POST
|
Hi all, I am using a GeocodeServer service published off the Classic locators from StreetMap Premium Dataset versioned 2018R3. The service is running in ArcGIS Server version 10.6.1. The problem is when I am using the findAddressCandidate or the geocodeAddresses endpoints after an idle time 30 minutes to an hour, the geocoding is considerably slow. Geocoding from findAddressCandidate endpoint: after idle time of 40 minutes: 60-90 seconds after the endpoint has been called once: ~800 milliseconds. What is the reason for this lag in the response when the endpoints are used after a brief period of idle time? Thanks and Regards, Lakshmi Kanthan.
... View more
04-18-2019
11:54 PM
|
0
|
1
|
666
|
POST
|
Hi Dan, The encrypted string datatype can only be used in workflows where we have an Esri tool that can decrypt the encrypted password. But for now, I am using arcpy.setLogHistory to disable writing the tool execution history to file. Thank you for the reference provided! Regards, Lakshmi Kanthan M.
... View more
04-18-2019
11:40 PM
|
0
|
0
|
890
|
POST
|
Hi Dan, Thank you for that reference! Just one more doubt - when I have parameters that are of type StringHidden, I can see that they are stored in the history log file like this: ...
<Parameters>
<Inputs>
<Parameter Label="Input Table" Type="Dataset">D:\data\text\sample-100.csv</Parameter>
<Parameter Label="Username" Type="Scalar">*****</Parameter>
... Does it store this sensitive information somewhere else? If so, where? Is the data encrypted? If so, what algorithm and level of encryption are used? If not, how does ArcMap know what the hidden information is? Regards, Lakshmi Kanthan M.
... View more
04-07-2019
11:29 PM
|
1
|
2
|
890
|
POST
|
Hi all, When we run a script tool, the geoprocessing result appears in the Results window, wherein we can re-run the result, publish a geoprocessing service, etc. This means that ArcMap is writing the signature (parameters and environment settings) for the tool run to disk, so it can re-run the tool whenever required. My questions are these: - Where does ArcMap write the files with this information? - If it writes this information to disk, is it written as a binary file, or is it protected? (This is essential because, I'm passing some sensitive information as parameters to a custom script tool I've developed.) Thanks and Regards, Lakshmi Kanthan Muralikrishnan.
... View more
04-05-2019
03:50 AM
|
0
|
4
|
1104
|
POST
|
It does work with Shapely or arcpy, yeah. For now, I am just using Python's re to modify the WKT I am getting to the OGC WKT specification. I may probably end up using arcpy for different reasons in the same environment. So, I think this issue should inherently not appear then. Thank You for your assistance in this regard!
... View more
11-12-2018
08:48 PM
|
0
|
0
|
3086
|
POST
|
No I am not using the arcgis that comes with Pro. I am using the conda installation of arcgis api for python. But, why would the specification of WKT vary, irrespective of using the API with Pro or not? Anyway, I'll try with the arcgis package in Pro and update here. Thank You!
... View more
11-12-2018
06:26 AM
|
0
|
2
|
3086
|
POST
|
Hi Joshua Bixby, Thanks for your response! The geometry object I got is a response from the TIGERWeb API (follow it here: URL). These are the steps I followed: - query the REST API (using arcgis.features.FeatureLayer.query method) to get a arcgis.features.FeatureSet object. - get the geometry dict from each feature in the FeatureSet object and append the spatialReference key to the dictionary - pass this geometry dict object to the arcgis.geometry.Geometry class to create a Geometry object instance - Use the associated WKT attribute to retrieve the WKT string representation. This is my python script: from arcgis.features import FeatureLayer
from arcgis.geometry import Geometry
# API URL
api_url = 'https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer/19'
# I used Web Mercator Auxiliary PCS
# although the format of the resulting WKT string
# is the same for 4326
wkid = 4326
fl = FeatureLayer(api_url)
# Take a sample set of OIDs
oid_list = [1, 2, 3]
# query the feature later
fs = fl.query(
out_sr=wkid,
object_ids=','.join(map(str, oid_list)),
out_fields='*'
)
sample_feature = fs.features[0]
# geometry dict for a single feature
geom_dict = sample_feature.geometry
geom_dict.update({"spatialReference": {"wkid": wkid}})
print(geom_dict)
# This should look like:
# {'rings': [[...]], 'spatialReference': {'wkid': 3857}}
geom = Geometry(geom_dict)
print(geom.type)
# Polygon
print(geom.WKT)
# MULTIPOLYGON (((-120.5001609997531204, 38.0041239997223812), ..., (-120.5001609997531204, 38.0041239997223812)))
I do follow what is specified in the documentation, and still end up with a different result. Can you run this script in your environment and see if you can reproduce the error? N.B.: - The FeatureServer resource is not secured. So, you don't need any access token. - The version of arcgis in my environment is, indeed, 1.5.0.
... View more
11-11-2018
10:36 PM
|
0
|
4
|
3086
|
POST
|
Hi all, The issue is this: While the WKT attribute of an arcgis.geometry.Geometry object returns me WKT geometry in this format: (for instance) MULTIPOLYGON (((30, 20), (45, 40), (10, 40), (30, 20)),((15, 5), (40, 10), (10, 20), (5, 10), (15, 5))) An OGC WKT string for the same geometry would look so: MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5))) This, in my opinion, diminishes the usability of the WKT object. For instance, if I want to write this to a database in the database's native geometry data type, I cannot use methods that convert WKT to Geometry (like STAsText in MS SQL Server), as they will be expecting the data to be in OGC WKT format. The questions are, hence, - why does the arcgis.geometry.Geometry.WKT object not have the format specified in OGC specification for WKT representation? - will this behaviour be changed, at all, to conform to the said standards in the future releases of ArcGIS API for Python?
... View more
11-08-2018
01:01 AM
|
0
|
6
|
3938
|
POST
|
Hi Simo, Thank you for the response! mapview.draw did really solve my issue, although I could do it without projecting it to 4326. But, I still wonder why the add_layer method would not display the FeatureSet, especially when the documentation qualifies FeatureSet as a valid input. Thanks again!
... View more
09-24-2018
09:25 PM
|
0
|
0
|
1087
|
POST
|
Hi all, I am trying to display a FeatureSet (arcgis.features.FeatureSet) object on the ArcGIS API for Python map widget (arcgis.gis.GIS.map.add_layer) in Jupyter Notebook. I have two FeatureSet objects: obtained while querying a layer (query_resp_from_x) constructed from arcgis.features.Feature objects (feature_set) This is the code I am using to create the feature_set object: from arcgis.features import Feature, FeatureSet, FeatureCollection
attributes = [{'FID':1, 'some_field':'some_val', ...}, {'FID':2, 'some_field':'some_val', ...}, ...]
features_from_geom = [{"paths": [[...]]}, {"paths": [[...]]}, ...]
# len(attributes) = len(features_from_geom) = 5
features = list()
counter = len(attributes)
for idx in range(counter):
features.append(Feature(geometry=features_from_geom[idx], attributes=attributes[idx]))
# here, query_resp_from_x is just a query response from layer X, which in itself is a FeatureSet
feature_set = FeatureSet(
fields=query_resp_from_x.fields,
geometry_type=query_resp_from_x.geometry_type,
spatial_reference=query_resp_from_x.spatial_reference,
object_id_field_name=query_resp_from_x.object_id_field_name,
global_id_field_name=query_resp_from_x.global_id_field_name
)
Then, I created a map widget in the same notebook and added both the FeatureSet objects to it: from arcgis.gis import GIS
gis_obj = GIS('http://my_portal', 'my_user')
map_obj = gis_obj.map()
map_obj.add_layer(feature_set)
map_obj.add_layer(query_resp_from_x)
map_obj The map displayed only the query response FeatureSet (query_resp_from_x). Neither the FeatureSet I constructed (feature_set) was displayed, not an exception was raised. I tried adding some rendering information to the FeatureSet and construct a FeatureCollection from it and display it on map, to no avail. Can someone tell me what is wrong with this approach? (P.S.: I converted both the FeatureSet objects (feature_set and query_resp_from_x) and compared them. They were exactly the same except for changes in values. I am attaching both the dict objects as JSON files for your reference.)
... View more
09-24-2018
04:43 AM
|
0
|
2
|
1285
|
POST
|
I created the service definition file from ArcMap's Share as a Service wizard. The issue was that I did not specify the path to the locators in the publisher's machine. Thank you for time!
... View more
06-21-2018
02:41 AM
|
0
|
0
|
1186
|
POST
|
I had to register the publisher folder path separately, as the Server was running on a different machine. @Jonathan thanks for the comment. Helped me locate the issue!
... View more
06-21-2018
02:40 AM
|
1
|
0
|
1186
|
POST
|
Hi all, I have ArcGIS Server 10.6 running on a Linux machine (Ubuntu 16.04 LTS). Our organisation has purchased the Esri StreetMap Premium SMP 2017 R3 data and the appropriate data license. I've installed the data license in the server and copied a simple address locator for Guam (GUM_StreetAddress.loc, GUM_StreetAddress.loc.xml and GUM_StreetAddress.lox) to a local directory (/home/arcgis/gum_loc) in the machine where the server is running. I've registered the directory as shown below: (and validated it) Now, whenever I create a service definition file (without adding data into it) and publish a geocode service, the server does not recognise the locators in the registered directory. It throws the following error: ERROR 001487: Failed to update the published service with the server-side data location. Please see the server's log for more details. ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). Failed. The Server log showed the same message: SEVERE May 30, 2018, 8:57:35 PM Error executing tool. Publish Service Definition Job ID: jfb6284cd3f984415ba9088d783b80599 : ERROR 001487: Failed to update the published service with the server-side data location. Please see the server's log for more details. ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). System/PublishingTools.GPServer SEVERE May 30, 2018, 8:57:35 PM Failed to create the service. System/PublishingTools.GPServer SEVERE May 30, 2018, 8:57:35 PM DoAfterSDExtraction failed. System/PublishingTools.GPServer However, when I am publishing a MapServer from the same registered directory, the data is not copied to the server. Question is: What is it I am doing wrong here that the Server does not recognise the data in the registered directory? Thanks for your time!
... View more
05-31-2018
12:16 AM
|
0
|
4
|
1657
|
POST
|
Hi Tina, Thanks for your reply! I was not aware that the Enable Enterprise Geodatabase tool could (should) be used on SQL Server express instances, which can only house Workgroup and Desktop geodatabases (not enterprise). I did try enabling a SQL Server Express instance DB as an Enterprise Geodatabase from a Windows Server installation of ArcGIS Server (10.5.1). It worked without any hassle. Also, the documentation says it is supported: Microsoft SQL Server database requirements for ArcGIS 10.6—System Requirements | ArcGIS Desktop MS SQL Server 2017 64-bit version is in the list of supported editions (which also happens to be the version I use). Just open ArcCatalog, connect to your SQL Server Express instance and create a new geodatabase. I tried connecting to SQL Server from ArcGIS Server on Windows, it worked (through ArcCatalog and through arcpy). However, when my ArcGIS installation is on Linux , it doesn't work. (N.B.: This is irrespective of the OS on which the SQL Server instance is running: Linux or Windows)
... View more
03-26-2018
10:40 AM
|
0
|
0
|
1366
|
POST
|
Hi all, I tried enabling a SQL Server (Express Edition: 14.0.3022.28) database as an Enterprise Geodatabase from arcpy in ArcGIS Server (10.6 on Ubuntu 16.04 LTS) on Linux machine, which fails. Here goes the details: I did the following to first create the Database Connection (.sde) file in ArcGIS Server machine's arcpy: Created a database testsde in the SQL Server instane Installed MS SQL Server ODBC client (v13.1) on the Linux machine where ArcGIS Server is installed. Open Python interactive in ArcGIS Server machine: <Server Installation Directory>/tools/python Executed the logic: import arcpy
arcpy.CreateDatabaseConnection_management('<ArcGIS Installation Directory>/temp', 'sqlconn.sde', 'SQL_SERVER', '<host_ip>', 'DATABASE_AUTH', 'sa', '<password>', 'SAVE_USERNAME', 'testsde')
# N.B.: I've already copied the ArcGIS Server authorization file to /home/<user>/ directory
arcpy.EnableEnterpriseGeodatabase_management('<ArcGIS Installation Directory>/temp/sqlconn.sde', '/home/<user>/keycodes')
The code threw the following error: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\ArcGIS\Server\ArcPy\arcpy\management.py", line 5311, in EnableEnterpriseGeodatabase
raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000837: The workspace is not the correct workspace type.
Failed to execute (EnableEnterpriseGeodatabase). Now, since the error said The workspace is not the correct workspace type, I checked the properties of the SDE file created using arcpy.Describe(): desc = arcpy.Describe('<path_to>/sqlconn.sde')
desc.workspaceType
desc.ConnectionProperties.is_geodatabase Python threw the following error: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: DescribeData: Method workspaceType does not exist So, this did not work as well. Does connecting to a SQL Server database work at all from ArcGIS Server on Linux? Can I enable SQL Server DB as an enterprise Geodatbase from ArcGIS Server on Linux? Thank You for Your time. (P.S.: Do let me now if you need further details to understand the questions.) Regards, Lakshmi Kanthan M.
... View more
03-19-2018
07:27 AM
|
0
|
3
|
2132
|
Title | Kudos | Posted |
---|---|---|
1 | 04-07-2019 11:29 PM | |
1 | 06-21-2018 02:40 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|