[gdal-dev] Problem re-projecting shapefile by using ogr2ogr
deb
otrov at hush.ai
Wed Dec 12 17:36:39 PST 2012
You are right. What I wrote doesn't make any sense. It just solved my initial problem, which blinded me to think that I solved my more general problem, and that is how to deal with all these projections and reference systems. I'm very new to GIS
New ground control point feature solved my problem, but also `-a_srs` switch could have solved it the same way, as I apparently didn't needed re-projecting but just assigning new projection.
My initial problem was that I was working in one projection, and then wanted to check the result in different projection (physical google maps)
Any use of `-t_srs` switch did change to shapefile itself, but vector did not overlay as coordinates were different.
What -gcp switch did, and even more simpler `-a_srs` does, is just change .prj file from shapefile, while shapefile itself is intact. Result seems correct and I take it as is, until I understand how projections and reference systems works.
Cheers
13.12.2012 at 2:02 AM, "Eli Adam" wrote:
>
>> ogr2ogr can't "re-project" - that is apply transformation - it
>can only set/change it.
>
>I'm not sure that I understand your above wording. But I think
>that
>ogr2ogr can reproject data (prior to #4602 as well). On the help
>page,
>http://gdal.org/ogr2ogr.html, you may want to look at:
>
>-a_srs srs_def:
> Assign an output SRS
>-t_srs srs_def:
> Reproject/transform to this SRS on output
>-s_srs srs_def:
> Override source SRS
>
> (the example at the bottom of the help page which has been there
>for
>along time does a reprojection).
>
>The help page and searching the email list (nabble for instance,
>http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html) are
>often
>better resources to try before a general web search.
More information about the gdal-dev
mailing list