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

Address Locator for Geocoding Issue (picture)

$
0
0
I have a very large dataset of property addresses that I subscribe to. The problem is, the way the data is currently sorted in excel itcannot be geocoded. The problem is, in the database, it stores the address in a single cell.

For instance "123 main street Denton TX 76205", that is a single cell in the column. Is there a way, either through Excel Macro within ArcGIS or some other method, to quickly go through the database and break apart each of the addresses into additional fields for each entry?

Such as:

"Address" 123 Main Street
"City" Denton
"State" TX
"ZIP" 76205

I will need to break it apart in this manner to geocode the data.
Attachment 18716
Attached Thumbnails
Click image for larger version

Name:	Break Apart.jpg‎
Views:	N/A
Size:	49.1 KB
ID:	18716  

Importing gpx files

$
0
0
Can anyone help with importing gpx files and converting them from GCS_WGS_1984 to British National Grid so that I can overlay them on the OS mapping I have? I'm very new to ArcGIS (2 weeks) and have never used python.

Thank you,
Ian.

Iterate Field Value in-line variable problem

$
0
0
I am trying to Iterate a model based on field values that contain the path to my layers, but the model does not recognize the Value variable as a valid input layer. Images below show what it looks like. Any idea what is wrong?

Attachment 18733
Attached Thumbnails
Click image for larger version

Name:	1.jpg‎
Views:	N/A
Size:	82.9 KB
ID:	18733  

Combine 2 shapefiles into 1 with unlike boundaries and unlike attributes

$
0
0
Hey Everyone,

New to ArcView/ArcMap here…

I'm having a problem trying to figure out how to properly merge a shapefile that holds one set of boundaries and unique attributes to another with differing boundaries and unique attributes.

The closest article I could find online somewhat relating to this issue is here: http://www.library.yale.edu/MapColl/...Boundaries.pdf

The one element that both these shapefiles have in common is that they are overlaid geographically (i.e. one shapefile has smaller boundaries and when I add the layer in ArcView, it rests on top of the other, larger shapefile/layer).

1. Do both of these shapefiles need similar attribute tables before I can merge the two into one shapefile? (fundamentally, doesn’t make sense to me because if one shapefile offers one set of different/exotic boundaries…how can the shapefile match attributes with the other shapefile of differing boundary attributes)

2. I attached a picture of what I’m dealing with…hopefully it helps!

Thank you for helping! Hopefully I can figure out if this is even possible soon : )

Attachment 18736
Attached Thumbnails
Click image for larger version

Name:	Untitled1.png‎
Views:	N/A
Size:	70.3 KB
ID:	18736  

ArcGIS Desktop Crashes using arcpy.FeatureClassToFeatureClass_conversion SVP 5

$
0
0
I am new to coding in python and specifically Arcpy. Through trial and error I was able to piece together this code that was working fine yesterday until I installed service pack 5 for ArcGIs Desktop 10.0, on a 64 bit Windows machine. The reason I decided to install this service pack is because the code was incapable of doing more than ~60 iterations of the loop without stopping unless everything on my machine was closed except ArcCatalog. I saw on a discussion board that updating to a new service pack might solve my problem. Now my problems is the machine crashing halfway through one loop.

Through trial and error I have determined that using the line of my code which calls on the FeatureClassToFeatureClass_conversion crashes ArcCatalog. The only thing that I can trace the problem back to is upgrading to service pack 5.

Code:

import arcpy
arcpy.env.scratchWorkspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\Scratch'
arcpy.env.workspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW'
import os
xcelFiles = arcpy.ListFiles('*.xls')
count =1
while count < 140:
        arcpy.env.workspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW'
        fileName = xcelFiles[count]
        tableName = fileName[:-4] + '_Table_View'
        layerName = fileName[:-4] + 'Point_Layer'
        xyName = fileName[:-4] + '_pts'
        tempName = 'LW' + fileName[11:-4]
        shpPath = r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW\Shape'
        spRef = r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"
        points=arcpy.MakeTableView_management(fileName + '\\sheet1$', tableName)
        b=arcpy.MakeXYEventLayer_management(points,"F2","F3",tempName, spRef, "F4")
        fullshppath = shpPath +'/' + tempName + '.shp'
        arcpy.env.mask = "C:/Users/fk128474/Documents/Freds_Bitterroot_Model/MODIS/Projected_FSCA/2000/2000_FSCA_070.hdf"
        arcpy.env.cellsize = 463.312717
        arcpy.env.extent = "C:/Users/fk128474/Documents/Freds_Bitterroot_Model/MODIS/Projected_FSCA/2000/2000_FSCA_070.hdf"
        arcpy.FeatureClassToFeatureClass_conversion (b, shpPath, tempName)
        shpname = "C:/Users/fk128474/Documents/Freds_Bitterroot_Model/wrf_data/2001_LW/Shape/" + tempName +'.shp'
        rstname =  "C:/Users/fk128474/Documents/Freds_Bitterroot_Model/wrf_data/2001_LW/Raster/" +tempName
        arcpy.PointToRaster_conversion(shpname, "F4", rstname,"","",463.312717)
        arcpy.env.workspace=r'C:/Users/fk128474/Documents/Freds_Bitterroot_Model/wrf_data/2001_LW/Raster/'
        from arcpy.sa import *
        rasterName = ExtractByMask(rstname, "C:/Users/fk128474/Documents/Freds_Bitterroot_Model/MODIS/Projected_FSCA/2000/2000_FSCA_070.hdf")
        arcpy.env.workspace= r'C:/Users/fk128474/Documents/Freds_Bitterroot_Model/wrf_data/2001_LW/ASCII'
        asciiName = "C:/Users/fk128474/Documents/Freds_Bitterroot_Model/wrf_data/2001_LW/ASCII/" + 'Temp' + fileName[:4] + '_' + fileName[11:-4] + '.txt'
        arcpy.RasterToASCII_conversion(rasterName, asciiName)
        arcpy.Delete_management(tableName)
        arcpy.Delete_management(tempName)
        count =count+1

File Compare tool not writing out the different values in each file

$
0
0
Comparing two text files, a.txt and b.txt. Output to a text file.

a.txt:
foo,bar
1,2
2,4
3,6


b.txt:
foo,bar
1,3
2,4
3,5


Comparison file:
Has_error, Identifier, Message, Base_value, Test_value, ObjectID
"true", "File", "ASCII files are different at line 2", " ", " ", -1
"true", "File", "ASCII files are different at line 4", " ", " ", -1

I would have expected this comparison file to have the Base value and Test value and not " " - what am I doing incorrectly?

SQL help

$
0
0
I have historical data sets in two separate files (one for fire and the other for weather), with 1000 fires and 100 weather stations, of 50 years. For each fire, I need to extract weather data. But, among total weather stations, for each fire, I need to extract weather data from a station which is closest to the fire event and is recorded on the same date as of the fire event. What SQL shall I use to address these two requirements? I would appreciate any suggestions.

Thanks,
Shulu

the execute method of custom geoprocessing tool is not invoked

$
0
0
I use Java to create a custom geoprocessing tool and deploy it into ArcGIS 10.0. The user input interface can be showed and no error report. After click "OK", nothing is done. It seems the execute method is not invoked. Any idea about it?

Geoprocessor return value

$
0
0
Apologies for cross-posting

I am using ArcGIS 10.1 and Python to create a toolbox (a script and a model) and then publish it as a geoprocessing service. One of the return values is like a table, with fixed columns but unfixed number of rows. What type of output should I choose? Table? Table View?

By the way, I am using Flex Builder 4.6 to develop the client and get the return value. How can I parse the output value defined in Python generated from the server?

Thanks!

SpatialFilter query in Python

$
0
0
In C# and ArcEngine, there is SpatialFilter Class that can execute spatial and attribute query at the same time. In Python, we need to use the following two steps:
1: gp.SelectLayerByLocation(inLayer, "intersect", pAOI, "", "", "NEW_SELECTION")
2: gp.SelectLayerByAttribute(inLayer, "SUBSET_SELECTION", whereClause)

If there are many features in the input layer, step 1 will be very consuming.

Any reply and suggestion is highly appreciated. Thanks!

Cannot publish geoprocessing service

$
0
0
I created a toolbox with some scripts and a model. The script runs well in ArcMap. When I try share the result as a service, two errors come up as follows:
1: Script Statistics contains broken project data source: SUBSET_SELECTION Model
2: Script Statistics contains broken project data source: NEW_SELECTION Model Tool Unknown

I do use the SUBSET_SELECTION and NEW_SELECTION. I am using ArcGIS 10.1. What 's wrong with my script?

Problem mosaicing Landsat 45 TM images

$
0
0
Dear fellows,

I am having a problem while mosaicing Landsat 45 TM images (from Jun-Jul 2011) in ArcGIS 10.1.

The problem is every time I try to merge them together, it appears this annoying and bad-looking border of NullData that I cannot get rid of. I tried to calculate stats, but it does not work either. I read thousands of tutorials but no one mentioned this problem, and I am lost now. I am NOT asking about the black border, this one I know how to exclude, what I mean is the border inside the image.

Has anyone experienced something similar before? Could you give me an idea on how to make things work?

Thank you very much for your help.

Leandro

output of geoprocessing service -- customize?? arcgis server 9.3.1

$
0
0
I am using 9.3.1 arcgis server, and published model by turning it into python as a gpserver service and it is synchronous.
Now my client needs output results to contain only the result nothing else.

currently the gpserver on execute task returns response like this (html):

HTML Code:

<b>Results:</b> <br/>
<br/>
<ul>
AreaName:<ul><br/>
<b>Value:</b> Isthmus<br/>
</ul><br/>
</ul><br/>
<b>Messages:</b> <br/>
<br/>

and what I need this to be is
HTML Code:

<AreaName>Isthmus</AreaName>
How do I customize my gpresult, do I have to create another webservice as a wrapper on top of this?? or recreate the whole as a SOE. any comments will be very helpful.

Thanks
Kolla

link photos in attribute column

$
0
0
hey,

i got an attribute table with a column containing single text e.g. "photo1" and in folders/subfolders on my harddisk the corresponding jpg files with identic name "photo1.jpg"..

is there a possibility for automatic linking the column with the pictures so that the photos can be openend quick via ArcGIS? (V. 10.1)

king regards
andreas

Weighted Smoothing By Attribute?

$
0
0
Hi folks,

I have a point dataset that I wish to create a surface from, based on a specific field. This is simple using the Natural Neighbour tool, however what I want to do is to weight the interpolation/smoothing process by another attribute. I cannot seem to find any tool that allows this weighting technique; IDW, kriging, spline and natural neighbour etc only allow variation of sample points or distance.

I do not have access to the Geostatistical Toolbox. Any help would be greatly appreciated.

Thanks,
DK

Applying Formulas to Raster Cell Values

$
0
0
Has anyone successfully applied formulas to raster cell values? I need to do something like add then multiply and take the square root. In that order. Any advise welcome.

testing for raster

$
0
0
In 10.1, I'm using FC_List = arcpy.ListFeatureClasses() to capture a list of fc's names,
but some of those are also raster.
Now, I'm not seeing that in the doc http://resources.arcgis.com/en/help/...00000018000000.
However, to humor me.

Using Arcpy, what test can I use to distinguish fc from raster?

As in perhaps...

for name in FC_List:
if name.ObjectType_for_example == "raster":
process_raster(name)
else:
process_fc(name)

Behaviour of published geoprocessing services for selection

$
0
0
Behaviour of geoprocessing tool for selection
I’m working on an AG Server application using the Silverlight viewer that displays the location of where an assessment happened (point feature). This feature class is generated from a table with coordinates in WGS 1984 using the “Make XY Event Layer” tool (base map is in State Plane Nad 83). I created models to be published in AG Server that allow the user to select and show a location. I have some questions regarding the behaviour of these published services. The tools do the same, which is to select a point based on a string attribute, but I was testing 2 approaches:

-Publish the tool with a base MXD:

Attachment 18838


Problem here is that sometimes it shows the correct place for a feature, but for some reason a lot of times the desired feature is displayed wrong, even out of the limits for the Island as shown below. The same feature may display out of place when originally was displayed in the correct location.

Attachment 18839

The following model was used.

Attachment 18840


- Geoprocessing service with a result map service:

Attachment 18841

For this service I just add the step to copy features to a file geodatabase to the model used.

Attachment 18842

Here I have not experienced the same erratic behaviour described above, but I’m confused on why I do not see any record for the output (in the attribute table), while in the first example I can. I understand the more secure way to publish a geoprocessing tool is by using a Result Map, so I’m leaning towards this approach.

Lastly, is it expected that a new layer is added to the table of contents every time the tool runs while leaving the previous selection on? If so, can this be controlled in the model or by some setting in AG Server? Ideally I want the user to see just what correspond to his/her last selection.

In summary:
1. Why the erratic behaviour using the geoprocessing service with a base MXD?
2. Why I’m not able to see the attribute table when using the geoprocessing service with a result map?
3. Is it expected that every execution of these tools add a new layer to the application? Can it be controlled?

If you can give me some suggestions I’ll appreciate.
Attached Thumbnails
Click image for larger version

Name:	basemap.jpg‎
Views:	N/A
Size:	58.6 KB
ID:	18838   Click image for larger version

Name:	basemap2.jpg‎
Views:	N/A
Size:	41.9 KB
ID:	18839   Click image for larger version

Name:	basemap_model.jpg‎
Views:	N/A
Size:	5.7 KB
ID:	18840   Click image for larger version

Name:	resultmap.jpg‎
Views:	N/A
Size:	56.6 KB
ID:	18841   Click image for larger version

Name:	resultmap_model.jpg‎
Views:	N/A
Size:	7.3 KB
ID:	18842  

Selecting Point Features by Distance and Name

$
0
0
Hello,

I have a multi point Townland file. I want to be able to remove duplicates within a radius of 3000 meters from each individual point??

I cannot simple remove duplicates as they are from various locations.

Eg. There may be five points called Castletown within a 4000m radius and I only want one.

However there may be another five points called Castletown 40,000m away (As more than one area is called Castletown) and I also only want to keep one of these within a 4000m radius of itself.

Therefore I would end up with two points called Castletown from two seperate locations.

Any ideas on whats the best way to do this?

Thanks

Niall

Cannot populate all fields using spatial join script tool

$
0
0
I am trying to create a script tool that spatially joins point and polygon features so that they create a new feature class with only user specified fields included. I have created a parameter that allows the user to check off which fields they want to include, but if both input and target feature classes have the same field name in their table, only one of the fields will be populated in the output table (ie. both have NAME field). If I use the spatial join tool the new table will include populated NAME and NAME_1 fields, but not in a script. I have also tried to check the 'maintain fully qualified fieldnames' in environments so that each field name is unique, but this doesn't seem to help. If anyone has any idea it would be greatly appreciated. Thanks

Jesse
Viewing all 1952 articles
Browse latest View live