[PROJ] Understanding dropped parameters for stere and latlong

David Hoese dhoese at gmail.com
Sun Apr 12 14:53:23 PDT 2020


Thanks Even,

 >There's no way in standard WKT to express a longitude of origin != 0 
for a GeographicCRS. If you export to WKT1_GDAL, a EXTENSION[] node 
captures this however. Or if you re-export back to PROJ string the CRS 
object built from "+proj=latlong +lon_0=45", you'll get back the 
original string.

So if I use WKT2 as my standard in-memory/serialized version of a CRS, 
is there any standard way to handle a geotiff that goes over the 
anti-meridian (-180/180)? In the past I've played around with `+over` or 
changing with `+lon_0=X`, but those won't work here it seems.

Thanks.

Dave

On 4/12/20 2:50 PM, Even Rouault wrote:
> David,
> 
>  > I noticed that the `lat_ts` parameter gets dropped for any case where
> 
>  > `lat_0` isn't -90 or 90. Is this expected?
> 
> Yes. Given what is supported in the mathematical part of PROJ, either 
> you have Polar Stereographic (lat_0=+/-90, and lat_ts), or Oblique 
> Stereographic (lat_0 != +/-90, and k_0)
> 
> Previous PROJ versions might have returned the string you provided, but 
> that didn't mean all the parameters you specified were taken into account.
> 
>  > Is it no longer valid (or maybe it never was) to specify a "lon_0" for a
> 
>  > lat/lon projection:
> 
>  >
> 
>  > crs = CRS("+proj=latlong +lon_0=45")
> 
>  >
> 
>  > crs.to_wkt()
> 
>  > # Outputs:
> 
>  > 'GEOGCRS["unknown",DATUM["World Geodetic System 1984",ELLIPSOID["WGS
> 
>  > 
> 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["Gr
> 
>  > 
> eenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellips
> 
>  > 
> oidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.017453292519943
> 
>  > 
> 3,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174
> 
>  > 532925199433,ID["EPSG",9122]]]]'
> 
> There's no way in standard WKT to express a longitude of origin != 0 for 
> a GeographicCRS. If you export to WKT1_GDAL, a EXTENSION[] node captures 
> this however. Or if you re-export back to PROJ string the CRS object 
> built from "+proj=latlong +lon_0=45", you'll get back the original string.
> 
> Even
> 
> -- 
> 
> Spatialys - Geospatial professional services
> 
> http://www.spatialys.com
> 


More information about the PROJ mailing list