Add and Remove Extension Tool beta4

Mar 2, 2012 at 4:15 PM
Edited Mar 2, 2012 at 4:20 PM

Hello,

I call several OSMEditorfunctions via python in an application. Until Version 2Beta2 I used those calls successfully:

arcpy.OSMGPAddExtension_osmtools(nameOfPointFeatureClass)

arcpy.OSMGPAddExtension_osmtools(nameOfLineFeatureClass)       

arcpy.OSMGPAddExtension_osmtools(nameOfPolygonFeatureClass)

 

I just installed 2beta4 and it doesn't work anymore:

Traceback (most recent call last):  File "C:\testfolder\test\beta4\osm2use\start_osm2use.py", line 3053, in <module>    arcpy.OSMGPAddExtension_osmtools(nameOfPointFeatureClass)TypeError: OSMGPAddExtension() takes no arguments (1 given)

 

Changing it to 

arcpy.OSMGPAddExtension_osmtools()

crashes as well with:

Traceback (most recent call last):  File "C:\testfolder\test\beta4\osm2use\start_osm2use.py", line 3058, in <module>    arcpy.OSMGPAddExtension_osmtools()  File "C:\Program Files (x86)\ESRI\OSMEditor\data\OpenStreetMap Toolbox.tbx", line 110, in OSMGPAddExtension    R       AttributeError: Error in getting tool information

 

Even calling the AddTool within the ArcGIS10-GUI in the OSMToolbox doesnt work anymore. 

 

I let the user decide which version of the OSMEditor should be installed. If the user installs 2beta4 I have to disable Adding and removing the OSM Extension to the fcs. It seems, that the output (geomerties, Attributes) is identical with and without Extension. For which tools adding the OSM extension is necessary?

I use after loading: OSMGPAddExtension_osmtools, OSMGPAttributeSelector_osmtools, OSMSymbolizer_osmtools, OSMGPRemoveExtension_osmtools

After having loaded an OSM file, I copy fcs and put them in an new dataset under other names to make them more accessible. Might this be the reason the Extensiontool fails or might there be a bug somewhere? Do I need to Add the Extension for the needed Tools at all?

I'm currently not posting changes back to osm, but might want to do that in future. Does using the Extensiontool have an effect on being able to post back?

 

Thanks,
Tilo 

Developer
Mar 2, 2012 at 6:50 PM
Edited Mar 2, 2012 at 6:54 PM

Tilo,

first of all, yes that is a bug and has just been fixed. Thanks for reporting it.

The topic of extensions is a longer story:

The way the OSM data is structured and the way ArcGIS usually expects data is different. In order to edit data with the ArcGIS framework and still be considered OSM compliant we introduced some business logic. Once the data has been imported into a geodatabase and the user wants to stay OSM compliant for the purposes of uploading the edits back to OSM the business logic has to be applied. The "extension" or "OSM extension" is in technical terms a feature class extension and implemented at a low level in the geodatabase. Since the business logic is part of the database everything that touches the data is forced to use it - the desktop products, engine, server, or even python scripts. A more technical discussion can be found at http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000004p7000000

Now the question becomes: do you really need the OSM extension? And as so often the answer is: it depends. Since the tools are called ArcGIS Editor for OSM the answer is most likely yes you do need it. However, in writing the editing components we also generated import and export tools as a side product and a lot of users are now discovering OSM data as a very useful alternative data source. If you are not interested in ever submitting updates back to OSM then you might not need the extension at all.

All of our tools, the import and loading tools automatically apply the extension - there is no way around it and you don't need to explicitly apply it again. If you want to pass the data on to other ArcGIS users that don't have the editor tools installed you'll need to remove the extension. If you don't remove it users will get an error message to the extent that they unable to open the data. This has to do with the enforcement of the business logic and is not to be confused with an attempt by Esri to lock down the data. It is quite the opposite - we would like very much to increase the OSM community and get both user groups (OSM and ArcGIS) closer together. The error message is just a technical implementation issue and the add and remove extension tools are the way around it.

- Thomas

 

Mar 6, 2012 at 4:02 PM

Thomas,

thanks for the quick and detailed answer!

Tilo

Developer
Mar 6, 2012 at 7:26 PM

Tilo,

since we only fixed this one thing we don't really want to push out an official 'beta5' build. However we would you to confirm that the fix works in your environment as we are approaching the final version.

Time permitting you might want to download the updated version from http://maps.esri.com/ArcPhotoWeb/Download/ArcGIS_Editor_OSM_build_2.0.67.zip to see if it works in your scripting environment.

Thanks,

-Thomas

 

Mar 7, 2012 at 6:12 PM

Thomas,

the fix works fine! Adding and removing the extension with build_2.0.67 in my scripting environment don't cause Errors anymore.

Thanks a lot for the updated version!

-Tilo