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

Viewshed Output Data

$
0
0
I'm working on a viewshed analysis for multiple points, and comparing viewshed change from one time period to another. Is it possible to get a viewshed output that provides the viewshed in degrees? For example, if I input the parameters to scan 180 degees, how many degrees of that 180 are actually viewable? I know you can input the azimuth for the analysis to consider, but I'm not sure if you can get these results in an output as well.

A serious problem with some ArcToolbox instruments

$
0
0
It seems that I have a global problem with some ArcToolbox instruments (ArcGIS10.0).
I tried to use instruments "Add Xy Coordinate" and "Field Calculate".
In both cases they doesn’t work, the program gave zero (0) for all objects in all new fields.

Really, I can’t imagine the reason of it. What shall I try to do with that?

Feature comparison scenario

$
0
0
I am trying to find differences among polygon features between two sets of data. For the sake of simplicity, I drew a little diagram . Let's say there is a county that consists of four cities: Alpha Ville, Beta Ville, Gamma Ville, and Delta Ville. In 2003, each city occupied a quadrant of the county. Fast forward to 2013 and there have been some changes. First, Gamma Ville has changed its name to Gummy Ville. Second, the coverage of Beta Ville and Delta Ville have shifted.

My diagram - and the portions highlighted in green and purple - show differences between the shapefiles. These highlighted areas are the output I hope to achieve.

What operations can I use to do this? I tried Feature Compare (Data Management) because that very much sounds like what I intend, but I keep getting the error, "Table row counts are different". However, I know that my comparison files will have different numbers of features; that is part of why I want to make the comparison, to see changes in existence, geometry, and/or names of all features.

Thanks in advance for your help!

Splitting large point data layer problem!!!

$
0
0
Hi Folks,
I am trying to clip a point data layer by another polygon file. This point file is pretty large (millions of points - address points in the US). Every time i try using clip or select, it either freezes with "Not responding" or takes forever (~14 hrs with no results). I am trying to use Dice tool, but I am not sure if I can use Dice tool on point feature. If so, what am i supposed to put on "vertex limit"? BTW, the data is on SDE server. I also tried exporting it to the local drive, but with no success. Any help will be greatly appreciated.

Thanks,
Binesh

Iterated inline variable as input for geoprocessing tools

$
0
0
I am trying to loop through a series of folders and clip the appropriate rasters with polygon, the new rasters will then be mosaiced.

I am having trouble passing the parsed file name and path as an input to the clip tool. It looks like the tool is iterating through the folders and not passing the information to the rest of the tools.

I have set the parsed path and file name as a precondition to the clipping tool, to ensure the input feature was properly populated.

I am receiving the message "The process did not execute because the precondition is false."

Any help would be appreciated.

Thanks
Attached Thumbnails
Click image for larger version

Name:	WSEL_Grid_Model.jpg‎
Views:	N/A
Size:	49.0 KB
ID:	27302   Click image for larger version

Name:	Geoprocessing_Error.JPG‎
Views:	N/A
Size:	107.2 KB
ID:	27301  

Python geoprocessing performance

$
0
0
Hi,

I have a python geoprocessing that takes a lot of time. The geoprocessing calculates geometries using points, polygons, buffers, and cursors.
Do you have any hint of how to optimize the geoprocessing?
Would it be shorter in time if I used the Java API?

Thanks.

Geoprocessing dont work!

$
0
0
Hi
I have 10 geoprocessing services on my server. But I have problem with these GP Services. When I run GP Services with large area the GP service dont work. Is there any limitation on ArcGIS Server by default?
Regards
A.Ponker

Re: Intermediate data

$
0
0
I already tried those things, unfortunately. I probably could have figured this out, but it would've took me too long, so I decided to just drop that part of the model from my study. Oh well. Arc works in mysterious ways.

Cell Values to NoData

$
0
0
Hi all,

I'm trying to use the SetNull function in Raster Calculator with no results so far:

I have Raster1 and Raster2. Boths Rasters share some pixel cells locations. For those cells that have the same location in Raster1 andRaster2 I need to set those cells to No Data in Raster1.

I've tried with SetNull(Raster1, Raster2, Raster1) but it doesn't do the job.

Any help would be greatly appreciated.

Many thanks

Toni

merge certain layers within multiple feature datasets in a geodatabase

$
0
0
I have a geodatabase with multiple feature datasets inside. Each of these feature datasets contains multiple layers of different geometry types. I would like to create a comprehensive file of each of these geometry types.

In order to do this i would normally just open the merge tool and pick out all the ones i want.

Well in this case there are over 100 so i was thinking this would be a lot easier if there was a script that could crawl through the geodatabase, pull out the certain geometry type from each feature dataset and merge them all together. And what would be even better would be if it added a field to the final file with the layer name of each merged file so that i'd know which was which.

Anyone have something like that lying around? or is this something easy to create?

I have little to know python experience so any help would be appreciated.

thank you.

Create Query Layer Tool Output Object Not Found or Recognized

$
0
0
ArcGIS 10.1 SP1. ArcSDE 10.1, SQL Server 2008 R2

I have been trying to use the Make Query Layer Tool to create a table view from SDE tables (_VM) in SQL Server 2008 R2 and save the table by a number of export methods with limited success. I have been unsuccessful in saving the information through either the tools, modelbuilder, python window or arcpy (external python). Only manual export is working.

The tool "make query layer" ran from within ArcMap will create the proper table from the SDE/SQL Server 2008R2 query and tables, however, it is not possible to export this Table_View layer using export Table to Table or CopyRows or Table to Geodatabase as shown in the help literature. The ONLY method to export the information has been in the Table of Contents (TOC), through export from the table.


Delving a little deeper I tried to get a little infomration on this object and it appears to contain part of the SQL/SDE connection string as part of it's object as several tools have indicated a .name of "SEKI_HazardTrees.DBO.%HazTree" when the original given name is HazTree only (SEKI_HazardTrees is the name of the SQL/SDE database). I also receive this name when I run arcpy.describe on the object and return a path of the sde connection string.

desc.name = SEKI_HazardTrees.DBO.%HazTree
desc.dataType = TableView
desc.nameString = HazTree
desc.path = Z:\Projects\HazardTrees\inpsekigistest_HazardTrees.sde ( the path of the SQL database)


The error received is very general and similar between failing tools:

Failed to convert SEKI_HazardTrees.DBO.%HazTree. ERROR 999999: Error executing function.
Failed to execute (CopyRows).

or

Cannot open HazTree (the Table View - in arcpy)

I have tried to override the tool from including the SEKI_HazardTrees to it's name by setting up the scratch and normal workspaces to no avail.

IF you have a working python .py example of this (not from the ESRI site that does not work) please post. I have tried all the versions posted by ESRI.

Thanks
Kevin






I'm including my code here for what its worth, but since the stand-alone tools couldn't work I wouldn't expect the arcpy gp tools to work any better (although sometimes they do).



python code
Code:

#Import system modules
import arcpy

arcpy.env.overwriteOutput = True

# Set data path also tried removing the r and change / to //
workspace = r"Z:/Projects/HazardTrees/Results.gdb"
intable = r"Z:/Projects/HazardTrees/Results.gdb/Veg_HazardTreeSurvey_tbl"

inpsekigistest_HazardTrees_sde = r"Z:/Projects/HazardTrees/inpsekigistest_HazardTrees.sde"

arcpy.env.workspace = workspace
arcpy.env.scratch = workspace

# Create the Query Layer and return the Table-View name for verification
test = arcpy.MakeQueryLayer_management(inpsekigistest_HazardTrees_sde, "HazTree", "SELECT * from SEKI_HazardTrees.dbo.Veg_HazardTreeSurvey_tbl_VW", "OBJECTID", "", "", "").getOutput(0)
# Get the properties of the Query Layer if possible
objMQ = arcpy.Describe(test)
print objMQ.name
print objMQ.dataType
print objMQ.nameString
print objMQ.path
print test

# Get column count - note that if the MakequeryLayer function fails, then an empty table with only the schema will be produced.
# However, we have tested this and copied the SQL query and parameters from ArcMap tools for which we were successful generating the Table View so this should be ok

#print int(arcpy.GetCount_management(test).getOutput(0))  # doesn't work
#print int(arcpy.GetCount_management("HazTree").getOutput(0)) # doesn't work

#arcpy.CopyRows_management(test, r"Z:/Projects/HazardTrees/hz002.dbf")  # doesn't work Error 99999
#arcpy.CopyRows_management(test, "Z://Projects//HazardTrees//hz002.dbf")  # doesn't work Error 99999

ModelBuilder with precondition in batch mode fail

$
0
0
I have a model that recalculates and applies a new spatial index to a feature class which came from the discussion Batch recalculate spatial index. One issue I had with it is that it would fail if the feature class didn't have any features. When running a batch, this would suck as it would come across an empty feature class then stop. So I added a precondition to use Get Count to check that the number of rows wasn't 0. Works great on a single class. If it's empty, it indicates that the precondition fails and skips the spatial index stuff instead of throwing an error.

Now, run this in batch mode with two feature classes, one with features and one without. If the one without features is first, then the precondition fails on both and nothing happens. If the one with features is first, then the precondition passes and both run which causes it to error on the empty class. You would think that running in batch means run the model X amount of times with the different input values. But it would appear there is something that crosses between inputs that causes a precondition result from one input to be applied to all input.

Attached is a test toolbox with the model in it. Has anybody else noticed this issue? Is there some option or setting that is missing that would allow this to work? In the end, I created a python script that does the same thing and that works in batch mode just fine. Ran into some issues with python as well, but that's a discussion for another day.
Attached Files

arcpy.getparameter type returned for multivalue changed in 10.1?

$
0
0
Can anyone confirm whether the variable type returned for multivalue parameters by arcpy.getparameter() changed in 10.1?

I run the same tool with the same parameters in ArcGIS 10.0 and 10.1 and the 10.0 version returns a Arcpy ValueTable object, but 10.1 is returning a list object (which breaks the tool).

According to the 10.1 documentation here: http://resources.arcgis.com/en/help/...00000013000000
AND the 10.0 documentation here: http://help.arcgis.com/en/arcgisdesk...00000013000000
both should be able to return either a string, a Python list, or a ValueTable, but why would the exact same script return a different type of object if run in 10.1?

The line doing it is simply elemSet = arcpy.GetParameter(9)
On the next line if I do type(elemSet) I get different object types as noted above. Anybody know any way to force 10.1 to return a ValueTable?

Thanks!!!!

How to resolve encoding errors in python geoprocessing?

$
0
0
I have a simple python script that reads a string from a text file and inserts it into an Oracle database.

When I run the script with Eclipse using Pydev plugin I get no error and the message is inserted into database.

However, when I run the script using an ArcGIS geoprocessing service (using a toolbox), I get the following error in the logs, and no insertion is performed into database:

Code:

[06/09/2013-10:30:39.380] ERROR - APPLICATION <module>(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u"INSERT INTO APPLI.ALERT (ID_ALERT,MESSAGE,TYPE_ALERT) values(1617.0,q'[Les coordonn\xe9es ne sont pas correctes\n]',3)", 94, 95, 'ordinal not in range(128)'))
The code is the following:

Code:

try:
    msg=open("myFile.log", 'r')
    a=msg.read(20)
    strInsert = "INSERT INTO  APPLI.ALERT(ID_ALERT,MESSAGE,TYPE_ALERT) values(1625.0,'"+a.replace('\"','').decode('utf-8')+"',3)"
    logger_module.debug(str(strInsert))
    SdeExecuteSQL(CONNEXION_FILE,strInsert )
except:
    python_error_handler()

When I open myFile.log with Notepad++ the encoding is ANSI as UTF-8.

Do you have any hint?

Regards.

How to georeference multiple images in ArcGIS 10.1

$
0
0
I have scanned about 200 aerial photographies and want to georeference these to fit the area they are covering. I'm using the Imagery basemap, because this is the only free georeferenced map I have found of the area.

This basemap is a very big file, covering the whole world. For my project i only need a small part of Greenland. Does anyone know if it is possible to crop this map to only cover my area of interest?

Second question, when i georeference one picture and rectify this it is saved so that I can close and open it again. But when i try to put another picture in the same file and georeference the second picture, the first one snapps back to original position.

Is it possible to georefernece several pictures in the same file, to make them fit together?

Hope to get a quick answer!

Stine M.

Splitting large point data layer problem!!!

$
0
0
Hi Folks,
I am trying to clip a point data layer by another polygon file. This point file is pretty large (millions of points - address points in the US). Every time i try using clip or select, it either freezes with "Not responding" or takes forever (~14 hrs with no results). I am trying to use Dice tool, but I am not sure if I can use Dice tool on point feature. If so, what am i supposed to put on "vertex limit"? BTW, the data is on SDE server. I also tried exporting it to the local drive, but with no success. Any help will be greatly appreciated.

Thanks,
Binesh

Viewshed Output Data

$
0
0
I'm working on a viewshed analysis for multiple points, and comparing viewshed change from one time period to another. Is it possible to get a viewshed output that provides the viewshed in degrees? For example, if I input the parameters to scan 180 degees, how many degrees of that 180 are actually viewable? I know you can input the azimuth for the analysis to consider, but I'm not sure if you can get these results in an output as well.

A serious problem with some ArcToolbox instruments

$
0
0
It seems that I have a global problem with some ArcToolbox instruments (ArcGIS10.0).
I tried to use instruments "Add Xy Coordinate" and "Field Calculate".
In both cases they doesn’t work, the program gave zero (0) for all objects in all new fields.

Really, I can’t imagine the reason of it. What shall I try to do with that?

Feature comparison scenario

$
0
0
I am trying to find differences among polygon features between two sets of data. For the sake of simplicity, I drew a little diagram . Let's say there is a county that consists of four cities: Alpha Ville, Beta Ville, Gamma Ville, and Delta Ville. In 2003, each city occupied a quadrant of the county. Fast forward to 2013 and there have been some changes. First, Gamma Ville has changed its name to Gummy Ville. Second, the coverage of Beta Ville and Delta Ville have shifted.

My diagram - and the portions highlighted in green and purple - show differences between the shapefiles. These highlighted areas are the output I hope to achieve.

What operations can I use to do this? I tried Feature Compare (Data Management) because that very much sounds like what I intend, but I keep getting the error, "Table row counts are different". However, I know that my comparison files will have different numbers of features; that is part of why I want to make the comparison, to see changes in existence, geometry, and/or names of all features.

Thanks in advance for your help!

Iterated inline variable as input for geoprocessing tools

$
0
0
I am trying to loop through a series of folders and clip the appropriate rasters with polygon, the new rasters will then be mosaiced.

I am having trouble passing the parsed file name and path as an input to the clip tool. It looks like the tool is iterating through the folders and not passing the information to the rest of the tools.

I have set the parsed path and file name as a precondition to the clipping tool, to ensure the input feature was properly populated.

I am receiving the message "The process did not execute because the precondition is false."

Any help would be appreciated.

Thanks
Attached Thumbnails
Click image for larger version

Name:	WSEL_Grid_Model.jpg‎
Views:	N/A
Size:	49.0 KB
ID:	27302   Click image for larger version

Name:	Geoprocessing_Error.JPG‎
Views:	N/A
Size:	107.2 KB
ID:	27301  
Viewing all 1751 articles
Browse latest View live