Re: [GRASS-user] Query vector type has problems
Hi! Hi Andres, please try the latest trunk (at least r66460 [1, 2]). I did not test r66460, in r66584 the v.what.vect works on 3D vector, thank you! Andres ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Query vector type has problems
Hi! Vector commands v.what.vect and v.distance do not fill the attribute column of a point vector. [..] it took me a while to figure out the problem, but it's because your samples are 3D and the stand vector is not. If you convert the samples to 2d with v.to.3d, then it will work. Thank you! Andres Kuusk Tartu Observatory ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Query vector type has problems
Hello! Vector commands v.what.vect and v.distance do not fill the attribute column of a point vector. I created small test vectors, a vector map 'varea' of area type which has an area polygon, and a vector map of points 'vpoints' - 191 GPS way-points, 135 of which are inside the polygon. The command v.what.vect map=vpoints column=aid query_map=varea query_column=aid returns: Finding nearest features... Update vector attributes... 191 categories - no nearest feature found The same result I get using v.distance: v.distance from=vpoints to=varea dmax=0. upload=to_attr column=aid to_column=aid Finding nearest features... Update vector attributes... 191 categories - no nearest feature found If I omit the option 'dmax=0.' all points get the attribute 'aid', also the points outside the polygon. Both vectors have several columns in the table of attributes. The OS is OpenSUSE-13.1, 3.11.10-25-desktop, x86_64. The problem is there in: GRASS-7.0.0-2.42 from the repository http://download.opensuse.org/repositories/Application:/Geo/openSUSE_13.1 GRASS-7.1 SVN r65785M (GRASS GIS 7.1.svn r65785M compilation log: No errors detected.) GRASS-7.0 SVN r58582. An old svn-version of 7.0 did the work (r51370): v.what.vect ... Finding nearest feature.. Finding nearest areas... Update vector attributes... 2837 categories - no nearest feature found 23679 categories read from the map 23679 categories exist in the table 23679 categories read from the map exist in the table v.distance complete. 23679 records updated. 20842 points have got the attribute. Andres Kuusk Tartu Observatory, Estonia ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] wms import fail
Sun, 24 Jun 2012, Martin Landa: could you try `r.in.wms2` from GRASS Addons? It works. Great! .../.grass7/addons/scripts/r.in.wms2 -d output=p_orto mapserver=http://kaart.maaamet.ee/wms/alus layers=of1 srs=3301 format=tiff method=near --overwrite --verbose Input parameters: '+proj=lcc +lat_1=58 +lat_2=59. +lat_0=57.51755393056 +lon_0=24 +x_0=50 +y_0=6375000 +no_defs +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000 +to_meter=1' Output parameters: '+proj=lcc +lat_1=59.34 +lat_2=58 +lat_0=57.5175539306 +lon_0=24 +x_0=50 +y_0=6375000 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0,0,0,0,0,0,0 +to_meter=1' Downloading data from WMS server... Reprojecting raster... Creating output file that is 1020P x 1000L. Processing input file /home/grass/... Using band 4 of source image as alpha. Using band 4 of destination image as alpha. 0...10...20...30...40...50...60...70...80...90...100 - done. Importing raster map into GRASS... WARNING: Raster map already exists and will be overwritten WARNING: Datum not recognised by GRASS and no parameters found WARNING: Raster map is a base map for . Remove forced. Thanks! Andres ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] wms import fail
Hi, I have also trouble with r.in.wms. Estonian Land Board has a WMS server http://kaart.maaamet.ee/wms/alus, projection of maps EPSG:3301. I am using GRASS-7.0.svn, r52182, openSUSE-11.4, linux 2.6.37.6-0.11-pae. In the graphical user interface wxGUI the connect to server returns error message: Traceback (most recent call last): File "/usr/local/grass-7.0.svn/scripts/r.in.wms", line 284, in sys.exit(main()) File "/usr/local/grass-7.0.svn/scripts/r.in.wms", line 228, in main list_layers() File "/usr/local/grass-7.0.svn/scripts/r.in.wms", line 223, in list_layers cap_xml.getLayers() File "/usr/local/grass-7.0.svn/etc/r.in.wms/wms_parse.py", line 78, in getLayers print " Title: " + ly['title'] UnicodeEncodeError: 'ascii' codec can't encode character u'\xf5' in position 10: ordinal not in range(128) However, I got the list of layers - two items. Now, if I select a layer (of1 - ortofoto) and connect, I got the same error message again, and nothing happens. In the commandline in the xterm window where I started GRASS the results are different. % env TERM=xterm SHELL=/bin/tcsh LANG=en_US.utf8 PYTHONSTARTUP=/etc/pythonstart HOME=/home/grass/CHRIS_LE/CHRIS MACHTYPE=i586 GISBASE=/usr/local/grass-7.0.svn GRASS_VERSION=7.0.svn PYTHONPATH=/usr/local/grass-7.0.svn/etc/python GRASS_PAGER=more GRASS_WISH=wish GRASS_PYTHON=python GRASS_GNUPLOT=gnuplot -persist GRASS_PROJSHARE=/usr/local/share/proj GRASS_HTML_BROWSER=xdg-open GISDBASE=/home/grass % g.region -p projection: 99 (Lambert Conformal Conic) zone: 0 datum: wgs84 ellipsoid: a=6378137 es=0.006694380022900787 north: 6468300 south: 6468050 west: 693060 east: 693315 nsres: 1 ewres: 1 rows: 250 cols: 255 cells: 63750 % r.in.wms mapserver=http://kaart.maaamet.ee/wms/alus -l returns the long list of map layers, there is a layer LAYER: of1 Title: ORTOFOTO SRS: EPSG:3301 I have tried all possible combinations of r.in.wms options. % r.in.wms output=p_orto mapserver=http://kaart.maaamet.ee/wms/alus layers=of1 srs=EPSG:3301 format=tiff maxcols=255 maxrows=250 method=near --overwrite Calculating tiles... ERROR: r.tileset failed In the directory /home/grass/wms_download/ an empty directory p_orto was created. Adding the option -p results in a different error message: % r.in.wms -p output=p_orto mapserver=http://kaart.maaamet.ee/wms/alus layers=of1 srs=EPSG:3301 format=tiff maxcols=255 maxrows=250 method=near --overwrite Traceback (most recent call last): File "/usr/local/grass-7.0.svn/scripts/r.in.wms", line 284, in sys.exit(main()) File "/usr/local/grass-7.0.svn/scripts/r.in.wms", line 245, in main request = wms_request.WMSRequest(flags, options) File "/usr/local/grass-7.0.svn/etc/r.in.wms/wms_request.py", line 28, in __init__ self.__set_options() File "/usr/local/grass-7.0.svn/etc/r.in.wms/wms_request.py", line 40, in __set_options self.srs_scale = int(grass.parse_key_val(proj_srs['+to_meter'])) NameError: global name 'proj_srs' is not defined The same error messages I get using r.in.wms options -c, -g, -a. Do I something wrong or is there some error in the r.in.wms ? The native reolution of the ortophoto at WMS server is 0.25 m, I guess. I tried the region resolution of 0.25, and missed maxcols and maxrows values in the commandline as well but no success. In February 2010 using some GRASS-6 version I could download small pices of ortophoto from this WMS server. Thanks for any assistance. Andres Kuusk Tartu Observatory, Estonia and...@aai.ee ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.db.* commands in GRASS-7
Hi! It seems to me that some v.db.* modules do not do what is described in the manual. I am using GRASS-7.0 r51370 and Postgres data base. In the manual I read: It is possible to link the geographic objects in a vector map to one or more tables. All vector objects are kept in one geometry file, and topology is maintained for all vector objects together. GRASS layers only consist of links to different attribute tables in which vector objects can have zero, one or more categories. I link two attribute tables to a vector of area polygons. In layer 1 I see area polygons and I can use selection with where conditions on the attribute table 1. In layer 2 the same polylines are boundaries and selection in the attribute table 2 does not work. Maybe I am doing something wrong? Another problem. Command v.db.join returns error. I am trying to join two attribute tables (era2011 linked to the vector of area polygons era2011 with key=cat, and erb2011) of the same size: % v.db.join map=era2011 layer=1 column=cat otable=erb2011 ocolumn=erid Column cat in table era2011 is of type integer. Column erid in table erb2011 is of type smallint. I got an error: Adding column to the table DBMI-PostgreSQL driver error: Unable to execute: ALTER TABLE era2011 ADD COLUMN erid INTEGER(2) ERROR: syntax error at or near "(" LINE 1: ALTER TABLE era2011 ADD COLUMN erid INTEGER(2) ERROR: Error while executing: 'ALTER TABLE era2011 ADD COLUMN erid INTEGER(2)' ERROR: Unable to add column . ERROR: Error creating column The same error (syntax error at or near "(") I got in case the integer columns in the otable are of type integer (integer(4)). The v.db.join works if the first table (era2011) already has empty columns which correspond to the columns of the otable (erb2011). Does this mean that I have first to add columns to the attribute table of layer 1 and after that the v.db.join can be used for updateing attribute values in these columns? Thanks for advices! Andres Kuusk Tartu Observatory, Estonia ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] An error in GRASS-7 manual
Hi! ERROR: Sorry, is not a valid parameter ERROR: Required parameter not set Perhaps you need to recompile the code if you did it yourself I see! I am still using GRASS-7 r48844 and everything works fine. This minor discrepancy between the code and manual is not a problem. Thanks for your advice! Andres ... AH, I got it: you are using GRASS 6 while reading the GRASS 7 manual.. the parameter name changed! So please read here instead for GRASS 6: http://grass.osgeo.org/grass64/manuals/html64_user/v.what.rast.html Hope this helps, Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] An error in GRASS-7 manual
Hi! There is a small error in the GRASS-7 HTML-manual v.what.rast, http://grass.fbk.eu/grass70/manuals/html70_user/v.what.rast.html The required parameter is vector=name, ERROR: Sorry, is not a valid parameter ERROR: Required parameter not set Thanks to developers for the great tool! Andres Kuusk Tartu Observatory, Estonia ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to shift a raster map?
Thanks to Markus and Moritz, I did not read carefully enough the last section of the r.region manual. Memory has nothing to do with the error "ERROR: Error writing segment file", this is an error while writing to disk (not enough disk space?). The error message appears when the i.rectify is loading the image. I have enough disk space, I hope: % df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 33031204919284 30433984 3% / /dev/sda9359924668 41523544 300118004 13% /home /dev/sda8 49548372 4450220 42581220 10% /var The raster is 1351510007 bytes, users have no quota. i.rectify has a separate option controlling memory usage, default is 300MB; this does not affect disk space requirements. I tried to change it, and closed all other applications, so the 3.2G of memory was used for X11, FWVM2 and GRASS, and a few small applications in background (FWVM2 buttons and panel etc). The other PC with 4G memory did use my disk over nfs, thus the difference was in memory and the space for temporary files. Andres ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] How to shift a raster map?
Hi! I have a high-res satellite image which has a positioning error about 5 m. A previous GRASS version had a simple shift of coordinates however in the GRASS-7 I cannot find such a tool. A workaround is to use i.rectify. It seems to me that there could be a more simple possibility for such a simple operation. The image is large and i.rectify returns ERROR: Error writing segment file. I get this error even after splitting the image and trying to rectify a small piece of the large image. The procedures I did were: - defined a small region - with r.resample made a copy of the small region of the original large map - r.info reports the correct new region and the correct size of the small map - i.rectify of the new small map reported in the output window the previous large region and I got the same error: Error writing segment file. I could to run i.rectify on another PC which has a bit more memory (4G, my PC can use 3.2G, both are Linux), but anyway, to shift a raster should be more simple. Thanks for suggestions! Andres Kuusk Tartu Observatory, Estonia ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.vect.stats has no results
Hi! GRASS is r48844 on an openSUSE-11.4 and everything works fine. Great work! However, the current version has again problems with using selection options for a vector - the display window is empty if I turn on a selection option. The layer number must be set. Andres ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.vect.stats has no results
Hi, I am sorry, the module v.vect.stats was missing in my set-up. I tried to start it through GUI-CLI, that was the output. Now I upgraded GRASS-7 to r48840 or r48841 (I guess, sorry, I cannot check, the Internet connection of office is down), and v.vect.stats works fine. Thanks for your support. However, the current version has again problems with using selection options for a vector - the display window is empty if I turn on a selection option. Vector(s) is(are) visible again if I turn the selection option off. I will give more details when I can access Internet in my office. Andres Tue, 18 Oct 2011, Markus Metz: Weird. With DEBUG=2, all sorts of debug messages should be printed. Looks like the module exits immediately and can not even open the vectors. Can you run it again through CLI, not the GUI (also not the GUI-CLI)? ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.vect.stats has no results
Hi, .. v.vect.stats uses the key column recorded in the db link info. If there would be a problem with the points vector, v.vect.stats should print something like area_cat|count|average 1|0|null 2|0|null 3|0|null Maybe rebuilding topology helps? I created a new vector of points (tmp4) using v.select, operator=within Building areas... 0 areas built 0 isles built Attaching islands... Attaching centroids... Topology was built Number of nodes: 577 Number of primitives: 577 Number of points: 577 All these points are inside the areas 1, 2, and 3 of the area vector "rami". Also output of v.info on the area vector Area vector is "rami": Type of map: vector (level: 2) Number of points: 0 Number of centroids: 3 Number of lines:0 Number of boundaries: 3 Number of areas:3 Number of islands:3 Map is 3D: No Number of dblinks: 1 and v.vect.stats after g.gisenv set="DEBUG=2". (Tue Oct 18 12:36:48 2011) g.gisenv set=DEBUG=2 (Tue Oct 18 12:36:48 2011) Command finished (0 sec) (Tue Oct 18 12:36:58 2011) v.vect.stats -p points=tmp4 areas=rami type=point method=average pcolumn=uav8 ccolumn=nuav scolumn=uav8min --verbose (Tue Oct 18 12:36:58 2011) Command finished (0 sec) I am using GRASS-7, r47868. Andres ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.vect.stats has no results
Hi! What I am doing wrong, or is this the problem of v.vect.stats? I have an area vector "area_vector" of three rectangular areas and a vector "point_vector" with numerous points inside these areas. The output of the command v.vect.stats -p points=point_vector areas=area_vector type=point player=1 alayer=1 method=average pcolumn=uav8 ccolumn=nuav scolumn=uav8mean --verbose is empty. No error messages. The areas in the area_vector have categories 1, 2, 3. The column uav8 is present in the table point_vector and I can see the values of attributes making query in display window. GRASS is using Postgres, driver pg. Attribute values are real. v.rast.stats is working and updates attribute table. Can the problem be that the point_vector has no column 'cat'? The key column for linking the vector layer to its attribute table has a different name. I am using GRASS-7, r47868. Andres Kuusk Tartu Observatory, Estonia ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] d.vector problems in GRASS-7
Hi! Wed, 24 Aug 2011, Markus Metz: missing is: make distclean Now it works. Thanks! Andres ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] d.vector problems in GRASS-7
Hi! I am using the SVN version of GRASS-7 for a while. In r45123 I had a problem of using selection options for displaying vectors, which I reported in ticket #1266. Since that time several modifications of vector modules has been done, however things turn worse and worse. I have tested r45168, r45179, r45185, r45214, r45303, r45362, r45396, r45405, r45592, r47521, r47600, r47640, r47770, r47865. In the early versions just vectors disappeard if I turned on some selection criterion. Since r46317 I got error message which I reported as a comment to the ticket #1266. Since r47521 the rendering of a vector fails at all. Therefore I still use r44607. I have tested GRASS-7 from svn-trunc on two Linux PC-s, openSUSE-11.4, Linux 2.6.37.6-0.7-pae i686 i386 and openSUSE-11.2, Linux 2.6.31.14-0.8-desktop6 i686 i386 # svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk # ./configure --enable-shared --without-mysql --without-sqlite --with-gdal --without-fftw --with-postgres --with-postgres-includes=/usr/include/pgsql --with-freetype-includes=/usr/include/freetype2 --with-freetype-libs=/usr/lib --with-geos=/usr/local/bin/geos-config # make or # make clean # svn cleanup # svn up # ./configure --enable-shared --without-mysql --without-sqlite --with-gdal --without-fftw --with-postgres --with-postgres-includes=/usr/include/pgsql --with-freetype-includes=/usr/include/freetype2 --with-freetype-libs=/usr/lib --with-geos=/usr/local/bin/geos-config # make In openSUSE-11.4: # ./bin.i686-pc-linux-gnu/grass70 I open a raster - OK I try to open a vector: Command 'd.vect color=165:42:42 map=cks@CHRIS layer=-1 type=boundary,area fcolor=none' failed Details: Unable read topology for area 2 ERROR: Rendering failed I try to open another vector: Command 'd.vect color=165:42:42 map=eraldised_8m_buf@CHRIS layer=-1 type=area fcolor=none' failed Details: G_realloc: unable to allocate 3720975616 bytes of memory at struct_alloc.c:378 ERROR: Rendering failed Both vectors are correct and can be used in r44607. I like the GRASS-7 and obviosly several new features are introduced or got working since r44607. Unfortunately I still have to use rather old version wich has its own problems. Is it only a problem of my installation or maybe the same problem is there on other Linux PC-s as well? Andres Kuusk Tartu Observatory, Estonia ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user