[gdal-dev] [Gdal-dev] python - reproject a shapefile

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] [Gdal-dev] python - reproject a shapefile

Nikos Argiropoulos
As you can see in this post, I try to reproject a shapefile based on the projection info that I get from a raster, but the output shapefile is completely wrong. I cannot seem to find a solution to this problem as the code seems to work without errors. Could you please help?

Thank you in advance!

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Gdal-dev] python - reproject a shapefile

Rutger
Hey,

As you already mention in your post, you didn't specify a SRSfor the input,
that's probably the main issue. Inputs need to be georeferenced correctly.

If you 'only' want to do a reprojection, you could consider using the
bindings to the command line utilities. This would simplify you code a lot,
reducing the possibility of bugs. Something like:

/dsvec = gdal.VectorTranslate('output.shp', 'input.shp' srcSRS=input_srs,
dstSRS="EPSG:32633")
dsvec = None /

Usually you don't have to specify the input SRS, but since yours is missing,
you can assign (overrule!) it like this.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev