[postgis-users] Using st_intersects without a defined projection

Sandro Santilli strk at keybit.net
Thu Feb 12 00:51:34 PST 2015


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


More information about the postgis-users mailing list