Using st_intersects without a defined projection

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using st_intersects without a defined projection

Trang Nguyen

Hello,


I have two tables with geometry columns defined as

geometry(POINT), geometry(LINESTRING), and geometry(MULTIPOLYGON), passed in as a sequence of lon/lat coordinates.

I don’t have any projection defined on these tables, so I believe it’s using the system SRID of 0.

 

Would I get accurate results if were to do an st_intersects(table1.point_col, table2.multipoly_col), or st_intersects(table1.linestring_col, table2.multipoly_col)?

 

When would it be better to define projection (4326) for these columns?

 

Thanks,
Trang

 

 


_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Using st_intersects without a defined projection

Sandro Santilli-2
On Thu, Feb 12, 2015 at 01:40:00AM +0000, Trang Nguyen wrote:
> Hello,
>
> I have two tables with geometry columns defined as
> geometry(POINT), geometry(LINESTRING), and geometry(MULTIPOLYGON), passed in as a sequence of lon/lat coordinates.
> I don't have any projection defined on these tables, so I believe it's using the system SRID of 0.
>
> Would I get accurate results if were to do an st_intersects(table1.point_col, table2.multipoly_col), or st_intersects(table1.linestring_col, table2.multipoly_col)?

Yes.

> When would it be better to define projection (4326) for these columns?

When you want to deal with data in different projections, or if you want
to use the "geography" type. As these events might occur at some later
time it's easier if you have the SRID defined earlier. Changing the SRID
later would require a full table rewrite. Defining a SRID does not change
the storage size.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users