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

to_file(): 'long' isn't a valid Fiona property type #93

Closed
sgillies opened this issue Mar 25, 2014 · 0 comments · Fixed by #94
Closed

to_file(): 'long' isn't a valid Fiona property type #93

sgillies opened this issue Mar 25, 2014 · 0 comments · Fixed by #94

Comments

@sgillies
Copy link
Contributor

The question http://gis.stackexchange.com/questions/89206/geopandas-error-when-writing-to-file-valueerror-long-is-not-in-list revealed a bug to me.

If you pass schema={'geometry': 'Point', 'properties': {'foo': 'long'}} into fiona.open(), the type 'long' isn't found at https://github.com/Toblerity/Fiona/blob/master/src/fiona/ogrext.pyx#L973. OGR doesn't distinguish between long and int, so converting 'long' to 'int' within Fiona may help...

But :)

Fiona will always return 'int' in the .schema attribute and this could cause trouble for programs that pass 'long' and expect it to stick. So, let's fix up geopandas so it always uses 'int' and never 'long'.

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

Successfully merging a pull request may close this issue.

1 participant