[postgis-users] Postgis Transform Problem

Benjamin Wragg bwragg@tpg.com.au
Tue Jul 1 06:43:46 2003


I tried the cs2cs utility. I think I'm passing the correct paramaters.
If I enter the following:

	cs2cs +proj=latlong +ellps=WGS84 +to +proj=merc +lon_0=150.0 
	180 90

I get 

	*	* 0.00

If I type any other coordinate I get a figure back. So is the cs2cs
utility what Postgis uses to project it's coords? If it does, it seems
this is whats causing the problem.

Thanks,

Benjamin

-----Original Message-----
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Paul
Ramsey
Sent: Wednesday, 25 June 2003 10:55 PM
To: bwragg@tpg.com.au; PostGIS Users Discussion
Subject: Re: [postgis-users] Postgis Transform Problem


Those coordinates are right on the edge of the global plane, could be 
hitting the edge of validity in the reprojection library. Try testing 
the same stuff directly using the proj4 cs2cs utility.

On Tuesday, June 24, 2003, at 10:35 PM, Benjamin Wragg wrote:

> I'm having a problem with the transform function in Postgis. If I run
> the following query:
>
> select transform(GeometryFromText('MULTIPOLYGON(((112 -45 ,112 -10
> ,155 -10 ,155 -45,112 -45)))',4326),54004)
>
> I get:
>
> SRID=54004;MULTIPOLYGON(((12467782.9688466
> -5591295.91855339,12467782.9688466 -1111475.10285223,17254521.0729574 
> -1111475.10285223,17254521.0729574 -5591295.91855339,12467782.9688466 
> -5591295.91855339)))
>
> But if I do:
>
> select transform(GeometryFromText('MULTIPOLYGON(((-180 -90 ,-180 90
> ,180 90 ,180 -90,-180 -90)))',4326),54004)
>
> I get:
>
> Error: transform: couldn't project polygon
> Warning: Error occurred while executing PL/pgSQL function transform
> Warning: line 2 at return
>
> Any ideas why? I turned the postgresql log level to debug5 to see if I
> could get more detailed errors, but it's exactly the same error. I'm 
> running postgresql 7.3.2, postgis 0.7.5 and proj 4.4.7
>
> Thanks,
>
> Benjamin Wragg
>
>
      Paul Ramsey
      Refractions Research
      Email: pramsey@refractions.net
      Phone: (250) 885-0632


_______________________________________________
postgis-users mailing list postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users