POST
|
Yes, that allowed me to to create a map service from the XY features. Curious as to why I can't publish directly. Ultimately, we would like to enable users to edit the attributes in the data tables online (AGOL?) Any specific advice or gotchas if we want to do that?
... View more
05-11-2016
09:35 AM
|
0
|
4
|
1774
|
POST
|
Some further observations- If I remove the XY event layer, I can publish as a service If I convert the tables to dbf and use them instead of file gdb, the service will publish (but I will need to use geodatabase in production) Found this page in the 10.2 documentation: ArcGIS Help (10.2, 10.2.1, and 10.2.2) -it was of no help whatsoever.
... View more
05-11-2016
08:00 AM
|
0
|
7
|
1774
|
POST
|
Not seeing any obvious error messages in the logs. I can save a service definition as an .sddraft, but ArcGIS Server will then complain because it is "not an .sd file", so I can't import it.
... View more
05-10-2016
01:07 PM
|
0
|
0
|
1774
|
POST
|
I am trying to publish XY event data, either to ArcGIS Server or ArcGIS Online. The data comes from two tables that are joined (one table contains attributes, the other has the XY location data). The XY event layer derived from this works well in ArcMap, but when I try to publish in ArcGIS Server, I get the following message: 001270: Consolidating the data failed -The data is all in a file GDB which has been registered to the ArcServer.
... View more
05-10-2016
08:25 AM
|
0
|
12
|
6324
|
POST
|
In an earlier version of the script I used Try blocks, but I have removed them in the current version (unless you see any that I didn't remove?). I'll investigate the file/path names, but if you see anything in particular that looks suspicious, please let me know.
... View more
01-11-2016
12:10 PM
|
0
|
0
|
167
|
POST
|
In this particular situation, we are not using the actual town names. Instead the "town name" is actually an alphanumeric code as a text item. Examples are AR021, HA007, PI063. There are no special characters or spaces in any of the names. And it is a different town each time- a town that will cause the program to quit on one try will work just fine on another try (and vice versa). Again, no error messages, just stopping.
... View more
01-11-2016
12:08 PM
|
0
|
0
|
167
|
POST
|
I've made modifications as suggested by everyone, but still having the same problem. In particular, I made the following changes: Using arcpy.OverwriteOutput = 1 as suggested by Jake Changed the rows with gp.SearchCursor to the arcpy.da.SearchCursor as suggested by Darren Changed the workspace variable to raw format: workspace = r'C:\workspace\parcelsut as suggested by Dan I tested the looping process by commenting out the conversion to KMZ. The looping/iteration works fine. So I uncommented the KML conversion again. Once again, the program will stop either when creating the feature layer, or when converting the feature layer to KMZ. It stops with a different town each time. But the problem appears to be in the KMZ conversion. Is there any way to further diagnose why this is happening? Is there an alternate approach to converting to KMZ?
... View more
01-11-2016
11:31 AM
|
0
|
4
|
744
|
POST
|
The workspace was set in an earlier part of the code, which wasn't pasted here. This is the line: workspace = 'C:\workspace\parcelsut' Will also try the data access module search cursor.
... View more
01-11-2016
07:13 AM
|
0
|
6
|
744
|
POST
|
I'm sorry, I don't see how to put it in code tags, but here is the code: rows = gp.SearchCursor(workspace + "\\parcels_ut_town_list.dbf") for row in rows: town = row.town # Create Output Directory towndir = town.strip() # Create Output Directory gp.AddMessage("Processing" + " " + town) print "Processing" + " " + town gp.AddMessage("Creating Directory For" + " " + town) print "creating outfolder for "+town outfolder = gp.CreateFolder_management(workspace, towndir) ##Sometimes quitting here expression = "TOWN = " + "'" + town.strip() + "'" parcels = outfolder + "\\parcels"+towndir+".kmz" # Process: Make Feature Layer print "making feature layer" ##-And sometimes quitting around the next line- arcpy.MakeFeatureLayer_management(parcelsProject_shp, parcelsProject_Layer, expression, "", "FID FID VISIBLE NONE;TOWN TOWN VISIBLE NONE;COUNTY COUNTY VISIBLE NONE;GEOCODE GEOCODE VISIBLE NONE;STATE_ID STATE_ID VISIBLE NONE;MAP_BK_LOT MAP_BK_LOT VISIBLE NONE;PARENT PARENT VISIBLE NONE;PROP_LOC PROP_LOC VISIBLE NONE;PROPLOCNUM PROPLOCNUM VISIBLE NONE;TYPE TYPE VISIBLE NONE;FMUPDORG FMUPDORG VISIBLE NONE;FMUPDAT FMUPDAT VISIBLE NONE;FMSRCORG FMSRCORG VISIBLE NONE;Shape_STAr Shape_STAr VISIBLE NONE;Shape_STLe Shape_STLe VISIBLE NONE;Shape Shape VISIBLE NONE;Shape_ST_1 Shape_ST_1 HIDDEN NONE;Shape_ST_2 Shape_ST_2 HIDDEN NONE") # Process: Layer To KML gp.AddMessage("Converting town to KML") print "Converting town to KML" arcpy.LayerToKML_conversion(parcelsProject_Layer, parcels, "0", "false", parcelsProject_Layer, "1024", "96", "CLAMPED_TO_GROUND") #Copy Metadata gp.AddMessage("Copying parcels Metadata For" + " " + town) print "Copying parcels Metadata For" + " " + town shutil.copy(metat, outfolder + "\\" + "parcels.txt") gp.AddMessage("Done Processing parcels For" + " " + town) print "Done Processing parcels For" + " " + town #Create The Zipfile #gp.AddMessage(output + "\\Parcels_" + towndir) zpfile = zipfile.ZipFile(output + "\\Parcels_" + towndir + ".zip", 'w') zpfile.write(outfolder + "\\parcels"+towndir+".kmz", "Parcels_" + towndir + ".kmz", zipfile.ZIP_DEFLATED) zpfile.write(outfolder + "\\parcels.txt", "Parcels_" + towndir + ".txt", zipfile.ZIP_DEFLATED) zpfile.close() #Delete Uncompressed Files shutil.rmtree(outfolder) gp.AddMessage("All Done Processing" + " " + town) del rows
... View more
01-08-2016
06:42 AM
|
0
|
9
|
744
|
POST
|
Hi Jake, and thanks for the reply. I added the overwriteOutput line to my script, and I removed the delete featurelayer code. Also added more Print lines so I can see what's going on. The script is still quitting randomly. In some attempts, it stopped while creating a new output directory for a KML, in other cases it quit while creating a feature layer. But again, it quits with a different record each time. And I am not seeing any error messages.
... View more
01-07-2016
02:23 PM
|
0
|
11
|
744
|
POST
|
I am working on a Python script that includes a cursor looping process to create KML files for individual towns. For each iteration of the loop, the script creates a feature layer, then exports that feature layer to KML. The problem is, the script tends to stop working for no apparent reason. After each KML is created from the feature layer, I delete the feature layer so a new one can be created for the next town. The script tends to stop at this point. No error messages, and it doesn't stop at the same town every time I try. Here is the code that manipulates the feature layer: try: print "Deleting feature layer..." arcpy.Delete_management(parcelsProject_Layer) print "...deleted it" except: print "Couldn't delete feature layer!", sys.exc_info()[0] raise else: # Process: Make Feature Layer arcpy.MakeFeatureLayer_management(parcelsProject_shp, parcelsProject_Layer, expression, "", "FID FID VISIBLE NONE;TOWN TOWN VISIBLE NONE;COUNTY COUNTY VISIBLE NONE;GEOCODE GEOCODE VISIBLE NONE;STATE_ID STATE_ID VISIBLE NONE;MAP_BK_LOT MAP_BK_LOT VISIBLE NONE;PARENT PARENT VISIBLE NONE;PROP_LOC PROP_LOC VISIBLE NONE;PROPLOCNUM PROPLOCNUM VISIBLE NONE;TYPE TYPE VISIBLE NONE;FMUPDORG FMUPDORG VISIBLE NONE;FMUPDAT FMUPDAT VISIBLE NONE;FMSRCORG FMSRCORG VISIBLE NONE;Shape_STAr Shape_STAr VISIBLE NONE;Shape_STLe Shape_STLe VISIBLE NONE;Shape Shape VISIBLE NONE;Shape_ST_1 Shape_ST_1 HIDDEN NONE;Shape_ST_2 Shape_ST_2 HIDDEN NONE") # Process: Layer To KML gp.AddMessage("Converting town to KML") arcpy.LayerToKML_conversion(parcelsProject_Layer, parcels, "0", "false", parcelsProject_Layer, "1024", "96", "CLAMPED_TO_GROUND") --Any suggestions?
... View more
01-07-2016
12:11 PM
|
0
|
13
|
3237
|
POST
|
I am building a viewer with several WMS layers. I would like to create a GetFeatureInfo tool with the JavaScript API. Can anyone point me to some sample code? Thanks!
... View more
03-09-2015
07:53 AM
|
0
|
0
|
2761
|
POST
|
Hi Tim, Yes, that works. Thanks! Although that gets the job done, I would still like some explanation as to why Arc Online will let you upload a File GDB, but you can't map it directly. Bob Bistrais, GISP Maine Office of Geographic Information Systems Augusta, ME
... View more
03-06-2014
07:15 AM
|
0
|
0
|
15415
|
POST
|
I uploaded a zipped File Geodatabase to ArcGIS Online. It uploaded successfully and it shows up in My Content. My intention was to add layers in the File GDB to an Arc Online map. But Arc Online won't let me do so. There is no option to add it to the ArcGIS Online map viewer, and it will not show up in a search when adding data. The only thing I can seem to do with the file GDB is download or delete it. What am I missing here? It would seem logical that, if I can uplad my file GDB to Arc Online, I'd expect I can add that data to a map.
... View more
03-06-2014
05:54 AM
|
0
|
12
|
36823
|
Title | Kudos | Posted |
---|---|---|
1 | 09-26-2016 08:03 AM | |
1 | 04-19-2018 09:46 AM | |
1 | 12-19-2017 09:08 AM | |
1 | 01-31-2017 11:22 AM | |
2 | 10-04-2017 01:27 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|