3

I have experience in PostgreSQL but I am fresh new in PostGIS and I can see how quickly would I like it. I have extensively worked on time series and now I am discovering the spatial side of my data. I have installed PostGIS on my server and then I am wondering how to anwser tons of questions. Thus I am in the prospective part of my work and I have everything to learn.

Anyway, I would like to have some clues from GIS expert in order to take the good start. Basically, I am monitoring concentrations at constant places, but we also have some campaigns where we monitor concentrations when we are in motion. That is, we have, at least, a five dimension problem, spatial and time is tracked down by GPS and another dimensions are assessed by dedicated monitors.

I know that PostGIS have a multipoint object, but all example that I have seen on the web are limited to 4D. Is it possible to use this structure to store multiple concentrations in addition of space and time. If so, is there a simple way to get rid of extra dimensions such as concentrations and time, when we are just working on space? If I want to post process my data with QGIS, will I be able to use such structure?

  • Geometries as far as I know can have 2-4 dimensions: in addition to X and Y there can be either Z for height or M for one measure, or both. If you need more dimensions attach attributes to your geometries. – user30184 Dec 11 '15 at 9:12
  • Normally, time would be a separate column, and you can store, x,y,z plus measure in the geometry. Is that not enough? – John Powell Dec 11 '15 at 17:26
  • @ John Barça, what if I have many trajectories, will it be a table of points, I would like to have lines and then should I store time and concentrations in float[]? – jlandercy Dec 11 '15 at 22:00
  • What kind of queries are you going to be running? – John Powell Dec 14 '15 at 10:14
2

I know that PostGIS have a multipoint object, but all example that I have seen on the web are limited to 4D. Is it possible to use this structure to store multiple concentrations in addition of space and time. If so, is there a simple way to get rid of extra dimensions such as concentrations and time, when we are just working on space? If I want to post process my data with QGIS, will I be able to use such structure?

PostGIS supports up to four dimensions (x,y,z,m). That is all. I suggest never using m. Instead, store these attributes on the table instead.

However, if you want to do this with PostgreSQL and not PostGIS this answer may be of use.. Or at the least entertaining.

| improve this answer | |
1

In GIS, there is a concept for POINT, LINE and POLYGON (in a vector sense). There's no concept of LINE MADE OF POINTS, or SEQUENTIAL MULTI-POINT.

A multi-point dataset is simply many points grouped together with one set of attribute for the group.

For what you want to do, I think you just want to have something like:

id, station_id, datetime, geometry, observation_1, observation_2

If you want to display them together, you can style them by station_id, perhaps. You can also create a view that joins them into lines, to view a track, if that makes sense.

There is also a plugin for QGIS that does time-series visualisation (it does a real-time select based on a datetime range as you move a slider).

| improve this answer | |
  • One could argue there is no concept of line in GIS; They're all linesegments inherently made of points. I'm not sure what a sequential multi-point is, but the sequence of points inside determine geometric equality and can be significant. For comparison there is a native line type (storing Ax + By + C = 0). – Evan Carroll Feb 9 '17 at 4:12
  • But, @EvanCarroll, a linesegment only has one set of attributes for the whole line feature. The vertices that make up the line don't have individual attributes (aside from x, y, (z, m)). – Alex Leith Feb 9 '17 at 5:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.