-
Notifications
You must be signed in to change notification settings - Fork 6
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
Geometry column not showing the points explicitly in the README example and MERGING issue. #25
Comments
This is due to changes in ArchGDAL since the readme what written. The order of the columns has no meaning and the geometry is only a matter of the
See also my link to the DataFrames join method in JuliaGeo/Shapefile.jl#56 (comment). This package directly returns a DataFrame, so you can use this directly. The geometries will stay intact. |
Thank you very much Martin @visr ! Regarding the other problem, this is what I want to do (GDF=GeoDataFrames): graph_file="input.shp" But the code gives error when reading the input file: LoadError: MethodError: Cannot Do you have any clue of how to solve this problem ? |
Nice, thanks! You could use git, but for small changes I often find it more convenient to click the edit (pencil) button on github; https://github.com/evetion/GeoDataFrames.jl/edit/master/README.md. Your issues actually looks like this one that came up recently on the ArchGDAL repository: yeesian/ArchGDAL.jl#223 Until that issue is fixed, perhaps you could save your data as GeoPackage and use that instead, since the issue is limited to shapefiles. |
Thanks @visr ! graph_file="input.shp" |
I think this should work: df = GDF.read("input.shp")
GDF.write("input.gpkg", df)
state_data = GDF.read("input.gpkg") It's a good idea to put 3 backticks around your code to make it easier to read by the way. If you write julia after your first 3 backticks it will even apply syntax highlighting.
|
Thanks @visr, It seems the problem starts from the begining when reading the file
because it gives:
Is there any solution for this? I have tried to read directly with
It works ok for reading, but afterwards I cannot use the command:
because it gives:
Thank you very much, |
Ah sorry I missed that it failed on |
Can this be closed? |
Hi @evetion:
I have run the example commands in the README file from a Jupyter notebook that accepts Julia.
When I run:
df = GDF.read("test_points.shp")
I obtain a similar table to the one in the example but with the following differences:
The geometry is in the first column and the points do not appear explicitly but only says:
Geometry: wkbPoint
What can be the cause of the difference ?
The other questions is if I can use GeoDataFrames to merge a shapefile with a data frame when both
objects have a column in common. I want to preserve all the shapefile geometric structure.
Thank you very much,
Martín
The text was updated successfully, but these errors were encountered: