Quantcast
Channel: Forums - Geoprocessing
Viewing all 1952 articles
Browse latest View live

Failed to launch simple Geoprocessing Webservice

$
0
0
Greetings everyone,

I am currently trying to develop a custom data extract tool similar to the one used by the Flex Viewer. The difference is that this web service is supposed to output a simple .csv file instead of a geodatabase, shapefile, etc.

Attachment 19023

I have built this very simple model that clips and converts the resulting features into a CSV file. The model obviously works when executed on the Desktop, but fails on the server.

Attachment 19024



The server returns a JobSubmitted token, so I know the input is formatted properly. However, soon after the server returns failure.

Attachment 19025

I have been trying to determine the source of the error. I have visited the logs for that job and found this in the documentation:
Code:

Server Context created.
String request received. Request size is 277 characters.
GetDefaultMapName has started.
GetDefaultMapName has completed.
String request succesfully processed. Response size is 385 characters.
String request received. Request size is 275 characters.
GetDocumentInfo has started.
GetDocumentInfo has completed.
String request succesfully processed. Response size is 1406 characters.
String request received. Request size is 321 characters.
GetServerInfo has started.
GetServerInfo has completed.
String request succesfully processed. Response size is 23989 characters.
String request received. Request size is 287 characters.
GetServiceConfigurationInfo has started.
GetServiceConfigurationInfo has completed.
String request succesfully processed. Response size is 1281 characters.
String request received. Request size is 542 characters.
GetDefaultLayerDrawingDescriptions has started.
GetDefaultLayerDrawingDescriptions has completed.
String request succesfully processed. Response size is 2465 characters.
String request received. Request size is 341 characters.
GetCacheDescriptionInfo has started.
GetCacheDescriptionInfo has completed.
String request succesfully processed. Response size is 399 characters.
String request received. Request size is 333 characters.
String request succesfully processed. Response size is 391 characters.
Server Context released.
Server Context created.
String request received. Request size is 272 characters.
Container 6048 is successfully created on machine server.
Thread 10828 is successfully created on container 6048 of machine server.
GPServer instance is successfully constructed.
Server Object instance is successfully created on machine server.
Server Context created.
String request received. Request size is 272 characters.
String request succesfully processed. Response size is 11000 characters.
String request received. Request size is 282 characters.
String request succesfully processed. Response size is 431 characters.
String request received. Request size is 276 characters.
String request succesfully processed. Response size is 406 characters.
Server Context released.
String request succesfully processed. Response size is 11000 characters.
String request received. Request size is 282 characters.
String request succesfully processed. Response size is 431 characters.
String request received. Request size is 276 characters.
String request succesfully processed. Response size is 406 characters.
Server Context released.
Server Context created.
String request received. Request size is 2685 characters.
Job j6894e88ea85c4567bf12201d09e52311 is successfully submitted.
String request succesfully processed. Response size is 396 characters.
Server Context released.
Server Context created.
String request received. Request size is 342 characters.
String request succesfully processed. Response size is 385 characters.
String request received. Request size is 346 characters.
String request succesfully processed. Response size is 550 characters.
Server Context released.
Job j6894e88ea85c4567bf12201d09e52311 scheduled for execution.
Create directory succeeded: c:\arcgisserver\arcgisjobs\gravitymagnetic\gravity_mag_us_webmercator_gpserver\j6894e88ea85c4567bf12201d09e52311\scratch
Load job j6894e88ea85c4567bf12201d09e52311 message type SOAP message size 2685
ERROR 000816: The tool is not valid.
Error executing tool.
Save job j6894e88ea85c4567bf12201d09e52311 message type SOAP message size 371
Server Context released.
Server Context created.
String request received. Request size is 342 characters.
String request succesfully processed. Response size is 382 characters.
String request received. Request size is 346 characters.
String request succesfully processed. Response size is 831 characters.

I am not sure why it gives me an error if I correctly generate a csv file in ArcGIS Desktop.
Does someone have an idea of what is the error? Many thanks for all your help!

Regards,

Jorge
Attached Thumbnails
Click image for larger version

Name:	geoprocess.png‎
Views:	N/A
Size:	13.9 KB
ID:	19023   Click image for larger version

Name:	sucess.PNG‎
Views:	N/A
Size:	13.6 KB
ID:	19024   Click image for larger version

