POST
|
Thanks Gerardo. Our local support vendor suggested the same and I've now implemented an output parameter for messaging and to indicate it has finished. Only problem is running the GP tool more than once just shows up the same message. Our IE settings are set to cache the json response so it gives the same response when run again in the same session. Apparently in the Silverlight API you can disable client caching. Not so in the prebuilt ArcGIS Viewer for Silverlight.
... View more
05-06-2012
03:08 PM
|
0
|
0
|
263
|
POST
|
Hopefully you won't have to do it again, if you do try this http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000022000000http:// tool and then use the other one called Table to Domain to import them back. It'll at least save you having to copy a large amount of material. There's also this tool http://resources.arcgis.com/gallery/file/geodatabase/details?entryID=D62A883B-1422-2418-8873-5721AB32134Dhttp:// which can help when handling domains.
... View more
05-03-2012
06:55 PM
|
0
|
0
|
1122
|
POST
|
Hi Eric V, I have the same problem, there is no Register option. Am on a 64bit Win7 machine. The only other thing I could think of is maybe I need to install the .Net SDK as that was mentioned somewhere in the help the text document that you download with the file has in it. If you've managed to register it and get it going I'd be interested in knowing how. Thanks, Mark
... View more
05-02-2012
02:01 PM
|
0
|
0
|
297
|
POST
|
We've got some GP tools in an MXD which we publish and then use in the ArcGIS Viewer for Silverlight. When we execute the script it works fine but after having done the processing the dialog box sits there with the "Getting results..." message and doesn't finish, stop or disappear. How do we clear the processing thread\SOC or whatever and have the dialog box work as it should I guess. Also, is there a way of passing messages from a Script to a user in the ArcGIS Viewer using a GP tool? I've tried AddMessage in the script but it doesn't show up. The whole things works fine in the MXD but I'd like to add some user feedback in the Viewer so the user knows it has done what it should have. Thanks in advance. # Import arcpy module import arcpy arcpy.env.Overwriteoutput = True # Local variables: Stoat_Trap_Input = arcpy.GetParameterAsText(0) Stoat_Trap_Records = "Stoat Trap Records" stifl = "in_memory\\stifl" try: arcpy.MakeFeatureLayer_management(Stoat_Trap_Input, stifl, "Trap1 <>'Unchecked' OR Trap2 <>'Unchecked'") featurecount = arcpy.GetCount_management(stifl) print featurecount if not featurecount == 0: arcpy.AddMessage("Input layer " + Stoat_Trap_Input + " has " + str(featurecount) + " new\updated records.") arcpy.AddMessage("Adding " + str(featurecount) + " new\updated records to the main database.") arcpy.Append_management("in_memory\\stifl", Stoat_Trap_Records, "NO_TEST") arcpy.AddMessage(str(featurecount) + " new\updated records successfully added.") arcpy.CalculateField_management(stifl, "Trap1", "\"Unchecked\"", "PYTHON_9.3", "") arcpy.CalculateField_management(stifl, "Trap2", "\"Unchecked\"", "PYTHON_9.3", "") arcpy.RefreshActiveView() else: arcpy.AddMessage("Input layer " + Stoat_Trap_Input + " has no new updates. Records must be added\updated before they require processing.") except: msgs = arcpy.GetMessages(2) arcpy.AddError(msgs) arcpy.AddMessage(msgs) print msgs del arcpy
... View more
03-05-2012
08:03 PM
|
0
|
2
|
426
|
POST
|
I have ArcGis Desktop 10.1 beta installed and I have downloaded the v 1.2 of the geoportal. However, when trying to install the geoportal publish client, I receive the message "No ArcGIS Desktop 10 or later found" message and the install process is stopped. Any pointer about this issue? http://sourceforge.net/projects/geoportal/forums/forum/1096643/topic/4899200?message=10956475 - this link would suggest they will be porting the desktop add-ins for 10.1 but haven't done so yet.
... View more
01-24-2012
07:31 PM
|
0
|
0
|
374
|
POST
|
There's a V1.2 release of Geoportal http://sourceforge.net/apps/mediawiki/geoportal/index.php?title=Version_1.2
... View more
01-04-2012
04:53 PM
|
0
|
0
|
374
|
POST
|
For ISO 19139 metadata the Geoportal looks at HierarchyLevel for it's icon type and Dataset has been 'assigned' the downloadable data icon. It would be nice if there was further details on how one could re-assign an icon to a different content type, which I'm sure must be possible. It might be worth taking a look at the fgdc-indexables.xml file in here Tomcat 6.0\webapps\geoportal\WEB-INF\classes\gpt\metadata\fgdc - though we're running version 1.0.14 of Geoportal and by the sounds of it things have changed a bit for handling of FGDC metadata for the 1.1 and 1.1.1 versions.
... View more
11-14-2011
07:28 PM
|
0
|
0
|
314
|
POST
|
I've added a CSW as a resource and don't want to copy the contents to the local catalog. However when I synchronise the resource and then search, selecting the CSW site, the layers only show in the search results with links to Metadata and Zoom To. If I copy the entire contents then they show up with the Open link and other links like I'd expect. Is this a problem with the CSW they're publishing or with the CSW_2.0.2_APISO_GeoNetwork_GetRecords_Response.xslt file used by Geoportal? CSW link is: http://data.linz.govt.nz/feeds/csw/?service=CSW&request=GetCapabilities
... View more
10-30-2011
10:18 PM
|
0
|
0
|
1240
|
POST
|
Ended up being a completely unrelated issue, DBA was killing connections to the database and not restarting them for 10-15 min in order for other processing to occur. Geoportal does not keep polling the database so it falls over.
... View more
10-30-2011
09:25 PM
|
0
|
0
|
152
|
POST
|
We have a geoportal setup here http://geoportal.doc.govt.nz/geoportal/catalog/main/home.page , version 1.0.14, but we keep getting the following error sporadically. After a tomcat restart things seem to chug along for a few days and then we get the same thing. Unable to load /geoportal/rest/repositories?protocol=csw&dojo.preventCache=1316414423626 status:502 : Unable to load /geoportal/rest/repositories?protocol=csw&dojo.preventCache=1316414423626 status:502 : /geoportal/rest/repositories?protocol=csw My understanding is repositories got ditched and their function has been changed to be within the Admin tab. We aren't utilising CSW feeds so wonder what this is in relation to. Thanks
... View more
09-18-2011
11:02 PM
|
0
|
1
|
3757
|
POST
|
You need the Publisher extension to create .pmf's from the ArcMap project you setup.
... View more
07-10-2011
08:26 PM
|
0
|
0
|
193
|
POST
|
Our organisation is new to Geoportal and we're trying to work out how we can get the metadata in SDE populated and updated reguarly in Geoportal. We also have a couple of test WMS services that we need to link to the appropriate metadata. How do we go about this? I tried through metadata editing in the ISO 19139 standard but the linkage (http link) disappears when I save the metadata edit. I've attached a screenshot. Thanks in advance!
... View more
05-01-2011
11:32 PM
|
0
|
2
|
2482
|
POST
|
Below is the drastically improved script which utilises a dictionary. Now takes less than 20 sec to process 10000+ features. There's still a number of improvements that could be made to the code, especially for the field deletes etc. as I've just specified them based on knowing the input files.
# Purpose: Allow for symbolic representation where helicopter bait drop swaths overlap. The more overlaps the higher the concentration applied.
import arcpy
import time
import sys
arcpy.env.overwriteOutput = True
print "Start time = " + time.asctime()
# Variables defined by the user
infc = arcpy.GetParameterAsText(0)
existFGDB = arcpy.GetParameterAsText(1)
existFGDBPath = arcpy.GetParameterAsText(2)
FGDBlocation = arcpy.GetParameterAsText(3)
FGDBname = arcpy.GetParameterAsText(4)
outfcname = arcpy.GetParameterAsText(5)
# Checks if the user has specified an existing geodatabase for the output. If so there's a change
# to the path variables so the existing geodatabase is used.
# Function to define path to existing geodatabase
def FGDBsource():
global FGDB
FGDB = existFGDBPath
print arcpy.AddMessage("Opted to put output in existing file geodatabase")
FGDB = FGDBlocation + "\\" + FGDBname + ".gdb"
# Call definition above if output selected to go into existing geodatabase
if existFGDB == 'true': #Should be capital "T" but ArcMap returns lower case!
FGDBsource()
# Otherwise create new geodatabase
else:
print arcpy.AddMessage("Opted to create new file geodatabase")
# Create new File Geodatabase to hold output featureclass
arcpy.CreateFileGDB_management(FGDBlocation, FGDBname)
print arcpy.AddMessage("Created new file geodatabase")
# Set script variables
unionout = FGDB + "\\union"
jointbl = FGDB + "\\join_table"
output = FGDB + "\\" + outfcname
try:
# Run repair incase of empty geometries and self intersects
arcpy.RepairGeometry_management(infc)
print arcpy.AddMessage("Repaired geometry")
# Create temporary layer in memory for processing
arcpy.MakeFeatureLayer_management(infc, "in_memory\temp")
# Union featureclass to process overlaps
arcpy.Union_analysis ("in_memory\temp", unionout)
print arcpy.AddMessage("Completed union")
# Create temporary layer in memory for processing
arcpy.MakeFeatureLayer_management(unionout, "in_memory\temp")
# Delete unrequired fields
arcpy.DeleteField_management("in_memory\temp", ["Id", "Area", "Hectares"])
# Create new field for storing overlap count to be populated
arcpy.AddField_management("in_memory\temp", "Count", "SHORT", "2")
## # Create attribute index to speed up querying
## arcpy.AddIndex_management("in_memory\temp", "Shape", "Shape_Index")
## print arcyp.AddMessage("Completed field changes and index build")
except:
print arcpy.GetMessages()
# Dictionary for storing feature areas
countDict = {}
# For getting shapefield name
shapefldname = arcpy.Describe("in_memory\temp").ShapeFieldName
# Setup cursor for update
rows = arcpy.UpdateCursor("in_memory\temp", "", "", "Shape; Count")
print arcpy.AddMessage("Populating dictionary")
# For iterating through features
for row in rows:
feat = row.getValue(shapefldname)
# Get area of each feature using geometry object
area = feat.area
# If value is not in dictionary add it to dictionary with count = 1
if countDict.has_key(area) == 0:
countDict[area] = 1
# If area value is in dictionary add + 1 to the count value and delete the row as it's a duplicate
elif countDict.has_key(area) == 1:
countDict[area] = countDict[area] + 1
rows.deleteRow(row)
else:
print "Error"
print arcpy.AddMessage("Error: error with Shapefield value")
print arcpy.GetMessages()
# Setup another cursor for update
table = arcpy.UpdateCursor("in_memory\temp", "", "", "Shape; Count")
arcpy.AddMessage("Populating overlap 'Count' field")
# For iterating through non-duplicate features in order to write Count field
for r in table:
# Getting area again
feat = r.getValue(shapefldname)
area = feat.area
# Write count if count is not equal to zero
if countDict[area] in range(1, 10):
r.Count = int(countDict[area])
table.updateRow(r)
else:
print arcpy.AddMessage("Error: count value not between 1-10")
print arcpy.GetMessages()
# Copy feature class from memory to a physical location
arcpy.CopyFeatures_management("in_memory\temp", output)
arcpy.AddMessage("Created output featureclass")
# Add the output featureclass to the current map
arcpy.SetParameterAsText(6, output)
arcpy.AddMessage("Adding output to current mxd")
# Clean up redunadant layers and cursors to remove them from memory
arcpy.Delete_management("in_memory\temp")
arcpy.Delete_management(unionout)
del row, rows, r, table, arcpy
print "End time = " + time.asctime()
... View more
04-28-2011
02:07 PM
|
0
|
0
|
669
|
POST
|
Would this script help? http://arcscripts.esri.com/details.asp?dbid=16700 Thanks Chris, I did have a look at your script previously which gave me the idea of using a dictionary to prevent duplication. I think I'll implement that plus use the Geometry objects and hopefully that speeds things up.
... View more
04-03-2011
01:29 PM
|
0
|
0
|
669
|
POST
|
Yes it's a script tool and I'm running it "in process" already. I'm thinking I'll have to re-write the script to utilise Arcpy geometry, based on the centroid of the features, to work out the number of polygons that intersect and see if I can get the same result with better speed. I'm still baffled by what Arc is doing, when it runs a script tool, to slow everything down by that order of magnitude. I've got a few more test shapefiles so will try them when I have time, but I've heard from a colleague that it still runs very slowly in Arc.
... View more
03-27-2011
03:07 PM
|
0
|
0
|
669
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|