[postgis-users] ST_Intersects

Paul Ramsey pramsey at opengeo.org
Mon Jun 13 09:47:49 PDT 2011


You're thinking in straight lines, not great circles. Here's what your
"box" actually looks like

http://www.gcmap.com/mapui?P=10N+170E-10N+0E%2C%0D%0A10N+170E-5N+170E%2C%0D%0A5N+170E-5N+0E%2C%0D%0A5N+0E-10N+0E&MS=wls&DU=mi

I can see how that could hit your Russian foot print.

P.

On Mon, Jun 13, 2011 at 6:54 AM, Mahesh Ghule <mahesh.ghule at gmail.com> wrote:
> Hello Guys,
> After lot of head scratching I have decided to post this email.
> We have a PostGIS 1.5.1 on PostgreSQL 8.4
> select
> ST_AsText('0105000020E6100000010000000102000000020000009FAEEE586C8C5240029CDEC5FBF94D406B44300E2EDB5140D591239D81D14C40'::geography)
> as TextFootPrint,
>
>  ST_Intersects('0105000020E6100000010000000102000000020000009FAEEE586C8C5240029CDEC5FBF94D406B44300E2EDB5140D591239D81D14C40'::geography,
> ST_GeographyFromText('POLYGON((0 10,170 10,170 5,0 5,0 10))')) as
> Intersects;
> yields following result
> TextFootPrint
>                   |          Intersects
> -------------------------------------------------------------------------------------------------------------------
> MULTILINESTRING((74.194113 59.952996,71.424686 57.636768))      |          t
>
> Which as I understand is not correct. The footprint is a line string
> somewhere over Russia and the Polygon is a band in north hemisphere just
> above equator.
> Also when I visualise the both geographies as KML in google earth I can see
> them thousands of miles apart.
> This is just one example footprint where I have tens of thousand more in my
> DB like this.
> Please help me understand what is going on?
>
> Regards,
> Mahesh
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>



More information about the postgis-users mailing list