Name:	failure.PNG‎
Views:	N/A
Size:	15.4 KB
ID:	19025  

Need to find the acres of a park after buffering.

$
0
0
Hi,

My name is Dee.

I am trying to find the steps in figuring out how to calulate the acres with within the
South Park Township in Allegheny County, Pennsylvania that heavy industry cannot be built.

The buffer zone must be 0.25 miles away from parks. I need to know how many acres within
South Park Township is excluded from heavy industry?

Any help would be greatly appreciated.

Thanks

Sum polygons if they are within another polygon

$
0
0
hey!

attachment:
Attachment 19044

I need the sum shape_area of the blue and black polygons (feature class B) which are within the selected green polyon (feature class A, hollow polygonfilling) written in the polygon A attribute.
I tried a spatial join, but this only worked in the other direction, by joining the attributes from the big polygon A to the "compleytely_within" polygons B. Or is there a possibility to merge this results afterwards, if so how?

best regards
andreas
Attached Thumbnails
Click image for larger version

Name:	Clipboardx.jpg‎
Views:	N/A
Size:	23.4 KB
ID:	19044  

After display X Y data, exporting to shapefile creates bad data

$
0
0
Hi Folks,

I've got a fairly large tab delimited text file that I'm trying to work with. It's about 500 megabytes, and contains over 1.5 million records. After adding the data, the fields look fine, and I can add X Y data and it shows up correctly. However, I then export the data to a shapefile so that I can work with it, and the resulting shapefile has some fields shifted in their column, some columns are missing data entirely. It is no longer useful.

Is there anything in particular that I should be doing to ensure that this process works and the data is not useless at the end?

Datetime from CSV file

$
0
0
Good day. I am trying to parse a large amount of data (in CSV format) into minute intervals and then geocode the data into a geodatabase. Problem is that the datetime field does not display as text format in the geodatabase. It still shows a DATE format. The CSV file has the proper YYYY-MM-DD HH:MM text format after parsing. I have converted the date field to text format prior to geoprocessing but the data still appears to be processed in ArcGIS in date format.

I know shapefiles do not support the HH:MM timestamp date format so I have performed a text conversion on the date:

dt = DTTM[:19]
dtime = datetime.strptime(dt, '%Y-%m-%d %H:%M:%S')
str_date = dtime.strftime('%Y-%m-%d %H:%M')

And the datetime field is set as text format in the schema.ini file prior to geoprocessing.

[1output.csv]
Format=CSVDelimited
Col4=DTTM Text

I have also tried to write directly from the CSV to a file geodatabase, using CopyRows, i.e. arcpy.CopyRows_management(filename, geodb), but the geodatabase still contains the date format.

Any ideas what is going on?

Thanks in advance for all responses.

My code snippets are included below:

min_interval.py:

import csv
from datetime import datetime
import os

def min_aggr(infile, outfile):

ifile = open(infile, 'rb')
reader = csv.reader(ifile)
out = open(outfile, 'wb')
writer = csv.writer(out)
header = reader.next()
hdr = ['ID','LON','LAT','DTTM','HEADING','CALL_SIGN','vesselType']
writer.writerow(hdr)

for ID,LON,LAT,DTTM,HEADING,CALL_SIGN,vesselType in reader:
dt = DTTM[:19]
dtime = datetime.strptime(dt, '%Y-%m-%d %H:%M:%S')
str_date = dtime.strftime('%Y-%m-%d %H:%M')
data = [ID,LON,LAT,DTTM,HEADING,CALL_SIGN,vesselType]
writer.writerow(data)

filenum = 0
path = raw_input("Enter the full path name (ex. c:\\test\):")
datapath = raw_input('Enter the path for the output directory (ex. c:\\output\):')
dirList=os.listdir(path)
dirList.sort()
for fname in dirList:
filenum += 1
filename = path + fname
outfile = datapath + str(filenum) + 'output.csv'
try:
min_aggr(filename, outfile)
except IOError:
print filename

print 'files have been processed'

geocode.py:

import os
import arcpy
from arcpy import env
env.overwriteOutput = True

coord = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]" #spatial projection

#create file geodatabase
dir = raw_input('Enter path to create geodatabase (ex. c:\\data\):')
dbname = raw_input('Enter the name for the geodatabase (ex. test.gdb):')
arcpy.CreateFileGDB_management(dir, dbname)
print 'geodatabase ' + dbname + ' has been created'
geodb = dir + dbname

filenum = 0
path = raw_input('Enter the full path name for input files (ex. c:\\test1\):')
datapath = raw_input('Enter the path for the output directory (ex. c:\\output1\):')
dirList=os.listdir(path)
dirList.sort()
for fname in dirList:
filenum += 1
filename = path + fname
shp = datapath + str(filenum) + 'output.shp'
try:
arcpy.MakeTableView_management(filename,'View')
arcpy.MakeXYEventLayer_management('View','LON','LAT','Layer')
arcpy.CopyFeatures_management('Layer', shp)
arcpy.DefineProjection_management(shp, coord)
arcpy.FeatureClassToGeodatabase_conversion([shp], geodb)
print 'file ' + filename + ' has been geoprocessed'
except IOError:
print 'ERROR: ' + filename

print 'geoprocessing complete'

.apl file component creation within a .shp file

$
0
0
I have a model that uses the "Feature Class to Feature Class" tool to convert a .sde file to a .shp file. When it does this my shapefile isn't produced as it should be. The only thing I can spot that seems suspect is that the .shp file is missing the .apl component file. Does this cause problems? Is it indicative of possible problem? How can I get this .apl component created?
Any help would be greatly appreciated. Thanks!

cannot use VB expressions for services

$
0
0
10.1 geoprocessing tool.
I'm getting an error during the analysis phase in ArcCatalog while trying to publish my gp service. It says I can't use VB expressions in the Calculate Field Tool. The severity is High but i am still able to publish.
Here is the only line in my py script that uses the CalculateField tool:

Code:

arcpy.CalculateField_management("in_memory/buffer", "GP_ID", "x", "PYTHON", "x = '" + uniqueid + "'")
Am i missing something? Because I don't think there is any VB in there.

Kriging creates holes in resulting raster

$
0
0
Hi! I'm very new to spatial analysis, and I was wondering how to fix this problem. I have a set of points that convert very nicely into a raster with kriging, but a portion of the raster is missing. Why does this happen and how can I fix it?
I've put an example below. It probably has something to do with the large number of points in close proximity there.
Thanks!
Attachment 19077
Attached Thumbnails
Click image for larger version

Name:	krig.jpg‎
Views:	N/A
Size:	94.5 KB
ID:	19077  

ModelBuilder-Having problems with adding outputs to display

$
0
0
I created a model to calculate tax values of single family dwellings for a project I have. When I run the model in the model canvas, it will add the outputs to the display that I have designated to be added to the display. If I double click on the model in the catalog to run it that way, it will successfully run the model as well, it will leave the data outputs it created in the designated file geodatabase, but not add the to the display as well once the model is done running. Does anyone know why it would do that when it is run with the model canvas closed?

Coordinates Project

$
0
0
Hello,

I have a large list (over 6,000) of points in which some of the lat/long fields are blank, and some are in State Plane that need to be converted to lat/long.

I am trying to determine the best and most efficient workflow to complete this project. Any input or ideas would be greatly helpful. I am trying to compile a list of all the resources I have at my disposal, the best one will most likely be a dataviewer which will provide aerial photos of each point.

Thanks in advance!

Matt -

Script tools 'close this dialog...'

$
0
0
Hi folks,

When you create and run a script tool in ArcCatalog, it launches a geoprocessing window where you can print messages from your script. This window has a checkbox option to 'Close this dialog when completed successfully'. This checked by default.

When I ran a script tool that operated really quickly, this window disappeared before I got the chance to uncheck the box. (I hacked the problem by running it on a slower script tool so that I could grab it. Once it's unchecked for one tool, it's unchecked for all.) But I was wondering if there's another way to change this setting without having to run a slow script tool. I seem to remember there used to be an option to do with this under the 'Geoprcessing' menu, but I couldn't find it any more.

Thanks

GP service input parameter converted from string to integer when called from browser

$
0
0
I have a 10.1 GP service task based on a Python script. At the top of the script I grab the input parameters, e.g.,

myId = arcpy.GetParameterAsText(0)
myId2 = arcpy.GetParameterAsText(1)

The parameters are all defined as String type in the Properties of the script within the ArcGIS toolbox. The second parameter has a format along the lines of 01207.000. We need this full string including leading zeroes and trailing digits.

When I use ArcMap/Catalog to run this GP service task, the parameters get read correctly and the script runs fine. However, when I run this task from the Services Directory, the second parameter has its format converted to 1207, i.e., leading and trailing zeroes are dropped, as if it's been parsed to an integer. This happens even when running the task from a browser on the server using port 6080.

I have used a packet sniffer (Wireshark) to confirm that the full format is being sent to the server. And in the script I've used arcpy.AddMessage to display the value as read by the script. In the Services Directory case that shows it is receiving the parameter in integer format.

Is there some reason the value would be getting converted between the browser and the script?

The index was either too large or too small - Map Cache Error

$
0
0
Dear Sirs,

we have encountered some problem during map caching process, the error messages are as shown below:

Failed to cache extent: 206639.439105 2662911.235289 210804.241808 2669845.025823 at scale 800 ERROR 999999: Error executing function.
Failed to cache extent: 207337.875709 2666378.659724 210804.770976 2669845.554991 at scale 400 ERROR 999999: Error executing function.
The index was either too large or too small.
Failed to execute (Manage Map Cache Tiles).
Failed.
Field is not editable.
Failed to execute (ManageMapServerCacheTiles).

I tried to redo map cache for the the extent mentioned but no luck.

The map cache processes were doing fine in Arcgis 10.0, but there are many map cache problems in Arcgis 10.1, this is just part of it. We have many other problems such as cache job crashes, hangs, and so on..

I have another unsolved problem in post http://forums.arcgis.com/threads/601....GPServer-quot

Any help will much appreciated

Thanks, Bryant Lin

the arcmap collapse when call GPserver

$
0
0
i create a GPserver to get a buffer point ,and publish to GIS server
when i call the GPserver In the Arcmap, The Arcmap collapse.
but i change the "Synchronous" of server properties into "Asynchronous", the arcMap run well !!!!!!!!!

it is a bug?????

Creating a Buffer

$
0
0
Hi

I created a map document using feature class from SQLExpress geodatabase. Also installed ArcGIS Server advance Enterprise 10.1. Using the same map document Server service is created for editing through the service. I could edit features ( add/ delete/ move) from the service I created. Now I tried to create a geo processing service, to do it used the map document used for creating feature service and tried a buffer but it is not creating the buffer. The screen shot is attached for your reference. Please help.

OS - Windows 7
Software - ArcGIS Desktop Advanced 10.1 and ArcGIS Server Advanced Enterprise

Regards
Thillai
Attached Files

Filtering Data

$
0
0
I have opened the map data located at https://www.arcgis.com/home/item.htm...513d1ed7cec9fd and tried to filter out only the highway level data by right clicking on North America Detailed Streets and then going to Open Attribute Table. At the table I am Selecting Attributes "PRETYPE" = 'HWY' and then trying to export the data. I am assuming that this will filter on only the highway data and will make the data set much more manageable. I then export the data to file and I am having difficulty loading it back in. Is this the correct method for filtering out the data? Otherwise it is simply a massive amount of road data that I am not interested in and really kills my system. If I am correct in my way of exporting what is the correct way of importing and should I then be able to perform the Feature Vertices to Points functionality on the data?

kmz to layer failure

$
0
0
Hi!

I'm trying to import a kmz file to arcmap, I can see this file in google earth as a seeflormap that is placed over the lake it is associated with. When I try to convert it in arcgis 10.0 with the kmz to layer tool I get the 00401 error (no features found for processing) and when i try online http://www.zonums.com/online/kml2shp.php it says the the file holds no data..

The file holds data(138kb), I would not be able to see it in google earth and arcglobe if not.

The thing is that i like to open this file with arcgis 9.3 at work but this seems difficult. I have tried all different geoprocessing tools for this.

Anyone that can help?

A friend of my managed to open the file with arcgis 10.1 with the kmz to layer tool today, how is that possible?

Best
Johan

Sum polygons within polygons

$
0
0
Hello,

I am trying to sum small polygons (land disturbance) that are within larger ones (counties). Some polygons are completely within a county; others cross county boundaries. I would like to say, at the end of the day, "County X has 2,000 acres of disturbed land while County Y has 5 acres." (This is somewhat similar to this, except I am attempting to sum thousands of polygons within dozens of larger ones ).

Attachment 19157

Here is what I have done:
-Add county layer to ArcGIS
-Add land disturbance layer
-Spatially join them (Analysis Tools > Overlay > Spatial Join)
Target features: counties
Join features: land disturbance layer
Join operation: one to many
Join type: Intersects

I get a spreadsheet with a list of all of the polygons and their areas for each county. Some counties have 0, which is accurate. Other counties have several thousand entries, which is also accurate. The problem: The total area I come up with for land disturbance (if I sum everything by county) is greater than the total area of land disturbance in the original land-disturbance .dbf file.

If "intersect" over-counts, I figured using "contains" for the join type might be accurate. However, this undercounts the amount of total land disturbance. How do I get the right amount of land disturbance per county?

I would appreciate any help or advice. Thank you so much!
Attached Thumbnails
Click image for larger version

Name:	arcgis.jpg‎
Views:	N/A
Size:	133.2 KB
ID:	19157  

How to show clusters of events of the same category occuring within spacetime window?

$
0
0
Hi,

I have a set of points representing crimes, and want to show all clusters of specific crime categories which fall within a space/time window. For example, "show me where there are clusters of vehicle thefts which occurred within the same 1km area in 24 hours". From a crime analysis point of view, the question that I'm hoping to answer is "where have bursts of activity occurred, and which incidents were involved in them, so I can go back to my database and investigate those incidents". I've played around a lot, and looked into the help for Space-Time Cluster Analysis and associated pages, but it's not quite answering my question.

I've used the generate spatial weights matrix tool to specify a 1 km, 1 day neighbour matrix. I've then converted that to a table, which gives me a list of which features are adjacent (in space & time) to which other features. If I run that process once per category, that's my "clustering analysis" complete, really - I don't want to do any statistical stuff from here. Will I have to write my own tool from here to show these clusters on the map (e.g. as MBRs around the points in question)? I guess it's a relatively small step from the neighbour table to such a tool, but I don't want to write something if I don't have to.

I feel like this is either a lot easier than I'm making it out to be, or a lot harder. I have a niggling feeling I should be able to do the same thing with just SQL. If ArcGIS had multidimensional indexing then it could be a 4D buffer/union. Is this a 'hidden feature' that I don't know about? I guess I could hack time into the Z coordinate but that's a bit... well, hacky.

Thanks for your help.

(Cross-posted from the spatial statistics subforum)

ArcGIS 10.1 Tabulate Intersection: confused

$
0
0
Hi folks,

I have been testing using the new tool introduced in ArcGIS 10.1 called Tabulate Intersection. However, I am not getting the results I expect. Let me give you the details.

I have two polygon feature classes, first - represents administrative area units (say counties), second - the zone of interest. Each county polygon has a certain integer attribute field where a statistics value stored. What I am trying to achieve is to get to know what part of the county is located within the zone of interest (purely geometrical intersection) and then based on the percentage calculate the statistics value that will be allocated to the zone of interest. So, say in the zone of interest (red polygon), only 10% of the area of the county with the attribute value of 223 is located. This means, a smaller intersecting polygon that represents shared area between the county and the zone of interest gets the value of 22.3. Please refer to the figure attached.

Afterwards, I want to go through all other counties that intersect the zone of interest and calculate the value proportionally as outlined above. Then those intersecting polygons with newly allocated values are dissolved based on the zone of interest ID and their attribute value are summed.

All of this works fine in a newly built GP model where I run the Intersect first, then join the original counties to get their Shape_Area for area percentage calculation, then calculate the statistics value with the regards to the area percentage, then Dissolve those intersecting polygons and I get the results expected.

However, I was thinking to test the Tabulate Intersection tool which would give the table with the percentage value for every(?) intersecting polygon, so I could join the output table to the intersected polygons layer. So, when I run the tool, I get a smaller number of rows in the output table comparing to the output layer when I run Intersect for the zone of interest layer and counties layer (174 to 188). Yet I thought it would give me back a table where each row represents an intersecting polygon.

Questions:

1) Did I misunderstand how the Tabulate Intersection tool works? Should it give back the same number of rows as when running the Intersect?
2) Is there any other more efficient way to solve the problem described? Ideas for considerations are welcome :)

Thank you,
Alex
Attached Thumbnails
Click image for larger version

Name:	ZoneInterest_counties.jpg‎
Views:	N/A
Size:	71.3 KB
ID:	18873  
Viewing all 1952 articles
Browse latest View live