[Qgis-developer] Difference for transform reference system between QGIS and GDAL

Even Rouault even.rouault at mines-paris.org
Fri Jan 17 11:49:59 PST 2014


Le vendredi 17 janvier 2014 20:43:13, Luiz Motta a écrit :
> Hi all,
> 
> Thank Jürgen for your  explanation about how QGIS set the reference system
> from source.
> 
> I agreement with André Joost about the user should  select your specific
> reference.
> 
> The source of my problem is the creating of shapefile by GDAL/OGR.
> 
> For creating shapefile, the OGR/GDAL not using  all parameters of reference
> system.
> 
> I resolve my problem, creating the GML file, in this case, the refefence
> system is identical of source.
> 
> How suggested Etienne i will raise this issue in gdal-dev list.
> 
> If someone want to see the script example:
> http://pastebin.com/PbjwdrHR

Just lurking at this thread :
- it is a design decision that OGR will discard parameters of the SRS when 
writing it in a .prj. The .prj format is ESRI WKT and ESRI WKT does not 
support TOWGS84 parameters. Perhaps we could try to write them, but I have no 
way of checking if ESRI software will accept such files
- on reading .prj, as being said above, OGR will not try to find a SRS in the 
EPSG database that would be close. The .prj could be a custom SRS with a 
different TOWGS84 database. (By the way, the TOWGS84 presented by GDAL when 
resolving an EPSG code is just the "preferred" one , but there are potentially 
other possible TOWGS84 parameters that are a better fit for the area of 
interest. This is a complex issue...)

> 
> Regards,
> Luiz Motta
> 
> 
> 
> 2014/1/17 Andre Joost <andre+joost at nurfuerspam.de>
> 
> > Am 17.01.2014 11:56, schrieb Luiz Motta:
> >  The question is exact this, why the QGIS read the PRJ and understands
> >  the
> >  
> >> 'towgs84', otherwise, the GDAL don't understands, where , the QGIS use
> >> the GDAL/OGR provider ?
> > 
> > This is an intended behaviour.
> > 
> > Other software (like ESRI) don't write datum shifts in the .prj file, but
> > leave it to the end user to select one of the available shifts. QGIS has
> > to handle these files correctly, so it looks up the EPSG table and
> > selects the best fitting code. If you think it has guessed wrong, you
> > can assign another CRS to the layer.
> > 
> > GDAL does no guessing. Unless there are not datum shifts provided on
> > source and target CRS (using either +datum, +towgs84 or +nadgrids), it
> > does no datum shift at all. You can specify -s_srs to override the
> > source file's .prj file with an EPSG code that contains a datum shift.
> > This should bring the same result as QGIS does automatically.
> > 
> > 
> > HTH,
> > André Joost
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the Qgis-developer mailing list