POST
|
Lynn, Without going into a full discussion into precision/scale and number types for ArcGIS...I would add a format function to your cursor variable for that field. I created a test table and added your value as a Field Type Double. I ran a search cursor on my test table. If I print the entire row: for row in cursor:
print row
(1, 26.427265000000006, (-75.24637681199994, 72.53623188400007)) However if I print just my second field's value: for row in cursor:
print row[1]
26.427265 If you try: for row in cursor:
print format(row[1], '.15f') # give 15 digits after the point
26.427265000000006 Great resource: 15. Floating Point Arithmetic: Issues and Limitations — Python 3.5.2 documentation Probably the quickest way to return the values you need. Hope this helps! ~Alex
... View more
08-23-2016
08:48 AM
|
1
|
2
|
2490
|
POST
|
Rama, Be aware that if your ArcSDE is 10.3 or newer, the SDE command line has been deprecated. For running ArcSDE 10.2 and prior: ArcSDE Administration Command Reference Some additional information for ArcSDE: What's new in ArcGIS for Desktop—Help | ArcGIS for Desktop Alternatives to using SDE command line tools in ArcGIS | Support Services Blog ~Alex
... View more
08-22-2016
09:46 AM
|
0
|
0
|
1802
|
POST
|
Adriana, These should be helpful: About hosted web layers—ArcGIS Online Help | ArcGIS Publish hosted feature layers—ArcGIS Online Help | ArcGIS You cant exactly publish a map service like you would do on ArcGIS Server, but you can publish your content as a feature layer on AGOL. ~Alex
... View more
08-22-2016
06:10 AM
|
2
|
8
|
2189
|
POST
|
Brian, As RJ stated above regarding Watch a folder for new .csv files Input: "Please keep in mind that a known limitation of this Input is that once it has read data from a particular file, it will not re-read that file - even if the file's contents are changed. Deleting and dragging a new copy of the file into the folder being watched has no effect. The Input is remembering the file name and will not re-read the file to re-ingest its event data. You must stop/restart the Input in order to re-read the file, or change the file's name." Edit: 23-Jan-2018 Behavior for the ‘Watch a Folder for New CSV Files’ inbound connector was changed at 10.5.1 to no longer require that a file’s name be changed for the input to consider it a new file. The mechanism watching the folder for new files still does not consider file properties such as changes to a file’s “last updated” timestamp or file size. However, if you want an input to re-read files you’ve placed in a folder, you can simply stop and restart your input connector and each file’s content will re-read with its content processed as newly received event records. Your python script needs to output an additional file into that folder, rather than update the existing file. Also, from RJ's response, you cant just add the same file back into the folder. I would add some type of lookup in your python script to search the folder for the last filename, add a "_n" at the end of the new filename. If _1 exists, grab the integer and +1. For example your original file is "original.json", after your script runs it outputs an update to "original_1.json", next iteration would be "original_2.json". This would ensure the new file would get picked up by that type of input. ~Alex
... View more
08-19-2016
06:31 AM
|
1
|
1
|
1846
|
POST
|
Ben, Are you using the "Poll an External Website for JSON" for your input? Try appending your parameters (?f=json&id=77f06ce6-5da1 etc) to the end of the URL for your current input settings for your connector. Delete this text from the parameters setting. If unsuccessful, try to utilize "Poll an External Website for JSON" for your input: URL: Full URL with parameters JSON Object Name: attributes Let me know if this helps. Regards, Alex
... View more
08-17-2016
06:57 AM
|
0
|
0
|
516
|
POST
|
Sarah, Have you read through Create a traverse—ArcGIS Pro | ArcGIS for Desktop ? ~Alex
... View more
08-02-2016
12:54 PM
|
1
|
3
|
1116
|
POST
|
Suraj, You can always just include a border container in the <body> tag of your app code. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Simple Map</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.17/esri/css/esri.css">
<style>
html,
body,
#map {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script src="https://js.arcgis.com/3.17/"></script>
<script>
var map;
require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("map", {
basemap: "topo", //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
center: [-122.45, 37.75], // longitude, latitude
zoom: 13
});
});
</script>
</head>
<body>
<div dojotype="dijit.layout.BorderContainer" design="sidebar" gutters="false" style="width: 96%; height: 100%-150px;
margin: 2%; border:solid 3px #b7b7b7;">
<div id="map"></div>
</div>
</body>
</html> ~Alex
... View more
08-02-2016
11:38 AM
|
0
|
0
|
455
|
POST
|
Frank, Why are you utilizing a secured tiled basemap for the Nat Geo basemap? If you just need the basemap to run in your web map and through collector I would try this: NatGeo_World_Map (MapServer) In general, I usually reference this link for all ESRI provided basemaps: Folder: / ~Alex
... View more
08-02-2016
09:14 AM
|
0
|
0
|
1281
|
POST
|
Matei, Without utilizing the Data Interoperability extension, you can bring your DWGs right into arcmap -- where you can at least turn all the drawing layers on/off. Assuming your DWGs are properly spatially referenced, you should be able to zoom into the area and see if the native DWG exhibit the same behavior in ArcMap. Also, there is no gap if you look in the reference DWG? ~Alex
... View more
08-02-2016
06:16 AM
|
0
|
0
|
250
|
POST
|
Flavie, You can check out Tom Swanson's AGO get Info. You will need visual studio of some sort to open and run. GitHub - tswanson/AGOgetInfo: Output all AGO content for Org to a csv file I have seen this in action and believe it is exactly what you are looking for. Regards, Alex
... View more
08-02-2016
05:57 AM
|
0
|
5
|
665
|
POST
|
Charlie, The field calculator (regular expression) is exactly what you need to help parse through your JSON and extract the proper coordinates. Since I do not have access to your JSON REST endpoint, I took your example record and utilized the "Watch a Folder for New JSON Files" connector. 1. Create a new GeoEvent definition for your input (copy the auto generated definition from the first time you recorded a GeoEvent through the REST endpoint). My original input I called JSON_IN: Add three fields to your new copy: Coords (String) x (Double) y (Double) My new output definition I called JSON_IN-copy (new fields at the end) 2. Begin to extract coordinates and calculate geometry: Field Mapper -- Map original GeoEvent Definition to the new one Name: fm Processor: Field Mapper Source: JSON_IN (your original input) Target: JSON_IN-copy (your modified output with three fields). Make sure your three new fields are included at the bottom: Field Calculator (Regular Expression) -- Process the Latitude/Longitude from original JSON Name: Pull Coordinates Processor: Field Calculator (Regular Expression) Field Name: ${CREATED_LOCATION} Pattern: ^(\d*.\d*):(\d*.\d*) Target Field: Existing Field Existing Field Name: Coords Sample value written to Coords field: 36.863681:42.992592 Field Calculator (Regular Expression) -- Calculate X - Search from the beginning of the Coords field value for all characters prior to a colon. Name: x_calc Processor: Field Calculator (Regular Expression) Field Name: ${Coords} Pattern: ^(\d*.\d*) or ^[^:]+ Target Field: Existing Field Existing Field Name: x Sample value: 36.863681 Field Calculator (Regular Expression) -- Calculate Y Name: y_calc Processor: Field Calculator (Regular Expression) - Locate value before a colon (from end of the Coords field) Field Name: ${Coords} Pattern: (\d*.\d*)$ or [^:]+$ Target Field: Existing Field Existing Field Name: y Sample Value: 42.992592 Field Calculator - Process Geometry - Combine values of X, Y into a geometry field Name: Process Geometry Processor: Field Calculator Expression: '{"x":'+ x +',"y":'+ y +'}' Target Field: New Field New Field Name: Geometry New Field Type: GEOMETRY New GeoEvent Definition Name: Final_EXAMPLE That process will output: You can now see the fields at the end including the geometry in " ". With a geometry assigned, you should be able to output to a Feature Service. I have a hunch that you can accomplish this in maybe a step or less, depending on your experience level with regular expressions. However, this worked just fine for me. Let me know if you have any questions. Regards, Alex
... View more
08-01-2016
01:22 PM
|
2
|
16
|
1831
|
POST
|
This should update all of them at once. You were close! with arcpy.da.UpdateCursor(r"C:\TEMP\FZon2", ['DXF_TEXT','FZONE_CODE']) as cursor:
... for row in cursor:
... if row[0] == "R32558011" or row[0] == "R32747010" or row[0] == "R32842" or row[0] == "R32839":
... row[1] = ''
... cursor.updateRow(row) Regards, Alex
... View more
07-19-2016
09:42 AM
|
1
|
0
|
352
|
POST
|
Dave, Awesome! No problem, glad I could help. ~Alex
... View more
07-19-2016
07:38 AM
|
2
|
0
|
1249
|
POST
|
John, If that is an exact snippet of your code, your quotes around Polyline do not match. You have a " closed by a ' in: if IDESC.shapetype == "Polyline': This would certainly cause your issue failing on this type of feature. However, your python IDE shouldn't even let you run this. You would get a SyntaxError: EOL while scanning string literal Let me know if your code displays this same type of quote mismatch. If not, I'll take a further look. ~Alex
... View more
07-19-2016
07:24 AM
|
1
|
0
|
649
|
POST
|
John, When you refer to "based on certain criteria deletes out data", do you mean you delete the entire feature class or delete features within the feature class? This of course would change how you access the data you are trying to delete. For entire feature classes... Shape types are: Polygon Polyline Point Multipoint MultiPatch From your tags, I would assume you are utilizing some form of arcpy.Describe? Like this example: import arcpy
arcpy.env.workspace = r'Database Connections\your database connection.sde'
feature_list = arcpy.ListFeatureClasses()
for feature in feature_list:
desc = arcpy.Describe(feature)
if desc.shapetype == 'Polyline':
print desc.name Can you post a snippet of your code and the exact error message? That would be very helpful in investigating. I am wondering if there is some other operation that is interfering with your delete. Regards, Alex
... View more
07-18-2016
02:08 PM
|
1
|
2
|
649
|
Title | Kudos | Posted |
---|---|---|
1 | 07-28-2017 09:26 AM | |
1 | 03-15-2017 01:44 PM | |
1 | 11-11-2016 12:00 PM | |
1 | 11-11-2016 11:49 AM | |
1 | 03-28-2017 06:02 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|