POST
|
Hello Everyone, i am trying to create a vector tile package from a python script.I am using ArcGIS pro v2.7.i am always getting the same error Error: ArcGIS Fehler: ERROR 002112: The root tile must overlap the data sufficiently for features to draw. Failed to execute (CreateVectorTilePackage). i am creating tile cache schema and passing that to create tile index and then create tile package. one thing I found is in Arcgis pro when I try to create vtpk the schema XML is created automatically and it different from what I create with a toolbox and also from what I create from python. the origin is different and it selects different scales and in Arcgis Pro it works but not in python. for origin, i am taking map extent and then upper left point mapExtents = input_map.defaultCamera.getExtent()
origin = "{0} {1}".format(mapExtents.upperLeft.X, mapExtents.upperLeft.Y) i also tried to get the extent of feature class but still the has the same issue.i could not use ONLINE option because map coordinate system is not WGS84 all code snippet is as follows APRX = arcpy.mp.ArcGISProject(APRXLocation)
input_map = APRX.listMaps(mapName)[0]
mapExtents = input_map.defaultCamera.getExtent()
origin = "{0} {1}".format(mapExtents.upperLeft.X, mapExtents.upperLeft.Y)
with arcpy.EnvManager(scratchWorkspace=ws, workspace=ws):
arcpy.management.GenerateTileCacheTilingScheme(in_dataset=input_map, out_tiling_scheme=TPKSchemeName, tiling_scheme_generation_method="NEW", number_of_scales=TPKScalesNum, predefined_tiling_scheme=None,scales=TPKScales, scales_type="SCALE", tile_origin=origin, dpi=96, tile_size="512 x 512", tile_format="PNG", tile_compression_quality=0, storage_format="COMPACT", lerc_error=None)
indexFC = "in_memory\\vector_tile_index"
arcpy.management.CreateVectorTileIndex(input_map, indexFC, "EXISTING", TPKSchemeName, 10000)
arcpy.management.CreateVectorTilePackage(input_map, tpkFile, "EXISTING", TPKSchemeName, "INDEXED", "", "", None, '', '') also attaching the XML Script created by python script and xml created by ArcGIS Pro Thanks in Advance
... View more
02-10-2021
06:59 AM
|
0
|
0
|
524
|
POST
|
Hello Everyone, I try to update my Xamairn project.I am using visual studio 2019 and my project is working fine with ArcGIS.xamarin 105 but when i am trying to update the nugget package, I am getting error that Arcgis.Xamarin package trying to access System.drawing.common which is missing in GAC. i am not sure how to solve this issue.i am attaching screenshot of the error. Thanks
... View more
09-25-2020
04:38 AM
|
0
|
1
|
551
|
IDEA
|
This belongs not only to Dashboard Apps. All Items must be moved through staging enviroments!
... View more
01-21-2020
01:52 AM
|
0
|
0
|
914
|
POST
|
I am trying to find the empty fields in a feature class and delete the fields.i am checking the number of empty or null rows are equal to total number of rows then i am deleting the field.i don't want to go throw all the rows and check field is empty or null.but many fields has spaces in the records i want to trim the spaces in string fields. i could not fingure it how to add trim function in SearchCursor where_clause or in sql_clause. could you please let me know how to do it. result = arcpy.GetCount_management(layer) totalRows = result[0] if field.type == 'Double': query = '("{0}" is null OR "{0}" = 0)'.format(field.name) else: query = '("{0}" is null or "{0}"=\'\')'.format(field.name) # query = '("{0}" is null or Trim("{0}")=\'\')'.format(field.name) rows = [row for row in arcpy.da.SearchCursor(layer, [field.name], query)] if int(totalRows) <= len(rows): arcpy.DeleteField_management(layer, [field.name])
... View more
04-24-2019
01:34 AM
|
0
|
2
|
1009
|
Online Status |
Offline
|
Date Last Visited |
02-11-2021
07:59 AM
|