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

Map Package-Error

$
0
0
I am getting a "General Function Failure when creating a Map Package." I looked on the online forums and helps and haven't found much. Anybody have any suggestions to fix this issue.

Model builder: iterative Excel-file import and Shapefile output

$
0
0
Hi!

I'm trying to automate the following process within the model builder:

1. Import Excel xls-files, that each contain point elevation data with x,y and z values
2. Convert them into separate shape files while using the original xls file name as the output file name

Therefore I've setup the following model:
Attachment 27506

The problem occurs while trying to copy the features to an output shape when using the expression for the new file name. Since for iterating the Excel files I need to activate the Recursive option to scan the worksheets within each xls file. The extracted "File" then contains a "$" at the end to mark the worksheet (so if for instance the input file is 001b.xls, the extracted name within "File" is 001b$).
Because of the error message "000354 : The name contains invalid characters" i assumed that the "$" is the problem and used the Calculate Value tool with r"%File%".replace("$","") as an Expression and string as the Data Type. Unfortunately this doesn't help, although the calculated value seems to be correct (without the "$")...

Hence my questions are:
a) What exactly is causing the error and how can I solve it?
b) What other possibilities would I have to manipulate the input file name for output, for instance if I want to use only a part of the name or add an automated counter?

Thanks in advance for any help!
Attached Thumbnails
Click image for larger version

Name:	model.jpg‎
Views:	N/A
Size:	50.7 KB
ID:	27506  

Collapsing a folder structure into a single folder

$
0
0
Hi all,
I have a single folder, let's call it Folder1, which contains multiple folders; FolderA, FolderB, FolderC.....FolderZ.
Folders A-Z each contain multiple file geodatabases. Folders A-Z do not contain any other file type or any other folders.
I need to copy all the of the file geodatabases which are in folders A - Z into a single folder elsewhere on my local drive.

I am trying to do this in model builder as I have very little experience of python.

I thought that I would be able to easily achieve this by using a model (attached image "MainModel")and a submodel ("SubModel")

My main model has a folder variable set as the input parameter (this would be Folder1). This feeds into an Iterate Workspaces iterator. I have set this to only look for folders (here I want it to return FolderA, FolderB, FolderC....FolderZ).

I use the output workspace from here to feed into my submodel as a parameter.

The submodel has a folder parameter as the input (this is the "Workspace" from MainModel, in theory this should be FolderA, FolderB etc....). This then feeds into an iterate workspaces iterator and looks for FileGDB's. The "Worksapce" output then feeds into the copy tool which copies the geodatabase into a predefined folder on my local drive.

I can run the SubModel on its own and it works fine, i.e. I can point it to Folder A and it will copy all of the file geodatabases from FolderA into another folder. The problem arises when I try and work from the MainModel.

In MainModel, I can connect the "Workspace" output into the SubModel and it let's me select the "Folder" variable for this. However, the model doesn't fill with colour, and if I open the tool parameter window I see the error (attached "Error840" file).

I've tried changing the variables in each model to be folders or workspaces or a combination, and I've tried setting the iterators to look only for folders or only for GDB's or I've even left the "Workspace type" field blank. But nothing seems to work.

The only thing I've managed to do where I've had partial success is using a single model (attached "AlternateModel"). This uses the recursive option in the iterator properties and has Folder1 as the input Folder variable parameter.

This copies all the geodatabases as required from all the folder (A-Z), however, it also copies all the folders (A-Z).

Is there something simple which I am missing? Or is this not possible to do?

Many thanks to all.
Dan
Attached Thumbnails
Click image for larger version

Name:	MainModel.jpg‎
Views:	N/A
Size:	34.0 KB
ID:	27510   Click image for larger version

Name:	SubModel.jpg‎
Views:	N/A
Size:	32.3 KB
ID:	27511   Click image for larger version

Name:	Error840.png‎
Views:	N/A
Size:	31.7 KB
ID:	27512   Click image for larger version

Name:	AlternateModel.jpg‎
Views:	N/A
Size:	34.7 KB
ID:	27513  

Why is pooled geoprocessing service not available via the Rest API?

$
0
0
I'm using ArcGIS Server 10.0.

I've published a pooled asynchronous python geoprocessing service. It works correctly using the Rest API.

When I configure the service not to be pooled, I can't access it via the Rest API anymore. I get the following error: Service 'myService' of type 'GPServer' does not exist or is inaccessible. Error code: 404.

Is this normal?

Below the Pooling tab of my service configuration:
Attachment 27533
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG‎
Views:	N/A
Size:	12.2 KB
ID:	27533  

Is there an effective way to simply re-publish ESRI GP tools like ‘surface volume’ ?

$
0
0
Team,

Is there an effective way to simply re-publish ESRI built-in GP tools like ‘surface volume’ to the remote clients (ArcGIS Explorer, even ArcGIS Viewer for Flex)? In other words, do we have to customize own GP in order to publish via agis server?

Regards,

1 shapefile....duplicate features

$
0
0
I created a shapefile by merging to other ones together but now some of the polygons have more than one feature....I'm guessing the merge somehow caused this:

Attachment 27552

Does anyone know how to delete the duplicate feature from the shapefile? It holds the exact same info so I don't really need it....plus it's messing up my computations using Zonal Statistics tool :mad:

Any suggestions??
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG‎
Views:	N/A
Size:	18.8 KB
ID:	27552  

problems with DISSOLVE function when aggregating NEIGHBOUR POLYGONS

$
0
0
Hello everyone,

I have problems with the dissolve function.

I have a shapefile with multiple polygons, some are together and some are not. I want to use the dissolve function to create a new polygon shapefile where all adjacent polygons are aggregated into bigger polygons.

When I use the dissolve function it doesn't dissolve those polygons that only share a point with their neighbours.

A portion of my shapefile before the dissolve:
Attachment 27560

and after the dissolve
Attachment 27561

I think that the dissolve function doesn't understand that these polygons are also neighbours and, so, it creates two different polygons. Is there a way I can tell the dissolve function that those polygons are also neighbours?

Any help will be much appreciated.

Thank you.
Attached Thumbnails
Click image for larger version

Name:	Dissolve_NeighbourPolygons.jpg‎
Views:	N/A
Size:	34.7 KB
ID:	27560   Click image for larger version

Name:	Dissolve_NeighbourPolygons_1.jpg‎
Views:	N/A
Size:	32.6 KB
ID:	27561  

Selecting records from table's date field and deletiing expired dates.

$
0
0
I have zero programming skills here, so I need some help. I have a SDE Feature Class (SQL) showing where current Public Works Department's Projects are currently taking place though out the city. When a project location is added, someone populates the "begdate" field (Project Start Date) and the "enddate" field (Project Completion Date) for that project record. I want to write a script/program that will query the "enddate" field looking for records where the dates have expired. If it's older than today's date on my computer, then those records are selected and deleted from this Feature Class. Where do I start? Any suggestions would be appreciated.

Thanks,
Chuck

10.1 code that populates a field with sequential numbers

$
0
0
Hi folks,
I have a shapefile whose ID and FID numbers are all messed up in the attribute table and I'm looking for code I can type into my "Field Calculator" window that will fill in unique values for each polygon.
Any samples anyone?!!?! :)
Thanks

Here's what I've tried so far:

Attachment 27562

The complete code is:

rec=0
def autoIncrement():
global rec
pStart = 1 #adjust start value, if req'd
pInterval = 1 #adjust interval value, if req'd
if (rec == 0):
rec = pStart
else:
rec = rec + pInterval
return rec


Anyone see any issues that might be causing this not to work?
The error msg I keep getting is the dreaded 99999 error. :confused:
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG‎
Views:	N/A
Size:	64.7 KB
ID:	27562  

Geoprocessing guidance for African water project

$
0
0
A newbie (me) would love some geoprocessing, model building guidance. Conceptual advice is appreciated. I also have 2 specific questions: a) What tools are best to create my outputs? 2) Do I need to pre-process the layers since they are in different formats (polygons, xy data, etc.)? Many many thanks!

Outputs
1) Show polygon areas on African map when ALL of the following criteria are met
• Water depth = “Shallow”
• Population density = between x and y people per km
• Land usage = “Rainfed mixed crops” or “rainfed corn” or … (I will select 20 out of 73 categories)

2) # of people that live in those polygon areas, broken out by country

MY MAP LAYERS

WATER DEPTH
This shows water depth categories at various points in Africa (shallow, very shallow, etc.). I started with an XY table and converted it into a shape file. Info from Properties:
Code:

Data Type:                Shapefile Feature Class
Shapefile:                C:\Users\T. Hardy Jackson\Documents\Consulting\KickStart\GIS\KickStartGIS\WaterDepth.shp
Geometry Type:                Point
Coordinates have Z values:        No
Coordinates have measures:        No
Geographic Coordinate System:        GCS_WGS_1984
Datum:                D_WGS_1984
Prime Meridian:        Greenwich
Angular Unit:                Degree


POPULATION DENSITY
This shows population density at particular points (500 people / km at long xx.xxx and lat xx.xxx, etc.)
Code:

Columns and Rows:        2160, 1920
Number of Bands:        1
Cell Size (x,y):                0.0416666667, 0.0416666667,
Format:                        BIL
Source Type:                Generic
Pixel Type:                Unsigned integer
Pixel Depth:                32 Bit
NoData Value:               
Pyramids:                level: 3, resampling, Nearest Neighbor
Spatial Reference:        Undefined

LAND USAGE
Shows how land is being used at various areas in Africa (73 categories)
Code:

Columns and Rows:        40322, 19446
Number of Bands:        1
Cell Size (x,y):                0.089281971, 0.089281971
Format:                        GRID
Source Type:                Generic
Pixel Type:                Unsigned integer
Pixel Depth:                8 Bit
NoData Value:                255
Pyramids:                level: 7, resampling, Nearest Neighbor

Spatial Reference:        GCS_WGS_1984
Angular Unit                Degree (0.01745…..)
Datum:                        D_WGS_1984

AFRICA COUNTRY MAP
Shows country borders.
Code:

Data Type:        Feature Service Feature Class
Location:        http://services.arcgis.com/MdapRpkzb.../FeatureServer
Feature Class:        1
Feature Type:        Simple
Geometry Type:        Polygon
Coordinates have Z values:        No
Coordinates have measures:        No
Geographic Coordinate System:        GCS_WGS_1984
Datum:        D_WGS_1984
Prime Meridian: Greenwich
Angular Unit:        Degree

Creating 3D line features from extruded points

$
0
0
Hi All,

Until recently I was able to take a sample grid, make centroids and extrude the centroids to an elevation in ArcScence and using 'Layer 3D to Feature Class' create 3D connected lines (essentially sampling columns). As of today I can no longer do this process. I have tried on two computers to see if it is a Windows patching issue.

Just wondering if anyone else is able to replicate my workflow.

If I can't use my original workflow (which worked for last 18 months), how can I make my centroids at two elevation connect to recreate my sampling columns?

Any advice / comments welcome.

Regards,

Craig

Zonal Statistics as Table

$
0
0
Hi folks,
So this time I am once again, using Model Builder to run the "Zonal Statistics as Table" tool to create database (.dbf) files.
See model below:
Attachment 27583

After the model runs, I can access the .dbf files and pull them into excel for further analysis. For each time it runs with the different tiff layers, the format is as follows:
Attachment 27587

The issue is that each time I run the model with the different raster (.tif) images, the AREA for the same UNIQ_FIDs is different.
From what I understand about this tool, is that it performs the statistic specified (in this case = MEAN) of all the raster pixels that it counts within that zone. So I can understand why the COUNT would be different but I don't know why the AREA would change from dbf to dbf?!! Isn't the zone (in this case= polygon referenced by UNIQ_FID) remaining the same? :confused:

Maybe I have the whole Zonal Analysis idea wrong in my mind. Could anyone help me make sense of why the area would be changing.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG‎
Views:	N/A
Size:	32.2 KB
ID:	27583   Click image for larger version

Name:	Capture.PNG‎
Views:	N/A
Size:	9.6 KB
ID:	27587  

Polygon to Raster issue!

$
0
0
I'm trying to create a 0/1 raster in 10.1 where anything that is a polygon has a value of one and anything that is not has a value of zero. The polygons were created from a large point shape file that I put a buffer on. The buffer was dissolved and resulted in a total of 4 polygons. In the attribute table, I added a field called "count" and made all rows in the field = 1. The value was integer.
Then when I used the "polygon to raster" tool, the input was the polygon (4 total) layer, and the I chose "count" as the value field hoping the raster produced would have a range of values from 1 to 0 where anything that was a polygon was 1. I chose none for the priority field and cell center for the cell assignment type.
After an extremely long processing time, the raster returned to me had a max value of 2147483647 and min value of -2147483647. I don't understand why it did not just return a raster of a max of 1 and a min of 0 when I specified the value field to be count. Could it be because when I made the "count" field in the polygon layer I used integer?

Any help would be greatly appreciated as this should be simple!

Thanks so much

Sara

Question about the extract by mask tool.

$
0
0
Hi,
So I'm using the "Extract By Mask" tool to trim a raster dataset down, based on a shapefiles for the Brazilian states. It seems to work fine, however when I compare the pixels extracted for each state, there are a couple that are either left off (not extracted for either of two adjacent states) or extracted twice (for both adjacent states). I'm curious if anyone knows why this is happening? Ideally I'd like to extract pixels no more than once and not leave any off.

Thanks in advance,
-Scott

Model Builder: Selecting multiple input files

$
0
0
I'm trying to use model builder to clip multiple rasters existing in Tiff format using a polygon extent. All 167 rasters are in a single folder on my hardrive. I created a list of the files as an excel file, indicating their full path. I then created an input variable in model builder as 'raster data layer' and selected 'A list of values' in properties. I opened the raster layer and tried to use 'Insert values from a table' to select all 167 files. This does not work and nothing gets added.

Am I doing something wrong? I tried the same using the list saved as CSV and Text files, but neither works. I'm also unable to copy the entire list and paste it into the datafield. I tried changing the variable type to 'Raster Dataset', but that doesn't work either.

Any help will be appreciated,
Thanks

PS: I'm attaching the excel file containing the list of input files
Attached Files

Newly Projected Feature Class not overlaying properly

$
0
0
So I have a feature class wih western canada and a newly projected "creeks" layer that was projected into the coordinate system that the western canada feature class was in. even after re-adding the feature class from the destination folder it still is showing up in the same place it was on the map as before instead of overlaying over Alberta.

I'm not sure what I doing Wrong

Thanks,

Best Tool to create a series of rings, and how to start, if possible

$
0
0
Hi,
I have a group of points, I want to create multiple rings that connect a maximum of five points at a time with the shortest distance possible between rings. They can be any type of rings, as long as they connect no more than five points at once. I was searching specifically ESRI ArcGIS tools and was having trouble finding the best tool for this job. I was wondering if anyone had a suggestion for a method or Tool to use that would make this task possible. Here is the group of Points I am working with. If this is possible. This is for a Fiber Network.
Attachment 28906
Attached Thumbnails
Click image for larger version

Name:	fgKE7Ze.png‎
Views:	N/A
Size:	34.7 KB
ID:	28906  

Isses with generate near table

$
0
0
Hello,
I am trying to use the "generate near table" tool to find distance from certain pts to nearest roads(tiger data, lines). I have about 5,000 pts, but I think the issue lies in the amount of roads(lines). I have been running the tool for 3 days and it is hung on 100%, but will not finish. I am wondering if the data set is too large or what might be taking so long.
Any ideas or help would be greatly appreciated.
Thanks in advance.
Tyson

Population geoprocessing

$
0
0
Good day all,

i have a question about the dissolving of polygons into new polygons, based on a 'more than x inhabitants' selection.
So, my data is a 500m grid polygon with attributes which tell me the inhabitants of that specific polygon for the year 2000 to 2012 (in different fields).

My first step is to select the polygon which have more than 100 inhabitants. This data will be used to create the new polygons. My first thought was to make a model based on the following idea:

Select by attributes -> Inhabitants > 100.
Export selected data
Dissolve the polygons in one polygon if they are connected and add all the attributes from the 2012 inhabitants field into one field if applicable.
So you will get a new polygon based on 100 or more inhabitants with the attributes from the year I choose.

However, when I try the dissolve tool, I still get the same results as the select by attributes.
I think I overlooked something, but I don't know what. In what way can I create polygons based on attributes and also calculates the attributes into one new attribute? Do I have to write a python script?

Thanks in advance,

Mark

Layer from select road polygons between intersections

$
0
0
All,

I have been given a request to develop a roads-to-be-paved layer. I was given an excel sheet that identifies the street name and the containing streets.

For example:

STREET_NAME BTWNA BTWNB
Green Hills Way Alma Rd Oak Hills Road

I have roughly 800 of these to digitize and to do so manually is a tedious shore. What would be the best course of action to automate this? I was thinking of developing Intersection Points but am not sure then how to run the script/tool/model to select the road polygon with corresponding name BETWEEN those intersections and put it in the new layer.

Your help is greatly appreciated,
Nick
Viewing all 1751 articles
Browse latest View live