Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a [read] cmd for parity with [write] #63

Open
anoved opened this issue Dec 18, 2012 · 0 comments
Open

Add a [read] cmd for parity with [write] #63

anoved opened this issue Dec 18, 2012 · 0 comments
Assignees

Comments

@anoved
Copy link
Owner

anoved commented Dec 18, 2012

Could be used as a compact alternative to the following compound foreach construct:

foreach feature [$shp coord read] record [$shp attr read] {
    # process feature and record
}

The [read] method would return a two-element list containing the coordinate list and the attribute record. With no index argument, these lists would include all entities; with an index argument, they would be the coordinate and attribute data of the specified index.

foreach {feature record} [$shp read] {
    # process feature and record
}
@ghost ghost assigned anoved Dec 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant