Re: [postgis-users] st_transform, irreversible?

2010-08-17 Thread Paul Ramsey
It should be, our spatial_ref_sys is generated from gdal which generates from epsg. You have a pretty recent postgis, so I'm surprised it's missing. P On Tue, Aug 17, 2010 at 1:57 AM, Erik Rehn wrote: > Thank you guys! You were right, I had flipped the coordinates in the test I > made. > > But th

Re: [postgis-users] st_transform, irreversible?

2010-08-17 Thread Erik Rehn
Thank you guys! You were right, I had flipped the coordinates in the test I made. But that didn't explain the error I got in the KML. The solution to that was to add "+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0" to the spatial_ref_sys table for srid 3021. Why isn't that in there by default?

Re: [postgis-users] st_transform, irreversible?

2010-08-12 Thread Ricardo Bayley
very nice explanation Mike On Thu, Aug 12, 2010 at 11:39 AM, Mike Toews wrote: > Hi, > > Your coordinates may be flipped. Was it 59N 18E? If so, use x,y > notation: 'POINT(18 59)', which results in 'POINT(18.6 > 58.99905)', which is close enough. > > Also keep in mind that yo

Re: [postgis-users] st_transform, irreversible?

2010-08-12 Thread Mike Toews
Hi, Your coordinates may be flipped. Was it 59N 18E? If so, use x,y notation: 'POINT(18 59)', which results in 'POINT(18.6 58.99905)', which is close enough. Also keep in mind that you are outside the projection bounds: http://spatialreference.org/ref/epsg/3021/ (just a bit to

Re: [postgis-users] st_transform, irreversible?

2010-08-12 Thread Barend Köbben
I think that is because many projections can indeed not be reversed, i.e. the math is sometimes not straight formulas but iterative approximations and you'll get rounding errors, etcetera... -- Barend Köbben Senior Lecturer ITC ­ University of Twente, Faculty of Geo-Information Science and Earth

Re: [postgis-users] st_transform, irreversible?

2010-08-11 Thread Paul Ramsey
Removing the EPSG lookup from the equation changes nothing: echo "59 21" | proj +proj=tmerc +lat_0=0 +lon_0=15.808278 +k=1 +x_0=150 +y_0=0 +ellps=bessel +units=m +no_defs | invproj +proj=tmerc +lat_0=0 +lon_0=15.808278 +k=1 +x_0=150 +y_0=0 +ellps=bessel +units=m +no_defs 5

Re: [postgis-users] st_transform, irreversible?

2010-08-11 Thread Paul Ramsey
Seems to be an underlying problem with proj4: echo "59 21" | proj "+init=epsg:3021" | invproj "+init=epsg:3021" 58d49'47.733"E 21d2'54.745"N And that's without doing the datum shift part. P On Wed, Aug 11, 2010 at 1:10 PM, Erik Rehn wrote: > Hello Postgis Users! > > This is my first post on

[postgis-users] st_transform, irreversible?

2010-08-11 Thread Erik Rehn
Hello Postgis Users! This is my first post on this list so I will start by asking a simple (and probably stupid) question. :) While using ST_AsKml() to produce an overlay for Google Earth I noticed that all my geometries where shifted slightly south-east. I figured this had something to do with