Hi,all!
I made a ShapefileFeatureTable like this:
m_table1 = new ShapefileFeatureTable("E:/test/tp2.shp")(tp2 is a polyline shapefile);
i can use m_table1->extent().xMax() know the evelope's x,y coords;
but when i want to know the x,y coord of the point which explode by the polylineshapefile,
i dont know how to work with it,
Just like the function in ArcPy:
arcpy.da.SearchCursor(polyLineShapeFile, ['SHAPE@X', 'SHAPE@Y', 'SHAPE@M'], explode_to_points=True)
thans a lot!!
Solved! Go to Solution.
First thing to do after creating the shapefile feature table is to query it for the feature you want, using the query parameters - https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-featuretable.html#queryFeature...
Once you have the Feature handy, you can get the feature's geometry https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-feature.html#geometry
Once you get the geomtry, you'll need to use geometry_cast to cast the base class Geometry to a Polyline.
The Polyline is-a Multipart geometry. You'll want to go through the parts, and for-each part, you can get a list of the points/vertices that make up the part https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-immutablepart.html#points.
Hope this helps!
Thank you for the suggestion,but it do not work😂
In the api reference,the offical mathord is QFuture<*>:
and i tried like this:
the resault is:
seems like i have got the Geometry,
but the FeatureQueryResult has not function to get the geometry point list😂
so,what can i do
Hi,all,i have figure out!😀