|
POST
|
I created a similar tool in Model Builder: Split by Attributes
... View more
10-21-2015
11:59 PM
|
0
|
0
|
472
|
|
POST
|
With a bit of Python coding you should be able to do it. To create point features from your lines' vertices without an Advanced Licence, you need to iterate the feature parts of each line and write the points to a different feature class. There is an example how to do this here (Read polyline geometry) and write to the new feature class with the Insert Cursor. For your situation where the vertices might be far apart, you probably need to break the line features up into equal length smaller segments - for this you can use the positionAlongLine method (find usage instructions on this page) in an iteration to determine how far along the line the point should be. Once you have your segmented feature points for each line (in different feature classes), you can check which two points from each line points feature class are the closest to one another, take the geometric centre of them and create an array of these points to create a line feature again. You can try this code to create the centre line points: import arcpy
# point layers loaded in your dataframe
pnts1 = arcpy.mapping.Layer("line1_pnts")
pnts2 = arcpy.mapping.Layer("line2_pnts")
# create search cursor to iterate through first layer
scur = arcpy.SearchCursor(pnts1)
row = scur.next()
closestPnt = 0
closestPntID = 0
cenPnts = []
ctr=0
while row:
shp = row.shape
geom = shp.getPart()
print "Geom1 - " + str(row.FID) + ": " + str(geom.X) + ":" + str(geom.Y)
mindist = 9999
tmpdist = 9999
# search cursor for feature in second line point layer
scur2 = arcpy.SearchCursor(pnts2)
row2 = scur2.next()
geom2X = 0
geom2Y = 0
while row2:
shp2 = row2.shape
geom2 = shp2.getPart()
# check distance between points first and second layer and find closest point
tmpdist = shp.distanceTo(shp2)
if tmpdist < mindist:
mindist = tmpdist
closestPnt = shp2
closesPntID = row2.FID
geom2X = geom2.X
geom2Y = geom2.Y
row2 = scur2.next()
del scur2
print "Geom2 - " + str(closesPntID) + ": " + str(closestPnt.getPart().X) + ":" + str(closestPnt.getPart().Y)
print "Dist: " + str(mindist)
if shp != closestPnt:
# calculate geometric centre of two points closest to each other
cenX = (geom.X + geom2X) / 2
cenY = (geom.Y + geom2Y) / 2
midpnt = arcpy.Point(cenX, cenY)
# create mid line point
ptGeometry = arcpy.PointGeometry(point)
print "Mid1 >> " + str(cenX) + ":" + str(cenY)
# add point to array
cenPnts.append(midpnt)
row = scur.next()
ctr += 1
del scur
# write list of points to new point feature class ("cenlinepnts" - create point feature class and load into dataframe) for centre line
inscur = arcpy.InsertCursor("cenlinepnts")
insrow = inscur.newRow()
for p in cenPnts:
insrow.shape = p
inscur.insertRow(insrow)
del inscur There might be more efficient ways, but for this you don't need an Advanced licence.
... View more
10-21-2015
06:02 AM
|
1
|
1
|
5538
|
|
POST
|
In the ArcToolbox there is Conversion Tools -> From KML -> KML to Layer, which is available at all licence levels.
... View more
10-21-2015
02:30 AM
|
0
|
2
|
1082
|
|
POST
|
Thanks Simon, it works. I'm still using the 3.12 API version. Inserted it at the start of my "require" first function.
... View more
03-17-2015
10:57 PM
|
0
|
0
|
3178
|
|
POST
|
Hi Simon Uyttendaele Can you advise where to add this code?
... View more
03-17-2015
05:50 AM
|
0
|
2
|
3178
|
|
POST
|
Sorry Robert, I got confused with the WAB templates.
... View more
03-02-2015
09:57 PM
|
0
|
0
|
1196
|
|
POST
|
You'll need publishing permission on ArcGIS Server too, so chat to the server admin about that. Here is a tutorial page for publishing printing services. As for the overview map, you can read up on using an extent indicator. Basically you will need an additional data frame in your MXD - one for the main map and one for showing the overview map. Once you've finalised your MXD with an overview map, it must be added to the print templates folder and the print service must be republished.
... View more
02-24-2015
10:28 PM
|
2
|
2
|
2888
|
|
POST
|
The print service you are using only uses the default print layouts and none of them has the option for an overview map. You will need to set up a custom print template MXD (for each page size) that contains an additional data frame for the overview map, copy the new templates to your print templates folder (C:\Program Files (x86)\ArcGIS\Desktop10.2\Templates\ExportWebMapTemplates or create/select another folder which your ArcGIS Server has access to) and then republish the print service again with the Export Web Map tool. You should then be able to use one of the new print templates with an overview map as part of your print service. Check out my very basic jsFiddle example. You will have to decide on a background image service for your overview map's data frame in the new print template MXD - this cannot be changed when calling the print task unfortunately. Also, the overview map's extent indicator cannot be set transparent in ArcGIS.
... View more
02-23-2015
10:09 PM
|
2
|
5
|
2888
|
|
POST
|
Just for clarification, must the overview map display in the app in a separate container or in the printout map?
... View more
02-23-2015
12:47 AM
|
0
|
7
|
2888
|
|
POST
|
I don't think you can manipulate a print template dynamically, therefore I would set up 2 different print templates for each page size: one with an overview map data frame and one without. Then if the user ticks the option for including an overview map, select print template 1, otherwise print template 2 without the overview map.
... View more
02-19-2015
10:12 PM
|
0
|
9
|
2888
|
|
POST
|
For a start, open access to your example links would be nice. I could get the CSV to import and show like this: AGO Map: http://arcg.is/1vMzs33 The county data was added as an address type with the county name specified as "City" and state name as "State" and then symbolized on POP_2013. Not sure if you can actually link or join the CSV data to another layer on ArcGIS Online. You might have to join the data to the counties before you upload to AGO.
... View more
02-19-2015
10:00 PM
|
0
|
0
|
478
|
|
POST
|
I have found that the missing legend classes in the print export map are a result of the active dataset that does not contain any values in the specific class range and hence the "empty" class gets dropped from the legend. I would still like to see the full range for the class breaks in the print export map legend, because sometimes the missing class breaks are for values in the middle of the data range.
... View more
02-19-2015
05:27 AM
|
0
|
1
|
1650
|
|
POST
|
The Tabulate Intersection tool in the Analysis->Statistics toolbox is probably what you are looking for.
... View more
02-18-2015
10:39 PM
|
0
|
0
|
913
|
|
POST
|
I've had limited success with applying client-side raster function rendering rules to an image service. I've successfully applied the Mask function, but now I want to combine it with a Colormap rendering rule, preferably with a Color Ramp visualisation. I'm testing with the Image Service's Export Image page of my server directory on a single band raster. My Mask rendering rule, showing values between 200 and 500, looks like this: { "rasterFunction" : "Mask", "rasterFunctionArguments" : { "IncludedRanges" : [200,500], "NoDataValues" : [], "Raster":"Raster" }, "variableName" : "Raster" } Now I would like to combine it with the Colormap rendering rule with a Color Ramp.
... View more
02-18-2015
04:47 AM
|
0
|
1
|
5418
|
|
POST
|
Your code snippet would not create the map to add any layer to it, so yes my code will not work in that case. I think the best would be for you to work through the API reference and samples. You can start here: https://developers.arcgis.com/javascript/jshelp/intro_firstmap_amd.html No need for me to repeat what has been explained in many good samples.
... View more
02-17-2015
10:22 PM
|
1
|
1
|
1558
|
| 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 |
Online
|
| Date Last Visited |
18 hours ago
|