POST
|
I posted this on StackExchange already but do not get any feedback there... so here I go again: As I am not very experienced with Python I need your help. I managed to modify a Script (that has been posted here Get boundary of raster image as polygon in ArcGIS Desktop? by http://gis.stackexchange.com/users/2043/jeb) import arcpy,os InFolder = arcpy.GetParameterAsText(0) Dest=arcpy.GetParameterAsText(1) arcpy.env.workspace=InFolder #The raster datasets in the input workspace in_raster_datasets = arcpy.ListRasters() arcpy.CreateFeatureclass_management(os.path.dirname(Dest), os.path.basename(Dest), "POLYGON") arcpy.AddField_management(Dest,"RasterName", "String","","",250) arcpy.AddField_management(Dest,"RasterPath", "String","","",250) cursor = arcpy.InsertCursor(Dest) point = arcpy.Point() array = arcpy.Array() corners = ["lowerLeft", "lowerRight", "upperRight", "upperLeft"] for Ras in in_raster_datasets: feat = cursor.newRow() r = arcpy.Raster(Ras) for corner in corners: point.X = getattr(r.extent, "%s" % corner).X point.Y = getattr(r.extent, "%s" % corner).Y array.add(point) array.add(array.getObject(0)) polygon = arcpy.Polygon(array) feat.shape = polygon feat.setValue("RasterName", Ras) feat.setValue("RasterPath", InFolder + "\\" + Ras) cursor.insertRow(feat) array.removeAll() del feat del cursor that writes the Extents of a List of rasters that are in one folder to a Shapefile and adds the name of the raster to the attribute table. I would need the same function, but instead of the Extent of each Raster with the Raster Domain - to have the exact frame of each extracted georeferenced video still. Because I do not completely understand the single steps... I do not know where to incorporate the arcpy.RasterDomain_3d... Thanks a lot for help!
... View more
01-15-2015
07:02 AM
|
0
|
0
|
4003
|
POST
|
I have a problem concerning interpolation of compositional data of grain sizes. I need to interpolate the content of each component (clay, silt, sand in percent) to a raster. There are compositional variables — the values are connected by definition. In the case of the three texture fractions, a value of any variable equals 100 less sum of the other two. As I am reading into this topic I get into more and more problems. For kriging there compositional data do not meet the constrains of stationarity and known mean value. On the other hand my results do not satisfy the constant sum and nonnegativity constrains of the data. Walvoort and de Gruijter (2001) for example, already developed a compositional solution for ordinary kriging that will enforce estimated values to sum to unity at all locations. (Walvoort, D. J. J., de Gruijter, J. J., 2001. Compositional Kriging: A Spatial Interpolation Method forCompositional Data. Mathematical Geology 33 (8): 951–966) I would like to use ArcGIS and its geostatistical capacities - what would be your method of choice for such a interpolation? (There has been developed an R package for such cases: http://www.inside-r.org/packages/cran/compositions/docs/compOKriging - but I am not into this program yet to be able to generate meaningful results quickly)
... View more
11-05-2014
05:00 AM
|
0
|
0
|
3001
|
POST
|
... I did not change anything and since yesterday can not see my metadata anymore?! The strange thing is: on my notebook accessing the same data - everything is still fine. Does anyone have an idea what the problem could be? I googled the error message but did not find any solution... not even somebody with similar problems. I use ArcGIS 10.2.2 and the problem is for all data that I try to accesss from this one computer - no matter if they are in a file GDB or in FolderStructure... I attached a screenshot of the error message. Thank you for help!!! Regards Frauke
... View more
10-23-2014
02:47 AM
|
1
|
1
|
3298
|
POST
|
Dear Johannes, I found the old post too, but the script logically does not work for me. Maybe I have some missunderstanding. But if I try to apply this script to my arithmetic value of f.e. 270°, which is pointing to the west: 270 + 270 = 540 this is > 360: 540 - 360 = 180° ... and it should be 90° in geometric direction?!? This script is just 'shifting' the values, but not taking into account the 'counter clock rotation' of the arimetic direction. As I am not that much into VBA I might miss something here. I would be happy about advice! Thank you!
... View more
10-07-2014
12:35 PM
|
0
|
0
|
3518
|
POST
|
The difference of the two has been explained in another post: "A note for those not familiar with rotation options. Geographic rotation establishes due north as angle 0 and degrees above 0 cause a clockwise rotation so that due east is 90, due south is 180 and due west is 270. It's rules are designed to operate like a clock. An Arithmetic rotation follows Cartesian graphing rules and is what mathematicians use. It establishes the X axis in the positive direction (X = +, Y = 0) or due east in compass directions as 0 and degrees above 0 cause a counterclockwise rotation. In an arithmetic system due north is 90 degrees (X = 0, Y = +), due west is 180 degrees (X = -, Y = 0), and due south is 270 degrees (X = 0, Y = -)." The concept is clear to me... but how can I caculate one from the other? As I have aritmetic direction in my data, but I need them in geographic degree. Thank you! Frauke
... View more
10-07-2014
06:43 AM
|
0
|
9
|
12744
|
POST
|
Hey Riyas, i somehow didnt see your comment before! Thank you so much, its working!!!
... View more
08-19-2014
07:21 AM
|
0
|
0
|
2494
|
POST
|
Thank you so much Filip!!!! It is working perfectly, thats awesome! I cant tell you how happy that makes me! Have a great day, Teresa
... View more
08-19-2014
07:08 AM
|
0
|
0
|
2494
|
POST
|
And this is the Code so far... As I am new to Python I was only able to start with the basic things, I know this is missing the main part
import arcpy
# Set the Workspace
arcpy.env.workspace = "D:\Teresa\Kerstin\SouthernOcean\03_workspace\Teresa"
# Make table
table = "C:/Users/theidema/Desktop/OxzUti_GridP_Annual.csv"
#Create the search cursor
cursor = arcpy.SearchCursor(Table)
#Iterate through the rows
row = cursor.next()
if row.isNull (field.name):
print (row.getValue(field.name))
row = cursor.next()
... View more
08-19-2014
01:19 AM
|
0
|
4
|
2494
|
POST
|
Hello everyone! I am trying to write a python script to extract certain values from a table: the table I am referring to is a big collection of nitrate values for different water depths, which are deposited in the columns of the table. As I only need the value of the surface and the deepest point, I want to search through the rows and extract the last value that is not 0. I have started writing a script using the SearchCursor Tool but get stuck at the point, where I want it to search for the first 0-value and then go back and print the value fro mthe column before... Does anyone have an idea how to solve that problem? Thanks a lot in advance! Teresa
... View more
08-18-2014
06:53 AM
|
0
|
8
|
3732
|
Title | Kudos | Posted |
---|---|---|
1 | 10-23-2014 02:47 AM |
Online Status |
Offline
|
Date Last Visited |
06-03-2021
03:20 AM
|