Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Milton Cezar Ribeiro
Rich,

If your are using a resolution of ~5m, I suggest you adjust your region ~1m.
I think that the final result will not suffer so much changes. If so, may be
you can try finer resolution (4m?).

g.region n=1334420 s=1279150 w=769190 e=819255 res=5

good luck

milton



2010/1/27 Rich Shepard 

> On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote:
>
>  But g.region res=5 and g.region nsres=5 ewres=5 produce the same result?
>> I
>> never tryed.
>>
>
> Milton,
>
>  Yes. res is equal to setting both nsres and weres to the same values.
>
>
> Rich, another way is you use n= s= w= e= options, that may be will result
>> something like -a, I suppose.
>>
>
>  That changes the bounds. I don't want to do that other than the small
> increment necessary to get an integer resolution value.
>
>
> Rich
> ___
> 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] Problems Running r.flow

2010-01-27 Thread Rich Shepard

On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote:


But g.region res=5 and g.region nsres=5 ewres=5 produce the same result? I
never tryed.


Milton,

  Yes. res is equal to setting both nsres and weres to the same values.


Rich, another way is you use n= s= w= e= options, that may be will result
something like -a, I suppose.


  That changes the bounds. I don't want to do that other than the small
increment necessary to get an integer resolution value.

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


[GRASS-user] Re: [GRASS-dev] Re: GRASS to Numpy [was: Re: List of new features in GRASS 7 (in trac)]

2010-01-27 Thread Hamish
Timmie:
> Here is a example that I was trying out with Spearfish location:
> 
> ### PY ###
> 
> import scipy.io as sio
> elev = sio.loadmat('elev.mat')
> elev.get('map_data')
> data = elev.get('map_data')
> import pylab
> pylab.plot(data)
> pylab.show()
> 
> pylab.contour(data)
> pylab.contour(data.reverse())
> 
> import numpy as np
> 
> data_rev = data[::-1]
> pylab.contour(data_rev)
> # => this is a quick plot. basemap mapping may provide a
> nicer map!
> 
> 
> ###


neat. if you could add that (and whatever other tips you think are
useful) to the wiki site it would be really great:

http://grass.osgeo.org/wiki/GRASS_and_Python#Interfacing_with_NumPy



thanks,
Hamish



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


Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Milton Cezar Ribeiro
*Hum*
Interesting -a flag.

But g.region res=5 and g.region nsres=5 ewres=5 produce the same result? I
never tryed.

Rich, another way is you use n= s= w= e= options, that may be will result
something like -a, I suppose.

cheers

milton

2010/1/27 Rich Shepard 

> On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote:
>
> try g.region nsres=5 ewres=5, may be you can bypass this.
>>
>
> milton,
>
>  That's how I defined the resolution, but it was returned as slightly less
> for some reason. See:
>
> GRASS 6.4.0svn (Oregon):/usr4/grassbase > g.region res=5 -p
> projection: 99 (Lambert Conformal Conic)
> zone:   0
> datum:  nad83
> ellipsoid:  grs80
> north:  1334419.25160578
> south:  1279151.24118496
> west:   769192.9282895
> east:   819255.9236
>
> nsres:  4.99982001
> ewres:  4.99979979
> rows:   11054
> cols:   10013
> cells:  110683702
>
>
> Rich
> ___
> 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] Problems Running r.flow

2010-01-27 Thread Rich Shepard

On Thu, 28 Jan 2010, Markus Neteler wrote:


You have to set to the raster map first.


  That's what I do, Markus, when I start GRASS and when I change from the
10m resolution maps to the 5m resolution maps.

  What I _really_ need to figure out is why so many modules fail for me. I
cannot get proper output from r.flow, r.param.scale (using the example on
the bottom of that Web page), or the curve outputs from r.shade.aspect.
There must be something I'm not doing properly and I've yet to see what that
is.

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


Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Markus Neteler
On Thu, Jan 28, 2010 at 2:46 AM, Rich Shepard  wrote:
> On Thu, 28 Jan 2010, Markus Neteler wrote:
>
>> If you add -a to g.region, you obtain the desired resolution by
>> (automatically) a slightly enlarged region which make the pixels fit into
>> it properly.
>
> Markus,
>
>  Thank you. I'm still learning about the -a option and when to use it.
>
>  Perhaps this is why some output maps fail.

You have to set to the raster map first. If that has been generated without -a
then perhaps consider to re-do it. I personally dislike odd resolution values
like 4.99982001 which may introduce artifacts later (so, I am g.region -p
maniac to always keep an eye on these things).

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


Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Rich Shepard

On Thu, 28 Jan 2010, Markus Neteler wrote:


If you add -a to g.region, you obtain the desired resolution by
(automatically) a slightly enlarged region which make the pixels fit into
it properly.


Markus,

  Thank you. I'm still learning about the -a option and when to use it.

  Perhaps this is why some output maps fail.

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


Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Markus Neteler
On Thu, Jan 28, 2010 at 1:59 AM, Rich Shepard  wrote:
> On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote:
>
>> try g.region nsres=5 ewres=5, may be you can bypass this.
>
> milton,
>
>  That's how I defined the resolution, but it was returned as slightly less
> for some reason. See:
>
> GRASS 6.4.0svn (Oregon):/usr4/grassbase > g.region res=5 -p
> projection: 99 (Lambert Conformal Conic)
> zone:       0
> datum:      nad83
> ellipsoid:  grs80
> north:      1334419.25160578
> south:      1279151.24118496
> west:       769192.9282895
> east:       819255.9236
> nsres:      4.99982001
> ewres:      4.99979979

If you add -a to g.region, you obtain the desired resolution by
(automatically) a slightly enlarged region which make the pixels fit
into it properly.

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


Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Rich Shepard

On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote:


try g.region nsres=5 ewres=5, may be you can bypass this.


milton,

  That's how I defined the resolution, but it was returned as slightly less
for some reason. See:

GRASS 6.4.0svn (Oregon):/usr4/grassbase > g.region res=5 -p
projection: 99 (Lambert Conformal Conic)
zone:   0
datum:  nad83
ellipsoid:  grs80
north:  1334419.25160578
south:  1279151.24118496
west:   769192.9282895
east:   819255.9236
nsres:  4.99982001
ewres:  4.99979979
rows:   11054
cols:   10013
cells:  110683702

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


[GRASS-user] r.fillnulls with very large map

2010-01-27 Thread stephen sefick
As to a previous post I can't use r.fillnulls on the entire map- it
fails.  This is the unelegant method that I am going to try:

g.region n=570352.0 s=537854.2 w=1829041 e=1884039
r.fillnulls input=ft_bragg_lidar_2009 output=filled1
g.region n=570352.0 s=537854.2 w=1884039 e=1939037
r.fillnulls input=filled1 output=filled2
g.region n=570352.0 s=537854.2 w=1939037 e=1994035
r.fillnulls input=filled2 output=filled3
g.region n=570352.0 s=537854.2 w=1994035 e=2049033
r.fillnulls input=filled3 output=filled4
g.region n=537854.2 s=505356.5 w=1829041 e=1884039
r.fillnulls input=filled4 output=filled5
g.region n=537854.2 s=505356.5 w=1884039 e=1939037
r.fillnulls input=filled5 output=filled6
g.region n=537854.2 s=505356.5 w=1939037 e=1994035
r.fillnulls input=filled6 output=filled7


I am attempting to break the region up into smaller regions and then
iteratively fill in the  NULL value by using the last filled map as
the input to the next region.  Will this work?  The problem that I see
occurring is that the is not square so there are large empty regions
on the edges.  Thanks for any help.

-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

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


Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Milton Cezar Ribeiro
Hi Rich,

try g.region nsres=5 ewres=5, may be you can bypass this.

best regards

milton

2010/1/27 Rich Shepard 

