Comments (21)
Some confirmation that metadata scripting may be supported natively in arcpy/ArcGIS Pro soon - it's on the near-term panel in the July 2019 roadmap: https://community.esri.com/docs/DOC-13641-arcgis-pro-roadmap-july-2019
from arcpy_metadata.
I started a new branch to work on the getter/ setter functions
https://github.com/wri/arcpy_metadata/tree/getter_setter
This will allow to update and read metadata like this
md.title = "My Title"
title = md.title
list like keywords are treated like actual python lists
md.tags.append("new keyword")
second_keyword = md.tags[1]
Defining new elements will also be easier.
There is an elements file which contains a dictionary with the name, path and type for all the elements. To add a new element you simply need to add it to this dictonary, the rest of the code stays untouched.
https://github.com/wri/arcpy_metadata/blob/getter_setter/arcpy_metadata/elements.py
I am still not all way done and have to work on the more complex objects like contacts and locals and currently don't have so much time. For these you would still need the .get() and .set() methods.
If you start looking into the Python 3.4 comparability, can you check the new branch as well and point out any issues?
from arcpy_metadata.
As part of my testing of the existing version, I started some work on a Python 3 conversion - I added the six package as a dependency and made a small conversion in metadata_editor.py - there's still some work to do for Python 3 compatibility though - I'm getting an error during metadata editor setup that I'll track down later on.
from arcpy_metadata.
Additional progress, now that the test suite passes on Python 2, the Jenkins server will run the Python 3 tests, so I'll start getting notifications of breakage, and have more of an incentive to fix any issues.
from arcpy_metadata.
please check if 0.5-rc1 is compatible with python 3
from arcpy_metadata.
OK, will do - one thing I know will be broken is editing metadata from a GDB - arcpy.XSLTransform_conversion doesn't exist yet in ArcGIS Pro, so we won't be able to use that - if everything else is ready though, it still seems sensible to release it - I'll test it out in Pro/Py3
from arcpy_metadata.
Right now I'm getting errors on lines 163 and 164 (after my latest push of code to update logging code) - it's searching for a dictionary the object's attributes and failing - this is happening on Python 2 and 3. That code seems to be old enough that I doubt it's the problem - trying to isolate what's going on now.
from arcpy_metadata.
Also, that code gives me problems even on older versions of the code in Python 3, but not in Python 2. Going to see if Python 2 tests pass on my machine right now.
from arcpy_metadata.
Hey Nick,
I get some error messages when running your code.
The second argument for the log.info() method seems to be the issue.
Ie here
When I remove the second argument, the code works fine for me
from arcpy_metadata.
fixed in #40
from arcpy_metadata.
Thanks for fixing that - somewhere in the back of my head I knew those arguments were there and spaced on removing them.
So, after fixing that, you get no errors running the rest of the code normally? There errors I'm seeing relate to it using a dict as a key for another dict. But it theoretically should have been doing that going back a ways. It's possible I have a conflict on this machine with an old version or something, so I'm going to try it on a clean test machine, and then make sure the testing server is happy.
from arcpy_metadata.
from arcpy_metadata.
Just noted that QGIS 3 has a new way to access metadata and dump to XML via an API. Not explicitly ArcGIS Pro support, but in the absence of tools for dumping metadata, I wonder if extending the metadata dumper to check for arcpy, then check for QGIS as a dumper would work. I haven't investigated this thoroughly yet - it's just a thought as another way to get access to metadata and make this tool more broadly applicable:
http://changelog.qgis.org/en/qgis/version/3.0.0/#metadata-overhaul
from arcpy_metadata.
The main issue with Pro is that the arcpy metadata export tool does not work in 64bit. We currently use this to export metadata from file geodatabases into XML format.
Shapefiles and Raster files store their metadata directly in XML and we don't need to make use of this export tool.
The QGIS 3 tool would only be of use if it were able to read metastore stored in file GDBs and export them as XML
from arcpy_metadata.
Agreed on the current issue with Pro support. I also wanted to flag it as something that might be able to help with making this a tool that works with ArcGIS and open source tools. It seems like a big problem with it working as a workaround for dumping XML in Pro would be making arcpy and PyQGIS play nice in a single installation. Doable, but not trivial. It also might be an issue with dumping format, etc - haven't looked yet. When I get a chance, I'll take a more thorough look and see if there's anything useful that can be done with it.
from arcpy_metadata.
Well, we currently use the ArcGIS XML standard when parsing the metadata. QGIS doesn't use this. I think they use the ISO standard by default.
We would need to add a second path attribute to the elements in element.py to specify how to handle the iso standard. Users can then chose which standard to use or even convert between the two.
"title": {
"path_arcgis": "dataIdInfo/idCitation/resTitle",
"path_iso": "iso/path/title",
"type": "string",
"sync": False},
from arcpy_metadata.
from arcpy_metadata.
ya, we would also need to find a new name. Arcpy metadata wouldn't work anymore :)
next time, i would also switch to lxml, it is a bit harder to install on windows but much easier to use than the standard python xml module
from arcpy_metadata.
So if I understand your discussion correctly, there's no way how to make "arcpy metadata" working under ArcGIS Pro (and ESRI Enterprise Geodatabases) because of different Python and x64? Do you have in plan to upgrade it or make new tools for x64 & ArcGIS Pro?
from arcpy_metadata.
To access metadata in File Geodatabases and Enterprise Geodatabases we depend on ESRI drivers. ESRI does not provide such drivers for 64bit systems. Hence, this package will not work with Python x64 and ArcGIS Pro.
More info here under "Unsupported tools".
Once ESRI provides this functionality, this package will also work for Pro and Python x64
from arcpy_metadata.
As a note, saw a comment today from an Esri developer (in thespatialcommunity.com Slack) that they may skip building those geoprocessing tools entirely for ArcGIS Pro and may instead just build metadata access into arcpy directly. At that point, arcpy_metadata may remain 2.x only, or have some sort of compatibility layer to allow it to work with Python 3/ArcGIS Pro - probably unnecessary given usage levels, but possible.
from arcpy_metadata.
Related Issues (20)
- Several Python errors .Append() HOT 7
- Coding problem HOT 2
- ImportError: No module named 'version' HOT 3
- test_layer_file fails HOT 1
- Convert to using logging instead of simple custom logging code
- Tags and Place Keywords overwriting one another HOT 1
- suppress messages to console HOT 1
- Unable to obtain information in the useLimit tag HOT 4
- Dropdowns with code values? HOT 9
- file_identifier does not get written to feature classes
- Lock prevents removal of fGDB for test cases HOT 1
- Attribute Error HOT 4
- Upload 0.5.1 to pypi HOT 4
- write to text: metadata description has xml code HOT 6
- TypeError: unhashable type: 'dict' HOT 9
- Spatial Reference or Bounding Box Extent parameters? HOT 1
- Metadata abstract writen with wrong font HOT 3
- FGDB Tests not passing on 10.7 HOT 6
- How to add text with hyperlink HOT 1
- facing issue when using dictionary in my code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcpy_metadata.