<br><font size=2 face="Times New Roman">Radu,</font>
<br><font size=2 face="Times New Roman"> I
am somewhat confused. From my somewhat limited understanding of EPSG:4326
it's limited to values between 180, -180 for longitude and 90,-90 for latitude.
If your source geometry is epsg:4326, there should not be values
outside of those limits. Are you wrapping around those limits in
your geometry column to accomodate lines/polygons that cross those
boundaries ? ( Stretching my brain a bit here) Can you give examples
of coordinates that you have that are exceed these limits? </font>
<br>
<br><font size=2 face="Times New Roman">Doug</font>
<br>
<br>
<br><font size=2 face="sans-serif">Doug Newcomb
<br>
USFWS<br>
Raleigh, NC<br>
919-856-4520 ext. 14 doug_newcomb@fws.gov<br>
---------------------------------------------------------------------------------------------------------<br>
The opinions I express are my own and are not representative of the official
policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.
Life is too short for undocumented, proprietary data formats.</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>"Ilie, Radu"
<rilie@wsi.com></b> </font>
<br><font size=1 face="sans-serif">Sent by: postgis-users-bounces@postgis.refractions.net</font>
<p><font size=1 face="sans-serif">01/20/2011 08:33 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
PostGIS Users Discussion <postgis-users@postgis.refractions.net></font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">"PostGIS Users Discussion"
<postgis-users@postgis.refractions.net></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [postgis-users] Coordinates and
SRID - bound overflow, ST_Equals</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="Times New Roman">Doug,</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman">We do have the same problem. We
are in a situation where a central server has a column of type geometry
(SRID 4326) and it has points with latitude/longitude outside of (-180
-90,180 90). We need to retrieve the values from this column and insert
them into a local server where the column is of type geography. It doesn’t
work, we get errors like this:</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman">ERROR: Coordinate values
are out of range [-180 -90, 180 90] for GEOGRAPHY type</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman">Our solution for now is to modify
the PostGIS code and normalize points outside of (-180 -90,180 190) during
the cast to geography.</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman">The solution is cumbersome, because
it requires us to build PostGIS from source under Windows (the local server
is Windows 7). And that is a science project in itself.</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman">For reasons outside our control
we cannot change the type of the column on the central server, nor can
we move the local server to Linux. Is there any way to use the existing
functions in PostGIS to normalize points outside the allowed range for
geography? We need something that can be used during an implicit cast.</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman">Radu Ilie</font>
<br><font size=2 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman"><b>From:</b> postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <b>On Behalf Of
</b>Doug_Newcomb@fws.gov<b><br>
Sent:</b> Thursday, January 20, 2011 8:02 AM<b><br>
To:</b> PostGIS Users Discussion<b><br>
Subject:</b> Re: [postgis-users] Coordinates and SRID - bound overflow,
ST_Equals</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="Times New Roman"><br>
Balint</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
Would using the geography data type be more suitable to what you are trying
to accomplish?</font><font size=3 face="Times New Roman"> <br>
</font><font size=3 color=blue face="Times New Roman"><u><br>
</u></font><a href=http://postgis.refractions.net/docs/ch04.html#PostGIS_GeographyVSGeometry><font size=2 color=blue face="Times New Roman"><u>http://postgis.refractions.net/docs/ch04.html#PostGIS_GeographyVSGeometry</u></font></a><font size=3 face="Times New Roman">
</font><font size=2 face="Times New Roman"><br>
Doug Newcomb <br>
USFWS<br>
Raleigh, NC<br>
919-856-4520 ext. 14 doug_newcomb@fws.gov<br>
---------------------------------------------------------------------------------------------------------<br>
The opinions I express are my own and are not representative of the official
policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.
Life is too short for undocumented, proprietary data formats.</font><font size=3 face="Times New Roman">
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=47%><font size=1 face="Times New Roman"><b>Balint Persics <persicsb@gmail.com></b>
<br>
Sent by: postgis-users-bounces@postgis.refractions.net</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Times New Roman">01/20/2011 06:30 AM</font><font size=3 face="Times New Roman">
</font>
<p>
<br>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="Times New Roman">Please respond to<br>
PostGIS Users Discussion <postgis-users@postgis.refractions.net></font></div></table>
<br>
<td width=52%>
<br>
<table width=100%>
<tr valign=top>
<td width=9%>
<div align=right><font size=1 face="Times New Roman">To</font></div>
<td width=90%><font size=1 face="Times New Roman">postgis-users@postgis.refractions.net</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="Times New Roman">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="Times New Roman">Subject</font></div>
<td><font size=1 face="Times New Roman">[postgis-users] Coordinates and
SRID - bound overflow, ST_Equals</font></table>
<br><font size=3 face="Times New Roman"> </font>
<p>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br><font size=3 face="Times New Roman"><br>
<br>
</font><font size=2 face="Courier New"><br>
Hi,</font><font size=2 face="Times New Roman"><br>
</font><font size=2 face="Courier New"><br>
I have a very interesting problem, but I think some of you may have a<br>
solution for that.</font><font size=2 face="Times New Roman"><br>
</font><font size=2 face="Courier New"><br>
When I try to model Russia with EPSG:4326 coordinates, I "run out
of<br>
the bounds", e.g. Russia's extent is so wide, it overlaps the<br>
-180/+180 coordinate range of EPSG:4326, so the most<br>
eastern part is in the western Hemisphere. When inserting points to<br>
the geometry column, PostGIS allows me to insert both (186,45) and<br>
(-174,45) (the former is out of the bounds of the reference, the<br>
latter is okay). When I query the database whether these two points<br>
are equal with ST_Equals, I get a false result , but in reality, they<br>
are the same. I think there should be a version of ST_Equals which<br>
compares the geometries taking into account their SRID.</font><font size=2 face="Times New Roman"><br>
</font><font size=2 face="Courier New"><br>
Thanks,<br>
Balint</font><font size=2 face="Times New Roman"><br>
</font><font size=2 face="Courier New"><br>
-- <br>
Persics Balint<br>
_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@postgis.refractions.net</font><font size=3 color=blue face="Times New Roman"><u><br>
</u></font><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users"><font size=2 color=blue face="Courier New"><u>http://postgis.refractions.net/mailman/listinfo/postgis-users</u></font></a><tt><font size=2>_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@postgis.refractions.net<br>
</font></tt><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users"><tt><font size=2>http://postgis.refractions.net/mailman/listinfo/postgis-users<br>
</font></tt></a>
<br>