planetfederal / geogig-py

A Python library to use GeoGit
BSD 3-Clause "New" or "Revised" License
24 stars 14 forks source link

Error exporting to shapefiles #20

Closed jj0hns0n closed 10 years ago

jj0hns0n commented 10 years ago

Im seeing this error when trying to export to shapefile

geogitpy.geogitexception.GeoGitException: Error: The selected tree contains mixed feature types. Use --defaulttype or --featuretype to export.

The repo was created by importing shp to pg then making some modifications (deleting records, buffering a feature)

volaya commented 10 years ago

If the original layer was not a polygon one, after buffering you will have points/lines and the polygon resulting from the buffer operation. That cannot be exported to a shapefile, becasue there are mixed feature types in the tree to export.

I have added the --defaulttype switch, so in this case it will export only the features with the default featuretype, instead of failing