[Qgis-user] how does QGIS generate the EPSG from a Shapefile?

Jorge Gustavo Rocha jgr at di.uminho.pt
Thu Oct 25 11:59:27 PDT 2018


Oi Rodrigo,

Can you run ogrinfo in the command line? Like:

ogrinfo -al -so yourshape.shp

This will tell you the CRS detected by ogr.

ogr (and QGIS) uses the *.prj file. But there are known problems with
the WKT representation of CRS. Sometimes it is hard to know if two
different strings represents the same EPSG code.

For that reason, QGIS also writes and additional *.qpj. When it is
present, QGIS uses this textual representation to compare it against its
database and it always work.

But if you just have the *.prj along with the shapefile, both ogr and
QGIS might fail to detect the exact CRS.

Please share one *.prj that ogr fails to associate with a known EPSG.

Abraço,

Jorge

Às 13:27 de 25/10/18, Rodrigo Mariano escreveu:
> Hello everyone,
> 
> I would like to know: how does QGIS generate the EPSG from a Shapefile?
> 
> I ask this question, because I'm trying to upload a Shapefile by OGR,
> but the OGR doesn't
> insert the correct EPSG. So I need always open the Shapefile in QGIS to
> discover the
> EPSG before uploading it with OGR.
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Rodrigo
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

J. Gustavo
-- 
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor


More information about the Qgis-user mailing list