POST
|
Hi Justin, as Joshua pointed out, try to have the json file before run the tool. May be this could help you. import arcpy, sys, os, arcgis, requests, json
arcpy.env.workspace = "C:/Workspace/Sandbox/ScratchTests"
#Create a route to store your json file
jsonFile="C:/Workspace/Sandbox/ScratchTests/jsonTest.json"
params = {'f': 'json', 'where': '1=1', 'geometryType': 'esriGeometryPolygon', 'spatialRel': 'esriSpatialRelIntersects','outFields': '*', 'returnGeometry': 'false'}
r = requests.get('https://hazards.fema.gov/gis/nfhl/rest/services/CSLF/Prelim_CSLF/MapServer/3/query', params)
print(r.url)
cslfJson = r.json()
print(cslfJson)
#Pass the request to a jsonfile
with open(jsonFile,'w') as jsonDir:
json.dump(cslfJson,jsonDir)
arcpy.JSONToFeatures_conversion(jsonFile, os.path.join("cslf.gdb", "cslf"))
... View more
04-29-2020
11:24 AM
|
1
|
0
|
4610
|
DOC
|
Hi Jake, thanks for share your tool. I was learning more python just inspecting it. Im curious about this: Which WhereClause is faster to load features: a) where = "{0} IN ({1})".format(OID, ids) b) where = OID + '>' + str(y) + 'AND ' + OID + '<=' + str(x) c) Make a list of OID's and put it directly in the URL query like this: "......./query?objectIds={[OID's List]}&returnGeometry=true... What are the differences betwen the these? In which situations use them? Cold you tell me where can i find documentation about this? Thank you for your time. Regards Juan Julio
... View more
04-25-2020
02:37 PM
|
0
|
0
|
5485
|
POST
|
Thank you Jake, after excecute the tool it generates a layer with all the data in a field called PopopInfo in a XML format. There is a tool or a way to corvert it to a table? Thank you again. All you have told me has been really helpful. Regards, Juan Liñan
... View more
06-19-2019
09:40 PM
|
0
|
0
|
898
|
POST
|
Hi Jake, thank you for your time. Look, when i try to download the tabular data from this feature layer http://sinpad.indeci.gob.pe/arcgis/rest/services/SINPAD_2018/MapServer/215 i get this error: On the other side, whe i try to download the feature data from this feature layer, using a query statement I exported the feature. This means that the shape field is enabled right? Is there a better way to use query statemets to download only the valid geometries or "downloadable features'? I was tryng to do the same process with the other feature service but with no succes. When I try to use the same query on the web to export a KMZ, it is succesfully done. Is this another probe that the shape field is enabled? Is there a way to export all the fields into a kmz format? Thank you for your help. I'm tryng with all possibilities. Regards Juan julio
... View more
06-17-2019
10:40 PM
|
0
|
2
|
898
|
POST
|
Hi Jake, happy day. Could you help me on how to handle this kind of errors, please. Maybe a query sentence that i can use. 1. This error appeared when i was trying to download this feature layer http://sinpad.indeci.gob.pe/arcgis/rest/services/SINPAD_2018/MapServer/215 2. This second error appeared when i was trying to download this feature layer http://sinpad.indeci.gob.pe/arcgis/rest/services/SINPAD_2018/MapServer/204 Thank you for your time and attention. Regards, Juan Julio
... View more
06-16-2019
06:09 PM
|
0
|
4
|
898
|
POST
|
Yes, you're right, Jake, thanks for the answer. I was hopping to find a way to handle this kind WMS services to download its feature data. Thank you for you attention and time.
... View more
11-20-2018
08:13 AM
|
0
|
0
|
898
|
POST
|
Yes, Jake, I get te same error too, but that's the right URL. You can access it using JOSM as is showed here. Mapeo calles + nombres usando sige.inei.gob.pe · Issue #1 · osm-pe/mapping · GitHub The WMS i'm trying to download is used for this web map application. Sistema de Consulta de Centros Poblados
... View more
11-20-2018
08:00 AM
|
0
|
2
|
761
|
POST
|
Hi Jake, I was trying to download the features in that URL with no success, I just downloaded the tabular data. But most important is this URL MapServer Message Which I cannot access using arcgis online either. Thank's Jake
... View more
11-20-2018
07:42 AM
|
0
|
4
|
761
|
POST
|
Hi Jake, your tool is cool. Thank's for sharing. I've been downloading some wms, but then i found a wms server which i'm having troubles and i hope you could help me to handle it. http://sige.inei.gob.pe/cgi-bin/mapserv?map=/var/www/html/test/atlas/map/mapa_negocios_cp.map I note that this url has a different structure from ArcGIS services. How can i handle this kind of wms features to download its feature data. Thank you very much.
... View more
11-19-2018
08:16 PM
|
0
|
6
|
761
|
Title | Kudos | Posted |
---|---|---|
1 | 04-29-2020 11:24 AM |
Online Status |
Offline
|
Date Last Visited |
12-31-2020
01:06 PM
|