Jody Garnett ha scritto:
> On 13/06/2010, at 5:19 PM, Andrea Aime wrote:
> 
>> My guess is that anybody using a CRS with DMS unit is actually storing
>> the data in decimal deegrees, and that providing actual support for
>> the DMS unit transformation would just result in confused users.
>>
>> 2150 is one of such codes, if I look at spatialreference.org they
>> are using deegree as well:
>> http://www.spatialreference.org/ref/epsg/2150/html/
> 
> I hate making assumptions with any of this stuff; any way to contact the 
> spatialreference.org (or proj?) about this assumption to see if it common?

They publish straight the postgis srs tables:

select srtext from spatial_ref_sys where srid = 2150;

PROJCS["NAD83(CSRS98) / UTM zone 17N 
(deprecated)",GEOGCS["NAD83(CSRS98)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS
 
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4140"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2150"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]

postgis=# select srtext from spatial_ref_sys where srtext like '%dms%';
  srtext
--------
(0 righe)

postgis=# select srtext from spatial_ref_sys where srtext like '%DMS%';
  srtext
--------
(0 righe)

The units come directly from what proj supports, which is either an
angle or:

           km 1000.                Kilometer
            m 1.                   Meter
           dm 1/10                 Decimeter
           cm 1/100                Centimeter
           mm 1/1000               Millimeter
          kmi 1852.0               International Nautical Mile
           in 0.0254               International Inch
           ft 0.3048               International Foot
           yd 0.9144               International Yard
           mi 1609.344             International Statute Mile
         fath 1.8288               International Fathom
           ch 20.1168              International Chain
         link 0.201168             International Link
        us-in 1./39.37             U.S. Surveyor's Inch
        us-ft 0.304800609601219    U.S. Surveyor's Foot
        us-yd 0.914401828803658    U.S. Surveyor's Yard
        us-ch 20.11684023368047    U.S. Surveyor's Chain
        us-mi 1609.347218694437    U.S. Surveyor's Statute Mile
       ind-yd 0.91439523           Indian Yard
       ind-ft 0.30479841           Indian Foot
       ind-ch 20.11669506          Indian Chain

See also:

http://osdir.com/ml/gis.mapserver.user/2004-04/msg00759.html

>> What about:
>> a) go down and just change the current behavior to just use
>>   decimal degrees. Rationale: CRS with DMS are not usable anyways,
>>   so we don't have backwards compatibility issues from that pov
> 
> Any way we can only do that when lenient  is true?
> 
>> b) alternatively, add a flag to control the DMS/degree behavior.
> 
> I would prefer to add a flag; even if the default value is true.

Cool. Any reasoning behind the preference?

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to