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

CRS not associated with geometries? #114

Open
asinghvi17 opened this issue May 7, 2024 · 7 comments
Open

CRS not associated with geometries? #114

asinghvi17 opened this issue May 7, 2024 · 7 comments

Comments

@asinghvi17
Copy link
Member

When loading a Shapefile with defined CRS, the individual geometries always have GI.crs(geom) === nothing, even though GI.crs(table) isa GeoFormatTypes.ESRIWellKnownText. Would this need some form of refactor to store CRS in geometry as well?

@rafaqz
Copy link
Member

rafaqz commented May 7, 2024

Yes, there are no crs fields in the objects here. We could add them to most, but probably not to points.

And I guess strings are not actually copied/inlined for every polygon they are attached to? Its just a pointer to the same string underneath?

@asinghvi17
Copy link
Member Author

I think so? Strings are heap allocated, so presumably yes, and Base.summarysize doesn't tell you whether there's a pointer there or not.

@asinghvi17
Copy link
Member Author

Yes, I just checked and the pointer to the strings is the same for multiple geometries initialized with the same CRS object.

@asinghvi17
Copy link
Member Author

asinghvi17 commented Sep 23, 2024

Maybe it's a bad idea, but we could just wrap every Shapefile geometry as a GI geometry when they're returned from Handle....then the GI wrapper can hold crs.

@rafaqz
Copy link
Member

rafaqz commented Sep 23, 2024

Hmm maybe that will just work? But its a weird nested object in terms of default types. I think adding a field is better.

@asinghvi17
Copy link
Member Author

I guess we would add a crs argument to all read functions in Shapefile.jl?

@rafaqz
Copy link
Member

rafaqz commented Sep 23, 2024

Ah right that's kind of annoying but yes probably

And pass the crs through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants