[GRASS-user] Re: v.buffer problem (bug?)

2011-03-25 Thread leonidas
I'm trying to upgrade to GRASS 6.4.1RC2 following the instructions at
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable?field.series_filter=lucid
But grass --version command reports that the version is GRASS GIS 6.4.0
Did I make any mistake?


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/v-buffer-problem-bug-tp6199121p6209279.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


Re: [GRASS-user] Managing the Harmonized World Soil Database in GRASS

2011-03-25 Thread Luigi Ponti

On 25/03/2011 11:44, Sylvain Maillard wrote:

Hi,

some month ago I had to make some maps with the HWSD database. I used 
the mdbtool (http://mdbtools.sourceforge.net/) to extract all tables 
from the .mdb file to some sql files. Then I just imported all the 
table in a postgres database, and it is quite easy to access them in 
GRASS ...



Regards,
Sylvain


Hi Sylvain,

Thanks for your answer. I see your point.

After exporting the .mdb to PostgreSQL you can db.connect to it from the 
GRASS mapset where the HWSD soil map is. However, I do not see how you 
can then get the data on the map, given that a database links to a 
vector whereas the HWSD map is a raster. How did you map the connected 
database?


It would be nice if you could share a bit more of your experience with 
mapping HWSD data.


Kind regards and thank you,

Luigi





2011/3/24 Luigi Ponti mailto:lpo...@inbox.com>>

Dear listers,

I seem to have successfully imported the Harmonized World Soil
Database (HWSD) in BIL format to GRASS 6.4.svn via r.in.gdal. The
data is available at

http://www.iiasa.ac.at/Research/LUC/luc07/External-World-soil-database/HTML/index.html

The HWSD is composed of a raster image file and a linked attribute
database stored in Microsoft Access 2003 format. According to the
documentation (page 28)

http://www.iiasa.ac.at/Research/LUC/External-World-soil-database/HWSD_Documentation.pdf

using the HWSD database in a GIS should be straightforward. The
MU_GLOBAL attribute column in the database is also stored in each
raster cell, and may therefore be considered as the link to the
raster.

My goal would be to obtain more raster maps that show other (soil)
attributes from the database or combination of different
attributes based on computations. The documentation suggests the
following work flow:

- if necessary, realize the appropriate calculations (ex: after
exporting from Access to Excel);
- convert final attributes table to a compatible GIS format;
- join the MU_GLOBAL attribute and the GRID value (dbf or txt
formats);
- convert the attribute to a new GRID (in the case it is needed).

What comes to mind is value replacement using r.recode but maybe
there is a better course of action.

This is seemingly the best available soil GIS database with global
coverage, so I thought my question may be useful to others.

Kind regards and thanks in advance for any hint,

Luigi
___
grass-user mailing list
grass-user@lists.osgeo.org 
http://lists.osgeo.org/mailman/listinfo/grass-user




___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.sun - run script

2011-03-25 Thread Eli Adam
Markus,

 Thanks for clarifying and I find the GRASS wiki very helpful due to the 
efforts people have made to accumulate vast useful information there.

Thanks, Eli


>>> Markus Neteler  03/25/11 2:32 AM >>>
On Fri, Mar 25, 2011 at 6:35 AM, Eli Adam  wrote:
>>Consider to post such output as text here for example (easier to read):
>>http://osgeo.pastebin.com/
>
> I agree that screenshots of text are not as helpful as they could be.

I'd say that screenshots are useful for maps.

> I have been wanting to ask a question about pastebins for a variety of OSGeo 
> mail lists and this is at least a great opportunity for GRASS (perhaps we 
> should move to discuss?).  Are they preferable to putting it in the email 
> since it is 'too' much for an email?  I understand how you may want to 
> pastebin python or something else very sensitive to spacing, however, I also 
> thought that one of the main points of the mailing list was posterity and 
> helping other users by search.  If all the relevant information is contained 
> in an ephemeral pasetbin, searching is much less helpful.
>
> When should something be contained in an email?
>
> When should something be put in a pastebin?

Suggestions (fairly straightforward):

* email: for discussions (can include and small (!) snippets, put long
  snippets into pastebin for nice syntax highlighting)

* GRASS Wiki to create permanent documentation (e.g. summary of discussions
  in list, nice approaches etc) including code (there is also syntax
highlighting
  possible)

* pastebin is only a temporary container for discussions, not for permanment
  storage. Likewise summaries to the email list are way less useful than adding
  them to the Wiki where they can be further continued.

Makes sense?

Markus

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Region definition

2011-03-25 Thread Luisa Peña
Greetings

I have a raster map with a size like 25000 x 3 with valid values on all
its extent. With another raster, I defined a sub-extent of this raster, much
smaller where only a small area is valid and the rest it NULL() like this:
r.mapcalc output = if(regional_area@PERMANENT>0,2004@Reg,null())
In this case, regional_area is a smaller area and I want to select only a
portion of 2004@Reg that falls inside regional_area.
So I obtained output as a raster map with only some values (4000x3000)
If I define g.region rast=output I still obtain a 25000 x3 region which
does not make sense since I only have a small valid area.
How can I define a region, using g.region for only output valid pixels?

Thanks
Luisa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread William Kyngesburye
On Mar 25, 2011, at 8:32 AM, Glynn Clements wrote:

> 
> Johannes Radinger wrote:
> 
>> I opend the script with text wrangler and there were indeed
>> mac line endings. So I saved it with unix line endings and
>> now it seems to work. Maybe GRASS should be able to handle 
>> line endings from various platforms if that is possible...
> 
> 1. The terminator for the #! line must be a bare LF character ('\n',
> '\x0a', decimal 10). This is dealt with by the OS; there isn't
> anything that GRASS can do about it. The interpreter for a script is
> everything following the #! up to the first LF.
> 
> 2. The MacOS X line terminator is LF, the same as Unix. MacOS 9 and
> earlier used CR ('\r', '\x0d', decimal 13). This is one of the many
> things which changed between MacOS 9 and MacOS X.
> 
> 3. Supporting bare CR characters as line terminators is awkward, as
> the code cannot use standard library functions such as fgets(). 
> Supporting CRLF (DOS/Windows format) is somewhat easier, as fgets()
> treats the LF as a line break, and the trailing CR is considered
> whitespace by most C functions (scanf, isspace, etc).
> 
> 4. On platforms where CR is the native line terminator, opening the
> file in "text" mode deals with this. But that doesn't apply to MacOS
> X, where the native line terminator is LF (see #2).
> 

5. And, it's the Python interpreter that handles this, not GRASS.  Though I 
guess it also depends how you run it.  If you run it with just the script name, 
the shell needs to find the #! before it passes it off to Python, so it might 
need the unix LF (and this is also not GRASS, but the shell).  If you run the 
script from Python, 'python yourscript.py', then Python handles the script file 
completely.  I thought Python did handle all line endings, but I may be wrong.


-
William Kyngesburye 
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion 
caused by the passage of history."

- Hitchhiker's Guide to the Galaxy


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Using r.buffer on image with geographic coordinates

2011-03-25 Thread Ned Horning
Hi - I am trying to create buffers for large (~1GB) line and polygon 
vector files. I tried v.buffer but after letting it run overnight with 
no apparent progress I killed the process. I'm not aware of any software 
capable of buffering large vector files on a modest computer so that 
wasn't a big surprise. I then converted the vector to a large (23GB) 
raster file and am now trying r.buffer. I ran some tests on small images 
but can't figure out how the distance parameter works when an image has 
latitude/longitude coordinates. My image is in a geographic 
(latitude/longitude) projection with a resolution of 0.00025 (~27.75m) 
and I'd like to create a buffer with a distance of 0.0018 (~200m). How 
to I do that without projecting my image? I'm using GRASS 7.0 on 64 bit 
Ubuntu 10.04.


The manual seems to indicate that I can choose the distance units so I 
tried distances=200.0 and units=meters but that converted the entire 
image to a buffer so the distance was clearly too large. I then tried 
distances =0.0018 (the manual states that r.buffer uses "ellipsoidal 
geodesic distance measure for latitude/longitude locations) and 
units=meters but that didn't create any buffer. My last test was to use 
the number of pixels to define the distance so I tried distances =7.2 
and units=meters and that created a buffer roughly one pixel wide.


Any thoughts on how to buffer a large vector or raster data set would be 
appreciated.


All the best,

Ned
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread Glynn Clements

Johannes Radinger wrote:

> I opend the script with text wrangler and there were indeed
> mac line endings. So I saved it with unix line endings and
> now it seems to work. Maybe GRASS should be able to handle 
> line endings from various platforms if that is possible...

1. The terminator for the #! line must be a bare LF character ('\n',
'\x0a', decimal 10). This is dealt with by the OS; there isn't
anything that GRASS can do about it. The interpreter for a script is
everything following the #! up to the first LF.

