[gdal-dev] Degree symbols

Even Rouault even.rouault at spatialys.com
Thu Apr 29 06:56:32 PDT 2021


Why not. AFAICS CPLDecToDMS isn't used by GDAL anywhere else than in 
gdalinfo. But we'd need CPLDMSToDec() to be adapted to accept the old 
and new variants. you'll need to match the 2 bytes 0xC2 0xB0 for the UTF-8 °

Le 29/04/2021 à 15:44, Andrew C Aitchison a écrit :
>
> Now that PROJ data includes "AREA" descriptions with degree symbols,
> what to people think about the attached patch which makes CPLDecToDMS
> report angles with the degree symbol too ?
>
> Sadly, the reverse function CPLDMSToDec will need more work as we
> cannot fudge the fact that the degree symbol is a wchar there.
>
> ----- Sample output from
> -----     gdalinfo ./swig/java/test_data/byte.tif
> Driver: GTiff/GeoTIFF
> Files: ./swig/java/test_data/byte.tif
> Size is 20, 20
> Coordinate System is:
> PROJCRS["NAD27 / UTM zone 11N",
>     BASEGEOGCRS["NAD27",
>     ...    ...
>     USAGE[
>         SCOPE["Engineering survey, topographic mapping."],
>         AREA["North America - between 120°W and 114°W - onshore. 
> Canada - Alberta; British Columbia; Northwest Territories; Nunavut. 
> Mexico. United States (USA) - California; Idaho; Nevada; Oregon; 
> Washington."],
>         BBOX[26.93,-120,78.13,-114]],
>     ID["EPSG",26711]]
> Data axis to CRS axis mapping: 1,2
> Origin = (440720.000000000000000,3751320.000000000000000)
> Pixel Size = (60.000000000000000,-60.000000000000000)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  440720.000, 3751320.000) (117°38'28.21"W, 33°54' 8.47"N)
> Lower Left  (  440720.000, 3750120.000) (117°38'27.92"W, 33°53'29.51"N)
> Upper Right (  441920.000, 3751320.000) (117°37'41.48"W, 33°54' 8.71"N)
> Lower Right (  441920.000, 3750120.000) (117°37'41.20"W, 33°53'29.75"N)
> Center      (  441320.000, 3750720.000) (117°38' 4.70"W, 33°53'49.11"N)
> Band 1 Block=20x20 Type=Byte, ColorInterp=Gray
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210429/e3f0377c/attachment-0001.html>


More information about the gdal-dev mailing list