[postgis-users] Non GIS uses of PostGIS: Any tips?

Greg Troxel gdt at lexort.com
Mon May 23 04:41:45 PDT 2022


Rory Meyer <rory.meyer at VLIZ.be> writes:

> [x,y,t data in local coordinate system]
>
> My question is how do you do this with a non-spatial SRID? Can I just
> use pixel locations as X,Y fields, set the SRID to 0 and get
> pixels/sec out of any ST_funcs? Is there some previous work done on
> creating a camera specific SRID (probably a bit overkill) to take into
> account distortions and transform pixel/sec to meter/sec?

Generally, a SRID is about a mapping to coordinates on earth (or some
other body).  But there is also the concept of a local coordinate system
for measurements on the earth, used in plane or ordinary surveying.
This is really what this student is doing, except they don't care about
positions on earth, just dish-relative.

Practically, I would suggest that any projected system with x/y axes
would do.  One thing that may matter is scale, as projections often have
an intentional distortion in the center to minimize the max distortion
over the area of interest.  But if you are taking data in a local system
and just assigning it to a projection, you have avoided that issue.

I suspect your SRID 0 idea may work.  Or you can use some real SRID,
perhaps a UTM zone, and transforms the pixel coordinates to the central
meridian.

You can certainly create a custom local projection.  People usually do
that so they can transform their x,y into geographic coordinates.

However, what you are doing fits the concept of "GEOMETRY" more than
"GEOGRAPHY" and I think you can just use the data and ignore the SRID
issues.

Converting pixels to meters makes some sense, but beware of doing all
your math in a 0.05m square when all geo things consider that the bottom
end of what's representable.  That may be ok in GEOMETRY, but I'd be
slightly wary.  You may wish to have a scale factor of 10^6 so that a
0.05m dish is 50000m in the database -- or perhaps it's really 500000.
Or maybe 10^3, to balance avoiding precision loss with other issues.

Definitely try a toy example.

My ramblings are a bit confused, but maybe they'll provoke someone to
tell you how I'm off.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220523/fdb5231d/attachment.sig>


More information about the postgis-users mailing list