[postgis-users] Problem with transformation (NAD80 to SPCS)

CYW cyw at dls.net
Fri May 26 16:17:21 PDT 2006


That surely fixes it.
Thanks both Brent and Michael.
_cyw_

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Brent
Pedersen
Sent: Friday, May 26, 2006 2:57 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Problem with transformation (NAD80 to SPCS)

hi, i just did a similar thing and make the same mistake...
POINT takes x y you have y x
try:
select AsText(Transform(GeometryFromText('POINT(-88.051944 41.783)',
4269), 99999));

-brent

On Fri, 26 May 2006, CYW wrote:

>
> Hi all,
>
> I need to project latitude and longitude points in NAD83 to SPCS. The
> projection as described in shapefiles prj file is as below:
>
>
PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet",GEOGCS["GCS_North_
> American_1983",DATUM["D_North_American_1983"
>
,SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT[
>
"Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["F
>
alse_Easting",984250.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_M
>
eridian",-88.33333333333333],PARAMETER["Scale_Factor",0.999975],PARAMETER["L
> atitude_Of_Origin",36.66666666666666],UNIT["Foot_US",0.3048006096012192]]
>
> This projection is not in the spatial_ref_sys table, the one that is close
> to it is SRID 26791, but it is in meter unit. So I creates a projection
and
> assigned it an SRID 99999.
>
> I tested it with a lat-long data point in NAD83 (SRID=4269), below is the
> sql I used:
>
> select AsText(Transform(GeometryFromText('POINT(41.783333 -88.051944)',
> 4269), 99999));
>
> The response I got, which is wrong, is:
> POINT(1531185.06921148 -46594510.0726977)
>
> Obviously, I am wrong somewhere.
>
> Thanks in advance for any advice.
>
> _CYW_
> ---------------------------------------------------------------------
> Below is the full screen capture showing the projection definition and
> transformation sql:
> mydb=#   select *  from spatial_ref_sys where  "srid"=99999;
> srid  | auth_name | auth_srid |     srtext   | proj4text
>
>
> 99999 | EPSG      |     99999 |
>
PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet",GEOGCS["GCS_North_
>
American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,2
>
98.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PR
>
OJECTION["Transverse_Mercator"],PARAMETER["False_Easting",984250.0],PARAMETE
>
R["False_Northing",0.0],PARAMETER["Central_Meridian",-88.33333333333333],PAR
>
AMETER["Scale_Factor",0.999975],PARAMETER["Latitude_Of_Origin",36.6666666666
> 6666],UNIT["Foot_US",0.3048006096012192]] | +proj=tmerc
> +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000
> +y_0=0 +ellps=GRS80 +units=us-ft +no_defs
> (1 row)
>
> mydb=# select AsText(Transform(GeometryFromText('POINT(41.783333
> -88.051944)', 4269), 99999));
>                  astext
> -------------------------------------------
> POINT(1531185.06921148 -46594510.0726977)
> (1 row)
>
>
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list