Re: [GRASS-user] Natural Earth: public domain GIS datasets
Luigi Ponti wrote: Dear users, I did not see this cited in the mailing list archive so I thought others may find it useful as a source of basic GIS layers. Natural Earth http://www.naturalearthdata.com/ They seem to import fine into GRASS, and vectors have clean and informative attribute tables. Hi Luigi, There is a lot of nice data on there. I've had some trouble trying to import the vector data, however. I keep getting a buffer-overflow with v.in.ogr (see below). It happens with 6.4.0RC5, and with 6.5.svn. How did you import them? Cheers John GRASS 6.4.0RC5 (global):~/laptop/GIS_datasets/Natural_Earth_GIS_data_10m/physical v.in.ogr ../cultural/10m-populated-places.shp out=cities Projection of input dataset and current location appear to match Layer: 10m-populated-places Importing map 6599 features... *** buffer overflow detected ***: v.in.ogr terminated === Backtrace: = /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7057ed8] /lib/tls/i686/cmov/libc.so.6[0xb7056f10] /lib/tls/i686/cmov/libc.so.6[0xb7056869] /lib/tls/i686/cmov/libc.so.6(__snprintf_chk+0x34)[0xb7056754] /usr/lib/libgdal1.5.0.so.1(_ZN10OGRFeature16GetFieldAsStringEi+0x34e)[0xb74eb3be] /usr/lib/libgdal1.5.0.so.1(OGR_F_GetFieldAsString+0x28)[0xb74ec1c8] v.in.ogr(main+0x21e8)[0x804d9d8] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb6f8db56] v.in.ogr[0x804aab1] === Memory map: 08048000-0805 r-xp 08:06 24396 /usr/lib/grass64/bin/v.in.ogr 0805-08051000 r--p 7000 08:06 24396 /usr/lib/grass64/bin/v.in.ogr 08051000-08052000 rw-p 8000 08:06 24396 /usr/lib/grass64/bin/v.in.ogr 086e6000-08728000 rw-p 00:00 0 [heap] b4eb-b4eba000 r-xp 08:06 968 /lib/tls/i686/cmov/libnss_files-2.10.1.so b4eba000-b4ebb000 r--p 9000 08:06 968 /lib/tls/i686/cmov/libnss_files-2.10.1.so b4ebb000-b4ebc000 rw-p a000 08:06 968 /lib/tls/i686/cmov/libnss_files-2.10.1.so b4ebc000-b4ec2000 r-xp 08:06 964 /lib/tls/i686/cmov/libnss_compat-2.10.1.so b4ec2000-b4ec3000 r--p 5000 08:06 964 /lib/tls/i686/cmov/libnss_compat-2.10.1.so b4ec3000-b4ec4000 rw-p 6000 08:06 964 /lib/tls/i686/cmov/libnss_compat-2.10.1.so b4edc000-b4f1b000 r--p 08:06 134849 /usr/lib/locale/en_GB.utf8/LC_CTYPE b4f1b000-b4f1f000 rw-p 00:00 0 b4f1f000-b4f22000 r-xp 08:06 942/lib/libgpg-error.so.0.4.0 b4f22000-b4f23000 r--p 2000 08:06 942/lib/libgpg-error.so.0.4.0 b4f23000-b4f24000 rw-p 3000 08:06 942/lib/libgpg-error.so.0.4.0 b4f24000-b4f34000 r-xp 08:06 6439 /usr/lib/libtasn1.so.3.1.5 b4f34000-b4f35000 r--p f000 08:06 6439 /usr/lib/libtasn1.so.3.1.5 b4f35000-b4f36000 rw-p 0001 08:06 6439 /usr/lib/libtasn1.so.3.1.5 b4f36000-b4f4e000 r-xp 08:06 6375 /usr/lib/libsasl2.so.2.0.23 b4f4e000-b4f4f000 r--p 00017000 08:06 6375 /usr/lib/libsasl2.so.2.0.23 b4f4f000-b4f5 rw-p 00018000 08:06 6375 /usr/lib/libsasl2.so.2.0.23 b4f5-b4f51000 rw-p 00:00 0 b4f51000-b4f61000 r-xp 08:06 1006 /lib/tls/i686/cmov/libresolv-2.10.1.so b4f61000-b4f62000 r--p 0001 08:06 1006 /lib/tls/i686/cmov/libresolv-2.10.1.so b4f62000-b4f63000 rw-p 00011000 08:06 1006 /lib/tls/i686/cmov/libresolv-2.10.1.so b4f63000-b4f65000 rw-p 00:00 0 b4f65000-b4f67000 r-xp 08:06 951/lib/libkeyutils-1.2.so b4f67000-b4f68000 r--p 1000 08:06 951/lib/libkeyutils-1.2.so b4f68000-b4f69000 rw-p 2000 08:06 951/lib/libkeyutils-1.2.so b4f69000-b4f6f000 r-xp 08:06 2750 /usr/lib/libkrb5support.so.0.1 b4f6f000-b4f7 r--p 5000 08:06 2750 /usr/lib/libkrb5support.so.0.1 b4f7-b4f71000 rw-p 6000 08:06 2750 /usr/lib/libkrb5support.so.0.1 b4f71000-b4f97000 r-xp 08:06 2756 /usr/lib/libk5crypto.so.3.1 b4f97000-b4f98000 ---p 00026000 08:06 2756 /usr/lib/libk5crypto.so.3.1 b4f98000-b4f99000 r--p 00026000 08:06 2756 /usr/lib/libk5crypto.so.3.1 b4f99000-b4f9a000 rw-p 00027000 08:06 2756 /usr/lib/libk5crypto.so.3.1 b4f9a000-b4fad000 r-xp 08:06 962 /lib/tls/i686/cmov/libnsl-2.10.1.so b4fad000-b4fae000 r--p 00012000 08:06 962 /lib/tls/i686/cmov/libnsl-2.10.1.so b4fae000-b4faf000 rw-p 00013000 08:06 962 /lib/tls/i686/cmov/libnsl-2.10.1.so b4faf000-b4fb2000 rw-p 00:00 0 b4fb2000-b502b000 r-xp 08:06 938/lib/libgcrypt.so.11.5.2 b502b000-b502c000 r--p 00078000 08:06 938/lib/libgcrypt.so.11.5.2 b502c000-b502e000 rw-p 00079000 08:06 938/lib/libgcrypt.so.11.5.2 b502e000-b50d1000 r-xp 08:06 5969 /usr/lib/libgnutls.so.26.14.10 b50d1000-b50d5000 r--p 000a2000 08:06 5969 /usr/lib/libgnutls.so.26.14.10 b50d5000-b50d6000 rw-p 000a6000 08:06 5969 /usr/lib/libgnutls.so.26.14.10 b50d6000-b50e3000 r-xp
Re: [GRASS-user] Natural Earth: public domain GIS datasets
On Sun, Jan 17, 2010 at 5:12 PM, John A Stevenson john.steven...@manchester.ac.uk wrote: Luigi Ponti wrote: ... There is a lot of nice data on there. I've had some trouble trying to import the vector data, however. I keep getting a buffer-overflow with v.in.ogr (see below). It happens with 6.4.0RC5, and with 6.5.svn. How did you import them? Are you on Ubuntu? GRASS 6.4.0RC5 (global):~/laptop/GIS_datasets/Natural_Earth_GIS_data_10m/physical v.in.ogr ../cultural/10m-populated-places.shp out=cities Projection of input dataset and current location appear to match Layer: 10m-populated-places Importing map 6599 features... *** buffer overflow detected ***: v.in.ogr terminated === Backtrace: = /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7057ed8] /lib/tls/i686/cmov/libc.so.6[0xb7056f10] /lib/tls/i686/cmov/libc.so.6[0xb7056869] /lib/tls/i686/cmov/libc.so.6(__snprintf_chk+0x34)[0xb7056754] /usr/lib/libgdal1.5.0.so.1(_ZN10OGRFeature16GetFieldAsStringEi+0x34e)[0xb74eb3be] /usr/lib/libgdal1.5.0.so.1(OGR_F_GetFieldAsString+0x28)[0xb74ec1c8] v.in.ogr(main+0x21e8)[0x804d9d8] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb6f8db56] v.in.ogr[0x804aab1] Does ogrinfo work on the data set? It looks a bike like https://bugs.launchpad.net/ubuntu/+source/libgdal-grass/+bug/308158 http://trac.osgeo.org/grass/ticket/402 to me. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: [GRASS-dev] New WinGrass-Installer (r40386)
On Thu, Jan 14, 2010 at 10:27 AM, Markus Metz markus.metz.gisw...@googlemail.com wrote: Hi, I tested the new installer, doesn't work for me because it can't access mapsets because access is not available: access: no such file or directory. There is also some encoding issue in wxGUI, I can't work on it because I can't start grass. I tried on Vista: no such problem any more with the new package from today (to be checked on XP). A minor issue is the default installation directory, it's GRASS-4-SVN, more appropriate would be GRASS-64-SVN. AFAIK solved in SVN. My self-compiled version on windows works so far without these problems, but I too get the bug reported here [1] http://lists.osgeo.org/pipermail/grass-windows/2010-January/001965.html [Define new location Location Wizard] Confirmed with latest online winGRASS package (tested on Vista). I have opened a new ticket for that, a blocker unfortunately since LatLong is too important. http://trac.osgeo.org/grass/ticket/877 It is around line 757 in gui_modules/location_wizard.py Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Python scripting and GRASS
Hi Sonja, On Thu, Jan 14, 2010 at 11:06 AM, Sonja Jankowfsky sonja.jankowf...@cemagref.fr wrote: Greetings, I have some questions concerning Python scripting for GRASS under windows. [I don't have much experience on Windows] I'm relatively new to GRASS, and I'm neither familiar with Python nor UNIX (but I have some programming experience, C++, Java). I have six months, in which I have to work on the preprocessing of a hydrologic model with GRASS. For that it will be necessary to write some scripts. The idea was to use Python for this, as it is platform independent and more powerfull than UNIX You mean Shell script: yes, that's right that Python offers way more than shell scripting. Due to that all shell scripts in GRASS 7 have been rewritten to Python (they are a good resource to learn how to do it). (I'm working on windows as the model only runs on windows) . However, I have some problems getting started and all what I found on the internet was quite confusing. In case that GRASS sources are involved, please indicate how to improve them. We are always happy about detailed feedback. I would appreciate all advice concerning the following questions: Which compiler is usually used for Python scripting with GRASS? Is there a standard way? Python does not require any compiler. You just need Python installed (Python 2.x, not 3.x). Is it possible to do the scripting inside GRASS? Right. See http://grass.osgeo.org/wiki/GRASS_and_Python http://grass.osgeo.org/wiki/Using_Eclipse_to_develop_GRASS_Python_programs Can I use SWIG? Do I have to install it extra, or is there an integrated version? SWIG is an extra software which generates extra Python bindings. You do not necessarily need it for GRASS-Python programming, it depends on the level of integration you want to achieve between your model and GRASS. I found a description how to configure Eclipse for python and GRASS, but up to now I get some Attribut errors while compiling the simple test code (I think there are still some problems with the environment variables). You will need to post the errors to let us better understand the problem. Can I run python scripts with MySYS? I think so (Python needs to be installed). Can I access to all the GRASS functions with Python? In general yes, but there are different levels of doing so. Please see the Python in GRASS 7 for inspiration: http://svn.osgeo.org/grass/grass/trunk/scripts/ (or your download GRASS 7 source code). Is it usefull to use IDLE? Perhaps some GRASS-Python developer can comment: http://en.wikipedia.org/wiki/IDLE_(Python) I would say: personal taste: try and decide... Is the GRASS plugin for QGIS written in Python? No, it is in C++: https://svn.osgeo.org/qgis/branches/Release-1_4_0/src/plugins/grass/ Or is it just easier to write the scripts in UNIX? (you mean Unix shell) Maybe slightly easier but Python offers way more. So better to invest in Python. Is it possible to execute the UNIX scripts with MySYS under windows? Very limited only. So better Python Best Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Python scripting and GRASS
Markus Neteler wrote: Can I use SWIG? Do I have to install it extra, or is there an integrated version? SWIG is an extra software which generates extra Python bindings. You do not necessarily need it for GRASS-Python programming, it depends on the level of integration you want to achieve between your model and GRASS. Also, the current SWIG bindings should be considered experimental, and likely to change. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user