|
POST
|
... and if you're wondering why you are not getting any results, then it's because your workspace is not being set correctly: arcpy.env.workspace = "C:\E1B8\Grid_Create_Update_11-2013\CalcMiles.gdb" should be: arcpy.env.workspace = r"C:\E1B8\Grid_Create_Update_11-2013\CalcMiles.gdb" or arcpy.env.workspace = "C:/E1B8/Grid_Create_Update_11-2013/CalcMiles.gdb" Kind regards, Xander
... View more
11-25-2013
09:23 PM
|
0
|
0
|
1112
|
|
POST
|
Xander Create a ConstantRaster (filled with 1's), then use the Shift tool (say shiftx, shifty=55) and create another raster. Use CellStatistics (Overlay statistic=Sum), Extent=Union and the rest=default. You'll notice that your output has 1's and 2's and, Nodata in areas where neither rasters have values. Now if you uncheck Ignore Nodata on the Cellstats tool and do the above you'll only get 2's -Steve Hi Steve, You're absolutely right. Thanks for pointing that out! (+1 for that). Kind regards, Xander
... View more
11-25-2013
04:05 AM
|
0
|
0
|
1112
|
|
POST
|
Hi Erin, Have you tried creating a TIN from the 3D points and use the "Interpolate Shape (3D Analyst)" to assign the Z value to the polyline? Kind regards, Xander
... View more
11-25-2013
02:07 AM
|
0
|
0
|
1550
|
|
POST
|
Hi Bert, Try something like this: import arcpy from arcpy.sa import * # settings (paths to input and output data) rasname1 = "Y:/Path/To/Input/Data.gdb/2010cl3" # edit this rasname2 = "Y:/Path/To/Input/Data.gdb/2013cl5" # edit this rasnameout = "Y:/case13/first/scrap_db.gdb/outputras" # grab a SA license if arcpy.CheckExtension("Spatial") == "Available": arcpy.CheckOutExtension("Spatial") else: exit("No SA license available...") # make Raster objects for easy processing ras1 = arcpy.Raster(rasname1) ras2 = arcpy.Raster(rasname2) # apply math rasout = (Int(ras1 / 10) * 10) + Int(ras2 / 10) # save the result to disk rasout.save(rasnameout) Kind regards, Xander
... View more
11-25-2013
12:34 AM
|
0
|
0
|
652
|
|
POST
|
use the Cellstatistics tool and set the extent to Union -Steve Use Cell Statistics only if the NoData cells have been changed to 0, since it will propagate NoData values from any input raster into the output raster. See "How Cell Statistics works". Kind regards, Xander
... View more
11-24-2013
09:27 PM
|
0
|
0
|
1112
|
|
POST
|
Hi Matthew, You may want to look at this thread: http://forums.arcgis.com/threads/96534-Raster-Conversion-and-Density-Analysis Shaun Walbridge has some useful suggestions to solve this. If this is what you want. You are right that the MAXOF setting will only make sense when combining more than 1 raster. If you already know the final extent (of all rasters/polygons) you can set this extent in the environment settings. Alle rasters will be created for that extent and can be summed afterwards. I can look into it next Monday, but have a look at the post by Shaun first. Kind regards, Xander
... View more
11-22-2013
06:37 AM
|
0
|
0
|
1112
|
|
POST
|
I just tried using switching to MULTI-PART instead of SINGLE_PART. It worked! It doesn't matter if they are separated, the street names in our county aren't allowed to clash with one another. So, we only have one road name per road, instead of a weird situation where 11th St. is on two different sides of town. Thank you for all your help, Xander. Hu Bryce, Glad to hear that the multiparts work for you. In case you want to eventually correct the lines, there is a tool called "Flip Line (Editing)", which can flip the orientation of a polyline. (It is available for standard and advanced licenses.) In ArcObjects the IPolyline interface has a ReverseOrientation method. I don't see this in arcpy, but it wouldn't be too difficult to write. Kind regards, Xander
... View more
11-22-2013
06:07 AM
|
0
|
0
|
262
|
|
POST
|
You can ZIP the files of the shapefile and attach the zip. It should be possible to flip the lines. I'll look into it.
... View more
11-22-2013
05:31 AM
|
0
|
0
|
1661
|
|
POST
|
Hi Bryce, I would probably start with trying to find out why those features couldn't be dissolved into one feature. If they exactly connect, then maybe the direction of the lines is not matching? Try and symbolize the lines using a Cartographic Line Symbol, with in the Line Properties tab defining a line decoration as an arrow (second of the three options). What do you see? Another possibility is going into edit mode and examine the feature vertices. Select a feature click Edit Vertices and look at the sketch properties. In case of Z or M do they match? If you want share a few features and I can have a look at it... Kind regards, Xander
... View more
11-22-2013
04:55 AM
|
0
|
0
|
1661
|
|
POST
|
Hi Bryce, Did you try the "Dissolve (Data Management)" tool? Dissolve on your Road ID or name field and with these options: Create multi part features (switched off) Unsplit lines (switched on) There is also the "Unsplit Line (Data Management)" tool (Advanced license). Kind regards, Xander
... View more
11-22-2013
04:06 AM
|
0
|
0
|
1661
|
|
POST
|
Hi Brett, If you run the code in the Python window it will work. If you use a standalone script, it won't :(. To solve this you should make a Featurelayer of TableView and describe those objects instead: Feature class import arcpy fc = r'\\nlbltfs01\Projecten\307103\werkdir\fgb\BLS_Copy_Paste.gdb\Leiding' arcpy.MakeFeatureLayer_management(fc,"myLayer") desc = arcpy.Describe("myLayer") print "myLayer: {0}".format(desc.relationshipClassNames) Results in: myLayer: [u'ZZRC_Leiding_Afsluiter', u'ZZRC_Leiding_Cap', u'ZZRC_Leiding_Diameterovergang', u'ZZRC_Leiding_Flens', u'ZZRC_Leiding_Isolatiekoppeling', u'ZZRC_Leiding_Las', u'ZZRC_Leiding_Leidingzakbaken', u'ZZRC_Leiding_Wanddikteovergang', u'ZZRC_Leiding_TStuk', u'ZZRC_Leiding_Pigmarker', u'ZZRC_Leiding_Ontluchting', u'ZZRC_Leiding_Mangat', u'ZZRC_Persoon_Leiding'] Table tbl = r'\\nlbltfs01\Projecten\307103\werkdir\fgb\BLS_Copy_Paste.gdb\Persoon' arcpy.MakeTableView_management(tbl,"myTable") desc = arcpy.Describe("myTable") print "myTable: {0}".format(desc.relationshipClassNames) Results in: myTable: [u'ZZRC_Persoon_Leiding', u'ZZRC_Eigenaar_Duiker', u'ZZRC_Eigenaar_KruisendeWeg', u'ZZRC_Inspectieweg_Eigenaar', u'ZZRC_Inspectieweg_Onderhoud', u'ZZRC_KruisendeKabel_Persoon', u'ZZRC_KruisendeLeiding_Persoon', u'ZZRC_Onderhoud_Duiker', u'ZZRC_Onderhoud_KruisendeWeg', u'ZZRC_Persoon_Damwandkoker', u'ZZRC_Persoon_Gebouwen', u'ZZRC_Persoon_Gelijkrichter', u'ZZRC_Persoon_Handhole', u'ZZRC_Persoon_KruisendeMantelbuis', u'ZZRC_Persoon_Pachtkavel', u'ZZRC_Persoon_Peilbuis', u'ZZRC_Persoon_Wbe', u'ZZRC_Persoon_Grondzakbaken', u'ZZRC_Persoon_Leidingzakbaken', u'ZZRC_ZakelijkRecht_Persoon'] Kind regards, Xander
... View more
11-21-2013
10:03 PM
|
0
|
0
|
917
|
|
POST
|
Hi Matthew, Did you try using the setting "MAXOF" for Output Extent (Environment setting)? The effect on the output extent will be: The combined extent of all input data. All features or rasters will be processed. Kind regards, Xander
... View more
11-21-2013
09:17 PM
|
0
|
0
|
1112
|
|
POST
|
Hi Sam, If you think the answer was helpful you can use the "arrow" button in order to help other members find useful information: More info here: http://resources.arcgis.com/en/help/forums-mvp/ Kind regards, Xander
... View more
11-21-2013
08:59 PM
|
0
|
0
|
527
|
|
POST
|
Hi Shaun, Thanx for this great post (+1 for that). A small correction; the 'PointsSolarRadiation' is part of the sa module. So in the code change the line: arcpy.PointsSolarRadiation("elevation", "my_sites", for this: arcpy.sa.PointsSolarRadiation("elevation", "my_sites", Kind regards, Xander
... View more
11-21-2013
03:23 AM
|
0
|
0
|
1078
|
|
POST
|
The code is a standalone script and you can run it from any Python IDE. You can also load this into the Python window in ArcMap. This is done with the Load command (context sensitive menu of the Python window). Make sure you adjust the names and paths to the datasets before you load the script into the Python window. I'm referring to the following lines of code: inputDEM = r'C:\Project\_Forums\numpy\grd\dem'
outRasE1 = r'C:\Project\_Forums\numpy\grd\dem01E1'
outRasE2 = r'C:\Project\_Forums\numpy\grd\dem01E2'
outRasAlt = r'C:\Project\_Forums\numpy\grd\dem01alt'
Kind regards, Xander
... View more
11-20-2013
04:18 AM
|
0
|
0
|
2094
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM | |
| 1 | 05-29-2019 02:45 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-26-2025
02:43 PM
|