POST
|
Hello everyone... I am really confused and I would like to ask some help from you. I have a dependent variable named "D" and two independent variables named "V" and "H" The D variable can take the values 1 or 2 or 3 or 4 or 5 The H variable values can be H1, H2, H3, H4 Same for V variable which takes the values V1, V2, V3 I have several triads of data as for example: H1, V1, 1 H1, V2, 3 H1, V1, 2 H1, V2, 2 H3, V4, 5 etc... I have attached an image as an example in order to explain better the problem. I would like to see which are the curves fitting these data. But I can't decide the way to do it. I have studied a little logistic regression... polytomous logistic regression specifically, but I am not sure that it can help me... Hope that you can understand what i am looking for... thank you very much in advance for your help. I have sets of data in the form (H,
... View more
06-04-2013
07:04 AM
|
0
|
1
|
489
|
POST
|
Try to read the whole procedure described in the link I have proposed above... It is really helpful. Hope it works!
... View more
02-21-2013
09:26 PM
|
0
|
0
|
2179
|
POST
|
I have created a Python code that uses: a. a grid file of water depth values in a region (Every cell is 10x10 m) and b. a polygon shapefile of land use information Generally the code reads the depth values in every grid cell and according to the land use of each cell performs several calculations And now here comes the problem: At first I made the assumption that the land use found in the center of every grid cell represents the land use of the whole cell. But I am wondering whether a big error takes place in cells which cover two different land use polygons. Is it worthy to find a way to calculate the irregular areas that come up in those grid cells, which ???carry??? the same landuse information? Or I should only minimize the dimensions of every grid cell (to 5x5 for example), minimizing in this way the error? Thank you very much for your time!
... View more
12-10-2012
02:40 AM
|
0
|
0
|
249
|
POST
|
Thank you very much for your help... it finally worked... The only change that I have done is in: points = [(x1,y1), (x2, y2),...,(xn, yn)] I changed that to the following: points=[(x,y)] because of the fact that the code reads in every grid cell the (x, y) pair and as a result these pairs are always changing. Thank you again!
... View more
11-29-2012
10:01 PM
|
0
|
0
|
209
|
POST
|
Hello everyone! I have tried the following code: from osgeo import ogr
LandUse = ogr.Open("C:\\Python26\\ArcGIS10.0\\landuse shpfile (polygon)\\landuse.shp")
lyr = LandUse.GetLayerByName("landuse data_ypan")
lyr.ResetReading()
point = ogr.CreateGeometryFromWkt("POINT(503234.931458 3443753.43622)")
for feat in lyr:
geom = feat.GetGeometryRef()
if geom.Contains(point):
sm = feat.GetField(feat.GetFieldIndex("Land_Group"))
print sm I am wondering if there is the possibility to import variables X, Y in the place of the number coordinates (red coloured text) in order to perform a for loop among several x, y coordinates. Thank you very much.
... View more
11-29-2012
02:13 AM
|
0
|
2
|
485
|
POST
|
It is a really good the link that you post it... however I need to get (read) the X, Y coordinates in the center of every cell, in this phase. I don't want to save them in a file... just read them... is there any other way?
... View more
11-26-2012
02:12 AM
|
0
|
0
|
548
|
POST
|
Hello everyone? Can you please help me in the following? I am reading the value of every grid cell in a raster file. But I also need to read the X, Y coordinates of these grid cells (more specifically the coordinates in the center of each cell). Is there a way to do so? Thank you very much!!!
... View more
11-25-2012
11:59 PM
|
0
|
3
|
1311
|
POST
|
I have changed the file extension from "asc" to "ascii" and everything is running!!! But unfortunately another problem comes up. I need to convert this "ascii" file into raster and when I am using the command "arcpy.ASCIIToRaster_conversion" there is no way to use a file with the extension "ascii"... The file must have an "asc" extension. Why? Which is the difference between these two extensions?
... View more
11-13-2012
01:45 AM
|
0
|
0
|
372
|
POST
|
I would like to add something When running the same code in a smaller grid (4x5) everything is ok!!! The problems appears in the big grid (300 x 300).
... View more
11-12-2012
10:18 PM
|
0
|
0
|
372
|
POST
|
This is the error that comes out: IOError: [Errno 22] invalid mode ('w+') or filename: 'test.asc' Thank you very much...
... View more
11-12-2012
09:14 PM
|
0
|
0
|
372
|
POST
|
Hello everyone! I would like to ask if there is a space limit for ascii files in python. For some reason I am writing some data in an ascii file and while everything seems to be ok... suddenly the code crashes and an error appears saying that something goes wrong with the delimiter "w+" Do you have any idea why???
... View more
11-12-2012
08:46 AM
|
0
|
5
|
903
|
POST
|
I finally manage it through the help of the following link... http://stackoverflow.com/questions/12223167/adding-header-to-numpy-array Thank you all very much, have a nice day!!!
... View more
11-11-2012
10:42 PM
|
0
|
0
|
121
|
POST
|
This is the output ascii file Whereas the headers seem to be ok... The first row of the calculated values is missing and the second is not properly written... NCOLS 5 NROWS 4 XLLCORNER 513589 YLLCORNER 3923728 CELLSIZE 10 NODATA_VALUE -100 172 10.14299988747 10.28650045395 10.42899966240 10.57000041008 19.53180027008 19.10220050812 19.15980005264 19.21560001373 19.27019977570 20.64479970932 23.32259988785 23.50019931793 23.67780017853 23.85419940948
... View more
11-09-2012
12:51 AM
|
0
|
0
|
121
|
POST
|
Yesterday I supposed that converting the ascii to raster file would be the easy thing. May be I was wrong 😞 Something goes wrong with the needed header of the ascii file. I have created an ascii file (damageFile) which is the same with the one where the calculated values are saved. I am writing the following... damageFile=open('C:\\Python26\\ArcGIS10.0\\Python programming\\test2.ascii', "w+") damageFile.write('NCOLS 5' + "\n") damageFile.write('NROWS 4' + "\n") damageFile.write('XLLCORNER 513589.931' + "\n") damageFile.write('YLLCORNER 3923728.436' + "\n") damageFile.write('CELLSIZE 10' + "\n") damageFile.write('NODATA_VALUE -100' + "\n") then the calculations follow under several scenarios... and then the statement: numpy.savetxt("C:\\Python26\\ArcGIS10.0\\Python programming\\test2.ascii", Damage, fmt="%14.11f", delimiter="w+") and the damageFile is closed... Can you find any mistake that I can see??? Thank you very much!!!
... View more
11-09-2012
12:47 AM
|
0
|
0
|
594
|
POST
|
@ rafaelr Your help was very important! My problem is solved for small grids! Let's try for bigger ones!!! I am not good on python programming but I am trying... I would like to ask you for the raster calculator. As I can see it is an ArcGIS tool, but as long as the calculations among my cells are not the same every time, for all the cells. For example I am checking whether the cell value of the first array is greater than one and the cell value of the second array is lower than 3 and if this happens the D value is calculated through a specific equation. But there are several scenarios for the read cell values... So...It won't help me, will it? Thank you again!!!
... View more
11-08-2012
12:47 AM
|
0
|
0
|
594
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|