I am looking for inspiration. I am working with a dataset representing movement of material. So a record contains the source location polygon, the destination location polygon, and properties describing the type and amount of materials, the date when the move was made etc…
This record description is hard to fit with the existing WFS/WMS/WCS feature model, as these have only 1 location, and I have 2.
I see 2 main ways to deal with this:
A) Merge the 2 polygons together in a multipolygon, and use a Z or M coordinate for tagging (like 0=source 1=destination). This is a bit of a semantic crime, and not all software deals well with Z and M (what does M stand for? I found ‘Milestone’ in some docs)
B) Create 2 features for each record, and provide an id to link them together. This is annoying for client software, which has to grab everything twice and merge it together.
C) Represent one of the 2 polygons as a text field, e.g. using WKT.
I’ve gone for B) for now, but none of these options is fully appealing. If anyone has a better idea, I’d love to hear it.
maybe I’m misunderstanding, but neither WMS nor WFS limit you to a single geometry, you can have as many geometry properties as you like, although it makes usage a bit more complex:
In WMS styles, you have to use the <geometry> tag and indicate which geometry property you want to use, if it’s not the first one in the table (that’s the default one)
In WFS you have to be explicit about which geometry you’re filtering against, for BBOX filters, so you basically need to use CQL/OGC Filter all the time
where there is a difference between geometry and properties. But if I understand you, that’s not inherent to the WFS/… standards, which is interesting. I’ll have to do a reading of the standards in question.
GeoJSON does not support multiple geometries natively. As a workaround it is possible to place one geometry into standard “geometry” and additional geometries under “properties”. GML, that is also the default outputformat in WFS, does support multiple geometries per feature. See an example from the GDAL test dataset gdal/autotest/ogr/data/gml/bbox_and_several_geom_elements.gml at master · OSGeo/gdal · GitHub.
Yes, it is “some measure”. Often it is a distance, but it can mean something else as well. From the OGC Simple Features standard:
A Point value may include an m coordinate value. The m coordinate value allows the application environment to associate some measure with the point values. For example: A stream network may be modeled as multilinestring value with the m coordinate values measuring the distance from the mouth of stream. The method LocateBetween may be used to find all the parts of the stream that are between, for example, 10 and 12
kilometers from the mouth. There are no constraints on the m coordinate values in a Geometry (e.g., the m coordinate values do not have to be continually increasing along a LineString value).