Closed Mikejmnez closed 5 months ago
Agreed. This needs to be clarified. @Mikejmnez can you coordinate with Mitya?
@ThomasHaine I think that we should just have a "best practice" on the user side somewhere in the documentation. And we should have a warning or an error within oceanspy
that tells the user selected different geometry types with the poseidon viewer, and only one type was picked. What do you think?
Description
I am looking into poseidon viewer + oceanspy integration via
viewer2range
, and I noticed a behavior that is independent of OceanSpy and rather a feature of the poseidon viewer. Here is an example scenario:Notice there are several geometry types defined and selected by the poseidon tool, and so these will be copied into the clipboard bundled together. That action generates the following json:
Now this is confusing to me, because of my preconceived notion of geometry and functionality of the different ways in which poseidon viewer can "sample" coordinates. This is, the Poseidon viewer app has three ways to sample coordinate data, called
geometry
:Polygon
: A closed array of any shape with N vertices. min(N)=4 consisting of 3 different points.LineString
: An general open or closed array of N points. min(N) = 2.Point
: A single data point. min(N)=1The difference between them at sample time is the minimum number of points that a user needs to create with the tool, in order to select it and copy it the clipboard for use. But their biggest difference to me is their functionality.
I make the following assumptions regarding how to "best" use these geometries with
oceanspy
:Polygon
<----->cutout
,Linestring
<--->mooring_array
orsurvey_stations
Point
<----->stations
.And so going back to the example above, it feels wrong. And the reason why this is important is because the generated data by the poseidon viewer will be passed as arguments to
oceanspy
's subsample methods. And so the arguments (coordinates) must make sense.**question/proposition:
Are my preconceived ideas about shape and functionality off? I feel like the above case, when passing the json generated into
oceanspy.utils.viewer2range
should throw aWarning
and only select one type ofgeometry
from poseidon viewer data (e.g. the first one), or result in aError
. Either way there should be a clear message describing the relation between shape and functionality when integrating oceanspy and poseidon viewer...