[GRASS-user] Strange issue with v.buffer and latest 6.4
Hello everybody, I have a strange issue with the v.buffer command: Here you can see 2 vectors: red is input and grey is the output of v.buffer: http://dl.dropbox.com/u/348430/buffer.png The upper left of the polygon it's not correct Here you can download the GML file (EPSG:4326): http://dl.dropbox.com/u/348430/gml.zip Any idea? Thx Luca -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Strange-issue-with-v-buffer-and-latest-6-4-tp5433030p5433030.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Error with r.in.wms and UMN MapServer
Hello everybody, I have got some troubles with a WMS server and r.in.wms (latest 6.5-svn) and it seems related to the request created by grass. This is the command line: r.in.wms -g --v --overwrite output=orto mapserver=http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/service/ortofoto_colore_08_f33.map layers=ortofoto_colore_08 srs=EPSG:32633 format=jpeg folder=/tmp/ v=3 This the error: MapServer Message msEvalRegex(): Regular expression error. String (/ms_ogc/service/ortofoto_colore_08_f33.map?request=GetMap) failed expression test. This orto_.wget: OUTPUT_FILE="/tmp//orto__0.jpeg";SERVER="http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/service/ortofoto_colore_08_f33.map";STRING="request=GetMap&layers=ortofoto_colore_08&styles=&srs=EPSG:32633&bbox=310494.15110544,4808290.38776543,310683.61730524,4808423.352582376633&width=10&height=8&format=image/jpeg&transparent=TRUE&version=1.1.1"; It seems that the request url is http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/service/ortofoto_colore_08_f33.map";STRING="request=GetMap&layers=ortofoto_colore_08&styles=&srs=EPSG:32633&bbox=310494.15110544,4808290.38776543,310683.61730524,4808423.352582376633&width=10&height=8&format=image/jpeg&transparent=TRUE&version=1.1.1"; What do you think about? Thx Luca -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Error-with-r-in-wms-and-UMN-MapServer-tp5227861p5227861.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Two questions about r.stream.*
Hello everyone, before beginning to write script from scratch I'd like to know if I can use the r.stream.* for my tasks. What I need to this is: - For each subbasin in a certain area extract each subbasin-outlet; - Input a certain number of points and extract the subbasins using the points as outlets; For the second point I tried r.stream.basins, but the problem is that if one of the points is also the basin outlet, it creates just one subasin that includes the entire area. Thanks Luca -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Two-questions-about-r-stream-tp5031327p5031327.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: r.mapcalc and nested if
Thank you all for yours answers! I'll explain my problem: I have got a raster map with a lot of small area like this one: 112 112 112 122 112 112 112 1 1 122 122 1 1 1 122 112 122 122 112 112 The boundary is made cells with values from 100 to 200 instead the inner ones have got 1 as value. I need to fill the inner cells with the mode of a 3x3 window. Using a loop until there are no more cell with 1 as value, I started with this approach: map=if(map == 1,mode(map[-1,-1],map[-1,0],map[-1,1],map[0,1],map[1,1],map[1,0],map[1,-1],map[0,-1]),0) I added the map == 1 condition due the null cells outside the boundary, which set the mode to null and slowly eat all my areas :) Using that syntax the loop goes smooth but after a certain point the cells=1 remain the same because the mode is always 1. I discarded r.neighbors because it changes also the values on the boundary which should remain the same. Any hint? Thank you very much. Luca -- View this message in context: http://n2.nabble.com/r-mapcalc-and-nested-if-tp4901916p4913028.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: r.mapcalc and nested if
Sorry, this is the expression: r.mapcalc 'map2=if(map ==1 ,if(mode(map[-1,-1],map[-1,0],map[-1,1],map[0,1],map[1,1],map[1,0],map[1,-1],map[0,-1])==1,0,mode(map[-1,-1],map[-1,0],map[-1,1],map[0,1],map[1,1],map[1,0],map[1,-1],map[0,-1]),map))' Thanks Luca -- View this message in context: http://n2.nabble.com/r-mapcalc-and-nested-if-tp4901916p4901925.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.mapcalc and nested if
Hello everybody, I need to run a complex r.mapcalc expression, but I can't understand how to use nested if. This is the expression: r.mapcalc 'map2=if(mode(map[-1,-1],map[-1,0],map[-1,1],map[0,1],map[1,1],map[1,0],map[1,-1],map[0,-1])==1,0,mode(map[-1,-1],map[-1,0],map[-1,1],map[0,1],map[1,1],map[1,0],map[1,-1],map[0,-1]))' The idea is this: if the cell value is 1, do the mode else skip that cell; if the mode is equal to 1 assign 0 to that cell else assign the mode value. The r.mapcalc expression I just posted produce wrong result.. Any idea? Thanks Luca -- View this message in context: http://n2.nabble.com/r-mapcalc-and-nested-if-tp4901916p4901916.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Parsing output with python
Thank you very much, it worked fine! Ciao Luca -- View this message in context: http://n2.nabble.com/Parsing-output-with-python-tp4864622p4870862.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Parsing output with python
Hello everybody, I am porting a bash script to python and for it I need to know the number of cells of a certain category. Right now I use this syntax: grass.parse_command('r.stats',flags='c',input='map'), but the output is something like this: {'112 525': None.. }. Is there a way to have {'112':525..} so that I can easy get the number of cells ? Thank you very much Luca -- View this message in context: http://n2.nabble.com/Parsing-output-with-python-tp4864105p4864105.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Output parsing in python
Hello everybody, I am porting a bash script to python and for it I need to know the number of cells of a certain category. Right now I use this syntax: grass.parse_command('r.stats',flags='c',input='map'), but the output is something like this: {'112 525': None.. }. Is there a way to have {'112':525..} so that I can easy get the number of cells ? Thank you very much Luca -- View this message in context: http://n2.nabble.com/Output-parsing-in-python-tp4864508p4864508.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: r.out.gdal and INTERLEAVE=PIXEL
Thanks for all your answer. This is the reply from the Gdal list: http://trac.osgeo.org/gdal/ticket/3433 My problem is how to export a raster to be used inside ArcGIS..the procedure on the wiki [1] uses INTERLEAVE=PIXEL . If I use a standard r.out.gdal syntax, the min shown is 2.22 *e^-308 and the max 1.97*e^308 Anyone has got experience on this task? Thanks Luca [1] : http://grass.osgeo.org/wiki/Tips_for_Arc_users#Raster_import.2Fexport_commands -- View this message in context: http://n2.nabble.com/r-out-gdal-and-INTERLEAVE-PIXEL-tp4611081p4621558.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.out.gdal and INTERLEAVE=PIXEL
Hello everybody, I need to export some raster data from GRASS to ArcView; as suggested on the wiki [1] I used the option INTERLEAVE=PIXEL with r.out.gdal: r.out.gdal in=elevation.10m format=GTiff type=Float32 createopt="INTERLEAVE=PIXEL" out=output.tif The problem is that, using gdalinfo, INTERLEAVE is still set to BAND. Any idea? Using GRASS 6.4.0svn and GDAL 1.7.1 Thanks Luca -- View this message in context: http://n2.nabble.com/r-out-gdal-and-INTERLEAVE-PIXEL-tp4611081p4611081.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user