[postgis-users] Spatial Ref Sys oops

Paul Ramsey pramsey at refractions.net
Sat Mar 15 11:25:03 PST 2003


The spatial_ref_sys file might not have good definitions it it, 
depending on the version you are using. I am pretty sure the current CVS 
version has all the correct definitions though. I am attaching an epsg 
file I know has the right definitions for the strange "stateplane in 
feet" projections. The "to_meter" parameter should be sufficient to do 
the units transform. Note that in proj for, all the offsets are in 
meters, even when the output projection is in feet. Fun.

Carl Anderson wrote:
> I have been have some problems using transform(geometry,srid)
> 
> I tracked it down to an oops in the spatial_ref_sys file
> 
> For SRID's that are in coordinate units other than meters this is true.  
> SRID's tha are in meters are not affected by this.
> 
> using SRID 102667  --  NAD83 Georgia West (FIPS 1002) US Feet as an example
> 
> The srtext field shows the false easting in meters not in feet (the 
> projections coord units).
> Additionally proj4 needs a units parameter otherwise it will not change 
> coordinate units.
> 
> 
> 
> -----------------------------------------------------------
> initially
> 
> select transform('SRID=102667;POINT(2284248.581058 
> 314340.180605)'::geometry,4267);
>                       transform
> -----------------------------------------------------
>  SRID=4267;POINT(-100.609237649977 29.8157860269902)
> 
> wrong location
> 
> fixing the proj4text from
> 
> +proj=tmerc +lat_0=30.000000000 +lon_0=-84.166666667 +k=0.999900 
> +x_0=2296583.333 +y_0=0.000 +ellps=GRS80 +to_meter=+0.3048006096
> 
> BY (for grins throw a proj4.4.5 datum also)
> 
> update spatial_ref_sys set proj4text = '+proj=tmerc +lat_0=30.000000000 
> +lon_0=-84.166666667 +k=0.999900 +x_0=700000.00 +y_0=0.000 +ellps=GRS80 
> +units=us-ft +datum=NAD83' where srid = 102667;
> 
> then produces the correct results
> select transform('SRID=102667;POINT(2284248.581058 
> 314340.180605)'::geometry,4267);
>                      transform
> ----------------------------------------------------
>  SRID=4267;POINT(-84.2060804142583 30.864143821645)
> 
> 
> 
> C.
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: esri
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20030315/60f94a55/attachment.ksh>


More information about the postgis-users mailing list