-
Notifications
You must be signed in to change notification settings - Fork 33
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
KML -> Records (GeoJSON) #5
Comments
QGIS can do that. |
QGIS uses GDAL/OGR for this reason is very easy use the python interfaces to OGR/GDAL ogr2ogr -f "GeoJSON" file.geojson file.kml |
I've written some code for the KML bits in a branch. Can someone give me a reality check on whether I'm headed in the right direction? I intend to add a Python Geo Interface if this is indeed the right direction. |
Not sure why you need the Python Geo Interface - could you not just return geojson style python record objects (doing the python geo interface will require you creating proper "Record" objects which then implement that interface). Regarding the code, as I'm not a KML expert, it is hard to tell whether this is right - could you add an example test (even a failing one) - that would at least tell me which kml file to look at it and an idea of what you expect output to be. |
Implementing the Python Geo Interface has the advantage that if I do Well, I think the problem is, I'm not sure what the output should be. I already do have a test with prints out the current output. You can see if you run |
@nigelbabu have you pushed all the code you have here or do you still have stuff on disk? |
@rgrp I have nothing on-disk. I'm hoping to talk to Adria and get some help to kick this code off my plate. |
Suggest we just have a kml_parse method that yields iterator over geojson style python dicts.
Implementation
Various options here.
Note this is not supported by Fiona bindings for gdal (atm)
Other libraries:
The text was updated successfully, but these errors were encountered: