[postgis-users] transform problem
ujunge at pmcentral.com
ujunge at pmcentral.com
Fri Apr 16 00:22:17 PDT 2004
Sorry for the therm. "not work" means, that an error message
"transform: couldnt project polygon"
is thrown by PostGis and the query is aborted.
The strange thing is, that
the individual statements (polygon with 1 ring)
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.1,-80 40)' ,4326)
,102013)
and
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.01,-80 40)'
,4326),102013)
work on my machine, but the combination (polygon with 2 rings)
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.1,-80 40),(-90 40,-85 35,-80 40,-90 40)
',4326),102013)
won't.
If I change the point "-70 40.1" to "-70 40.01" in the last statement,the
query is successfully executed.
When you say, this last statement is executed without any errors on OS/X,
it seems to me as problem with CYGWIN.
Uwe
-- Paul wrote:
What do you mean by "not work"? I ran both your test cases on OS/X
without problems. Do you mean you get a backend crash, or the wrong
answer, or what?
You could try and isolate the problem by running all your points
through the proj utilities and see if you can individually transform
them all, independent of PostGIS.
Paul
Paul Ramsey
Refractions Research
Email: pramsey at refractions.net
Phone: (250) 885-0632
On Thursday, April 15, 2004, at 09:40 PM, <ujunge at pmcentral.com> wrote:
hi,
i have following transformation problem:
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.1,-80 40),(-90 40,-85 35,-80 40,-90 40)
',4326),102013)
does NOT work, while
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.01,-80 40),(-90 40,-85 35,-80 40,-90 40)
',4326),102013)
does work (only the 40.1 changed to 40.01).
Also,
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.1,-80 40)'
,4326),102013)
and
select transform(GeometryFromText('POLYGON(
(-80 40,-75 35,-70 40.01,-80 40)'
,4326),102013)
do both induvidually work.
It doesen't matter, what kind of destination coordinate system i choose, as
long it's not longlat.
That means from my understanding, it is rather a data-handling problem
within the postgis transform-function than a projection problem within
proj4.
I had a couple of multipolygons and was trying to calculate the area
(in sqmeter or sqmiles) and had to reproject the data. But in 30% of all
cases
these queries did return an error. I manually simplified the multipolygons,
removed points and decimals in order to figure out if there is a
data-problem.
But even in the extremly simplified case shown above the same error occured.
I'm using W2K and compiled postgresql-7.4.1-3 with postgis-0.8.0 in CYGWIN
after running into troubles with postgis-0.8.1:
Reading some acrticles in the mailing list and trying very hard, i was not
able to figure out a way of getting the loader to write the database-name
into the created sql-statement(s), and the -D flag produced non readable
dumps.
But i have to say that the installation intructions are very well done !
Uwe Junge
PMCentral Systems, Inc.
4201 Pinefield Court
Fairfax, Virginia 22033
Tel: +1 (703) 378-0952
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.656 / Virus Database: 421 - Release Date: 4/9/2004
More information about the postgis-users
mailing list