133 reputation
8
bio website
location
age
visits member for 1 year, 10 months
seen 3 hours ago

23h
comment What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
My motivation is the same specified distance redistributing-vertices use-case as in gis.stackexchange.com/q/107999/10229 but I'd like to know how to write things to deal with polygons, and potentially 2.5D polygons and polylines as well. (Ultimately, I need to redistribute the vertices unevenly, based on a raster or some function of a raster, but that's for later.)
23h
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
expand the question
1d
comment What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
No, I do not want to replace the multipart with a set of component parts (like 'explode' ungroup, or multi-to-single). I want to unpack the multigeom into its component parts, apply a user-defined function (in the Q, myFunction() is an identity function as a , but a function like reverse_line(), densify(), simplify()) to the parts to make a set of new parts, then re-pack the new parts into a new, replacement multigeom to use as a replacement. In your answer, how do I append each g.exportToWkt() into a list, and convert the list back into a multipart geometry of the same type as geom?
Jul
25
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
added 168 characters in body
Jul
25
revised How does one modify selected geometry with a function in qgis python console?
added 46 characters in body
Jul
25
comment What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
After I iterate, I then want to re-collect the list of paert into a type-conformant replacement for the original geometry. It appears that you can take apart all types of .isMultipart()==True geometries with .asGeometryCollection(), but you can't re-collect them with something like geom.replaceGeometry(geomColl).
Jul
25
revised How does one modify selected geometry with a function in qgis python console?
Fix for WKBMultiLineString / MultiPolyline / multiple-line cases
Jul
25
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
More trial and error, but found some working code.
Jul
24
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
Add links to docs.
Jul
24
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
update non-working example
Jul
24
comment What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
Can you point me toward MultiPolyline documentation? The list of objects returned by asGeometryCollection does not appear to be a list of Polylines.
Jul
24
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
Add some failures.
Jul
24
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
Add some failures.
Jul
24
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
added 50 characters in body
Jul
24
comment What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
I'd like to process the lines within a selected multi-part polyline separately. My motivating example is in gis.stackexchange.com/a/108243/10229
Jul
24
revised What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
typo in title
Jul
24
asked What is the inverse of QgsGeometry.asGeometryCollection() in qgis python?
Jul
24
revised How does one modify selected geometry with a function in qgis python console?
add note about joining multi-segment lines.
Jul
24
revised How does one modify selected geometry with a function in qgis python console?
add links
Jul
24
revised How does one modify selected geometry with a function in qgis python console?
list possible defents, and remove note about refreshing