[postgis-users] PostgreSQL geometric data types vs GEOMETRY data type

Peter Len peteralen at earthlink.net
Thu Jan 2 13:04:59 PST 2014


Thanks Baris.... here are the two table definitions:

-- Using default PostgreSQL geometric types
create table gis.cities (
   id serial primary key,
   name varchar(50),
   state varchar(2),
   geom point
);

-- Using PostGIS geometry types
create table gis.table_pt (
   id serial primary key,
   name varchar(50),
   state varchar(2),
   geom geometry(Point)
);


The select query below only worked when run against the PostGIS geometry
type:

SELECT id, name FROM gis.table_pt WHERE ST_DWithin(
  geom, 
  ST_GeomFromText('POINT(0 0)', 26910),
  1000
); 





--
View this message in context: http://postgis.17.x6.nabble.com/PostgreSQL-geometric-data-types-vs-GEOMETRY-data-type-tp5005378p5005381.html
Sent from the PostGIS - User mailing list archive at Nabble.com.


More information about the postgis-users mailing list