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

Error 210 and Add Data dialog

$
0
0
Hi,

is there any way to avoid getting a error 210 when running one instance of ArcMap or ArcCatalog, doing some geo-processing and starting another instance of ArcMap or ArcCatalog?
It is very frustrating when your software is opening the Add Data dialog or a Save Data dialog while some model or Python script is working in that folder/database. The result seems obvious... the model or the script crash, unable to write any longer to the location!

Bests Thomas

Get records that exist in one table but not another

$
0
0
Hello, I am relatively new to using the model builder and I have a problem maybe someone could help me with. I have a table in a Geodatabase, and I have a shapefile. The geodatabase table for sake of argument has 1000 records, and the shapefile has 900 records. I would like a model that would pull out or extract those 100 records that exist in the geodatabase table but not in the shapefile. Is this easy to do, and does anyone have suggestions on how to go about this?

thanks
mike

Selecting non-overlapping objects within single polygon layer

$
0
0
I have a polygon layer of regularly spaced, overlapping buffers, created by buffering points 400m apart, with buffers of a 400m radius. But now I need to split this into separate polygon layers in which the buffers do not overlap, in order to use zonal statistics with raster layers (if the polygons overlap the zonal statistics doesn't work properly). By manually selecting the first few buffers I have found that four layers would suffice to contain all the buffers with no overlaps within each of the four new layers.

My problem is how to select the buffers that I want to export to new layers. I don't have a regular number of polygons on the x or y axis and I tried generating a point layer to use select by location but I couldn't get the right spacing, it was very fiddly.

I have attached an image with the four separate layers on top (which I extracted manually) and the overlapping polygon layer (which I extracted them from) on the bottom. I can't do all the extractions manually as I have 800,000 polygons!

Any suggestions? I don't know python but this could be programmed I'm sure with a python script. I just don't have the first clue!
Attached Thumbnails
Click image for larger version

Name:	chapter2.jpg‎
Views:	N/A
Size:	54.4 KB
ID:	34501  

Error executing tool.: ERROR 001369: Failed to create the service.

$
0
0
Hello, i create test tools in model builder. When i publish this, out error
Code:

SEVERE Error executing tool.: ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). System/PublishingTools.GPServer       
SEVERE 1Failed to create the service.: ERROR: Service failed to start, Cannot connect to this server. System/PublishingTools.GPServer       
SEVERE  Core server call to create service failed. System/PublishingTools.GPServer

Why?
Thanx.
Attachment 34504
Attached Thumbnails
Click image for larger version

Name:	2.PNG‎
Views:	N/A
Size:	36.7 KB
ID:	34504  

How do you convert from numbers as text string to numberic, double, long, etc?

$
0
0
I know how to do it in Avenue and I see old threads about how to do it in VBA. But how do I do it now with VB or Python? This should be simple but every time I get an error. I have one column with numbers and its a String field. I added a new field as a Long and am trying to use the field calculator to populate it with the same data as the string field, but as a number. How?

Parameter order for a script tool

$
0
0
This help page (http://resources.arcgis.com/en/help/...00000011000000) says:

Quote:

A tool dialog box has the capability to show parameters in a different order than the actual parameter order, so in rare cases, the order of the parameters in the tool's dialog box may be different than the order in the parameter table. For Python, always use the order as shown in the parameter table.
An example of where this is found is the Convert Coordinate Notation tool.

Is there a means by which this can be achieved for a Script Tool (i.e. having a parameter order in the dialog box that is different from the order in the script)?

Model Builder Overwriting my final output

$
0
0
Hi,

I am trying to create a grid index based upon an ID field and have managed to create the workflow in model builder and everything is working great until the final output where the process overwrites the final output.

I have attached a picture of the workflow in model builder so you can see the steps taken and hopefully offer some advice.

Thanks

John
Attached Thumbnails
Click image for larger version

Name:	Grid Model2.jpg‎
Views:	N/A
Size:	54.0 KB
ID:	34532  

Locate Features Along Routes (Linear Referencing) tool produces too many events

$
0
0
Hi,

ArcGIS: 10.1

I have a railway feature class (route) with Z & M values. There are 5 route lines in the feature class with an associated route ID (character). My point feature class (in_features) contains around 10,000 points which are dispersed all around the 5 routes. When the two feature classes are put through this tool (radius is set large to target all 10,000 points) the resulting event table has around 400 additional points. I have worked out that these additional points are duplicates and are positioned on top of each other normally in the middle between two of the route lines. It feels like the tool is ignoring the route_locations (unchecked) parameter ot it struggles when a point maybe exactly between two lines. I have adjusted tolerances, unchecked/checked distance field and all other manner of checking/unchecking parameters for the tool but it still results in 400 additional points. I have also tried adjusting the XY Resolution and Tolerance in the Environment settings but this produces the same amount of additional points.

I have unchecked Distance field as I read on another Thread that the distance calculation can cause problems but it still results in the same additional points and other Threads have gone unanswered which allude to a Bug with this tool.

Can anyone explain the additional points?

Many thanks! :)

Arcgis Layer to KML (google earth)

$
0
0
Hi there,



I've been struggling for ages trying to export a layer file (either vector or image to google earth).
I have been using Layer to KML export function but the result is always wrong.
I'm in the uk so the original layer is in OSTNO2 coordinates. I've try to export to different coordinates system but it's always out on the same location wrong by a few ten's of meter. As you can see below my outline should fit within the field and not be on the road!!!



I've attached a zipped folder which contain the layer file, the origin shapefile and the kml exported.

After trying for ages I gave up thinking that there is some projection incompatibility between ArcGIS and google earth and I was surprised to find no solution on internet of a problem that I imagine would be very common.
But this week I had a demonstration from a sales man working for trimble. We processed some GPS data using Trimble Business Office. And by a simple clic, all our data within TBO were display on google earth with very good accuracy.

So this let me to think that they MUST be a way to do the same with my layer and shapefile in ArcGIS. I would be greatfull to hear if you have the same issue or know how to solve it!

Thanks
Attached Files

QA QC excel log for SDE Layers

$
0
0
I am still very new to python and very much learning on the fly. I am trying to create and email a excel spread sheet of various layers in a SDE db. I am doing this because we have multiple users editing and creating new layers and to QA QC all of, we can sort by certain fields and time stamps. I have been able to create a log for one particular feature data set but would like to ultimately have this file monitor about 17 more files within this SDE db system.

The code is below. in this instance the fields of interest are:
sde_master.GIS_USER.AccessPoints.OBJECTID #;
sde_master.GIS_USER.AccessPoints.CREATEDBY #;
sde_master.GIS_USER.AccessPoints.CREATEDDATE #;
sde_master.GIS_USER.AccessPoints.EDITEDBY #;
sde_master.GIS_USER.AccessPoints.EDITEDDATE

How would I modify this script below to track and monitor certain fields(not necessarily the ones above) and have those results emailed to me in a condensed spread sheet. A multi page excel work book with each tab representing a various SDE layer would be optimal. Thank you in advance:

Raoul


# Import arcpy module
import arcpy
import time

# Set the Date
Date = time.strftime("%m-%d-%Y", time.localtime())

# Set the time
Time = time.strftime("%I:%M:%S %p", time.localtime())

# Set Environment Variables
arcpy.env.overwriteOutput = True

print "Process started at " + str(Date) + " " + str(Time) + "." + "\n" #Log File Start Time

# Set up the log file.
LogFile = file('C:\\Temp\\Esri_anon' + '.txt', 'w') #Creates a log file with todays date.
output = open('C:\\Temp\\EsrianonLog' + '.txt', 'w') #Path to log file.
output.write(str("Process started at " + str(Date) + " " + str(Time) + "." + "\n")) # Write the start time to the log file.

# Local variables:
Input_Tables = "'Database Connections\\gis_ims@sde_master.sde\\sde_master.GIS_USER.CommunicationNetwork\\sde_master.GIS_USER.AccessPoints'"
QueryTable = "QueryTable"
QueryTable_View = "QueryTable_View"
new_xls = "E:\\GIS\\RJC\\GeoProccessing\\20140612\\new.xls"

# Process: Make Query Table
arcpy.MakeQueryTable_management(Input_Tables, QueryTable, "USE_KEY_FIELDS", "", "sde_master.GIS_USER.AccessPoints.OBJECTID #;sde_master.GIS_USER.AccessPoints.CREATEDBY #;sde_master.GIS_USER.AccessPoints.CREATEDDATE #;sde_master.GIS_USER.AccessPoints.EDITEDBY #;sde_master.GIS_USER.AccessPoints.EDITEDDATE #", "EDITEDBY in( 'Esri_Anonymous') AND EDITEDDATE >= GetDate()-14")

# Process: Make Table View
arcpy.MakeTableView_management(QueryTable, QueryTable_View, "", "", "sde_master.GIS_USER.AccessPoints.OBJECTID sde_master.GIS_USER.AccessPoints.OBJECTID VISIBLE NONE;sde_master.GIS_USER.AccessPoints.CREATEDBY sde_master.GIS_USER.AccessPoints.CREATEDBY VISIBLE NONE;sde_master.GIS_USER.AccessPoints.CREATEDDATE sde_master.GIS_USER.AccessPoints.CREATEDDATE VISIBLE NONE;sde_master.GIS_USER.AccessPoints.EDITEDBY sde_master.GIS_USER.AccessPoints.EDITEDBY VISIBLE NONE;sde_master.GIS_USER.AccessPoints.EDITEDDATE sde_master.GIS_USER.AccessPoints.EDITEDDATE VISIBLE NONE;sde_master_GIS_USER_AccessPoints_CREATEDBY sde_master_GIS_USER_AccessPoints_CREATEDBY VISIBLE NONE;sde_master_GIS_USER_AccessPoints_CREATEDDATE sde_master_GIS_USER_AccessPoints_CREATEDDATE VISIBLE NONE;sde_master_GIS_USER_AccessPoints_EDITEDBY sde_master_GIS_USER_AccessPoints_EDITEDBY VISIBLE NONE;sde_master_GIS_USER_AccessPoints_EDITEDDATE sde_master_GIS_USER_AccessPoints_EDITEDDATE VISIBLE NONE")

# Process: Table To Excel
arcpy.TableToExcel_conversion(QueryTable_View, new_xls, "ALIAS", "DESCRIPTION")

print "Process Successful Completed at" + str(Date)+" " + str(Time) + "."

# Sets the Date & Time since the script Ended.
Date = time.strftime("%m-%d-%Y", time.localtime())# Set the date.
Time = time.strftime("%I:%M:%S %p", time.localtime()) # Set the time.
output.write(str("Process completed at " + str(Date) + " " + str(Time) + "." + "\n")) # Write end time to the log
output.write(str("\n" + " !!!!!!!!!!!!!!!!Import Sucessful!!!!!!!!!!!!!!!!!!!"))
output.close() # Closes the log file.

print "!!!Records exported!!!!"

#End of program

Python Errors in IDLE when processing metadata

$
0
0
Scripting ImportMetadata_conversion in Python worked for me with ArcGIS Desktop 10.1. Now ImportMetadata_conversion won't run in script; I am now on ArcGIS for Desktop 10.2.2. I get "ERROR 000816: The tool is not valid."

Although problems with scripting metadata processes might not be very significant in some organizations, my organization provides a GIS data clearinghouse. Metadata processing is a significant part of our work.

I was disappointed because the ImportMetadata_conversion Help document in ArcGIS for Desktop did not indicate that the tool won't work in an external script. I wrote a script that uses ImportMetadata_conversion, and then discovered that ImportMetadata_conversion won't run in the script.

Grouping adjacent cells by given number

$
0
0
Hello everybody,

we have a vector polygon made by 1'206'198 (500x500m) cells.

We need to make groups of 9 adjacent cells (3x3). The selected cells must belong to one and only one group.

A complication is that our grid is not regular but it is a bit distorted in order to account for the sferical and irregular terrestial surface.

Is ther any tool or proven procedure to achieve such a result?

Thanks in advance!

table to dbase tool not overwriting existing file

$
0
0
I have been trying to export a table to a .dbf file on a network and would like to use the Table to Dbase geoprocessing tool in ArcToolbox to automate this. However when I try to run this tool more than once it fails to overwrite the existing file. I looked under geoprocessing options to make sure the overwrite option is checked but it still puts a _1, _2, etc, at the end of the name. Is their any other place I need to look to make sure it overwrites the existing file.

I can do this manually by going to Data > Export, but would like to use this tool to automate it. If anybody can help point me in the right direction or give me some clues on how to accomplish this?

Thanks

Binding a Program to ArcGIS

$
0
0
Good afternoon,
I got a tool (a program) developed based on ArcObjects for Microsoft .NET framework. The problem is I don't how to install or to bind to ArcGIS. It is a executable .exe and when I double-click on it, the popup says it should be bound to ArcGIS. Please, can someone give me the step-by-step procedure to bind quickly. I do not have notion about development. I am using ArcGIS 10.2.
Best considerations,

ssaine0180

Model Builder - Make Query Table expression

$
0
0
I am working on a model that uses the 'Make Query Table' Tool as the first step in the workflow. There are 3 fields from the input table being used in the query expression, which I have set up as model parameters so that users can define the query.

I have created in the model three string variables, called SelectVar1, SelectVar2 and SelectVar3. These are model parameters and are connected to the Make Query Table as 'preconditions'.

Within the Make Query Table tool dialog, the Expression is defined as follows:

"Var1" = %SelectVar1% AND "Var2" = %SelectVar2% AND "Var3" = %SelectVar3%

This is working fine; whatever values are provided for the parameters are plugged in to the query. However, there are limitations with this approach. Specificly, only 1 value is allowed per variable, and all 3 variables are required for the query to work.

What if I want the query to be a bit more flexible with the query inputs? For example, query multiple values from a single variable, or query based on one variable but not the others? Ideally, I would like users running the model to be presented with a list of possible values for each variable, and let them click check boxes to choose which values to query for.

Does anybody have any thoughts on how this might be accomplished? Thanks

Modelbuilder in ArcGIS 10

$
0
0
Hi all
I got a problem when I want to make a modelbulider in ArcGIS 10.

The thing is that: I have a polyline shp file with length field in attribute table (havent been calculated so they are value 0 now). Now I have no idea how can I make a function to calculate geometry in modelbuilder(I knew how to calculate manually by just right-clicking field and choose calculate geometry). I tried to serarch Calculate geometry in toolbox but there was anything.

I know I can also do this manually but my project is quite big. In this case, it would be a good idea to create complete model to process everything.

Could someone help me to solve? or if there is any other way works well.

I would be much appreciate if anyone can help me.

Select lines by length convert to polygon?

$
0
0
Quote:

Originally Posted by rfairhur24 View Post
You have to use python in the field calculator. The basic operations are listed here under the Geometry Unit Conversion section. The basic syntax for filling in length from lines is:

!shape.length!

You can convert units with expressions like:

!shape.length@yards!

Hi
Thank you for your answer! I think I got this now
I have a further question: I need calculate the mean of all this length fields and just want to transform lines that are less than mean value to be a polygon. How can I make this possible? I know there was a function called "features to polygon" but this is only work for whole line. Could you please kindly give me some tips? Thank you again!

to clip a line with a polygon directly without creating a new .shp?

$
0
0
Hi,

I need to clip my contours (lines) with a rectangle polygon directly in the original .shp without creating a new one.

Can you give me some advise?

Thanks

Ilona

X Y coords not plotting in right place

$
0
0
Hello,

I am attempting to plot in X/Y coordinates using the format for example Lat = 41100 and Y = 21400, using the coordinate system of WGS 1984 UTM zone 33N. When I plug in vector or raster data, everything is fine, but when I put in a base map, my data ends up in Africa when it should be in the UK. Can someone tell me what I am doing wrong?

Thanks.

Create a path between point with restriction

$
0
0
Hello,

I want to create a path between points and measure path distance given that there is a polygon restriction. For example, I have species initial location and final location, and big lake is in between the points. I want to create a shortest path so that it avoids lake. I guess there must be tool in ArcGIS 10x other than least cost path method that does what I want. Any tips ?

Thanks !
Viewing all 1952 articles
Browse latest View live