>  In -6.4svn from last Friday's weekly snapshot.
>
>  After setting "g.region rast=aber5m" I tried running "r.flow elevin=aber5m
> aspin=aber5aspect flout=aberFlowline lgout=aberFlowlength" and ran into
> resolution problems:
>
> Reading input files: elevation
> ERROR: Elevation file's resolution differs from current region resolution
>
>  g.region -p reports:
>
> nsres:  4.99982001
> ewres:  4.99979979
>
>  g.region rast=aber5m -p reports:
>
> nsres:  4.99982001
> ewres:  4.99979979
>
>  I also get the same error message about the aspect map (derived from the
> elevation map) which has the same resolution as above.
>
>  Any ideas what's going on? More importantly, how do I get his module
> running here?
>
> Rich
> ___
> 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] Problems Running r.flow

2010-01-27 Thread Rich Shepard

  In -6.4svn from last Friday's weekly snapshot.

  After setting "g.region rast=aber5m" I tried running "r.flow elevin=aber5m
aspin=aber5aspect flout=aberFlowline lgout=aberFlowlength" and ran into
resolution problems:

Reading input files: elevation
ERROR: Elevation file's resolution differs from current region resolution

  g.region -p reports:

nsres:  4.99982001
ewres:  4.99979979

  g.region rast=aber5m -p reports:

nsres:  4.99982001
ewres:  4.99979979

  I also get the same error message about the aspect map (derived from the
elevation map) which has the same resolution as above.

  Any ideas what's going on? More importantly, how do I get his module
running here?

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


Re: [GRASS-user] Max length of sql_query in v.extract

2010-01-27 Thread Markus Neteler
On Wed, Jan 27, 2010 at 8:35 PM, Luigi Ponti  wrote:
> Hello,
>
> Is there a length limit to a "where" sql statement fed to v.extract?
>
> I am getting an
> ...
> Error in db_open_select_cursor()
> ...
> in the middle of a very long query.

Could you please try to analyse with
 g.gisenv set=DEBUG=3
to identify when it gets lost? And perhaps provide an example
based on the Spearfish or North Carolina data sets?

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


[GRASS-user] Call for Workshops and Tutorials - FOSS4G 2010, Barcelona, Spain (Sept 6-9)

2010-01-27 Thread Markus Neteler
Barcelona, Spain. 15 January 2010.

The Free and Open Source Software for Geospatial (FOSS4G) conference
is pleased to announce a Call for Workshops and Tutorials for the 2010
conference, being held September 6-9, 2010, in Barcelona, Spain.

FOSS4G is the international "gathering of tribes" for open source
geospatial communities. Users and developers are encouraged to present
their latest projects and software to demonstrate the power of Open
Source for system integration through a series of workshop sessions
and tutorial presentations. Session participants should expect to see
presentations on both geospatial open source and propriety software
integration along with pure open source solutions.


Workshops


Workshops are expected to be 3 hour hands-on experiences with
participants following along with the instructor, working directly
with the application under discussion. All workshop rooms will be
equipped with computers to support this vision. A projector will be
provided for each computer room for use within a workshop. Instructors
will need to discuss pre-installation requirements with the Conference
Organising Committee if required.

Workshops are expected to require considerable effort to create, with
past experience showing that three days of preparation per hour of
presentation are required to produce a high quality workshop.
Additionally you will be expected to develop material for attendees to
take home with them, such as handouts, workbook, CD-ROMs, etc. Due to
the effort involved in producing and presenting a workshop,
instructors will receive a single complementary registration to the
conference for delivering a workshop.

All workshop submissions will be considered, but particular interest
will be shown in:

 * Practical Introduction to FOSS4G software
 * Integrating Open Source
 * Spatial Data Infrastructure


Tutorials


Tutorials are 90 minute sessions during the regular presentations
portion of the conference. Tutorial rooms will not be equipped with
computers. However, presenters may make use of delegate laptops and
the FOSS4G LiveDVD.

Preference will be given to hands-on tutorials.

