-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate and return a polygon based on the vds trace mask #51
Comments
SummaryI did some research into different algorithms and libraries. However, at the moment we cannot implement the feature as we want. As the OpenVDS documentation states about name channels [(Trace channel in our case)](https://osdu.pages.opengroup.org/platform/domain-data-mgmt-services/seismic/open-vds/vds/specification/Metadata.html#named-channels
In our case all traces are present during the conversion. This means the trace mask is full of ones in our case. This makes is unfeasible at the moment to extract a bounding polygon around the existing data, i.e., points were data is typically different from the "no Value". Below I summarize some results of the research about edge/contour tracing, polygon reconstruction and polygon formats. Accessing trace mask in OpenVDSIf one accesses the trace mask ( Note that the bit mask will always contain a number of bits that is a multiple of 8 (since there are 8 bits within each AlgorithmsOne could potentially implement the contour tracing (or edge tracing) algorithm ourselves if needed. Possible choices are
FavoritesThe algorithms below could be a good fit. The Suzuki algorithms can even establish the hierarchy of edges/contours.
Libraries for tracking contours and edgesNote that this overview contains also lots of libraries or tools for Python or special data bases for geographic information systems (GIS).
For C++, most examples point to OpenCV. OpenCV is often also the backend used by Python packages. FavoriteFor a quick test I set up a small C++ example that obtains the contour of an artificial bitmask. This worked quite well, but is lacking the polygon representation. Additionally, OpenCV might be a rather large dependency compared to what we actually want to achieve by extracting the contour. Formats to represent polygons
Conversion of pixels to polygons |
At the moment we cannot fix this issue in a simple way. Therefore, I will mark the issue as |
The polygon of the bounding box of the volume is trivially available as metadata in the vds through entries such as origin, rotation, spacing and number of samles.
More useful however, might be the the polygon of the trace mask. I.e. where the volume contains data. This would include cut of edges and corners in irregular sized cubes as well as holes.
This should be and entry in the /metadata endpoint. The representation should match common polygon representation for easy integrations with other formats. E.g. PostGis defines them like this:
For us a list of points might make more sense than a string, but we can reuse the shape.
The text was updated successfully, but these errors were encountered: