[postgis-users] creating a grid; transform error

pcreso at pcreso.com pcreso at pcreso.com
Thu Mar 15 20:48:21 PDT 2012


Hi,

No mercator projection can encompass the poles, as they are asymptotic & the latitude values approach infinity.

"Because the Mercator projects the poles at infinity, Google Maps cannot 
show the poles. Instead it cuts off coverage at 85° north and south."

Brent Wood

--- On Fri, 3/16/12, Puneet Kishor <punk.kish at gmail.com> wrote:

From: Puneet Kishor <punk.kish at gmail.com>
Subject: [postgis-users] creating a grid; transform error
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Date: Friday, March 16, 2012, 3:47 PM

I am trying to create a simple 1 deg x 1 deg grid and transform it to spherical mercator

    SELECT ST_Transform(ST_MakeEnvelope(minx, miny, maxx, maxy, 4326), 900913) the_geom
    FROM (
        SELECT lng minx, lat miny, (lng + 1) maxx, (lat + 1) maxy
        FROM (
            SELECT Generate_series(-180, 180, 1) lng, Generate_series(-90, 90, 1) lat
        ) series 
        WHERE (lng + 1) < 181 AND (lat + 1) < 91
    ) lat_lng


I get

    ERROR: transform: couldn't project point (-180 -90 0): tolerance condition error (-20)



What am I doing wrong?


--
Puneet Kishor
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120315/21ee0326/attachment.html>


More information about the postgis-users mailing list