2. The MacOS X line terminator is LF, the same as Unix. MacOS 9 and
earlier used CR ('\r', '\x0d', decimal 13). This is one of the many
things which changed between MacOS 9 and MacOS X.

3. Supporting bare CR characters as line terminators is awkward, as
the code cannot use standard library functions such as fgets(). 
Supporting CRLF (DOS/Windows format) is somewhat easier, as fgets()
treats the LF as a line break, and the trailing CR is considered
whitespace by most C functions (scanf, isspace, etc).

4. On platforms where CR is the native line terminator, opening the
file in "text" mode deals with this. But that doesn't apply to MacOS
X, where the native line terminator is LF (see #2).

-- 
Glynn Clements 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread Johannes Radinger
Hello GRASS-people!!

I face a problem when I try to run mapcalculator in a pyhton script.

I attached a sample test script which i tried on the subset of the spearfish 
data set (http://grass.fbk.eu/sampledata/north_carolina/nc_basic_spm.tar.gz)

I just tried to multiply geology * elevation (just to try, in reality this 
wouldn't make sense, I know) and a new map should be created...but I fail and 
nothing is created. But the script itself can be loaded and I get to the 
interactive menu to choose the maps I want to process.

Is the script working on your GRASS? what is wrong with the script syntax?

cheers
/johannes


 Original-Nachricht 
> Datum: Fri, 25 Mar 2011 12:45:18 +0100
> Von: "Johannes Radinger" 
> An: Nick Cahill , grass-user@lists.osgeo.org
> Betreff: Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

> Thank you nick for the tipp with the line breaks!
> 
> I opend the script with text wrangler and there were indeed
> mac line endings. So I saved it with unix line endings and
> now it seems to work. Maybe GRASS should be able to handle 
> line endings from various platforms if that is possible...
> 
> Now I get the menu for setting input and output for the script
> after launching it...seems to work...anyway I have to play around
> because no output is created at the moment from my script...hmmm?
> 
> /johannes
> 
> 
>  Original-Nachricht 
> > Datum: Wed, 23 Mar 2011 05:06:51 -0500
> > Von: Nick Cahill 
> > An: GRASS user list 
> > Betreff: Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)
> 
> > 
> > 
> > I haven't run python scripts from within GRASS, but have found that they
> > won't run if the line breaks are not unix line breaks, rather than Mac
> or
> > Windows - which you'll get if you write the script in some applications.
> > 
> > BBEdit is a very good editor on the Mac and will run python scripts
> within
> > the editor. I think there's a free version too - text wrangler. 
> > 
> > Nick Cahill
> > 
> > 
> > On Mar 23, 2011, at 2:29 AM, Johannes Radinger wrote:
> > 
> > > 
> > > Am 23.03.2011 um 05:22 schrieb Glynn Clements:
> > > 
> > >> 
> > >> Johannes Radinger wrote:
> > >> 
> > >>> I'd like to run a python script on my GRASS6.5 on MacOS.
> > >>> 
> > >>> I saved a *.py script for testing with following content on my
> > desktop:
> > >> 
> > >>> All the needed files (upstream_part, shreve) are existing in the
> > >>> location and mapset that is open. Then I tried to execute
> > >>> File-->Launch Script and choose it. Then I just get back:
> > >>> 
> > >>> Launching script '/Users/Johannes
> Radinger/Desktop/mapcalc-test.py'...
> >  
> > >>> (Tue Mar 22 10:57:15 2011)  
>  
> >  
> > >>> /Users/Johannes Radinger/Desktop/mapcalc-test.py
>  
> >  
> > >>> (Tue Mar 22 10:57:15 2011) Command finished (0 sec)
> > >>> 
> > >>> and nothing happend and no map was created...
> > >>> 
> > >>> what is wrong with my script?
> > >> 
> > >> Does the script have execute permission ("chmod +x ...")?
> > > 
> > > The script has execute permission so far as I think, but anyway I ran
> > chmod +x on the file...
> > > 
> > >> 
> > >> Does MacOSX have the Python interpreter at /usr/bin/python?
> > >> 
> > >> It's common practice for Python scripts to use:
> > >> 
> > >>  #!/usr/bin/env python
> > > 
> > > my first script included #!/usr/bin/env python, but it failed (error
> > message) it couldn't find python, thats why I googled  and found:
> > http://macosx.com/forums/unix-x11/46163-how-do-i-run-python-script.html
> > > that is why i used /usr/bin/python.
> > > 
> > > I just got the tip in forum to check for the line-endings in the file,
> > they might cause the problem, so I will check that.
> > > 
> > > But anyway, is there any other possible reason why I fail?
> > > Is there any Mac-User with Python-Script-Mapcalc experience?
> > > 
> > > 
> > >> 
> > >> which only requires that "python" is somewhere in $PATH, rather than
> > >> assuming a fixed location. The Python scripts in 7.0 use this
> > >> mechanism.
> > >> 
> > >> -- 
> > >> Glynn Clements 
> > > 
> > > 
> > > ___
> > > grass-user mailing list
> > > grass-user@lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/grass-user
> > 
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> -- 
> NEU: FreePhone - kostenlos mobil telefonieren und surfen! 
> Jetzt informieren: http://www.gmx.net/de/go/freephone
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

-- 
Ihr GMX Postfach immer dabei: die kostenlose GMX Mail App für Android.
Komfortabel, sicher und schnell: www.gmx.de/android
#!/usr/bin/env python
#
##

Re: [GRASS-user] Managing the Harmonized World Soil Database in GRASS

2011-03-25 Thread Rich Shepard

On Fri, 25 Mar 2011, Luigi Ponti wrote:


There is a driver apparently more advanced than the OpenOffice.org one,
which I haven't tried yet:
http://www.kexi-project.org/wiki/wikiview/index@mdbdriver.html


Luigi,

  How interesting! I use OO.o to translate .doc to .odt and .xls to ods, but
it has not occurred to me to try it with a .mdb file. I suppose that is
because almost all my writing is done in LyX/LaTeX and I have little need
for spreadsheets so I don't use OO.o unless I must.

Thank you for the idea and URL,

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread Johannes Radinger
Thank you nick for the tipp with the line breaks!

I opend the script with text wrangler and there were indeed
mac line endings. So I saved it with unix line endings and
now it seems to work. Maybe GRASS should be able to handle 
line endings from various platforms if that is possible...

Now I get the menu for setting input and output for the script
after launching it...seems to work...anyway I have to play around
because no output is created at the moment from my script...hmmm?

/johannes


 Original-Nachricht 
> Datum: Wed, 23 Mar 2011 05:06:51 -0500
> Von: Nick Cahill 
> An: GRASS user list 
> Betreff: Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

> 
> 
> I haven't run python scripts from within GRASS, but have found that they
> won't run if the line breaks are not unix line breaks, rather than Mac or
> Windows - which you'll get if you write the script in some applications. 
> 
> BBEdit is a very good editor on the Mac and will run python scripts within
> the editor. I think there's a free version too - text wrangler. 
> 
> Nick Cahill
> 
> 
> On Mar 23, 2011, at 2:29 AM, Johannes Radinger wrote:
> 
> > 
> > Am 23.03.2011 um 05:22 schrieb Glynn Clements:
> > 
> >> 
> >> Johannes Radinger wrote:
> >> 
> >>> I'd like to run a python script on my GRASS6.5 on MacOS.
> >>> 
> >>> I saved a *.py script for testing with following content on my
> desktop:
> >> 
> >>> All the needed files (upstream_part, shreve) are existing in the
> >>> location and mapset that is open. Then I tried to execute
> >>> File-->Launch Script and choose it. Then I just get back:
> >>> 
> >>> Launching script '/Users/Johannes Radinger/Desktop/mapcalc-test.py'...
>  
> >>> (Tue Mar 22 10:57:15 2011)
>  
> >>> /Users/Johannes Radinger/Desktop/mapcalc-test.py  
>  
> >>> (Tue Mar 22 10:57:15 2011) Command finished (0 sec)
> >>> 
> >>> and nothing happend and no map was created...
> >>> 
> >>> what is wrong with my script?
> >> 
> >> Does the script have execute permission ("chmod +x ...")?
> > 
> > The script has execute permission so far as I think, but anyway I ran
> chmod +x on the file...
> > 
> >> 
> >> Does MacOSX have the Python interpreter at /usr/bin/python?
> >> 
> >> It's common practice for Python scripts to use:
> >> 
> >>#!/usr/bin/env python
> > 
> > my first script included #!/usr/bin/env python, but it failed (error
> message) it couldn't find python, thats why I googled  and found:
> http://macosx.com/forums/unix-x11/46163-how-do-i-run-python-script.html
> > that is why i used /usr/bin/python.
> > 
> > I just got the tip in forum to check for the line-endings in the file,
> they might cause the problem, so I will check that.
> > 
> > But anyway, is there any other possible reason why I fail?
> > Is there any Mac-User with Python-Script-Mapcalc experience?
> > 
> > 
> >> 
> >> which only requires that "python" is somewhere in $PATH, rather than
> >> assuming a fixed location. The Python scripts in 7.0 use this
> >> mechanism.
> >> 
> >> -- 
> >> Glynn Clements 
> > 
> > 
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Managing the Harmonized World Soil Database in GRASS

2011-03-25 Thread Sylvain Maillard
Hi,

some month ago I had to make some maps with the HWSD database. I used the
mdbtool (http://mdbtools.sourceforge.net/) to extract all tables from the
.mdb file to some sql files. Then I just imported all the table in a
postgres database, and it is quite easy to access them in GRASS ...


Regards,
Sylvain


2011/3/24 Luigi Ponti 

> Dear listers,
>
> I seem to have successfully imported the Harmonized World Soil Database
> (HWSD) in BIL format to GRASS 6.4.svn via r.in.gdal. The data is available
> at
>
> http://www.iiasa.ac.at/Research/LUC/luc07/External-World-soil-database/HTML/index.html
>
> The HWSD is composed of a raster image file and a linked attribute database
> stored in Microsoft Access 2003 format. According to the documentation (page
> 28)
>
> http://www.iiasa.ac.at/Research/LUC/External-World-soil-database/HWSD_Documentation.pdf
>
> using the HWSD database in a GIS should be straightforward. The MU_GLOBAL
> attribute column in the database is also stored in each raster cell, and may
> therefore be considered as the link to the raster.
>
> My goal would be to obtain more raster maps that show other (soil)
> attributes from the database or combination of different attributes based on
> computations. The documentation suggests the following work flow:
>
> - if necessary, realize the appropriate calculations (ex: after exporting
> from Access to Excel);
> - convert final attributes table to a compatible GIS format;
> - join the MU_GLOBAL attribute and the GRID value (dbf or txt formats);
> - convert the attribute to a new GRID (in the case it is needed).
>
> What comes to mind is value replacement using r.recode but maybe there is a
> better course of action.
>
> This is seemingly the best available soil GIS database with global
> coverage, so I thought my question may be useful to others.
>
> Kind regards and thanks in advance for any hint,
>
> Luigi
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Managing the Harmonized World Soil Database in GRASS

2011-03-25 Thread Luigi Ponti

Dear Rich,
> The HWSD is composed of a raster image file and a linked attribute database 
> stored in Microsoft Access 2003 format.



   It would be nice if the attributes were made available in a format using
open standards. That would make it available to those of us who don't do
windows.

Rich
  


You are right.

There is a driver apparently more advanced than the OpenOffice.org one, 
which I haven't tried yet:

http://www.kexi-project.org/wiki/wikiview/index@mdbdriver.html

I have inquired the data provider about the issue, and will let the list 
know.


Kind regards,

Luigi
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: Import Interlis format

2011-03-25 Thread Andreas Neumann

Hi Patrick,

You are right - there are currently only simple feature/non topological 
formats available in OGR/QGIS and others. GRASS is an exception and I 
believe that OGR can read old ArcInfo coverages (also a topological 
format). I just don't know any solution currently.


The problem with Interlis is the bad performance. Parsing the model and 
polygonizing each time you open a project will always be slower. That's 
why I suggested the conversion to a different format. Interlis is 
designed as an exchange format, not a production database. I don't know 
any GIS (neither commercial or Open Source) that can read/write/edit 
directly off of Interlis data. Usually there are only import and 
exports.


Sorry that I don't have a better answer,
Andreas



On Fri, 25 Mar 2011 09:53:55 +0100, Patrick S. wrote:

Thanks Andreas,

But it just doesn't seem a right approach to me to convert a
topological format into a simple feature format to import it to 
GRASS.

I am speaking of some 300.000 polygons of buildings and X00.
parcels, which created a lot of topological problems when I imported
from shapefiles. That's why I did ask the dataowner for the INTERLIS
format.

Isn't there any other solution or exchange format that is 
topological?



Regards, Patrick


P.S. sorry for the late answer- but I was off for 2 Weeks



On 03/12/2011 12:28 AM, grass-user-requ...@lists.osgeo.org wrote:

Message: 9
Date: Fri, 11 Mar 2011 21:39:20 +0100
From: Andreas Neumann
Subject: Re: [GRASS-user] interlis import
To:grass-user@lists.osgeo.org
Message-ID:<4d7a8878.6050...@carto.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Patrick,

I wouldn't try to open Interlis files directly in GRASS. You are 
better

off converting them to an intermediate format or database, e.g.
spatialite, PostgreSQL, GML, etc. and work from there.

If you open the files directly, performance will be bad.

btw: Interlis consists of two files:
1. .ili file (contains the data model: topics, tables, columns, data
types, domain lists, etc.)
2. .itf file (the raw data: geometry and attribute data).  - itf 
means

"interlis transfer format"

You always need both files.

Here are one or two examples:http://gis.hsr.ch/wiki/HowTo_OGR2OGR

Good luck,
Andreas

On 3/11/11 8:00 PM, Patrick S. wrote:

>  Dear List,
>
>  does someone have experience in importing the topological format
>  INTERLIS to GRASS?
>  It seems to need an .ili file, that will define polygons, lines 
and
>  points, but I don't see how to integrate this one in the 
v.in.ogr

>  command.
>
>  I managed to use ogr2ogr and tested conversion to shapefile. 
This one

>  uses the java interpreter ili2c.jar. (see:
>  http://www.gdal.org/ogr/drv_ili.html). It will only work if the 
.ili

>  is intergrated as in the command:
>
>  ogr2ogr -f "ESRI Shapefile" shpdir
>  /home/order/filename.itf,/home/order/description.ili
>
>  When I import the .itf to GRASS it will only create lines 
instead of
>  areas. Same result for conversion with ogr2ogr mentioned above 
when

>  the .ili is not integrated.
>
>  Any Feedback would be helpful.
>
>  Patrick
>
>  P.S. Testfiles can be foundhttp://www.interlis.ch/
>  ___
>  grass-user mailing list
>  grass-user@lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/grass-user


--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.sun - run script

2011-03-25 Thread Markus Neteler
On Fri, Mar 25, 2011 at 6:35 AM, Eli Adam  wrote:
>>Consider to post such output as text here for example (easier to read):
>>http://osgeo.pastebin.com/
>
> I agree that screenshots of text are not as helpful as they could be.

I'd say that screenshots are useful for maps.

> I have been wanting to ask a question about pastebins for a variety of OSGeo 
> mail lists and this is at least a great opportunity for GRASS (perhaps we 
> should move to discuss?).  Are they preferable to putting it in the email 
> since it is 'too' much for an email?  I understand how you may want to 
> pastebin python or something else very sensitive to spacing, however, I also 
> thought that one of the main points of the mailing list was posterity and 
> helping other users by search.  If all the relevant information is contained 
> in an ephemeral pasetbin, searching is much less helpful.
>
> When should something be contained in an email?
>
> When should something be put in a pastebin?

Suggestions (fairly straightforward):

* email: for discussions (can include and small (!) snippets, put long
  snippets into pastebin for nice syntax highlighting)

* GRASS Wiki to create permanent documentation (e.g. summary of discussions
  in list, nice approaches etc) including code (there is also syntax
highlighting
  possible)

* pastebin is only a temporary container for discussions, not for permanment
  storage. Likewise summaries to the email list are way less useful than adding
  them to the Wiki where they can be further continued.

Makes sense?

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: Import Interlis format

2011-03-25 Thread Patrick S.

Thanks Andreas,

But it just doesn't seem a right approach to me to convert a topological 
format into a simple feature format to import it to GRASS. I am speaking 
of some 300.000 polygons of buildings and X00. parcels, which 
created a lot of topological problems when I imported from shapefiles. 
That's why I did ask the dataowner for the INTERLIS format.


Isn't there any other solution or exchange format that is topological?


Regards, Patrick


P.S. sorry for the late answer- but I was off for 2 Weeks



On 03/12/2011 12:28 AM, grass-user-requ...@lists.osgeo.org wrote:

Message: 9
Date: Fri, 11 Mar 2011 21:39:20 +0100
From: Andreas Neumann
Subject: Re: [GRASS-user] interlis import
To:grass-user@lists.osgeo.org
Message-ID:<4d7a8878.6050...@carto.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Patrick,

I wouldn't try to open Interlis files directly in GRASS. You are better
off converting them to an intermediate format or database, e.g.
spatialite, PostgreSQL, GML, etc. and work from there.

If you open the files directly, performance will be bad.

btw: Interlis consists of two files:
1. .ili file (contains the data model: topics, tables, columns, data
types, domain lists, etc.)
2. .itf file (the raw data: geometry and attribute data).  - itf means
"interlis transfer format"

You always need both files.

Here are one or two examples:http://gis.hsr.ch/wiki/HowTo_OGR2OGR

Good luck,
Andreas

On 3/11/11 8:00 PM, Patrick S. wrote:

>  Dear List,
>
>  does someone have experience in importing the topological format
>  INTERLIS to GRASS?
>  It seems to need an .ili file, that will define polygons, lines and
>  points, but I don't see how to integrate this one in the v.in.ogr
>  command.
>
>  I managed to use ogr2ogr and tested conversion to shapefile. This one
>  uses the java interpreter ili2c.jar. (see:
>  http://www.gdal.org/ogr/drv_ili.html). It will only work if the .ili
>  is intergrated as in the command:
>
>  ogr2ogr -f "ESRI Shapefile" shpdir
>  /home/order/filename.itf,/home/order/description.ili
>
>  When I import the .itf to GRASS it will only create lines instead of
>  areas. Same result for conversion with ogr2ogr mentioned above when
>  the .ili is not integrated.
>
>  Any Feedback would be helpful.
>
>  Patrick
>
>  P.S. Testfiles can be foundhttp://www.interlis.ch/
>  ___
>  grass-user mailing list
>  grass-user@lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/grass-user


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.rescale - float instead of integer?

2011-03-25 Thread Markus Neteler
On Thu, Mar 24, 2011 at 6:07 PM, Glynn Clements
 wrote:
>
> Johannes Radinger wrote:
>
>> I think r.mapcalc is probably the best solution, but as I don't know the 
>> maximum
>> value in every case (I've to process several maps), I wanted to automatize.
>> Probably I've to write a script to read the max value and parse it to the 
>> mapcalc function.
>> My problem: First, I don't know how to do that, Second there is this 
>> python-script issue
>> on my mac (see other thread)...
>
> "r.info -r ..." will output the minimum and maximum values.
>
> For a shell script, you can use e.g.:
>
>        eval `r.info -r $inmap`
>        r.mapcalc "$outmap = float($inmap) / $max"

Added here:
http://grass.osgeo.org/wiki/GRASS_and_Shell#Using_output_from_GRASS_modules_in_the_script

> For a Python script, you can use grass.script.raster_info(), e.g.:
>
>        import grass.script as grass
>
>        max = grass.raster_info(inmap)['max']
>        grass.mapcalc("$outmap = $inmap / $max",
>                      inmap = inmap, outmap = outmap, max = max)

Added here:
http://grass.osgeo.org/wiki/GRASS_and_Python#Using_output_from_GRASS_modules_in_the_script

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] simple shell scrip example with parameters

2011-03-25 Thread Markus Neteler
Hi,

I have taken Daniel's example and own and added them to the
related Wiki page:

http://grass.osgeo.org/wiki/GRASS_and_Shell

Feel free to add more there.

Markus

On Wed, Mar 23, 2011 at 11:28 PM, Daniel Victoria
 wrote:
> Not sure this is the best way to do but, if you are using bash in
> linux, the variables $1 $2 and so on are the parameters you pass to
> the script. So, if you have a script called basin.sh and you type
>
> basin.sh -23 -47
>
> the variable $1 will be -23 and $2 will be -47...
>
> so in your script you could put
>
> r.water.outlet drainadge=your_map basin=basin_map easting=$2 northing=$1
>
> you could also pass a third parameter for the basin map name...
>
> Here is a good online tutorial for bash scripting
> http://www.linuxconfig.org/Bash_scripting_Tutorial
>
> Boa sorte
> Daniel
>
> On Tue, Mar 22, 2011 at 5:25 PM, Marcello Benigno
>  wrote:
>> Hi All,
>>
>> I need build one script shell for GRASS that receive two parameters (x and y
>> coordinates) and calculate the r.water.outlet to this point, but I'm newbie
>> in shell programming. Anyone have a example or link to show something
>> similar? In my tests I can run one simple script, without parameters, and
>> now thats the point.
>>
>> Thanks in advance,
>> --
>> Marcello Benigno B. de Barros Filho
>> Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
>> Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
>> http://profmarcello.blogspot.com
>> http://about.me/marcello.benigno
>>
>> ___
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user