it should be possible to draw a polygon on the map, and have all objects (all plants) that are included in the perimeter. first mentioned in #2.
I'm still doubting how to do this. first of all, I doubt I want to offer a polygon, and I'm thinking of no more than a rectangle.
could it be implicit?
If we were selecting plants, as in a plant where … query, the rectangle could work as an extra implicit clause and geometry in rectangle. but this implicit clause becomes more complex the farther we move from plant: for accessions, it would be and plant.geometry in rectangle, for contact, it cannot be implicit, since a contact may be the source of the accession, or the person validating the accession. after all, also the geometry could be the place of collection or the current geographic placement. also, we would need an extra checkbox, enabling or disabling the geographic clause.
should it be explicit?
then the user would decide whether or not to have a geographic clause in the query.
easier for the the program, and clearer to the user.
so I decide for explicit, and that we only work with the clearly marked rectangle, not the moving map extents.
further, our API for the query accepts a GET, with a q parameter, and I wish to stay with GET, as opposed to moving to POST. staying with the GET, I would add a r parameter for the coordinates of the extremes of the selection rectangle. and I would encode the limits somehow, like using (base64.b64encode/decode + struct.pack/unpack).
whenever the user changes the text query, they need to press the search button to have the server execute the query. that's changing the q parameter. I would start with the selection rectangle automatically firing the query. that's changing the r parameter.
[x] API: decide the format, maybe WKB/WKT/json, maybe the b64 encoded 4 coordinates?
[x] client side: pass the in rectangle clause (this is a no-action for the user can write whatever they want, in the search clause)
[x] server side: accept and evaluate the in rectangle geographic clause
:stop_sign: client side: let user draw a polygon
:stop_sign: client side: let user edit the selection polygon
it should be possible to draw a polygon on the map, and have all objects (all plants) that are included in the perimeter. first mentioned in #2.
I'm still doubting how to do this. first of all, I doubt I want to offer a
polygon
, and I'm thinking of no more than a rectangle.could it be implicit? If we were selecting plants, as in a
plant where …
query, the rectangle could work as an extra implicit clauseand geometry in rectangle
. but this implicit clause becomes more complex the farther we move fromplant
: for accessions, it would beand plant.geometry in rectangle
, for contact, it cannot be implicit, since a contact may be the source of the accession, or the person validating the accession. after all, also the geometry could be the place of collection or the current geographic placement. also, we would need an extra checkbox, enabling or disabling the geographic clause.should it be explicit? then the user would decide whether or not to have a geographic clause in the query. easier for the the program, and clearer to the user.
so I decide for explicit, and that we only work with the clearly marked rectangle, not the moving map extents.
further, our API for the query accepts a GET, with a
q
parameter, and I wish to stay with GET, as opposed to moving to POST. staying with the GET, I would add ar
parameter for the coordinates of the extremes of the selection rectangle. and I would encode the limits somehow, like using (base64.b64encode/decode + struct.pack/unpack).whenever the user changes the text query, they need to press the search button to have the server execute the query. that's changing the
q
parameter. I would start with the selection rectangle automatically firing the query. that's changing ther
parameter.in rectangle
clause (this is a no-action for the user can write whatever they want, in the search clause)in rectangle
geographic clause :stop_sign: client side: let user draw a polygon :stop_sign: client side: let user edit the selection polygon