1

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.

1

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but as I stated in the last point of my question, I would invoke ST_ConvexHull on these points, which is in fact a special postgis function.
1

I'm able to accomplish this using regular old EPSG:4326 (i.e., 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)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.