IDEA
|
-->
You make your selection on the map then you see your selected feature counts in the List by Selection tab in the TOC from here would like the right click context menu for each selected layer to include "Data", "Export Data..." like you would find in List by Drawing Order tab. This would help because when you are selecting multiple layers and you have many layers in your TOC, it gets hard to search for each one when there's no indication which layers are selected.
... View more
12-23-2014
11:32 AM
|
4
|
1
|
199
|
POST
|
"Upgrade to 10.1 SP1 Quality Improvement Patch "-- this got rid of my keep existing cache checkbox! How can I keep my existing cache when i republish a service without this check box? I am also getting the dreaded "failed to cache extent: ... at scale 480 Field is not editable. The index was either too large or too small." was optimistic about this patch until I tried to republish my service and saw the check box to keep the cache was gone.
... View more
08-20-2014
05:23 PM
|
0
|
0
|
2198
|
POST
|
Just found this...Thanks for posting Becky, that helped me a lot! We recently upgraded from 10 to 10.1 and the most I could find on bringing over our caches was when you copy over the cache to make sure the name was the same as the service. It worked mostly.. the tiles would display in our applications, but you could tell pieces were missing. previewing in javascript api from the services directory showed a blank map, and running the manage cache tiles tool didn't list out the scale levels. But your sequence of steps help us correct these issues..
... View more
04-28-2014
03:12 PM
|
0
|
0
|
416
|
POST
|
Hello, I'm trying to script republishing a map service that already has a cache and am having problems getting it to keep the existing cache. my script is using a combo of arcpy.mapping.CreateMapSDDraft, arcpy.StageService_server and arcpy.UploadServiceDefinition_server. Does anyone have an example of how to script republishing a service while keeping your existing cache? I've been trying to set properties of the .sddraft file by following doc = DOM.parse(sddraft)
#turn on caching in the configuration properties
configProps = doc.getElementsByTagName('ConfigurationProperties')[0]
propArray = configProps.firstChild
propSets = propArray.childNodes
for propSet in propSets:
keyValues = propSet.childNodes
for keyValue in keyValues:
if keyValue.tagName == 'Key':
print "found Key"
print str(keyValue.firstChild.data)
if keyValue.firstChild.data == "KeepExistingMapCache":
print "found keep existing cache prop"
#keep existing caching
keyValue.nextSibling.firstChild.data = 'true'
elif keyValue.firstChild.data == "isCached":
print "found is cached prop"
#turn on caching
keyValue.nextSibling.firstChild.data = 'true'
elif keyValue.firstChild.data == "antialiasingMode":
keyValue.nextSibling.firstChild.data = 'Fast' Hoping that Im missing something here and thats it's possible to do this. Oh and im using 10.1 sp1 Thanks
... View more
04-21-2014
02:19 PM
|
0
|
0
|
709
|
POST
|
Hi, I've got a tiled map service that displays fine in flex api, in silverlight, in arcmap, but not javascript api since moving the cache from an arcgis server 10 machine to 10.1 (it did display fine in js api when being served from a 10.0 server). My other cached map service which the tiles are format jpeg displays fine in javascript api from the new 10.1 server. The map service with the problem has tile image format of "Mixed".. Does anyone know if this type of tiled service not supported in javascript api from a 10.1 server or is this a bug, or maybe has something to do with the migration of the cache to the new server... just trying to rule some things out. Thanks a lot. here are some details from the service directory: Single Fused Map Cache: true Tile Info: Height: 512 Width: 512 DPI: 96 Levels of Detail: 14 Level ID: 0 [ Start Tile, End Tile ] Resolution: 0.10416666666666667 Scale: 120 Level ID: 1 [ Start Tile, End Tile ] Resolution: 0.20833333333333334 Scale: 240 Level ID: 2 [ Start Tile, End Tile ] Resolution: 0.4166666666666667 Scale: 480 Level ID: 3 [ Start Tile, End Tile ] Resolution: 0.5208333333333334 Scale: 600 Level ID: 4 [ Start Tile, End Tile ] Resolution: 1.0416666666666667 Scale: 1200 Level ID: 5 [ Start Tile, End Tile ] Resolution: 1.4583333333333335 Scale: 1680 Level ID: 6 [ Start Tile, End Tile ] Resolution: 2.0833333333333335 Scale: 2400 Level ID: 7 [ Start Tile, End Tile ] Resolution: 4.166666666666667 Scale: 4800 Level ID: 8 [ Start Tile, End Tile ] Resolution: 8.333333333333334 Scale: 9600 Level ID: 9 [ Start Tile, End Tile ] Resolution: 15.625000000000002 Scale: 18000 Level ID: 10 [ Start Tile, End Tile ] Resolution: 31.250000000000004 Scale: 36000 Level ID: 11 [ Start Tile, End Tile ] Resolution: 41.66666666666667 Scale: 48000 Level ID: 12 [ Start Tile, End Tile ] Resolution: 62.50000000000001 Scale: 72000 Level ID: 13 [ Start Tile, End Tile ] Resolution: 108.50694444444446 Scale: 125000 Format: Mixed Compression Quality: 75.0 Origin: X: -1.5822E7 Y: 3.3315599999999993E7 Spatial Reference: 102709 (3423) Initial Extent: XMin: 2230936.559916945 YMin: 1.484664112464784E7 XMax: 2323003.654913731 YMax: 1.4899482191160783E7 Spatial Reference: 102709 (3423) Full Extent: XMin: 2131158.2962532546 YMin: 1.4702703773002457E7 XMax: 2379417.816155119 YMax: 1.497342893080594E7 Spatial Reference: 102709 (3423)
... View more
02-27-2014
10:11 AM
|
0
|
0
|
435
|
POST
|
Hi, I've been developing a soap soe to be deployed on a map service that I don't intend to be displayed anywhere as a map, just a way to get to the underlying data through arcgis server as a webservice. Now I realize the results of the soe reflect how the data was when the map service was started. If I make edits to the data the edits aren't reflected in the results until i restart the map service.... If I do display the map service and pan the map or zoom or whatever, then the data is "refreshed" for the soe... but this doesn't seem right to have to do that. Is there a way around this? (AGS 10.1 sp1 with sde) Thanks a lot.
... View more
12-18-2013
07:35 AM
|
0
|
0
|
499
|
POST
|
At 10.1 for SOAP SOE you do not need to manually create any XML registry file. The latest arcobjects sdk help for soap soe describes the creation of xml registry file so this is a little unclear about how its actually getting handled.
... View more
11-16-2013
02:18 PM
|
0
|
0
|
176
|
POST
|
I ended up doing this and it works... Private Function GeocodeSOAP(ByVal Inputadd As String) As String
Dim geocodeservice As Parcels_GeocodeServer = New Parcels_GeocodeServer()
geocodeservice.Url = "http://myarcgisserver/arcgisserver/services/Parcels/GeocodeServer"
' Define address inputs
'had to qualify properyset because of ambiguous references
Dim geocodePropSet As serverparcellocator.PropertySet = New serverparcellocator.PropertySet()
Dim propArray(1) As PropertySetProperty
Dim geocodeProp As PropertySetProperty = New PropertySetProperty()
geocodeProp.Key = "Street"
' Intersection
'geocodeProp.Value = "Magnolia & Central";
' Address
geocodeProp.Value = InputAPN
propArray(0) = geocodeProp
Dim geocodeProp1 As PropertySetProperty = New PropertySetProperty()
geocodeProp1.Key = "Zone"
geocodeProp1.Value = ""
propArray(1) = geocodeProp1
geocodePropSet.PropertyArray = propArray
'Geocode address
Dim results As wateragsparcellocator.PropertySet = geocodeservice.GeocodeAddress(geocodePropSet, Nothing)
Dim resultsArray() As PropertySetProperty = results.PropertyArray
Dim geocodePoint As PointN = Nothing
Dim result As PropertySetProperty
For Each result In resultsArray
Dim val As String = result.Key.ToString()
If result.Key = "Shape" Then
geocodePoint = CType(result.Value, PointN)
Dim x As Double = geocodePoint.X
Dim y As Double = geocodePoint.Y
End If
Next
Return CStr(geocodePoint.X) & " " & CStr(geocodePoint.Y)
End Function Choose soap over http request because It seems easier to deal with the results after finding this example....
... View more
11-07-2013
06:26 AM
|
0
|
0
|
197
|
POST
|
Ok, I think I'm getting it now... Thanks for your help
... View more
11-06-2013
06:28 AM
|
0
|
0
|
288
|
POST
|
Thanks a lot! So is there no equivalent to server context release when you're done?
... View more
11-04-2013
02:01 PM
|
0
|
0
|
288
|
POST
|
Hi could anyone tell me if its possible to geocode an address within a SOE. It could be done before making direct connection to server. Is there a way to access either an address locator in the geodatabase or access a locator service... from an SOE thats deployed on a map service? Thanks a lot.
... View more
11-01-2013
09:30 AM
|
0
|
1
|
1949
|
POST
|
Hi All, I'm trying to refactor some old code to create a SOE and before with direct connections to the server the following was true for creating an object in the server: This was incorrect: Dim point As IPoint = New Point() this was correct: Dim point As IPoint = serverContext.CreateObject("esriGeometry.Point") Now in 10.1 in a SOE if I want to create a new temporary point or polygon, etc. what is the correct way of doing this? Thanks a lot
... View more
11-01-2013
08:32 AM
|
0
|
4
|
607
|
POST
|
Figured it out... it was using feature to point tool. That tool requires an Server Advanced license. the script tool worked on desktop because I had an Info license... Went about getting the centroid using the geometry object tools. import arcpy
import os
import sys
APN = arcpy.GetParameterAsText(0)
scriptPath = sys.path[0]
thisFolder = os.path.dirname(scriptPath)
ToolDataPath = os.path.join(thisFolder, "ToolData")
parcels = os.path.join(ToolDataPath,"County_Parcels.lyr")
ServiceArea = os.path.join(ToolDataPath, "Service_Area.lyr" )
whereclause = '"APN" = ' + str(APN)
print whereclause
#Get the parcel centroid of the selected parcel and then spatial join the
# parcel centroid with the Service Area it falls within.
# Return the name of the Service Area.
try:
arcpy.MakeFeatureLayer_management(parcels, "PARCELtobeQueried", whereclause)
arcpy.MakeFeatureLayer_management(ServiceArea, "ServiceLayer")
layerdesc = arcpy.Describe("ParceltobeQueried")
shapefieldname = layerdesc.ShapeFieldName
print str(shapefieldname)
rows = arcpy.SearchCursor("ParceltobeQueried")
for row in rows:
feat = row.getValue(shapefieldname)
cent = feat.centroid
print cent.X, cent.Y
myPt = arcpy.Point(cent.X, cent.Y)
myPtGeometry = arcpy.PointGeometry(myPt)
arcpy.SelectLayerByLocation_management("ServiceLayer", "INTERSECT", myPtGeometry)
srows = arcpy.SearchCursor("ServiceLayer")
for srow in srows:
print srow.DESCRIPTIO
OUTPUT = arcpy.SetParameterAsText(1, str(srow.DESCRIPTIO))
#arcpy.Delete_management("ServiceLayer")
del srow, srows
del row, rows
arcpy.Delete_management("PARCELtobeQueried")
except:
msg = arcpy.GetMessages()
print msg
... View more
10-24-2013
07:43 AM
|
0
|
0
|
226
|
POST
|
Hi Everyone, Wanted to repost my code, all the field mapping stuff was taking up a lot of space... Does any one know if the arcgisserver account needs permissions to someplace in particular to write to in_memory workspace? The script below is supposed to make a centroid of a selected parcel and then spatial join it to a service area fc and return an attribute from that spatial joined fc. Its works fine in desktop but returns nothing when its published as a service. BTW its published as a script tool within a model with two parameter variables, gplong (in) and GPString (out). I've tried writing these intermediate outputs to scratch workspace with no luck either. When Im using only select cursors and not trying to write to anything it will return results as a service (but I need the centroid). If anyone has any ideas (script or server permissions or otherwise) I really appreciate it. Thanks, import arcpy
import os
import sys
APN = arcpy.GetParameterAsText(0)
scriptPath = sys.path[0]
thisFolder = os.path.dirname(scriptPath)
ToolDataPath = os.path.join(thisFolder, "ToolData")
parcels = os.path.join(ToolDataPath,"County_Parcels.lyr")
ServiceArea = os.path.join(ToolDataPath, "Service_Area.lyr" )
whereclause = '"APN" = ' + str(APN)
#Get the parcel centroid of the selected parcel and then spatial join the
# parcel centroid with the Service Area it falls within.
# Return the name of the Service Area.
try:
#make feature layer of the parcel by the APN the user enters
arcpy.MakeFeatureLayer_management(parcels, "PARCELtobeQueried", whereclause)
ParcelCentroid = "in_memory" + "\\" + "ParcelCentroidFeature"
#Create a centroid of the feature layer
arcpy.FeatureToPoint_management("PARCELtobeQueried",ParcelCentroid )
SpatialJoinOUT = "in_memory" + "\\" + "ParcelCentroidSJBound"
#do a spatial join attaching the attributes of the Service Area to the Parcel Centroid feature
arcpy.SpatialJoin_analysis(ParcelCentroid,ServiceArea, SpatialJoinOUT)
#search cursor to get the attribute of the spatial join out feature
rows = arcpy.SearchCursor(SpatialJoinOUT)
row = rows.next()
TestText = ''
while row:
print row.DESCRIPTIO
TestText = str(row.DESCRIPTIO)
break
OUTPUT = arcpy.SetParameterAsText(1, TestText)
print TestText
del row, rows
arcpy.Delete_management(SpatialJoinOUT)
arcpy.Delete_management("PARCELtobeQueried")
arcpy.Delete_management(ParcelCentroid)
except:
msg = arcpy.GetMessages()
print msg
... View more
10-17-2013
02:04 PM
|
0
|
0
|
226
|
POST
|
Hi, I have a really basic script that I want to run as a geoprocessing service but from server it yields no results. It works and gives the expected result as a script tool in desktop. It works as expected when wrapped in a model and run from desktop. But when I publish it to server (10.0 sp3 .net) it doesn't fail, it just doesn't give any results. I think I've followed the best practices for the folder structure and data paths etc. Im using in_memory workspace for some of the outputs (hoping to speed up the process) and I think the server isn't actually able to write to in_memory (is that even possible?). Any suggestions are welcome, I've been trying to get this to work for a couple days now. Thanks. Here's the code: import arcpy
from arcpy import env
import os
import sys
env.workspace = "in_memory"
APN = arcpy.GetParameterAsText(0)
scriptPath = sys.path[0]
thisFolder = os.path.dirname(scriptPath)
ToolDataPath = os.path.join(thisFolder, "ToolData")
ScratchPath = os.path.join(thisFolder, "Scratch")
ScratchDataPath = os.path.join(ScratchPath, "scratch.gdb")
parcels = os.path.join(ToolDataPath,"County_Parcels.lyr")
ServiceArea = os.path.join(ToolDataPath, "Service_Area.lyr" )
whereclause = '"APN" = ' + str(APN)
try:
arcpy.MakeFeatureLayer_management(parcels, "PARCELtobeQueried", whereclause, "", "OBJECTID OBJECTID HIDDEN NONE;SHAPE SHAPE HIDDEN NONE;APN APN VISIBLE NONE;PIN PIN HIDDEN NONE;STREETNUM STREETNUM HIDDEN NONE;STREETDIR STREETDIR HIDDEN NONE;STREET STREET HIDDEN NONE;CITY CITY HIDDEN NONE;FIRSTNAME FIRSTNAME HIDDEN NONE;LASTNAME LASTNAME HIDDEN NONE;MAILING1 MAILING1 HIDDEN NONE;MAILING2 MAILING2 HIDDEN NONE;MAILCITY MAILCITY HIDDEN NONE;MAILSTATE MAILSTATE HIDDEN NONE;MAILZIP MAILZIP HIDDEN NONE;LAND_USE LAND_USE HIDDEN NONE;ZONING ZONING HIDDEN NONE;WATER WATER HIDDEN NONE;SEWER SEWER HIDDEN NONE;ACREAGE ACREAGE HIDDEN NONE;TAXDIST TAXDIST HIDDEN NONE;BEDROOMS BEDROOMS HIDDEN NONE;BATHS BATHS HIDDEN NONE;YEARBLT YEARBLT HIDDEN NONE;LANDASS LANDASS HIDDEN NONE;BUILDASS BUILDASS HIDDEN NONE;TOTALASS TOTALASS HIDDEN NONE;LANDAPR LANDAPR HIDDEN NONE;BUILDAPR BUILDAPR HIDDEN NONE;TOTALAPR TOTALAPR HIDDEN NONE;PROPCODE PROPCODE HIDDEN NONE;STORIES STORIES HIDDEN NONE;TOWNHOUSE TOWNHOUSE HIDDEN NONE;UNITS UNITS HIDDEN NONE;BUILDINGTYPE BUILDINGTYPE HIDDEN NONE;NAME NAME HIDDEN NONE;NUMBER_ NUMBER_ HIDDEN NONE;TOWNSHIP TOWNSHIP HIDDEN NONE;RANGE RANGE HIDDEN NONE;SECT SECT HIDDEN NONE;NBHD NBHD HIDDEN NONE;FACTORDIST FACTORDIST HIDDEN NONE;SALEDATE SALEDATE HIDDEN NONE;SALEPRICE SALEPRICE HIDDEN NONE;SPECPROPCODE SPECPROPCODE HIDDEN NONE;QC QC HIDDEN NONE;ORIG_FID ORIG_FID HIDDEN NONE")
#below is writing to in memory
ParcelCentroid = env.workspace + "\\" + "ParcelCentroidFeature"
arcpy.FeatureToPoint_management("PARCELtobeQueried",ParcelCentroid )
arcpy.Delete_management("PARCELtobeQueried")
#below is writing to in memory
SpatialJoinOUT = env.workspace + "\\" + "ParcelCentroidSJBound"
arcpy.SpatialJoin_analysis(ParcelCentroid,ServiceArea, SpatialJoinOUT, 'JOIN_ONE_TO_ONE','KEEP_ALL', "APN \"APN\" true true false 4 Long 0 0 ,First,#,{0},APN,-1,-1;DESCRIPTIO \"DESCRIPTIO\" true true false 254 Text 0 0 ,First,#,{1},DESCRIPTIO,-1,-1;NAME \"NAME\" true true false 254 Text 0 0 ,First,#,{2},NAME,-1,-1".format(ParcelCentroid, ServiceArea, ServiceArea), "INTERSECT", "", "")
arcpy.Delete_management(ParcelCentroid)
rows = arcpy.SearchCursor(SpatialJoinOUT)
row = rows.next()
TestText = ''
while row:
print row.DESCRIPTIO
TestText = str(row.DESCRIPTIO)
break
OUTPUT = arcpy.SetParameterAsText(1, TestText)
print TestText
del row, rows
arcpy.Delete_management(SpatialJoinOUT)
except:
print "cannot find apn"
msg = arcpy.GetMessages()
print msg
... View more
10-14-2013
04:08 PM
|
0
|
2
|
923
|
Title | Kudos | Posted |
---|---|---|
4 | 12-23-2014 11:32 AM | |
19 | 08-06-2010 03:43 PM | |
19 | 08-06-2010 03:43 PM | |
16 | 08-06-2010 04:06 PM | |
14 | 08-06-2010 04:06 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|