简体   繁体   中英

PostGIS spatial reference ID (SRID) for regular cartesian coordinate system?

I would like to store a polygon as a set of 2D points represented as x, y coordinates of a Cartesian coordinate system.

Which spatial reference can I use? Looking at my spatial_ref_sys table, all the spatial references seem to be geography related.

The points of the polygon would represent satellite measurements which I would invoke ST_ConvexHull on to get the shape of the satellite footprint.

You don't have to store all data as geography related unless you will use specail postgis functions. You can store your cartesian point's x,y values as varchar or some other type available at postgres.

I'm able to accomplish this using regular old EPSG:4326 (ie, lat, lon points):

CREATE TABLE my_points (id SERIAL PRIMARY KEY, point GEOMETRY);
INSERT INTO my_points (id, point) VALUES 
  (1, ST_GeomFromText('POINT(12 23)', 4326)),
  (2, ST_GeomFromText('POINT(23 45)', 4326));
SELECT ST_AsText(ST_ConvexHull(ST_Collect(point))) FROM points;

Returns LINESTRING(12 23,23 45)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM