Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support QGIS .qpj files #34

Closed
springmeyer opened this issue Nov 7, 2013 · 6 comments
Closed

Support QGIS .qpj files #34

springmeyer opened this issue Nov 7, 2013 · 6 comments

Comments

@springmeyer
Copy link

Turns out QGIS writes its own projection file - some variant of OGC WKT with extras like EXTENSION["PROJ4_GRIDS". Got a hold of one from a user running QGIS 1.8:

PROJCS["unnamed",GEOGCS["Clarke 1866",DATUM["unknown",SPHEROID["clrk66",6378206.4,294.9786982139006],EXTENSION["PROJ4_GRIDS","@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.9999333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Foot_US",0.3048006096012192]]
springmeyer pushed a commit that referenced this issue Nov 7, 2013
@springmeyer
Copy link
Author

/cc @timlinux - can you help me understand whether a QGIS .qpj is intended for use outside of QGIS? In this case a report came in of data lining up correctly in QGIS but not in the tilemill. The difference is the .qpj leads to a proj4 string like:

+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat +units=us-ft +no_defs

while the .prj results in:

+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +units=us-ft +no_defs

In TileMill I can start looking for an preferring .qpj files over .prj files if they exist. But want to make sure you think this is a good idea. Are .qpj files around for the long haul? Will their format change? They basically look like valid OGC WKT right now + extra details.

@timlinux
Copy link

timlinux commented Nov 7, 2013

@springmeyer Hi. Yeah I think you can reasonably expect the .qpj file to stick around for the long term. You can see the back story for adding .qpj here:

http://hub.qgis.org/issues/2123
http://hub.qgis.org/issues/2154

cc @jef-n in case he has any further comments to make.

@springmeyer
Copy link
Author

Thanks @timlinux. So, @jef-n: is there any formal documentation of this file and its format I can link to if I were to document that TileMill supports it?

@jef-n
Copy link

jef-n commented Nov 7, 2013

It's what GDAL's OSRExportToWkt() returns and what can fed into OSRImportFromWkt() without hassle. While OGR morphs the WKT into an ESRI WKT format for the .prj and back - and that's not lossless IIRC.

@springmeyer springmeyer changed the title .qpj - who knew? Support QGIS .qpj files May 1, 2014
@sgillies
Copy link

sgillies commented May 5, 2014

@springmeyer Review of node-srs issues is part of my getting up to speed on the project. Since we've got a test for this since cb6ce7c I'm closing.

@springmeyer
Copy link
Author

great, thanks @sgillies - yes, nothing more to do here as node-srs handles without any changes. As far as preferring .qpj over .prj this would be handled by some application calling node-srs and in the case of TileMill that's millstone, so tracking over at tilemill-project/millstone#115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants