ERROR 001243 preventing automatic publishing of geoprocessing service


I am trying to automate the process of publishing a geoprocessing service to ArcGIS for Server 10.2.2, using a python script:

import arcpy  
result = r"C:dataContourLineFunction.rlt"  
connectionPath = r"C:UserssofAppDataRoamingESRIDesktop10.2ArcCatalogarcgis on localhost_6080 (admin).ags"  
sddraft = "ContourLineFunction.sddraft"  
sd = "ContourLineFunction.sd"  
serviceName = "ContourLineFunction"  

# create service definition draft  
arcpy.CreateGPSDDraft(  
    result, sddraft, serviceName, server_type="ARCGIS_SERVER",  
    connection_file_path=connectionPath, copy_data_to_server=False,  
    folder_name=None, summary="lorem ipsum", tags="gp",  
    executionType="Synchronous", resultMapServer=False,  
    showMessages="INFO", maximumRecords=1000, minInstances=1,  
    maxInstances=5, maxUsageTime=100, maxWaitTime=10, maxIdleTime=180)  

analyzeMessages = arcpy.mapping.AnalyzeForSD(sddraft)

The result from the AnalyzeForSD function contains multiple errors 001243:

{  
  'errors':  
    {  
      (u'ERROR 001243: The ContourLineFunction/in_string_version parameter is missing a syntax dialog explanation in the item description', 92): [],  
      (u'ERROR 001243: The ContourLineFunction/yCoordinate parameter is missing a syntax dialog explanation in the item description', 92): [],  
      (u'ERROR 001242: Tool ContourLineFunction is missing item description summary', 80): [],  
      (u'ERROR 001243: The ContourLineFunction/xCoordinate parameter is missing a syntax dialog explanation in the item description', 92): [],  
      (u'ERROR 001243: The ContourLineFunction/radius parameter is missing a syntax dialog explanation in the item description', 92): []} ...  

I know I can get rid of the errors by manually entering item descriptions in the Service Editor in ArcMap/ArcCatalog.

I have tried to find the settings in the sddraft file, but nothing looked like the right place for the values.

I have tried to find something inside the .rlt-file (geoprocessing result), but this was all binary stuff inside a ZIP file :-(

How can I automate the setting of the item descriptions?

Where to find comprehensive descriptions of tools in QGIS, SAGA, Orfeo, etc. toolboxes? [closed]


There exists a large number of tools for QGIS (e.g. SAGA, GRASS, ORFEO etc.) – however none of these have sound description of the aim of the tool, the algorithm itself, differences to other similar tools and a hints for the interpretion of the result. How can I judge which tool to use if I do not know this essential background information?

This leads to a great problem that many people use sophisticated analyses but apply wrong (or only standard) parameters or thresholds as they do not know which parameter to adjust. ESRI provides simple explanations for their tools (also they seem not to be written by experts but programmers), taudem has useful description – It would be great to have similar descriptions for the other available opensource tools too!

Many, many thanks to all the programmers – but after working so hard could you please please please add half a page to describe the approach, add references, and explain (shortly) your parameters and the results and codes?

Any hint where to get background information on the different morphology/hydrology tools is highly appreciated!
Thanks a lot!

How to make a loop to MakeNetCDF Table View?


I was trying to write a code to extract grid point data from the NetCDF file.
I am able to view and save the table data extracted as follow

#Import system modules
import arcpy

# Set local variables
inNetCDFFile = "F:/7071.nc"
variable = "prec"
outTableView = "F:/precipm"
rowDimension = "time"
dimensionValue = "lat 64;lon -146"
valueSelectionMethod = ""

# Execute MakeNetCDFTableView
arcpy.MakeNetCDFTableView_md(inNetCDFFile, variable, outTableView, rowDimension, dimensionValue,valueSelectionMethod)

outTable = arcpy.CopyRows_management(outTableView)
print

The problem is I have about 1000 points that I am going to extract the time series data from the netCDF file. I want a to write a script that loops through the csv grid point and save each table using the point ID.
The grid point is given as

Grid.csv

ID lat lon
1 10 20
2 30 40

etc

Can Geoprocessing Services be consumed within ArcGIS Online?


I have a geoprocessing package in my ArcGIS Online account for my organization which can be downloaded and used within ArcGIS for Desktop.

Are similar functions available to enable Geoprocessing Services be consumed within the ArcGIS Online environment?

Superimposing high resolution NetCDF data on Google Earth?


I have got output from Weather Research Forecasting Software(WRF) in NETCDF format. These are basically high resolution forecasts for precipitation and wind barbs(sea breeze circulations or slope valley circulations). I want to be able to display this on Google Earth or some similar GIS software. It should be interactive meaning I should be click to the highest possible resolution to tell the viewer in which neighborhood the rainfall occurred. It should also show the terrain etc if in mountainous area. The tools on this web page – http://www.nusculus.com/wtools allows me to see static geographical domain information on Google Earth by converting WRF output(in NETCDF format) into KML format. I want to be able to project meteorological data onto Google Earth. Does anyone know of any tool(could be in any language-java,python) out there that does this ?

Why were Series variables of ModelBuilder removed at ArcGIS 10.0?


I’ve read a number of posts regarding the sequential batch processing of a model in ArcGIS. In particular this one, because I’m having the exact same issue.

Recently, I found an old 9.3 help page that shows that ArcGIS at one time supported a type of value called a series which is missing from the current 10.2 dialogue in model builder.

It appears that what I need to achieve my sequential processing of multiple input parameters for my model is what was once called a “series value” in 9.3.

I’m just wondering if anyone knows what happened to this and if there is some way to achieve the same thing in 10.2?

It’s hard to believe that Esri would take functionality out of more recent versions.

Why do I get a NameError: name 'gdbSuccessCount' is not defined?


I’m using a 412-line script that gathers and merges online tile data. However, I’m receiving a Traceback error, NameError: name ‘gdbSuccessCount’ is not defined.

I’ve included the portions of the code that gdbSuccessCount is included in (only 3 times it appears as is). I, and my work, will appreciate the help to find the resolve the problem. I apologize for the code mess, the indented code is below it (first time on StackExchange).

The problem is the last occurrence, in line 406 as follows:

if merge and gdbSuccessCount > 1:

Here are lines 333-412:

    r = 0
    if GDB:
        gdbSuccessCount = 0
        for g in gdbList:
            tileGDBID = g
            q250k = "q" + string.split(tileGDBID,"-")[0]
            srcGDB = dataPath +"/" + q250k + "/geodatabase/"+ tileGDBID +".gdb.zip"
            destGDB = dest+"\geodatabase\"+ tileGDBID+".gdb"
            destGDBzip = dest+"\geodatabase\"+ tileGDBID+".gdb.zip"
            if not os.path.exists(destGDB):
                arcpy.AddMessage("Copying Geodatabase " + tileGDBID)
                if not os.path.exists(destGDBzip):
                    try:
                        urllib.urlretrieve(srcGDB, destGDBzip)
                        gdbSuccessCount += 1
                    except:
                        arcpy.AddMessage("t WARNING: Geodatabase for tile " + tileGDBID + " not found - moving on to next one...") 
                if os.path.exists(destGDBzip):
                    zf = zipfile.ZipFile(destGDBzip)
                    zf.extractall(dest+"\geodatabase")
                    del zf
                    os.remove(destGDBzip)
            else:
                arcpy.AddMessage("tGeodatabase " + tileGDBID + " exists, moving on to next tile...")

    if LAS:
        # this is a batch file that will be used to unzip the LAZ files....
        f1 = open(dest + "\las\unziplaz.bat", "w")
        # now go through the list and download the LAZ files...
        lasSuccessCount = 0
        for l in lasList:
            q250k = "q" + string.split(l,"-")[0]        
            srcLAZ = dataPath + "/" + q250k + "/laz/"+ l +".laz"
            destLAZ = dest + "\las\"+ l +".laz"
            destLAS = dest + "\las\"+ l + ".las"
            if not os.path.exists(destLAZ):
                arcpy.AddMessage("Copying LAZ " + destLAZ + "n")
                try:
                    urllib.urlretrieve(srcLAZ, destLAZ)
                    lasSuccessCount += 1
                except:
                    arcpy.AddMessage("t WARNING: LAZ file for tile " + srcLAZ + " not found - moving on to next one...")                
            if not os.path.exists(destLAS) and os.path.exists(destLAZ):
                f1.write(dest + "\las\laszip.exe -v -i " + destLAZ + " -o " + destLAS + "n")

        #close the batch file    
        f1.close()
        if lasSuccessCount > 0:
            # add a message telling the user what we are doing...
            arcpy.AddMessage("Unzipping LAZ Files....please be patient")
            # download LASZIP.EXE from the mngeo site...
            lazsrc = "ftp://ftp.lmic.state.mn.us/pub/data/elevation/lidar/tools/lastools/laszip.exe"
            lazdest = dest + "\las\laszip.exe"
            urllib.urlretrieve(lazsrc,lazdest)

            #call the batch file to unzip the LAZ files...
            os.system(dest + "\las\unziplaz.bat")

            # if the user has ArcGIS 10.1 then build a LAS dataset.    
            if arcpy.GetInstallInfo()['Version'] == '10.2.2':
                lasDName = dest + "\" + "las_data.lasd"
                if not os.path.exists(lasDName):
                    arcpy.AddMessage("Creating LAS Dataset - " + lasDName)
                    try:
                        arcpy.CreateLasDataset_management(dest+"\las",lasDName,"NO_RECURSION","#","#","COMPUTE_STATS","RELATIVE_PATHS")
                    except:
                        arcpy.AddWarning("LAS files downloaded but attempt to bring into LAS dataset failed...")
                else:
                    arcpy.AddMessage("LAS Dataset - " + lasDName + " found....")
        else:
            arcpy.AddWarning("No LAS files found in requested area....")

    # if the user wants to merge the downloaded data then do that now....
    if merge and gdbSuccessCount > 1:
        arcpy.AddMessage("Merging tiles to "+ dest + "\ELEVATION_DATA.GDB")
        merge_tiles(dest)
    elif gdbCount == 1:
        arcpy.AddMessage("Only one GDB found...no merging necessary")
    elif gdbCount == 0:
        arcpy.AddWarning("No Geodatabase Tiles found in area requested....")

Digitizing a city map for thesis project; Transportaion


So, basically I need a digitized map of a city that can be used for analysis. My thesis will be focusing on land-use destination, so I’ll be needing the fully digitized map that has all kind of land-use categories plus the road networks, precisely the measurement of accessibility. The biggest hurdle that I’ve came across is, as I belong to the third world country i.e. Pakistan, the nonavailability of data for GIS. Besides, I am not an expert in the GIS. However, I am major in urban planning.

Things that I would like to ask are:

  • How can I extract image for the study area?
  • How can I digitize the map in the fastest way?

How to calculate X and Y projected coordinate in batch processing


I have more than 1000 shape files (all are point features). They were initially in WGS 84. I projected them in UTM. Then through batch processing I added X, Y fields in each table. But all the X, Y fields are now empty or rather filled with 0. I need to calculate X, Y projected coordinate through batch processing and fill newly added X, Y fields. I checked in calculate field option for batch processing under data management tool. But don’t see any calculate geometry option there. Where can I find the tool in the tool box so that I can use it for batch processing all my tables to calculate X, Y in meters.
I am using ArcGIS

How to check whether an optional FeatureSet parameter was set by the user in a geoprocessing script tool?


I have created a custom geoprocessing script tool which contains an optional FeatureSet parameter.

When unpacking the parameters in the script, the FeatureSet is defined as a RecordSet object, even though no input was received. It seems to set a default value if it was not entered.

I need to check if this parameter was specified by the user or not.

For example, when I run this through ArcMap without a FeatureSet parameter the following occurs:

exportAOI = arcpy.GetParameter(3)
arcpy.AddMessage('AOI is: ' + str(exportAOI))
# AOI is: <geoprocessing record set object object at 0x14133578>

I was expecting exportAOI to be None.

How can I determine whether the user actually set this type of parameter?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam