|
POST
|
Oh yes, for creating a point geometry the notation is Lon/Lat (Writing geometries—ArcPy Get Started | ArcGIS for Desktop ) and not the format I used in my script. So just change the sequence of the coordinate pairs to match the LAT and LON fields (see edits to my original script code): pnt1 = arcpy.PointGeometry(arcpy.Point(coord[2],coord[1]),srWGS,False, False)
... View more
11-28-2016
04:09 AM
|
1
|
0
|
6169
|
|
POST
|
Yes it should work. You might need to deauthorize/authorize the licences from the current LM.
... View more
11-28-2016
03:34 AM
|
2
|
3
|
1883
|
|
POST
|
No I don't think your coordinate float value is "too big", but make sure that the float is not expressed as a comma value (54,2506883777232), but with dot notation (54.2506883777232). Revisit your input file's values to ensure that the field formatting is correct..
... View more
11-28-2016
02:44 AM
|
1
|
0
|
6169
|
|
POST
|
Here's a basic version of a script that might work for you: import arcpy, os, csv, numpy as np
csvfile = r'D:\GIS\Scripts\points.csv'
arcpy.env.workspace = r'D:\GIS\ArcGIS\scratch.gdb'
polygons = arcpy.mapping.Layer(r'D:\GIS\ArcGIS\scratch.gdb\csv_points_poly')
csv = np.genfromtxt(csvfile, delimiter=",")
srWGS = arcpy.SpatialReference(4326)
# from second line of array
cur = arcpy.da.InsertCursor(polygons, ("ID", "SHAPE@"))
for coord in csv[1:]:
print coord
array = arcpy.Array()
# point 1
pnt1 = arcpy.PointGeometry(arcpy.Point(coord[2],coord[1]),srWGS,False, False)
array.append(pnt1.centroid)
# point 2
pnt2 = arcpy.PointGeometry(arcpy.Point(coord[4],coord[3]),srWGS,False, False)
array.append(pnt2.centroid)
# point 3
pnt3 = arcpy.PointGeometry(arcpy.Point(coord[6],coord[5]),srWGS,False, False)
array.append(pnt3.centroid)
# point 4
pnt4 = arcpy.PointGeometry(arcpy.Point(coord[8],coord[7]),srWGS,False, False)
array.append(pnt4.centroid)
polygon = arcpy.Polygon(array,srWGS)
cur.insertRow((coord[0],polygon)) First I created the output polygon feature class "csv_points_poly" in my scratch GDB with an additional "ID" field. Then assuming your XLS/CSV file looks something like this: ID,LAT1,LON1,LAT2,LON2,LAT3,LON3,LAT4,LON4
1,-34.5,17,-34.5,17.5,-35,17.5,-35,17
2,-34,18,-34,18.5,-34.5,18.5,-34.5,18
3,-33.5,19,-33.5,19.5,-34,19.5,-34,19
4,-32.5,20,-32.5,20.5,-33,20.5,-33,20
5,-31.5,21,-31.5,21.5,-32,21.5,-32,21
6,-30.5,22,-30.5,22.5,-31,22.5,-31,22
7,-30,23,-30,23.5,-30.5,23.5,-30.5,23
8,-29,24,-29,24.5,-29.5,24.5,-29.5,24
9,-28,25,-28,25.5,-28.5,25.5,-28.5,25
10,-27,26,-27,26.5,-27.5,26.5,-27.5,26 You can use numpy to make an array of your data, which you can iterate to build a polygon for each row.
... View more
11-28-2016
01:24 AM
|
1
|
5
|
6169
|
|
POST
|
You could handle your print template "plate" as a global variable and on the map extent change event (Map | API Reference | ArcGIS API for JavaScript 3.18 ) set the properties for the dynamic text map.on('extent-change', function(){
plate.layoutOptions.customTextElements.centerLatLong = latLong;
plate.layoutOptions.customTextElements.centerXY = center;
});
... View more
11-27-2016
11:47 PM
|
0
|
8
|
3628
|
|
POST
|
Same line as yours. Seeing that you are calling the PlayTimeSeries function recursively, you can call the clearTimeout method just before the setTimeout method.
... View more
11-21-2016
11:18 PM
|
0
|
2
|
1650
|
|
POST
|
Setting timeouts within the function scope might not be the best option. You should also create handlers for each timeout which you can clear before updating the layer definitions e.g. ... var toHandler = setTimeout( function(...){
...
clearTimeout(toHandler);
}) Why not consider time-enabling your layer and displaying it with a Time Slider (TimeSlider | API Reference | ArcGIS API for JavaScript 3.18)?
... View more
11-21-2016
10:23 PM
|
0
|
4
|
1650
|
|
POST
|
I also like the Leaflet option. The marker clustering plugin is very easy to use (GitHub - Leaflet/Leaflet.markercluster: Marker Clustering plugin for Leaflet ) and you can use ArcGIS services if you integrate the Esri plugin (GitHub - Esri/esri-leaflet: A lightweight set of tools for working with ArcGIS services in Leaflet. )
... View more
11-21-2016
10:09 PM
|
0
|
0
|
1345
|
|
POST
|
You should post your new question under a new topic. For labelling have a look at LabelLayer | API Reference | ArcGIS API for JavaScript 3.18
... View more
11-21-2016
02:54 AM
|
0
|
2
|
4679
|
|
POST
|
Are you going to use vector or raster data? I think you should look at time enabled layers (Enabling time on your data—Help | ArcGIS for Desktop ) if you want to do time-series maps, which will work for vector and raster (mosaic).
... View more
11-20-2016
11:50 PM
|
0
|
0
|
1040
|
|
POST
|
Yes that's correct. The link in the accepted answer refers to that tool.
... View more
10-19-2016
01:52 AM
|
0
|
0
|
1710
|
|
POST
|
You need to ensure that the ArcGIS Server is using the correct printer driver and you'll need to install a default printer with the ArcGIS Server account. See these threads: Bug: The PrintingTools service produces garbled or pixelated legend patches in PDF output https://community.esri.com/thread/99559#post227447 https://community.esri.com/message/368870?commentID=368870#comment-368870
... View more
10-17-2016
04:20 AM
|
2
|
0
|
2613
|
|
POST
|
I don't think there is a tool to let you do that directly. Did you set the Match Option in the tool to use "HAVE_THEIR_CENTER_IN"? Alternatively, you could convert the polygons to a point feature class, remove the fields you don't want and then run the spatial join with the polygons and points.
... View more
10-17-2016
03:05 AM
|
0
|
2
|
1710
|
|
POST
|
The Spatial Join tool should do the trick (Spatial Join—Help | ArcGIS for Desktop ).
... View more
10-14-2016
03:27 AM
|
3
|
0
|
1710
|
|
POST
|
So you basically want to calculate Field 2 based on the value in Field 1 Your Python code block can look like this: def calcfield(field1):
val = ""
if field1 == "test":
val = "string 2"
else:
val = "other string"
return val And the field calculation expression: Field2 = calcfield(!MyField!)
... View more
10-14-2016
02:58 AM
|
1
|
0
|
1389
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-22-2024 12:37 AM | |
| 1 | 10-02-2025 10:28 AM | |
| 1 | 09-17-2024 12:29 AM | |
| 1 | 03-15-2024 11:33 AM | |
| 1 | 03-13-2024 11:20 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-02-2026
12:31 AM
|