Skip to content
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

2 Questions #259

Closed
guyn2gis opened this issue Jun 7, 2018 · 5 comments
Closed

2 Questions #259

guyn2gis opened this issue Jun 7, 2018 · 5 comments

Comments

@guyn2gis
Copy link

guyn2gis commented Jun 7, 2018

Is it possible to overwrite Vector Tiles?

Is it possible to rebuild indexes on Feature layers?

@achapkowski
Copy link
Contributor

For question 2, you can rebuild spatial indexes by passing in the index into update_definition.

Example:

flc = <some FeatureLayerCollection>.manager.update_definition( {"indexes":[{"name":"<index id>","fields":"Shape"}]})

@achapkowski
Copy link
Contributor

@guyn2gis at the current version overwriting vectors is not possible, but I hear in future releases of ArcGIS Enterprise you will be able to swap service while leaving the same item id.

@pmacMaps
Copy link

@achapkowski, for updating the spatial index, what should the value of <index id> be? Ideally, when a user runs your example command, it will rebuild the indexes.

I have a working script that uses both ArcGIS Pro/ArcPy and the Python API to ovewrite an ArcGIS Online feature service using data on our organization's servers. As it's a large dataset, I still manually ran the Rebuild Indexes operation in ArcGIS Online. I would like to automate that, if possible.

@GideonSinger
Copy link

Are there any updates on this, I have tried to do the same thing and looked up the properties of the feature layer collection, found the 'name': <index id' in the "indexes" part of the json but now cannot seem get past my request timing out. (Error Code: 504).
"indexes": [
{
"name": "STRING",
"fields": "ObjectId",
"isAscending": true,
"isUnique": true,
"description": "clustered, unique, primary key"
},
{
"name": #"STRING",
"fields": "Shape",
"isAscending": false,
"isUnique": false,
"description": "Shape Index"
}
],

@GideonSinger
Copy link

I am also wondering if you need to wrap the {"indexes":[{"name":"","fields":"Shape"}]} string in json.loads(x). Even when I do that, however, it is still timing out.

I have even set the expiration variable to 9999...

I really don't understand why there isn't an easy way to rebuild spatial indexes using the ArcGIS API for Python API when it is essentially required for larger datasets to load properly on WebMaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants