-
Notifications
You must be signed in to change notification settings - Fork 10
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
Create bounding box area calculation process #301
Closed
LukeParky
wants to merge
1
commit into
otakaro_digital_twin
from
256-Draw-Bounding-Box-Calculate-Area
Closed
Create bounding box area calculation process #301
LukeParky
wants to merge
1
commit into
otakaro_digital_twin
from
256-Draw-Bounding-Box-Calculate-Area
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7030e40
to
275c5bd
Compare
caseyli92
requested changes
Nov 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Comment on lines
+13
to
+27
def __init__(self) -> None: | ||
"""Define inputs and outputs of the WPS process, and assogm process handler.""" | ||
# Create bounding box WPS inputs. | ||
inputs = [BoundingBoxInput('bboxin', 'box in', crss=['epsg:4326'])] | ||
# Create area WPS outputs. | ||
outputs = [LiteralOutput('area', 'Area', data_type='string')] | ||
|
||
# Initialise the process. | ||
super().__init__( | ||
self._handler, | ||
identifier='area', | ||
title="Calculate the area of the polygon.", | ||
inputs=inputs, | ||
outputs=outputs, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
def __init__(self) -> None: | |
"""Define inputs and outputs of the WPS process, and assogm process handler.""" | |
# Create bounding box WPS inputs. | |
inputs = [BoundingBoxInput('bboxin', 'box in', crss=['epsg:4326'])] | |
# Create area WPS outputs. | |
outputs = [LiteralOutput('area', 'Area', data_type='string')] | |
# Initialise the process. | |
super().__init__( | |
self._handler, | |
identifier='area', | |
title="Calculate the area of the polygon.", | |
inputs=inputs, | |
outputs=outputs, | |
) | |
def __init__(self) -> None: | |
"""Define inputs and outputs of the WPS process, and assogm process handler.""" | |
# Create bounding box WPS inputs | |
inputs = [BoundingBoxInput('bboxin', 'box in', crss=['epsg:4326'])] | |
# Create area WPS outputs | |
outputs = [LiteralOutput('area', 'Area', data_type='string')] | |
# Initialise the process | |
super().__init__( | |
self._handler, | |
identifier='area', | |
title="Calculate the area of the polygon.", | |
inputs=inputs, | |
outputs=outputs, | |
) |
Suggested change
def __init__(self) -> None: | |
"""Define inputs and outputs of the WPS process, and assogm process handler.""" | |
# Create bounding box WPS inputs. | |
inputs = [BoundingBoxInput('bboxin', 'box in', crss=['epsg:4326'])] | |
# Create area WPS outputs. | |
outputs = [LiteralOutput('area', 'Area', data_type='string')] | |
# Initialise the process. | |
super().__init__( | |
self._handler, | |
identifier='area', | |
title="Calculate the area of the polygon.", | |
inputs=inputs, | |
outputs=outputs, | |
) | |
def __init__(self) -> None: | |
"""Define inputs and outputs of the WPS process, and assogm process handler.""" | |
# Create bounding box WPS inputs. | |
inputs = [BoundingBoxInput('bboxin', 'box in', crss=['epsg:4326'])] | |
# Create area WPS outputs. | |
outputs = [LiteralOutput('area', 'Area', data_type='string')] | |
# Initialise the process. | |
super().__init__( | |
self._handler, | |
identifier='area', | |
title="Calculate the area of the polygon.", | |
inputs=inputs, | |
outputs=outputs, | |
) |
Comment on lines
+29
to
+30
@staticmethod | ||
def _handler(request: WPSRequest, response: ExecuteResponse) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
@staticmethod | |
def _handler(request: WPSRequest, response: ExecuteResponse) -> None: | |
def _handler(self, request: WPSRequest, response: ExecuteResponse) -> None: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DESCRIPTION OF PR:
MVP work for #256 but not enough to close to issue.
Polygon work would be better.
Could not display the bounding box polygon.
@caseyli92 use your best judgement if its best to merge this PR or complete and merge the polygon PR, or both
Developer Checklist
Reviewer Checklist