Dateline polygons?

Joe Bussell joe at OTSYS.COM
Sun Jul 10 19:55:35 PDT 2005


I had to split all polygon segments that cross the dateline into two 
segments.  One ends at -180 plus EPSILON and +180 minus EPSILON.  I 
found the point of intersection with the meridian using a modified 
function from William's Aviation Formulary.

If you need more, please let me know.

If you find a better way, please let me know.

Joe Bussell
On Time Systems


Chris Helm wrote:

>Hello list,
>
>I have a large dataset stored in a postgis database
>that contains several thousand polygons. I'm storing
>the geometry in epsg:4326 and my mapserver application
>is in the same projection (initially). My problem is
>that a number of my polygons cross the dateline (from
>-179 to 179) and the results are pretty obvious.
>Instead of crossing the dateline, they stretch the
>across the globe.
>
>I've tried converting the coordinates so that they go
>from -179 to -181 and I get the same result. Whenever
>I switch projections (into polar-stereographic) they
>come in just fine, but when viewing the entire global
>extent in 4326 I get the error. 
>
>When I use coordinates like -181 to -182 the polygons
>never show up regardless of the projection. 
>
>I guess what I'm asking is if anyone has conquered
>this issue before?
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>  
>



More information about the MapServer-users mailing list