POST
|
Hey everyone, Recently i've been working with the Harmonized World Soils Database(HWSD). I ran into some problems with getting it into ArcGIS but I have finally figured it out and i'm posting this so that anyone can use the dataset. First step is to go to this website and download the files at this website. http://webarchive.iiasa.ac.at/Research/LUC/External-World-soil-database/HTML/HWSD_Data.html?sb=4 After you have downloaded and unzipped these files open up arc catalog. Follow these instructions for adding a OLE DB http://resources.arcgis.com/en/help/main/10.2/index.html#//005s00000023000000 (If you have 10.0 or 10.1 the instructions are the exact same. After you have done that open up ArcMap. Add the raster that was provided with the HWSD If the dataset is unprojected run Define Projection (Data Management Tools/Projections and Transformations/Define Projection) and set it to World Geodetic Systm 1984. After that run the Build Raster Attribute Table(Data Management Tools/Raster/Raster Properties/Build Raster Attribute Table) on the raster. Right click on the raster in the table of contents and select Joins and Relates -> Join. Keep the dropdown as Join attributes From a table. For the second drop down(number 1.) Choose the field Value for number 2, click the open folder on the right side and browse to your Database Connections. Double Click the HWSD you added earlier and Add the table HWSD_Data For number 3's dropdown select the field MU_GLOBAL Keep the radio button selected for Keep all recrods You can then click validate join, currently 1 row will not be joined but the rest work perfectly fine. Click OK. That's it, now you have the HWSD in ArcGIS with all the attributes populated.
... View more
08-19-2014
02:01 PM
|
2
|
2
|
11167
|
POST
|
Hi there, what error are you seeing? Also this link may help you out. http://forums.arcgis.com/threads/65205-Using-ArcHydro-2.0-in-a-python-script
... View more
03-11-2014
07:28 AM
|
0
|
0
|
144
|
POST
|
UPDATE: So I tried something different that worked. It seems that I cannot make the destination of the polygon into the same location as the raster. In order to circumvent this I created a scratch geodatabase where the polygon is saved. The script ran fine, i'm going to add the copy feature tool and see if that works. It is an odd work around. Has anyone else experienced this problem? UPDATE 2: So I figured out a work around. Here is the code I ended up using. import arcpy from arcpy import env #Establish Workspace env.workspace = "C:/Fakepath.gdb" #Set Variables DATE = arcpy.GetParameterAsText(0) # DDMMMYY, MMM = 3 day abbreviation for month, March = Mar #Integer Conversion INTHEAT = arcpy.gp.Int_sa("MULT" + DATE, "INT" + DATE") arcpy.AddMessage("We now have only whole numbers") #Raster to Polygon arcpy.RasterToPolygon_conversion(INTHEAT, r'C:\Fakepath\scratch.gdb\HPOLY' + DATE, "SIMPLIFY", "") arcpy.CopyFeature(r'C:\Fakepath\scratch.gdb\HPOLY' + DATE, r'Processed_Data\HPOLY' + DATE) arcpy.Delete(r'C:\Fakepath\scratch.gdb\HPOLY') arcpy.AddMessage("Converted Raster to Polygon")
... View more
03-09-2014
10:26 PM
|
0
|
0
|
1438
|
POST
|
Hello all, i'm running into a problem i haven't been able to solve. I'm running ArcGIS 10.0 Here is a sample of the code i'm currently running. import arcpy from arcpy import env #Establish Workspace env.workspace = "C:/Fakepath.gdb" #Set Variables DATE = arcpy.GetParameterAsText(0) # DDMMMYY, MMM = 3 day abbreviation for month, March = Mar #Integer Conversion INTHEAT = arcpy.gp.Int_sa("MULT" + DATE, "INT" + DATE") arcpy.AddMessage("We now have only whole numbers") arcpy.RasterToPolygon_conversion("INT" + DATE, r'Processed_Points\POLY' + DATE, "SIMPLIFY", "") arcpy.AddMessage("Converted Raster to Polygon") The script is much longer and complex however it has been failing at Raster To Polygon, displaying this error. <class 'arcgisscripting.ExecuteError'>:ERROR 010151: No features found in C:\Fakepath.gdb\Processed_Points\POLY10MAR14. Possible empty feature class. Now i've had this problem before in model builder where this tool was originally built. I decided to switch to python as I prefer it over model builder. The model failed in the exact same spot. Now when i run the tool from the arctoolbox the tool runs fine. I should also mention that RasterToPolygon does generate the polygon. That polygon and the one that is generated separately via arctoolbox are the exact same. Anyone have any ideas what is going on here?
... View more
03-09-2014
08:51 PM
|
0
|
1
|
2776
|
POST
|
I don't really understand your question. Are you talking about the label in the toolbox that pops up when the user uses your tool? If so that's easily changeable. I need a bit more clarification to answer your question. If you want to give your user more information about what the script is doing, you can use arcpy.AddMessage("Your text") and that will put it in the results window.
... View more
03-07-2013
07:46 AM
|
0
|
0
|
252
|
POST
|
It's actually a pretty simple setup, you can use the link that mzcoyle posted and it can help you. It should end up looking something like this.
Import arcpy
SpatialReference = #Your Spatial Reference of choice, ie. WGS 1984
Output = #the place you want to put it, as well as the name. If you are doing multiple coordinates and individual shapefiles but all in the same folder, you can setup a workspace.
Lowerleft = a
Lowerright = b
Upperright = c
Upperleft = d
array = arcpy.Array()
array.add(Lowerleft)
array.add(Lowerright)
array.add(Upperright)
array.add(Upperleft)
array.add(Lowerleft)
polygon = arcpy.Polygon(array, SpatialReference)
#this next step is if you want to have it be in different shapefiles or all in one. Also if you are running this as a tool in ArcGIS that a user can use, instead of putting in set variables, use Arcpy.GetParameterAsText() The number inside the paranthesis (starting at 0) will be the order that you set them up in the tool when you create it in ArcGIS.
if arcpy.Exists(output):
arcpy.Append_management(polygon, output)
else:
arcpy.CopyFeatures_management(polygon, output)
That should help you get a start on it. Let me know if you have any questions.
... View more
03-07-2013
07:41 AM
|
0
|
0
|
467
|
POST
|
Alright, sounds good, i'll give it a shot and see how it goes. Thanks for the help.
... View more
11-07-2012
08:56 PM
|
0
|
0
|
438
|
POST
|
That tool is what i'm looking for except for one thing. I use Raster Catalogs so i can have unmanaged catalogs, if i used managed catalogs i wouldn't have this problem unfortunatly. Unless i misread the tool in the help menu i don't think is going to solve my issue.
... View more
11-01-2012
08:07 PM
|
0
|
0
|
438
|
POST
|
Hi there, I'm using Version 10.0 The raw data resides in a seperate folder. Here's basically how it goes. X:\Product\Data\Raster\CADRG\TLM50K....rpf folder and all the rpf data. the geodatabase sits here: X:\Product\Data.gdb\Raster_Catalog so if i were able to use relative paths it wouldn't matter as the entire product folder is archived, however everything after that stays the same. The repair tool just doesn't seem to work in the way i want it to, i have found it actually takes longer to run that than recreate the entire catalog again.
... View more
10-31-2012
06:20 PM
|
0
|
0
|
438
|
POST
|
Hello, I am running into the problem of my raster catalogs being unsourced when we do our yearly archive. Basically this is what it looks like for our data path before we archive it: X:\Product\Data.gdb\Raster_Catalog when we archive it, it looks like this: X:\Product\Archived_Products\FY2012\Product\Data.gdb\Raster_Catalog Is there a way to make raster catalog paths relative similar to what you can do with an MXD? I've been recreating the Raster Catalogs as needed, however it becomes quite time consuming and tedious when you have to do 200 differen't catalogs at once. I have tried the Repair tool and it doesn't seem to be what i'm looking for. Any ideas?
... View more
10-30-2012
08:03 PM
|
0
|
6
|
658
|
POST
|
sorry i should have clarified. I'm trying to run this through arc catalog rather than arcmap. The end state of this is a custom tool for the ArcToolBox. Any ideas on that?
... View more
07-02-2012
06:05 PM
|
0
|
0
|
288
|
POST
|
I tried that. However i also have an export of my product in the same folder as a pdf for dissemination purposes. When i ran the split text it gives me both then i added *.mxd and it would always return an error for me when trying to use it as a label. Do i need to turn it into a string via GetParameter?
... View more
07-02-2012
12:18 AM
|
0
|
0
|
288
|
POST
|
While this works for normal points that you can use. Is there a way to also do something similar with Military Overlay Editor(MOLE) Graphics?
... View more
06-29-2012
07:16 PM
|
0
|
0
|
238
|
POST
|
Hi everyone, I have a question about points. Sometimes you have a cluster of points on one area. In google earth when there is a cluster of points, you can mouse over it and it will spiderweb out into a series of lines where you can then select a point. Is there a way to make ArcMap(10.1) do this with points rather than manually drawing lines to the actual location of the points? Thanks a bunch.
... View more
06-27-2012
07:51 PM
|
0
|
2
|
2360
|
Title | Kudos | Posted |
---|---|---|
2 | 08-19-2014 02:01 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|