[mapserver-users] Problem with Russia polygon

Jan Hartmann j.l.h.hartmann at uva.nl
Tue Jan 5 16:38:49 EST 2010


I have seen the same problem several times. It could be a rounding 
problem: EPSG:900913 is the Mercator projection as used by Google, which 
is undefined at the Poles. Perhaps setting your extent a bit southward 
from the North Pole will solve the problem. Google maps does it too when 
you zoom to world scale, and even so, Antarctica is bigger than the rest 
of the world combined.

Jan

On 5-1-2010 15:05, Nelson Correia wrote:
> The problem seems to be with the re-projection from 4326 to 900913, which I'm doing with mapserver (hence, the map file configuration).
>
> If I configure the mapfile to use 4326 and make a request in 4326, the problem disappear. So, the re-projection to 900913 should be screwing the polygons at the edges of the map.
> I tried to re-project the polygons with postgis (st_transform), but I got the following error:
>
> 	ERROR:  transform: couldn't project point: -20 (tolerance condition error)
>
> Which I don't know the meaning.
>
> In the project I'm doing, I have to use 900913, so, if anyone have some ideas of how to solve this, they will be well appreciated.
>
> Thanks,
>
> Nelson
>
> -----Original Message-----
> From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi]
> Sent: segunda-feira, 4 de Janeiro de 2010 22:03
> To: Barend Köbben; Nelson Correia; Lime, Steve D (DNR); Andy Colson
> Cc: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] Problem with Russia polygon
>
> Hi,
>
> Unfortunately the extents are OK and the problem is something more complicated.  Extents are indeed in meters but that's how they must be because the MAP level projection looks like this:
>
> PROJECTION
> "init=epsg:900913"
> END
>
>
> -Jukka Rahkonen-
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users-bounces at lists.osgeo.org puolesta: Barend Köbben
> Lähetetty: ma 4.1.2010 22:52
> Vastaanottaja: Nelson Correia; Lime, Steve D (DNR); Andy Colson
> Kopio: mapserver-users at lists.osgeo.org
> Aihe: Re: [mapserver-users] Problem with Russia polygon
>
> You've got data that is in latlong (units decimal degrees) in your
> shapefile, however in the EXTENT part of the map file you use
>      EXTENT -20037508 -13590765 20037508 11229864
> Which are not latlomngs but some projected coordinates, and
>      UNITS meters
>
> IN the LAYER you tell mapserver that its:
> PROJECTION
>              "proj=longlat"
>              "datum=WGS84"
>              "no_defs"
>          END
>
> These two are contradictory. You'll have to match the PROJECTION in the
> LAYER to the actual projection and units (apparentlt these are correct) ,
> and make sure the EXTENT is expressed in the same system. So best thing is
> to set the EXTENT in latlons (as its the whole world -180 -90 180 90 is a
> safe bet) and UNITS to degrees...
>
>
> Yours,
>
>
>    


More information about the mapserver-users mailing list