Any hands-on aspects to a tutorial will be the responsibility of the
presenter and needs to be described in the tutorial description.
Presenters making use of the LiveDVD will be expected to contribute to
testing pre-releases to ensure material and software is properly
installed. To discuss your requirements for LiveDVD, please contact
the LiveDVD community:
http://wiki.osgeo.org/wiki/Live_GIS_Disc#Contact_Us.

All tutorial submissions will be considered, but particular interest
will be shown in the following topics:

 * Practical Introductions
 * Interoperability
 * Integration
 * Performance tuning
 * SDI services
 * Mobile/phone applications


Application form
---

Follow this link to submit your proposals:
http://intranet.pacifico-meetings.com:8081/abscoweb/Inicio.iface?id=14
Please add a 300 word abstract, in plain text format (pasting a text
with style markup could make the process fail).

The deadline for workshop / tutorial submissions is January 30.


FOSS4G 2010 Highlights


Workshops and Tutorials: Workshops and Tutorials allow presenters to
lead attendees through applications, integration solutions, or other
topics in an interactive environment. Half-day workshops (3 hours)
will be held in computer rooms on September 6 (afternoon session) and
7 (morning session). Tutorials (90 minutes) will be held in standard
presentation rooms, run concurrently with presentations on 7-9
September.

Presentations: The meat of the conference are it's presentations.
Drawing on a huge community of local, regional and international
experts we will discuss some of the most current and poignant topics
in the industry today.

Academic Track: The academic sessions, with paper publications and
poster presentations, aims at bringing together researchers,
developers, users and practitioners carrying out research and
development in the geospatial and the free and open source fields and
willing to share original and recent research developments and
experiences. The academic track will act as an inventory of current
research topics, with the main objective of promoting cooperative
research between OSGeo developers and the academia.

FOSS4G Live DVD: LiveDVDs, based on the Xubuntu operating system and
including Geospatial Open Source Software, will be given to all
delegates. Users can boot a Live DVD on their computer and trial the
software without installing or effecting the existing system.
http://wiki.osgeo.org/wiki/Live_GIS_Disc

Installfest: The Installfest will give delegates the opportunity to
meet in a common area and install a wide variety of FOSS software on
their laptops, netbooks or any other system they care to bring in.
Community members will assist with any troubles and provide help and
insight into the software.

Birds of a Fe

Re: [GRASS-user] Which version to start working

2010-01-27 Thread Markus Neteler
On Wed, Jan 27, 2010 at 6:18 PM, Luisa Peña  wrote:
> Greetings
> I've been browsing around GRASS website and GRASS wikis and I pretend to
> start working on GRASS in a LINUX system. Besides normal GRASS operations I
> also want to develop a few modules/scripts that I will probably need.
> What I want to know is from which version should I start? 6.4, 6.5 or 7?

If you want to use the scripts in production, use 6.4. This version
will be supported
for long; things can radically change in 7 without announcement (since it is
a development version).
But to be ready for GRASS 7 in future, consider to write them in Python,
not in Shell script.

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


[GRASS-user] Max length of sql_query in v.extract

2010-01-27 Thread Luigi Ponti

Hello,

Is there a length limit to a "where" sql statement fed to v.extract?

I am getting an
...
Error in db_open_select_cursor()
...
in the middle of a very long query.

Thanks for any hints,

Luigi

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


Re: [GRASS-user] r.shaded.relief question

2010-01-27 Thread Rich Shepard

On Wed, 27 Jan 2010, Rich Shepard wrote:


 On the shaded relief map, the drainage basin head appears as flat as the
confluence area.


  Fixed this, too. r.shaded.relief needed the zmult set higher than 1. '5'
does very nicely.

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


[GRASS-user] Re: Location installation in svn6.4.0

2010-01-27 Thread António Rocha

Pedro, I guess you have to compile with --with-nls

Best Regards
Antonio


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4810 (20100127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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


Re: [GRASS-user] problems importing vector and raster data via python script

2010-01-27 Thread Glynn Clements

Sonja Jankowfsky wrote:

> I'm running a python script under windows/eclipse, where I try to import 
> a shape and a raster file with v.in.ogr and r.in.gdal.
> 
> 
> grass.run_command("r.in.gdal",'-o', 
> input='E:\pythoninput\mnyzeron5m.asc', output='dem5m', '-o')

Python uses backslash as an escape character; if you need to use a
backslash in a string literal, either use two backslashes, i.e.:

input='E:\\pythoninput\\mnyzeron5m.asc'

or use a raw literal, i.e.:

input=r'E:\pythoninput\mnyzeron5m.asc'

Alternatively, a forward slash will work. But scripts should rarely
need to have literal pathnames embedded within them.

> grass.run_command("v.in.ogr", '-o', 
> dsn='E:\pythoninput\Mercier_ditch.shp', output='ditch2', '-o')

run_command() etc use the "flags" argument to specify flags (without
the leading '-'), e.g.:

grass.run_command("v.in.ogr", flags='o', 
dsn=r'E:\pythoninput\Mercier_ditch.shp', output='ditch2')

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


Re: [GRASS-user] r.shaded.relief question

2010-01-27 Thread Rich Shepard

On Tue, 26 Jan 2010, Rich Shepard wrote:


 Feeling irrationally exuberant that I might be able to quickly move on to
hydrological modeling, I just tried running r.shaded.relief on the same
raster DEM map used for the slopes, aspects, and curvatures. No joy. the
relief map looks like the earlier slope and aspect ones: vertical bands of
horizontal static.


  Got this fixed: it was incorrect region resolution.

  Now I have a question about the results. The source DEM has the highest
area in the southeast corner and the main stream drains northwest to the
confluence with a large river. The shaded relief map, however, does not
reflect this topography. Both maps have a resolution of 10m.

  On the shaded relief map, the drainage basin head appears as flat as the
confluence area.

  Why might I see results like this? Do I need to interpolate the source DEM
to a finer resolution before running r.shade.relief?

Suggestions needed,

Rich

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


[GRASS-user] Which version to start working

2010-01-27 Thread Luisa Peña
Greetings

I've been browsing around GRASS website and GRASS wikis and I pretend to
start working on GRASS in a LINUX system. Besides normal GRASS operations I
also want to develop a few modules/scripts that I will probably need.
What I want to know is from which version should I start? 6.4, 6.5 or 7?

Thank you all

Luisa Peña
S.Paulo, Brasil
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: problems importing vector and raster data via python script

2010-01-27 Thread Margherita Di Leo
I'm running a python script under windows/eclipse, where I try to import 
a shape and a raster file with v.in.ogr and r.in.gdal.



grass.run_command("r.in.gdal",'-o', 
input='E:\pythoninput\mnyzeron5m.asc', output='dem5m', '-o')


Sonja,
the correct command would be:
grass.run_command("r.in.gdal", input='/path/to/file', output='file', flags='o')

To import ascii files you can use r.in.ascii.

Cheers

--
Eng. Margherita Di Leo
Ph.D. Candidate
Methods and Technologies for Environmental Monitoring
Department of Environmental Engineering and Physics (DIFA)

University of Basilicata 
Campus Macchia Romana
85100 - Potenza 
Italy


Office: +39-0971205363
Fax: +39-0971205160





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


Re: [GRASS-user] Interpreting Terrestrial Geomorphometry

2010-01-27 Thread Milton Cezar Ribeiro
Hi There,


I put my 2cents on the Markus' suggestion. This book changed my life :-)
Thanks Tom!

best regards

milton

2010/1/27 Rich Shepard 

> On Wed, 27 Jan 2010, Markus Neteler wrote:
>
> Let me recommend this book:
>> http://geomorphometry.org/book
>>
>
>  Thank you, Markus. I'll ask my local library to borrow a copy for me.
>
>
> (of course it has a GRASS chapter :)
>>
>
>  Well, duh! GRASS grows on soils doesn't it?
>
> Rich
>
> ___
> 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] Interpreting Terrestrial Geomorphometry

2010-01-27 Thread Rich Shepard

On Wed, 27 Jan 2010, Markus Neteler wrote:


Let me recommend this book:
http://geomorphometry.org/book


  Thank you, Markus. I'll ask my local library to borrow a copy for me.


(of course it has a GRASS chapter :)


  Well, duh! GRASS grows on soils doesn't it?

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


Re: [GRASS-user] Location installation in svn6.4.0

2010-01-27 Thread Rich Shepard

On Wed, 27 Jan 2010, Pedro Roma wrote:


But, shouldn't it be done automatically by SV6.4.0 installer??


  No. No more than installing a word processor will create data directories
for you.

  You can have multiple locations; each one for a particular project and/or
geographic projection.

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


[GRASS-user] problems importing vector and raster data via python script

2010-01-27 Thread Sonja Jankowfsky
I'm running a python script under windows/eclipse, where I try to import 
a shape and a raster file with v.in.ogr and r.in.gdal.



grass.run_command("r.in.gdal",'-o', 
input='E:\pythoninput\mnyzeron5m.asc', output='dem5m', '-o')


grass.run_command("v.in.ogr", '-o', 
dsn='E:\pythoninput\Mercier_ditch.shp', output='ditch2', '-o')



The problem is that I can't use the '-o' flag to override the projection 
check. If I put the '-o' at the end, I get the following error message:



grass.run_command("r.in.gdal", input='E:\pythoninput\mnyzeron5m.asc', 
output='dem5m', '-o')

SyntaxError: non-keyword arg after keyword arg


If I put the '-o' before the input it is ignored, and I get the error 
that the projection does not match the current location.



grass.run_command("r.in.gdal", '-o', 
input='E:\pythoninput\mnyzeron5m.asc', output='dem5m')



ERREUR :Projection of dataset does not appear to match current location.


   Location PROJ_INFO is:
   name: Lambert Conformal Conic
   proj: lcc
   ellps: clark80IGN
   lat_1: 46.8
   lat_0: 46.8
   lon_0: 0
   k_0: 0.99987742
   x_0: 60
   y_0: 220
   towgs84: -168,-60,320,0,0,0,0
   pm: paris
   no_defs: defined

   Import dataset PROJ_INFO is:
   cellhd.proj = 0 (unreferenced/unknown)

   You can use the -o flag to r.in.gdal to override this check and use
   the location definition for the dataset.
   Consider generating a new location from the input dataset using the
   'location' parameter.


Does anybody know how I can actually override the projection check?

Sonja

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


Re: [GRASS-user] Location installation in svn6.4.0

2010-01-27 Thread Pedro Roma
But, shouldn't it be done automatically by SV6.4.0 installer??

On Wed, Jan 27, 2010 at 2:34 PM, Rich Shepard wrote:

> On Wed, 27 Jan 2010, Pedro Roma wrote:
>
>  1- What do I have to do in order to install location folder? (in order to
>> learn for the future :) )
>>
>
>  The command is 'mkdir'. It is used to make a new directory.
>
> Rich
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] regular wingrass builds

2010-01-27 Thread Paolo Craveri
2010/1/27 Colin (Nielsen) Wren :
> Wow that is amazing, thanks so much Martin.
>
> -Colin
+1

-- 
-- 
Paolo C.
Lat. 44° 39' 11.08'' N  Long. 7° 23' 25.26'' E
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: gdal, v.in.ogr, Ubuntu intrepid

2010-01-27 Thread Paolo Craveri
Hi,
I solved my troubles with  these repositories:

#ubuntu gis
deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu karmic main
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu karmic main



-- 
-- 
Paolo C.
Lat. 44° 39' 11.08'' N  Long. 7° 23' 25.26'' E
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.slope.aspect: Unexpected Results

2010-01-27 Thread Glynn Clements

Markus Metz wrote:

> I don't think it is possible to have different units within the same 
> location because units are set globally in PERMANENT/PROJ_UNITS. Is it?

Correct.

Apparently the issue has been reolved. Which is fortunate; as the
previous post doesn't actually make much sense.

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


Re: [GRASS-user] r.slope.aspect: Unexpected Results

2010-01-27 Thread Markus Metz


Glynn Clements wrote:

Rich Shepard wrote:

  

Source map (demNW raster map):



  

nsres:  32.82281055
ewres:  32.82281055



  

   Resolution in feet.

Cropped map (abernethy vector boundary map):



  

nsres:  4.99982001
ewres:  4.99979979



  

   Resolution in metres.



32.82281055 international feet is 10.00439265564 metres.

32.82281055 US survey feet is 10.00441266446533 metres.
  
I don't think it is possible to have different units within the same 
location because units are set globally in PERMANENT/PROJ_UNITS. Is it?


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


Re: [GRASS-user] Re: gdal, v.in.ogr, Ubuntu intrepid

2010-01-27 Thread Micha Silver

On 01/27/2010 11:27 AM, incanus wrote:

if you mean http://ppa.launchpad.net/qgis/ubuntu, yes
Is there any else?
   

Not that one. There's an UbuntuGIS repo"
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable/?field.series_filter=

--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918

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


[GRASS-user] Location installation in svn6.4.0

2010-01-27 Thread Pedro Roma
Greetings

I have just installed svn6.4.0 (using a snapshot) and I was expecting to
have a location folder at my installed directory. But nothing was there. In
the snapshot folder location is there.
1- What do I have to do in order to install location folder? (in order to
learn for the future :) )
2- Now that it isn't installed, can I just copied to my SVN6.4.0
installation?

Thanks

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


[GRASS-user] Re: gdal, v.in.ogr, Ubuntu intrepid

2010-01-27 Thread incanus

if you mean http://ppa.launchpad.net/qgis/ubuntu, yes
Is there any else?
-- 
View this message in context: 
http://n2.nabble.com/gdal-v-in-ogr-Ubuntu-intrepid-tp1886320p4466091.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] r.slope.aspect: Unexpected Results

2010-01-27 Thread Glynn Clements

Rich Shepard wrote:

> > It's possible that the cropping may have changed the grid slightly.
> 
> Glynn,
> 
>I do hope it's something simple. I can't do more until I have a good DEM
> map for the project area.
> 
> > What are the grid parameters (bounds, resolution, rows/cols) for the
> > source map and the cropped version?
> 
> Source map (demNW raster map):

> nsres:  32.82281055
> ewres:  32.82281055

>Resolution in feet.
> 
> Cropped map (abernethy vector boundary map):

> nsres:  4.99982001
> ewres:  4.99979979

>Resolution in metres.

32.82281055 international feet is 10.00439265564 metres.

32.82281055 US survey feet is 10.00441266446533 metres.

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


Re: [GRASS-user] Re: gdal, v.in.ogr, Ubuntu intrepid

2010-01-27 Thread Micha Silver

On 01/27/2010 10:11 AM, incanus wrote:

anyone discovered how to do this correctly? I've tried several ways, but my
ubuntu 9.10 don't see gdal 1.6
   

Are you using the ubuntugis repository from ppa?


--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918

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


[GRASS-user] Re: grass-gdal ubuntu issue solved (?)

2010-01-27 Thread incanus

Hi, that repositories doesn't work for me in Ubuntu 9.10, it's normal?
-- 
View this message in context: 
http://n2.nabble.com/grass-gdal-ubuntu-issue-solved-tp2352498p4465833.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: gdal, v.in.ogr, Ubuntu intrepid

2010-01-27 Thread incanus

anyone discovered how to do this correctly? I've tried several ways, but my
ubuntu 9.10 don't see gdal 1.6
-- 
View this message in context: 
http://n2.nabble.com/gdal-v-in-ogr-Ubuntu-intrepid-tp1886320p4465826.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