Re: [GRASS-user] Interactive flood simulation

2009-08-12 Thread Pavel Iacovlev
Thanks everyone for replies.

Markus Neteler, Will post a screen-shot and a small description today.

On Tue, Aug 11, 2009 at 8:38 PM, Markus Netelernete...@osgeo.org wrote:
 On Tue, Aug 4, 2009 at 2:21 PM, Pavel Iacovleviacovlev.pa...@gmail.com 
 wrote:
 Good day,

 I wrote a simple web flood simulation application. Posting here the
 source code, maybe it will be useful for someone who wants to use
 GRASS from PHP.

 Example: http://flood.iap.md/
 Source code: http://code.google.com/p/grass-flood/source/browse/#svn/trunk
 PHP Class for connecting to grass application:
 http://code.google.com/p/grass-flood/source/browse/trunk/Grass.php

 The example features GRASS, PHPMapscript, OpenLayers, PHP and how they
 can work together, based on http://grass.osgeo.org/wiki/GRASS_and_PHP

 Very nice! Please submit a screenshot plus short explanation to
 http://gallery.osgeo.org/

 Markus




-- 
http://iap.md, The future is open
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Interactive flood simulation

2009-08-04 Thread Pavel Iacovlev
Good day,

I wrote a simple web flood simulation application. Posting here the
source code, maybe it will be useful for someone who wants to use
GRASS from PHP.

Example: http://flood.iap.md/
Source code: http://code.google.com/p/grass-flood/source/browse/#svn/trunk
PHP Class for connecting to grass application:
http://code.google.com/p/grass-flood/source/browse/trunk/Grass.php

The example features GRASS, PHPMapscript, OpenLayers, PHP and how they
can work together, based on http://grass.osgeo.org/wiki/GRASS_and_PHP

-- 
http://iap.md, The future is open
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] PostgreSQL append

2009-08-02 Thread Pavel Iacovlev
Good day all,

1.
I have a vector grass file and I want to append it's data to a
PostgreSQL table, atm I use the following command:

v.out.ogr input=flood_vect type=area 'dsn=PG:host=localhost
dbname=gisdb user=gis password=*' olayer=flood layer=1
format=PostgreSQL lco='OVERWRITE=YES'

This command overwrites the postgis table, I want to append the data.
If I remove the lco='OVERWRITE=YES' I just get and error that the
table already exists.

2. When I export vector data to a PostgreSQL table it sets the wrong SRID
 g.region -p
projection: 3 (Latitude-Longitude)
zone:   0
datum:  wgs84
ellipsoid:  wgs84
north:  47:04:48.37738N
south:  46:55:11.265564N
west:   28:44:44.481812E
east:   28:58:20.944519E
nsres:  0:00:02.885559
ewres:  0:00:02.885027
rows:   200
cols:   283
cells:  56600

the SRID of the geometry is 900917, I expect it to be 4326 (wgs84)
what am I doing wrong ?

-- 
http://iap.md, The future is open
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] PostgreSQL append

2009-08-02 Thread Pavel Iacovlev
I am very new to grass so I am not sure if it's a bug or not, maybe I
defined my location incorrectly, how do I check ?

select * from geometry_columns where f_table_name = 'flood'

f_table_catalog f_table_schema  f_table_namef_geometry_column
 coord_dimension sridtype
   public  flood   wkb_geometry2 900917 POLYGON

On Sun, Aug 2, 2009 at 11:25 PM, Markus Netelernete...@osgeo.org wrote:
 On Sun, Aug 2, 2009 at 9:43 PM, Pavel Iacovleviacovlev.pa...@gmail.com 
 wrote:
 Good day all,

 1.
 I have a vector grass file and I want to append it's data to a
 PostgreSQL table, atm I use the following command:

 v.out.ogr input=flood_vect type=area 'dsn=PG:host=localhost
 dbname=gisdb user=gis password=*' olayer=flood layer=1
 format=PostgreSQL lco='OVERWRITE=YES'

 This command overwrites the postgis table, I want to append the data.
 If I remove the lco='OVERWRITE=YES' I just get and error that the
 table already exists.

 The OGR tools support is:
 ogr2ogr -update -append ..

 but I am afraid that v.out.ogr does currently not.


 2. When I export vector data to a PostgreSQL table it sets the wrong SRID
 g.region -p
 projection: 3 (Latitude-Longitude)
 zone:       0
 datum:      wgs84
 ellipsoid:  wgs84
 north:      47:04:48.37738N
 south:      46:55:11.265564N
 west:       28:44:44.481812E
 east:       28:58:20.944519E
 nsres:      0:00:02.885559
 ewres:      0:00:02.885027
 rows:       200
 cols:       283
 cells:      56600

 the SRID of the geometry is 900917,

 Do you mean 900913 (the unofficial outdated Google Mercator EPSG code)
 ?

 I expect it to be 4326 (wgs84) what am I doing wrong ?

 It should be like that. I currently have no PostGIS installed for
 a test. Maybe someone else in this list...

 Markus




-- 
http://iap.md, The future is open
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] PostgreSQL append

2009-08-02 Thread Pavel Iacovlev
 g.proj -w
GEOGCS[wgs84,
DATUM[WGS_1984,
SPHEROID[wgs84,6378137,298.257223563],
TOWGS84[0.000,0.000,0.000]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433]]

shape .prj file:
GEOGCS[GCS_WGS_1984,DATUM[D_WGS_1984,SPHEROID[wgs84,6378137,298.257223563]],PRIMEM[Greenwich,0],UNIT[Degree,0.017453292519943295]]

On Mon, Aug 3, 2009 at 12:46 AM, Markus Netelernete...@osgeo.org wrote:
 On Sun, Aug 2, 2009 at 11:35 PM, Pavel Iacovleviacovlev.pa...@gmail.com 
 wrote:
 I am very new to grass so I am not sure if it's a bug or not, maybe I
 defined my location incorrectly, how do I check ?

 select * from geometry_columns where f_table_name = 'flood'

 f_table_catalog f_table_schema  f_table_name    f_geometry_column
  coord_dimension srid    type
       public  flood   wkb_geometry    2 900917 POLYGON

 Two ideas:

 - run to obtain the projection of the location as WKT output:
  g.proj -w

 - export to SHAPE file first and see if the .prj file is ok (LatLong in
   your case).

 If both is fine, then would I suspect some problem with the PostGIS
 export.

 Markus




-- 
http://iap.md, The future is open
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Flood simulation

2009-08-01 Thread Pavel Iacovlev
Good day all,

I want to simulate a simple flood situation. My steps are
1. Download the elevation data
2. Use r.lake to generate the raster image of the flood area

No problem with this, works like a charm. Now I would like to get the
vector variant of the flood area so I can run intersects with my
other vector data to see what is flooded and whats not.

Any tips with what tool or combination of commands I can achieve this ?

-- 
http://iap.md, The future is open
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user