Skip to content
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

addAssignment should be LineString-vs-Polygon-agnostic #14

Open
caver456 opened this issue Jan 27, 2021 · 2 comments
Open

addAssignment should be LineString-vs-Polygon-agnostic #14

caver456 opened this issue Jan 27, 2021 · 2 comments

Comments

@caver456
Copy link
Collaborator

right now, the downstream tool needs to remember the assignment style, so it can call either addAreaAssignment or addLineAssignment as needed. When editing an assignment it would be great to just leave the style as-is.

@caver456 caver456 changed the title addAsignment should be LineString-vs-Polygon-agnostic addAssignment should be LineString-vs-Polygon-agnostic Jan 27, 2021
@caver456
Copy link
Collaborator Author

Should probably just make a root function addAssignment where line-vs-polygon is an argument; hopefully the argument can be ignored when making a call to edit the assignment / if existingId is specified; will have to see if the sartopo API allows this.

tkdiff shows that the only differences are:

line assignment:
geometry->type = LineString
geometry->coordinates = points (a list of coord pairs)

area assignment:
geometry->type = Polygon
geometry->coordinates = [points] (a list of coord pairs, wrapped as a one-element list)

@caver456
Copy link
Collaborator Author

see comment in #116 - the full json must be specified when editing. That doesn't really affect the need to write the wrappers for addAssignment.

@caver456 caver456 transferred this issue from ncssar/sartopo_python Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant