-
Notifications
You must be signed in to change notification settings - Fork 68
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
Scenic quality allowing line vector structures #1245
Comments
@dcdenu4 could you attach your polyline vector here? I agree, the model is only intended to run on points, so the fact that the model is somehow extracting points from a polyline is a little bit surprising. I'm curious which points the model is extracting in this case. |
I can upload the inputs from the user.
J.
…On Mon, Mar 13, 2023 at 10:43 AM James Douglass ***@***.***> wrote:
@dcdenu4 <https://github.com/dcdenu4> could you attach your polyline
vector here? I agree, the model is only intended to run on points, so the
fact that the model is somehow extracting points from a polyline is a
little bit surprising. I'm curious which points the model is extracting in
this case.
—
Reply to this email directly, view it on GitHub
<#1245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEX6RCWJTPNA4LNBGZIDRJTW35MCVANCNFSM6AAAAAAVYDASTY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Jess Silver
The Natural Capital Project, Stanford University
c/o School of Environmental and Forest Sciences
University of Washington, Box 352100
Seattle, WA 98195
*206-616-8730* (ph)
|
@jesssilver shared the data with me, I'll upload here.
Good question. The model is just iterating over those line features and extracting a point from the geometry. I do get a nice list of points, but I'm not sure if it's just returning the first point of the line geometry... from osgeo import ogr, gdal
structure_path ='NAC_Anthropogenic_12012022l.shp'
vector = gdal.OpenEx(structure_path)
layer = vector.GetLayer(0)
for point in layer:
geom = point.GetGeometryRef()
viewpoint = (geom.GetX(), geom.GetY())
print(viewpoint)
...
(435752.73330000043, 1432924.1162999999)
(469712.45109999925, 1304662.856899999)
(465154.60639999993, 1298408.638699999)
(437119.62209999934, 1407142.2459999993)
(438037.83999999985, 1399165.9740999993)
(463563.5987999998, 1335260.3095999993)
(462564.66080000065, 1327714.1539999992)
|
I just cracked the vector open and yes, it looks like GDAL is pulling the coordinates of the first point as its X and Y. Kind of an arbitrary choice if you ask me. |
@jesssilver mentioned
She's right, currently the model does not validate for Point Vector type and will run on a polyline. I reproduced this by creating a polyline in QGIS around the point vector provided in the sample data. The model ran and completed successfully.
Looking at the model, it very much assumes point vector type and doesn't do any fancy line handling that I could see.
The text was updated successfully, but these errors were encountered: