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

multi-Clip in ArcGIS 10?

$
0
0
Hi all
I have a question in my project! The thing is that : I have two maps, one is a polygon map of cities (area of cities) at global scale. another one is a adminstrative boundary map (also at global scale). Now I need a function or tool to multi-clip area of cities according to the boundary map. For example, A (area map) as a input layer and B,C,D,E,F.... (boundary map with different selected countries) as a clipped map. I knew that Clip function can work well with one clipped layer but cannot work with multi-tasks (for example if I would like to clip 50,100 cities or even more in same times). I just wonder if there was any function or code that can make this possible?

If you have any suggestion or idea, I would give all my thanks to you!

variable in modelbuilder?

$
0
0
Hello everyone!

I got a problem in modelbuilder. I need use "select by attribute" function to pick up some values that are less than the mean value. However, I dont know how can I define or input this mean value.

To be specific, I have a polyline shapfile and with a length field. Then I calculate its mean value (Length field) by right clicking fields - stasticis. here,I got mean value and type it as a input in "select by attribute" function by:

Length< mean (for example 1000) Length <1000

Then, Arcgis can select lengths that are less than mean value (1000). Then I used "Feature to polygon" function to output this features. Please note this is a manual way.

In modelbuilder, I have to drag some functional tools to make this possible. The problem was that the result calculated by "summary stastics" function only output a new table file, and this file was not related with previous work. My question is how ArcGIS can understand if I would like to use mean value (located in new table fild) as a threshold to select the length. In other words, How this mean value can be defined as a variable and identified when working with "Select by attribute" function (actually, there was only one number useful, not the whole table).

My supposed result like this: calculate mean value - select lengths (according to the mean value and less than this value)- feature to polygon as output.

I don't have any background in PC language and SQL, but I think it could work.
For example:
1. calculate mean value
2. Define mean value as a variable
3. Select by attribute : e.g length < mean?
...

I think there will be some SQL language or code in play but dont know what exactly I can do for this process. The reason why I would like to make this possible is that I have a big project so that making a fast and complete model for whole project would be very helpful.

I hope if someone can kindly help me or give me some tips.
I would be much appreciate.

ArcPy script to search, get value, compare to field names and sum field values

$
0
0
I am relatively new to Python (although experienced in GIS). I am working with a feature class which was joined by a matrix of flow data for areas. Each area has unique string label. I have run a seperate script to cluster the areas into regions and have attached the region number to the feature class. Each region has between 5-19 areas. I have attached a screendump of the feature class
I am looking to write a script to loop through each of the region ID numbers ("RegID_6k99"), select all of the areas which have that number, for these areas look at the area label and sum the cell values for the row based only where field names are the same as those belonging to the region.

I have written the code as follows:


>>> import arcpy
>>> fieldlist = arcpy.ListFields("C:/Temp/lorraine/NIData.gdb/fc_f6000_in99Matx")
>>> for field in fieldlist:
print field.name

>>>fc = "C:/Temp/lorraine/NIData.gdb/fc_f6000_in99Matx"
>>> regfield = "RegID_6k99"
>>> cursor = arcpy.SearchCursor(fc)
>>> for row in cursor:
print(row.getValue(regfield))

>>> for row in cursor:
if row.getValue(regfield)=="1":
row.getValue(LABEL)
print row.getValue(LABEL)
I have a search cursor to get a certain value. So I need to increment this upwards and I need to link the selection to the field name (fieldlist) and sum the values in those cells to a new column.

Help! I'm stuck. Don't know how to implement these last stages. Any advice gratefully accepted. Lorraine
Attached Thumbnails
Click image for larger version

Name:	featureClass.jpg‎
Views:	N/A
Size:	165.2 KB
ID:	34738  

Copying and Moving tools

$
0
0
I am sure this is fairly simple but i cant figure it out. I have made a few tools in model builder on one computer and now I want to move them to another computer, if i go into the app data and copy the tool box and paste it into the toolbox folder on the other computer but when i try and open the tool box on the second computer it freezes. Any ideas?
Thanks!

IOError trying to change PICTURE_ELEMENT sourceImage

$
0
0
This question is cross-posted here.

I recently ran into this issue after I published a Geoprocessing Task to a production server.

My geoprocessing python code is an enhanced Web Map Print service that loads a map via the arcpy.mapping.ConvertWebMapToMapDocument function and either sets the sourceImage of a PICTURE_ELEMENT or moves it off of the page. The published GP Service works correctly on a development server, but returns the following error when running on the production server.

Code:

Unable to complete operation.
Error executing tool.:
 Traceback (most recent call last):
  File "<ags_folder>\PythonWebPrint.GPServer\extracted\v101\my_toolboxes\service.py", line 643, in <module> main()
  File "<ags_folder>\PythonWebPrint.GPServer\extracted\v101\my_toolboxes\service.py", line 634, in main (message, output_file, image_files) = execute(web_map_json, output_format, layout_template, layout_template2, georef_info, quality)
  File "<ags_folder>\PythonWebPrint.GPServer\extracted\v101\my_toolboxes\service.py", line 482, in execute staticLegend.sourceImage = legendPath
  File "c:\program files\arcgis\server\arcpy\arcpy\arcobjects\_base.py", line 87, in _set return setattr(self._arc_object, attr_name, cval(val))
  IOError: Cannot set path based on current settings.
  Failed to execute (PythonWebPrint). Failed to execute (Python Web Print).

Here is the relevant python code:

Code:

            elements = arcpy.mapping.ListLayoutElements(mxd, 'PICTURE_ELEMENT', "StaticLegend")
            if len(elements) > 0:
                # Get the picture
                staticLegend = elements[0]

                if web_map_object.has_key("staticLegend"):
                    legendPath = os.path.join(template_path, "legends", web_map_object["staticLegend"])
                    staticLegend.sourceImage = legendPath
                else:
                    # Cannot actually delete things, so just move it off the page
                    staticLegend.elementPositionX = -100

I have verified that the correct file path is being used, and that the file exists and that the folder and file permissions are identical to the MXD files being loaded by the arcpy.mapping.ConvertWebMapToMapDocument function.

Any ideas as to the source of or how to fix this issue, or other diagnostics that I can perform?

Joining Textfile to Shapefile Differences in ArcGIS versions

$
0
0
I am trying to join a textfile generated in stata that includes caoname, caoid, and fips. The fips code should match to a shapefile county map that matches to the cntyidfp category. In ArcGIS 10.0, doing a straightforward join based on these attributes works. However, in 10.2, ArcGIS only allows for the joining of the cntyidfp to the caoname, which is completely useless. What's the difference between the two versions that makes this difficult? I have tried exporting to an excel document first, ensuring both the fips and cntyidfp data have the same number of characters, and creating a new table of the textfile within arcgis, but none of these solutions seem to work. What am I missing? Any insight would be appreciated, thank you.

Cannot Import XML workspace

$
0
0
I working with a SDE database with a feature dataset that has 6 or 7 feature classes that have documents attached to them via 'Attachments.' In order to periodically back-up the database, export it to the client and eventually move it to a new server. I am exporting the feature classes with 'Attachments' using the 'Export XML Workspace' and 'Import XML Workspace' tool in ArcToolbox to move them to a file geodatabase.

The feature classes that have a small number of attached documents are exporting and importing fine, however, one particular feature class has a large amount of attached documents. This feature exports fine but it will not let me import the feature class into a file geodatabase. I keep getting an error (see attachment to this post) stating that "Xml Parsing failed. Reason: Not enough storage is available to complete this operation."

Can someone clarify how I can resolve this issue? I have tried moving the file geodatabase to another drive with plenty of storage. Furthermore, the feature class with the attachments is not even close to 1GB yet but it, along with the others, will continue to grow, which is why I need to resolve this issue now.

Thanks,

Desktop version 10.1
Windows 7
Attached Thumbnails
Click image for larger version

Name:	import_xml_error.jpg‎
Views:	N/A
Size:	103.0 KB
ID:	34748  

Empty Output generated from Union operation

$
0
0
I am attemption to Union two shapefiles. I made sure both shapefiles have the same defined coordinates before trying to Union and I am still getting and empty output generated warning. I found on google that some people had the same issue and after repairing Geometry it worked for them. That did not work out for me.

Does anyone have any potential solutions on how I can achieve this Union operation successfully or have any insight on why this operation completes but generates an empty output.

My task:

I have two large shapefiles that I was trying to intersect. I was limited by my computational constraints, so I gave it the classic attempt of divide and conquer. I split shapefile 1 into two shapefiles 1a and 1b. Intersected them with Shapefile 2. Now I am trying to Union the two intersects together.

Thanks in advance for any suggestions.

000117 : Warning empty output generated.

Model Builder and Zonal Statistics as a Table

$
0
0
I am using ArcGis 10.1 and attempting to build a generic model with model Builder. I am trying to run zonal statistics as a table in a model to get values of slope for some polygons (in a shapefile). The polygons are processed in the model to calculate some other data. The updated shapefile feeds directly into the zonal statistics tool. However, when it comes to run the model, it fails at computing Zonal Statistics as there is no Zone Field (no way to select any field either when editting the model or when running the model). Is there anyway of putting the zonal statistics as a table into a generic model or does the Zone Field have to be manually selected?
Attached Thumbnails
Click image for larger version

Name:	zonalpartofmodel.jpg‎
Views:	N/A
Size:	25.8 KB
ID:	34776  

Modifying MdDlgContent Stylesheet Fonts

$
0
0
I've tried using the link below to customize a tool dialog box. I'm able to get the background image, color, and additional text to show up. What I'm not able to do is change the CaptionFont, etc. Anyone else run into this and/or know of a solution? Thanks.

http://webhelp.esri.com/arcgisdeskto...0SSContent.xsl

Model Builder: Calculate Statistics for whole dataset and export into a single table.

$
0
0
Good morning,

My goal here is to use the iterate tool and have the model run through each feature class(about 60+ feature classes) within a dataset, calculate the frequency/count of a ModifiedBy field & CreatedBy field and have the output be a single pivot table that is sortable by feature class, Modified By user & Created By user. I also need to it add the name of the feature class it pulled the statistics from. We want to use this on a monthly basis to see how often people are updating each feature class.

I am running into issues with the interate tool over writing my statistics output table from the feature class before it.
so I need it to almost append the new values it created to a new table before it overwrites it and moves on to the next feature class.

Any help would be great.

Thanks,

Alter Field tool not licensed (Bug?)

$
0
0
Hi All,
We have ArcGIS 10.2.1 for Desktop at Basic and Standard level installed in our machines and we are trying to use the Alter field tool (Data management tools -> Fields). This tool is new at 10.2 version and the help document says that it's available to all levels of licensing (Basic, Standard and Advanced). But in all of our machines the tool is blocked with the tool not licensed warning, using both license types (Basic and Standard). Same problem if we try the tool with ArcPy in python scripting, of course.
Strange and annoying thing... maybe a bug?.
Is there anyone with the same problem?
Thanks!

How do you reclassify many raster from one folder ?

$
0
0
Hello,

I am trying to write a model builder and what I would like to take many rasters and reclassify them and then use the raster to polygon and then add the field and then calculate field.

Problem is that I use the Iterate Rasters ( don't know if it must have raster existed in geodatabase) and then add the name and use Parse Path and value to take each raster name for each polygon.

I have all the rasters in different folder ie: 2006, 2007,2008, 2009 etc and wanted to use model builder and modifty for each year as a separate file.

Attachment 34850

Here is the sample.

Any tips that I need to fix the problem ?
Attached Thumbnails
Click image for larger version

Name:	Reclassify.jpg‎
Views:	N/A
Size:	54.6 KB
ID:	34850  

Clip, Spatial Join or Union?

$
0
0
Hi All
I have a question about which geospatial process need to be selected in my case, I would be much appreciate if someone could guide me and tell me what their differences.

I have two maps in my case, one is world bounday map (with COUNTRY name) and another is world city map(Only polygon without COUNTRY name). both maps are polygon formats. In order to know how many countries are located within certain country, I need use some geoprocessing tools, such as Clip, Spatial Join and Union.

I just wounder which geoprocessing tools should be the best one if I want to link two maps and get the number of cities.

I had already tried these three functions, see as following:

Clip: I use cthis fucntion to clip those countries I need (According to the world bounday map by "Select by attribute") and output as a new file. Open the attribute table then the number of cities was there.

Spatial Join: World bounday map is input as the Target features and World city map as Input featres. Then, "Contains" operation has been used for linking these two maps and result obtained.

Union: Input these two maps and the output can also show the similar result as above mentioned.

However, These three results are not equal in terms of the city numbers. For example, Clip could be 2000, Spatial join (Contains) could be 1850 and Union could be 1992. I have no idea which one will be more accurate.

Please note: sometimes, some cities were located around the country bounday that may significantly affect the result of this geoprocessing since these cities might be counted.
If anyone who has any experience on this topic, Please give me some suggestions and tips. Thank you.

Extract Data and Email Task geprocess publishing failing

$
0
0
Hi,

I am trying to publish Extract Data and Email Task geo processing task to ArcGIS server 10.2 from Arc Map 10.2 . it is failing to publish and Arc Map is crashing.

Configured task is executing successfully in the ArcGIS Desktop but not able to publish results to ArcGIS Server 10.2 . can some body help me in resolving this issue.

Thanks
Mallika

Connecting Points with Lines for Adjacent Polygons

$
0
0
Hello,

I am having issues trying to find the right geoprocess that will do the following:

I have a polygon feature filled with polygons. I also have created a point feature which has all of the geographic centers for each polygon.

I would like to connect each point to points around that were generated from polygons that border the polygon. So if a polygon had 3 neighbor polygons, its geographic center would have a line to each of the 3 points that represent the geographic centers of neighboring polygons.

I do not have too much experience with creating map topologies or networks in general, but I have tried looking and I do not think there is a tool that would do this as I am asking, but I am likely wrong.

Does anyone have any experience creating graph networks like this? I have attached an example image that gives you an idea of what I am talking about.

I would appreciate any advice!

Thanks!
Attached Thumbnails
Click image for larger version

Name:	NetworkExample.jpg‎
Views:	N/A
Size:	67.0 KB
ID:	34873  

ArcGIS query includes variants that don't exist.

$
0
0
I ran a query on an SDE Feature Class. It seems to return unique value variants that do not exist in the files table. When I query for SymbolType = 'Stairs', all of the features that show up have a SymbolType of 'STAIRS'. This also applies to 'Door', 'DOOR ', 'Seating', and 'Stairs'. How can I stop the "Get Unique Values" function from returning results that do not exist in the table?

Turm points in to a polygon

$
0
0
I've got this set of points. How do I turn this in to a polygon? I would just like a single polygon that traces the outside. I have over 100 separate files I would like to do this for.

Attachment 34897

Attachment 34898
Attached Thumbnails
Click image for larger version

Name:	6-25-2014 3-22-34 PM.jpg‎
Views:	N/A
Size:	42.1 KB
ID:	34898   Click image for larger version

Name:	6-25-2014 3-21-12 PM.jpg‎
Views:	N/A
Size:	159.7 KB
ID:	34897  

Use a Table to Select Records in another Table

$
0
0
I have a large geodatabase table (version 10.2.1) with traffic tickets (Table A). Every morning I receive a small table of voided traffic tickets (Table B) that need to be deleted from Table A. I will use Model Builder to create a python script. The script would run daily.
The question is how do I use Table B to select records in Table A?
Thanks for your help.

Geoprocessing package

$
0
0
Hello to all..

Where can i find that geoprocessing package used in this video?

http://video.arcgis.com/watch/192/th...crime-analysis

I had been searched the geoprocessing package (created by that author, like in that video) in all ArcGIS related website but nothing appeared.. :confused:

The model builder would be useful guide for me for my mini crime analysis projects..

Any helps would be appreciated.. :)

Cheers.
Viewing all 1952 articles
Browse latest View live