-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
OpenFileGDB: set xml shape type to "esriGeometryPolyline" when using arc pro layer creation options #9033
Conversation
@adamgutons I assume you've tested to open with ArcGIS Pro 3.2 datasets generated with this change ? For my information, how did ArcGIS Pro react on datasets with esriGeometyLine, before this change? And when creating a line layer with ArcGIS Pro 3.2, does it use esriGeometryPolyline? |
It would be appropriate to add a new test case for that in autotest/ogr/ogr_openfilegdb_write.py : creating a layer with geom_type = ogr.wkbLineString and TARGET_ARCGIS_VERSION=ARCGIS_PRO_3_2_OR_LATER, and testing its geometry type on re-opening Something like (untested):
|
@rouault I did test in 3.2, and the datasets will open fine and can be edited/geometries added. I tested prior to the change (with esriGeometyLine) in Pro 2.9 and 3.2, the datasets again open just fine and can be edited/geometries added. Anytime a line feature class is created in 3.2, it is alway "esriGeometryPolyline". I also added the suggested unit test. In the gdb_samples.zip file you will find testArcPro.gdb -> generated this file using this fix branch and lco TARGET_ARCGIS_VERSION=ARCGIS_PRO_3_2_OR_LATER testStandard.gdb -> generated this file without lco TARGET_ARCGIS_VERSION=ARCGIS_PRO_3_2_OR_LATER testLineArcProUI.gdb -> generated this file via ArcPro 3.2 application user interface. I used dump_gdbtable.py to confirm shapetype in the xml is always "esriGeometryPolyline" |
some code formatting issues. Please see https://gdal.org/development/dev_practices.html#commit-hooks to setup pre-commit and do a manual run of it to fix the issues |
What does this PR do?
Since ArcGIS Pro only handles "polyline", and there is no distinction between "esriGeometyLine" and "esriGeometryPolyline", this pull request sets the feature class XML metadata to "esriGeometryPolyline" any time TARGET_ARCGIS_VERSION=ARCGIS_PRO_3_2_OR_LATER is used as a layer creation option.
https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/geometry.htm
What are related issues/pull requests?
Tasklist
Environment
Provide environment details, if relevant: