Re: [GRASS-user] 7.5svn: issue with finding EPSG codes for new locations

2018-07-02 Thread Markus Neteler
On Thu, Jun 28, 2018 at 9:24 PM, Solano Barajas Ramon  wrote:
> I was struggling with the same problem since some time ago. I’m using a Mac 
> with  MacPorts so currently I have GRASS 7.4.0 installed, but the problem 
> dates from before.
>
> I just solved this problem: it look like the GRASS routine looking for the 
> EPSG data is not expecting the 1st line of the EPSG text file. Original  
> content  is:
>
>  +version=9.2.0 +origin=EPSG +lastupdate=2017-12-17
> # HD1909
> <3819> +proj=longlat +ellps=bessel 
> +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs  <>
...

Good catch!

Apparently that  was introduced at some point:

https://github.com/OSGeo/proj.4/blob/master/nad/epsg

I don't exactly know which parser needs to be fixed now... Please open
a ticket for this.

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

Re: [GRASS-user] how to use r.mapcalc in GRASS

2018-07-02 Thread Markus Neteler
Hello Marion,

On Mon, Jul 2, 2018 at 12:18 PM, marion-brunet  wrote:
> Hello,
>
> I am trying to calculate the difference between two raster layers. For that,
> I am using GRASS in QGIS. I use the command r.mapcalc. In the field
> "expression to evaluate" I wrote
> r.mapcalc expression=diff =TIN_12_17-TIN_06_18

be sure to have white spaces around the - (minus)

TIN_12_17-TIN_06_18
--> TIN_12_17 - TIN_06_18

and, as Vero wrote, perhaps quotes. So, pls try:

r.mapcalc expression="diff =TIN_12_17 - TIN_06_18"

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

Re: [GRASS-user] Importing lat-lon points into projected location

2018-07-02 Thread Rich Shepard

On Mon, 2 Jul 2018, Rich Shepard wrote:


 The project's location uses ESPG code 3828. I have a small point file of


  s/EPSG/ESPG/

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

[GRASS-user] Importing lat-lon points into projected location

2018-07-02 Thread Rich Shepard

  The project's location uses ESPG code 3828. I have a small point file of
three features very close to each other with unprojected geographic
coordinates in latitude-longitude:

45.299844|-122.353975|USGS gauge
45.288936|-122.350918|dam
45.302761|-122.358851|Building 1

When imported with:

v.in.ascii in=points.txt out=point_features columns=\
'y double precision, x double precision, label varchar(15)' cat=0 y=1 x=2 \
--overwrite

  The monitor displays only a single point (the first in the list) even when
I try zooming in very close, and the attribute data has the location in
lat-lon rather than easting and northing. I'm not seeing what I'm doing
incorrectly.

  I tried importing to a generic location but the result was the same.

  Pointers needed.

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

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Markus Metz
On Mon, Jul 2, 2018 at 4:54 PM, Moritz Lennert 
wrote:
>
> Le Mon, 2 Jul 2018 16:36:30 +0200,
> Markus Metz  a écrit :
>
> > On Mon, Jul 2, 2018 at 4:04 PM, Paul Shapley 
> > wrote:
> > >
> > > Hi Markus,
> > >
> > > Used 'db.connect' driver=sqlite
> > database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> > >
> > > I had to delete 'database schema=grass_gis'
> > >
> > > I had to delete 'default group=postgis_reader'
> >
> > That seems to be a bug in db.connect, apparently it is not possible to
> > reset schema and group. Can you please open a ticket?
>
> AFAIR, schema= and group= (i.e. without any value) should reset these
> parameters.

That means no answer to schema and group would be a reasonable default
answer in order to easily change the current connection parameters?

Markus M
>
> Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Markus Metz
On Mon, Jul 2, 2018 at 4:36 PM, Markus Metz 
wrote:
>
>
>
> On Mon, Jul 2, 2018 at 4:04 PM, Paul Shapley  wrote:
> >
> > Hi Markus,
> >
> > Used 'db.connect' driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> >
> > I had to delete 'database schema=grass_gis'
> >
> > I had to delete 'default group=postgis_reader'
>
> That seems to be a bug in db.connect, apparently it is not possible to
reset schema and group. Can you please open a ticket?

fixed in trunk r72941,2, please test!

Markus M

>
> Markus M
>
> >
> > Then 'RUN'
> >
> > output:-
> >
> > (Mon Jul 02 14:59:21 2018)

> > db.connect

> > (Mon Jul 02 14:59:22 2018) Command finished (1 sec)
> >
> > now attempted 'r.to.vect'
> >
> > r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
> > DBMI-SQLite driver error:
> > Error in sqlite3_prepare():
> > unknown database grass_gis
> > DBMI-SQLite driver error:
> > Error in sqlite3_prepare():
> > unknown database grass_gis
> > ERROR: Unable to create table: create table grass_gis.test1 ( cat
integer, value integer, label varchar(10))
> > WARNING: Table  linked to vector map  does not
exist
> >
> > Repeat as above!!
> >
> > Used 'db.connect' driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> >
> > I had to delete 'database schema=grass_gis'
> >
> > I had to delete 'default group=postgis_reader'
> >
> > Then 'RUN'
> >
> >
> >
> > On 2 July 2018 at 14:41, Markus Metz 
wrote:
> >>
> >>
> >>
> >> On Mon, Jul 2, 2018 at 3:25 PM, Paul Shapley 
wrote:
> >> >
> >> > Hi Markus,
> >> >
> >> > I used 'db.connect'
> >>
> >> which flags/options did you use?
> >>
> >> > followed by 'db.login'
> >>
> >> you don't need db.login for sqlite
> >> >
> >> > Please see below:-
> >> >
> >> > db.connect -p

> >> > driver: sqlite
> >> > database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
> >> > schema: grass_gis
> >> > group: postgis_reader
> >> > (Mon Jul 02 14:17:04 2018) Command finished (0 sec)
> >> >
> >> > db.connect -d

> >> > Default driver / database set to:
> >> > driver: sqlite
> >> > database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
> >> > (Mon Jul 02 14:19:40 2018) Command finished (0 sec)
> >> >
> >> > Still holding 'schema' and 'group' details from PostGIS. Shouldn't
these have been dropped when changing to sqlite which is perhaps why the
connection is failing?
> >>
> >> yes.
> >>
> >> It seems that db.connect -g is better than db.connect -p to verify
connection settings, e.g. I get in the North Carolina sample dataset
> >>
> >> > db.connect -g
> >> driver=sqlite
> >> database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> >> schema=
> >> group=
> >>
> >> The database is not a real path but contains GRASS variables that are
evaluated on the fly. This is the default connection.
> >>
> >> Markus M
> >>
> >> >
> >> > On 2 July 2018 at 14:10, Markus Metz 
wrote:
> >> >>
> >> >>
> >> >>
> >> >> On Mon, Jul 2, 2018 at 2:00 PM, Paul Shapley 
wrote:
> >> >> >
> >> >> > Hi Users,
> >> >> >
> >> >> > I want to use 'r.to.vect' but it seems to default to a 'Postgis'
table that has no geometry column just a table with a 'cat' id. I would
like to export to 'sqlite'. I have both postgres an sqlite login details
stored in 'db.login'. How do i switch between the two or at least make
sqlite the default? If I change settings with 'db.connect' to 'sqlite'
> >> >>
> >> >> what is the exact command you used to set the default connection to
sqlite?
> >> >>
> >> >> You can also try db.connect -d, otherwise you might need to specify
the default database to be used.
> >> >>
> >> >> In any case, please verify first with db.connect -p to see the
connection details used when creating a new vector.
> >> >>
> >> >> Markus M
> >> >>
> >> >> > it fails (error below) but still keeps holding onto the
'grass_gis' schema form the Postgis connection!
> >> >> >
> >> >> > r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
> >> >> > DBMI-SQLite driver error:
> >> >> > Error in sqlite3_prepare():
> >> >> > unknown database grass_gis
> >> >> > DBMI-SQLite driver error:
> >> >> > Error in sqlite3_prepare():
> >> >> > unknown database grass_gis
> >> >> > ERROR: Unable to create table: create table grass_gis.test1 ( cat
integer, value integer, label varchar(10))
> >> >> > WARNING: Table  linked to vector map 
does not exist
> >> >> >
> >> >> > Is there a preferred option to change databases more cleanly.
> >> >> >
> >> >> > Many thanks,
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Paul J. Shapley MSc CGeog (GIS) FRGS
> >> >> >
> >> >> >
> >> >> > ___
> >> >> > grass-user mailing list
> >> >> > grass-user@lists.osgeo.org
> >> >> > https://lists.osgeo.org/mailman/listinfo/grass-user
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Paul J. Shapley MSc CGeog (GIS) FRGS
> >> >
> >
> >
> >
> >
> > --
> > Paul J. Shapley MSc CGeog (GIS) FRGS
> >

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Moritz Lennert
Le Mon, 2 Jul 2018 16:36:30 +0200,
Markus Metz  a écrit :

> On Mon, Jul 2, 2018 at 4:04 PM, Paul Shapley 
> wrote:
> >
> > Hi Markus,
> >
> > Used 'db.connect' driver=sqlite  
> database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> >
> > I had to delete 'database schema=grass_gis'
> >
> > I had to delete 'default group=postgis_reader'  
> 
> That seems to be a bug in db.connect, apparently it is not possible to
> reset schema and group. Can you please open a ticket?

AFAIR, schema= and group= (i.e. without any value) should reset these
parameters.

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

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Markus Metz
On Mon, Jul 2, 2018 at 4:04 PM, Paul Shapley  wrote:
>
> Hi Markus,
>
> Used 'db.connect' driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
>
> I had to delete 'database schema=grass_gis'
>
> I had to delete 'default group=postgis_reader'

That seems to be a bug in db.connect, apparently it is not possible to
reset schema and group. Can you please open a ticket?

Markus M

>
> Then 'RUN'
>
> output:-
>
> (Mon Jul 02 14:59:21 2018)

> db.connect

> (Mon Jul 02 14:59:22 2018) Command finished (1 sec)
>
> now attempted 'r.to.vect'
>
> r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> unknown database grass_gis
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> unknown database grass_gis
> ERROR: Unable to create table: create table grass_gis.test1 ( cat
integer, value integer, label varchar(10))
> WARNING: Table  linked to vector map  does not
exist
>
> Repeat as above!!
>
> Used 'db.connect' driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
>
> I had to delete 'database schema=grass_gis'
>
> I had to delete 'default group=postgis_reader'
>
> Then 'RUN'
>
>
>
> On 2 July 2018 at 14:41, Markus Metz 
wrote:
>>
>>
>>
>> On Mon, Jul 2, 2018 at 3:25 PM, Paul Shapley  wrote:
>> >
>> > Hi Markus,
>> >
>> > I used 'db.connect'
>>
>> which flags/options did you use?
>>
>> > followed by 'db.login'
>>
>> you don't need db.login for sqlite
>> >
>> > Please see below:-
>> >
>> > db.connect -p

>> > driver: sqlite
>> > database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
>> > schema: grass_gis
>> > group: postgis_reader
>> > (Mon Jul 02 14:17:04 2018) Command finished (0 sec)
>> >
>> > db.connect -d

>> > Default driver / database set to:
>> > driver: sqlite
>> > database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
>> > (Mon Jul 02 14:19:40 2018) Command finished (0 sec)
>> >
>> > Still holding 'schema' and 'group' details from PostGIS. Shouldn't
these have been dropped when changing to sqlite which is perhaps why the
connection is failing?
>>
>> yes.
>>
>> It seems that db.connect -g is better than db.connect -p to verify
connection settings, e.g. I get in the North Carolina sample dataset
>>
>> > db.connect -g
>> driver=sqlite
>> database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
>> schema=
>> group=
>>
>> The database is not a real path but contains GRASS variables that are
evaluated on the fly. This is the default connection.
>>
>> Markus M
>>
>> >
>> > On 2 July 2018 at 14:10, Markus Metz 
wrote:
>> >>
>> >>
>> >>
>> >> On Mon, Jul 2, 2018 at 2:00 PM, Paul Shapley 
wrote:
>> >> >
>> >> > Hi Users,
>> >> >
>> >> > I want to use 'r.to.vect' but it seems to default to a 'Postgis'
table that has no geometry column just a table with a 'cat' id. I would
like to export to 'sqlite'. I have both postgres an sqlite login details
stored in 'db.login'. How do i switch between the two or at least make
sqlite the default? If I change settings with 'db.connect' to 'sqlite'
>> >>
>> >> what is the exact command you used to set the default connection to
sqlite?
>> >>
>> >> You can also try db.connect -d, otherwise you might need to specify
the default database to be used.
>> >>
>> >> In any case, please verify first with db.connect -p to see the
connection details used when creating a new vector.
>> >>
>> >> Markus M
>> >>
>> >> > it fails (error below) but still keeps holding onto the 'grass_gis'
schema form the Postgis connection!
>> >> >
>> >> > r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
>> >> > DBMI-SQLite driver error:
>> >> > Error in sqlite3_prepare():
>> >> > unknown database grass_gis
>> >> > DBMI-SQLite driver error:
>> >> > Error in sqlite3_prepare():
>> >> > unknown database grass_gis
>> >> > ERROR: Unable to create table: create table grass_gis.test1 ( cat
integer, value integer, label varchar(10))
>> >> > WARNING: Table  linked to vector map  does
not exist
>> >> >
>> >> > Is there a preferred option to change databases more cleanly.
>> >> >
>> >> > Many thanks,
>> >> >
>> >> >
>> >> > --
>> >> > Paul J. Shapley MSc CGeog (GIS) FRGS
>> >> >
>> >> >
>> >> > ___
>> >> > grass-user mailing list
>> >> > grass-user@lists.osgeo.org
>> >> > https://lists.osgeo.org/mailman/listinfo/grass-user
>> >>
>> >
>> >
>> >
>> > --
>> > Paul J. Shapley MSc CGeog (GIS) FRGS
>> >
>
>
>
>
> --
> Paul J. Shapley MSc CGeog (GIS) FRGS
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Paul Shapley
Hi Markus,

Used 'db.connect' driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db

*I had to delete* 'database schema=grass_gis'

*I had to delete* 'default group=postgis_reader'

Then 'RUN'

output:-

(Mon Jul 02 14:59:21 2018)

db.connect

(Mon Jul 02 14:59:22 2018) Command finished (1 sec)

now attempted 'r.to.vect'

r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
DBMI-SQLite driver error:
Error in sqlite3_prepare():
unknown database grass_gis
DBMI-SQLite driver error:
Error in sqlite3_prepare():
unknown database grass_gis
ERROR: Unable to create table: create table grass_gis.test1 ( cat integer,
value integer, label varchar(10))
WARNING: Table  linked to vector map  does not exist

Repeat as above!!

Used 'db.connect' driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db

*I had to delete* 'database schema=grass_gis'

*I had to delete* 'default group=postgis_reader'

Then 'RUN'



On 2 July 2018 at 14:41, Markus Metz  wrote:

>
>
> On Mon, Jul 2, 2018 at 3:25 PM, Paul Shapley  wrote:
> >
> > Hi Markus,
> >
> > I used 'db.connect'
>
> which flags/options did you use?
>
> > followed by 'db.login'
>
> you don't need db.login for sqlite
> >
> > Please see below:-
> >
> > db.connect -p
>
> > driver: sqlite
> > database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
> > schema: grass_gis
> > group: postgis_reader
> > (Mon Jul 02 14:17:04 2018) Command finished (0 sec)
> >
> > db.connect -d
>
> > Default driver / database set to:
> > driver: sqlite
> > database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
> > (Mon Jul 02 14:19:40 2018) Command finished (0 sec)
> >
> > Still holding 'schema' and 'group' details from PostGIS. Shouldn't these
> have been dropped when changing to sqlite which is perhaps why the
> connection is failing?
>
> yes.
>
> It seems that db.connect -g is better than db.connect -p to verify
> connection settings, e.g. I get in the North Carolina sample dataset
>
> > db.connect -g
> driver=sqlite
> database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> schema=
> group=
>
> The database is not a real path but contains GRASS variables that are
> evaluated on the fly. This is the default connection.
>
> Markus M
>
> >
> > On 2 July 2018 at 14:10, Markus Metz 
> wrote:
> >>
> >>
> >>
> >> On Mon, Jul 2, 2018 at 2:00 PM, Paul Shapley 
> wrote:
> >> >
> >> > Hi Users,
> >> >
> >> > I want to use 'r.to.vect' but it seems to default to a 'Postgis'
> table that has no geometry column just a table with a 'cat' id. I would
> like to export to 'sqlite'. I have both postgres an sqlite login details
> stored in 'db.login'. How do i switch between the two or at least make
> sqlite the default? If I change settings with 'db.connect' to 'sqlite'
> >>
> >> what is the exact command you used to set the default connection to
> sqlite?
> >>
> >> You can also try db.connect -d, otherwise you might need to specify the
> default database to be used.
> >>
> >> In any case, please verify first with db.connect -p to see the
> connection details used when creating a new vector.
> >>
> >> Markus M
> >>
> >> > it fails (error below) but still keeps holding onto the 'grass_gis'
> schema form the Postgis connection!
> >> >
> >> > r.to.vect input=APGB_aerial_2_i_segment_drained_peat_with_exposed_
> haggs@PERMANENT output=test1 type=area
> >> > DBMI-SQLite driver error:
> >> > Error in sqlite3_prepare():
> >> > unknown database grass_gis
> >> > DBMI-SQLite driver error:
> >> > Error in sqlite3_prepare():
> >> > unknown database grass_gis
> >> > ERROR: Unable to create table: create table grass_gis.test1 ( cat
> integer, value integer, label varchar(10))
> >> > WARNING: Table  linked to vector map  does
> not exist
> >> >
> >> > Is there a preferred option to change databases more cleanly.
> >> >
> >> > Many thanks,
> >> >
> >> >
> >> > --
> >> > Paul J. Shapley MSc CGeog (GIS) FRGS
> >> >
> >> >
> >> > ___
> >> > grass-user mailing list
> >> > grass-user@lists.osgeo.org
> >> > https://lists.osgeo.org/mailman/listinfo/grass-user
> >>
> >
> >
> >
> > --
> > Paul J. Shapley MSc CGeog (GIS) FRGS
> >
>



-- 
*Paul J. Shapley *MSc CGeog (GIS) FRGS
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Markus Metz
On Mon, Jul 2, 2018 at 3:25 PM, Paul Shapley  wrote:
>
> Hi Markus,
>
> I used 'db.connect'

which flags/options did you use?

> followed by 'db.login'

you don't need db.login for sqlite
>
> Please see below:-
>
> db.connect -p

> driver: sqlite
> database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
> schema: grass_gis
> group: postgis_reader
> (Mon Jul 02 14:17:04 2018) Command finished (0 sec)
>
> db.connect -d

> Default driver / database set to:
> driver: sqlite
> database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
> (Mon Jul 02 14:19:40 2018) Command finished (0 sec)
>
> Still holding 'schema' and 'group' details from PostGIS. Shouldn't these
have been dropped when changing to sqlite which is perhaps why the
connection is failing?

yes.

It seems that db.connect -g is better than db.connect -p to verify
connection settings, e.g. I get in the North Carolina sample dataset

> db.connect -g
driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
schema=
group=

The database is not a real path but contains GRASS variables that are
evaluated on the fly. This is the default connection.

Markus M

>
> On 2 July 2018 at 14:10, Markus Metz 
wrote:
>>
>>
>>
>> On Mon, Jul 2, 2018 at 2:00 PM, Paul Shapley  wrote:
>> >
>> > Hi Users,
>> >
>> > I want to use 'r.to.vect' but it seems to default to a 'Postgis' table
that has no geometry column just a table with a 'cat' id. I would like to
export to 'sqlite'. I have both postgres an sqlite login details stored in
'db.login'. How do i switch between the two or at least make sqlite the
default? If I change settings with 'db.connect' to 'sqlite'
>>
>> what is the exact command you used to set the default connection to
sqlite?
>>
>> You can also try db.connect -d, otherwise you might need to specify the
default database to be used.
>>
>> In any case, please verify first with db.connect -p to see the
connection details used when creating a new vector.
>>
>> Markus M
>>
>> > it fails (error below) but still keeps holding onto the 'grass_gis'
schema form the Postgis connection!
>> >
>> > r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
>> > DBMI-SQLite driver error:
>> > Error in sqlite3_prepare():
>> > unknown database grass_gis
>> > DBMI-SQLite driver error:
>> > Error in sqlite3_prepare():
>> > unknown database grass_gis
>> > ERROR: Unable to create table: create table grass_gis.test1 ( cat
integer, value integer, label varchar(10))
>> > WARNING: Table  linked to vector map  does not
exist
>> >
>> > Is there a preferred option to change databases more cleanly.
>> >
>> > Many thanks,
>> >
>> >
>> > --
>> > Paul J. Shapley MSc CGeog (GIS) FRGS
>> >
>> >
>> > ___
>> > grass-user mailing list
>> > grass-user@lists.osgeo.org
>> > https://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>
>
> --
> Paul J. Shapley MSc CGeog (GIS) FRGS
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Paul Shapley
Hi Markus,

I used 'db.connect' followed by 'db.login'

Please see below:-

db.connect -p

driver: sqlite
database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
schema: grass_gis
group: postgis_reader
(Mon Jul 02 14:17:04 2018) Command finished (0 sec)

db.connect -d

Default driver / database set to:
driver: sqlite
database: C:\\TempLocation\PERMANENT\sqlite\sqlite.db
(Mon Jul 02 14:19:40 2018) Command finished (0 sec)

Still holding 'schema' and 'group' details from PostGIS. Shouldn't these
have been dropped when changing to sqlite which is perhaps why the
connection is failing?

On 2 July 2018 at 14:10, Markus Metz  wrote:

>
>
> On Mon, Jul 2, 2018 at 2:00 PM, Paul Shapley  wrote:
> >
> > Hi Users,
> >
> > I want to use 'r.to.vect' but it seems to default to a 'Postgis' table
> that has no geometry column just a table with a 'cat' id. I would like to
> export to 'sqlite'. I have both postgres an sqlite login details stored in
> 'db.login'. How do i switch between the two or at least make sqlite the
> default? If I change settings with 'db.connect' to 'sqlite'
>
> what is the exact command you used to set the default connection to sqlite?
>
> You can also try db.connect -d, otherwise you might need to specify the
> default database to be used.
>
> In any case, please verify first with db.connect -p to see the connection
> details used when creating a new vector.
>
> Markus M
>
> > it fails (error below) but still keeps holding onto the 'grass_gis'
> schema form the Postgis connection!
> >
> > r.to.vect input=APGB_aerial_2_i_segment_drained_peat_with_exposed_
> haggs@PERMANENT output=test1 type=area
> > DBMI-SQLite driver error:
> > Error in sqlite3_prepare():
> > unknown database grass_gis
> > DBMI-SQLite driver error:
> > Error in sqlite3_prepare():
> > unknown database grass_gis
> > ERROR: Unable to create table: create table grass_gis.test1 ( cat
> integer, value integer, label varchar(10))
> > WARNING: Table  linked to vector map  does not
> exist
> >
> > Is there a preferred option to change databases more cleanly.
> >
> > Many thanks,
> >
> >
> > --
> > Paul J. Shapley MSc CGeog (GIS) FRGS
> >
> >
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
>
>


-- 
*Paul J. Shapley *MSc CGeog (GIS) FRGS
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Markus Metz
On Mon, Jul 2, 2018 at 2:00 PM, Paul Shapley  wrote:
>
> Hi Users,
>
> I want to use 'r.to.vect' but it seems to default to a 'Postgis' table
that has no geometry column just a table with a 'cat' id. I would like to
export to 'sqlite'. I have both postgres an sqlite login details stored in
'db.login'. How do i switch between the two or at least make sqlite the
default? If I change settings with 'db.connect' to 'sqlite'

what is the exact command you used to set the default connection to sqlite?

You can also try db.connect -d, otherwise you might need to specify the
default database to be used.

In any case, please verify first with db.connect -p to see the connection
details used when creating a new vector.

Markus M

> it fails (error below) but still keeps holding onto the 'grass_gis'
schema form the Postgis connection!
>
> r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> unknown database grass_gis
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> unknown database grass_gis
> ERROR: Unable to create table: create table grass_gis.test1 ( cat
integer, value integer, label varchar(10))
> WARNING: Table  linked to vector map  does not
exist
>
> Is there a preferred option to change databases more cleanly.
>
> Many thanks,
>
>
> --
> Paul J. Shapley MSc CGeog (GIS) FRGS
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] Switching databases for holding attributes in Grass 7.4.1

2018-07-02 Thread Paul Shapley
Hi Users,

I want to use 'r.to.vect' but it seems to default to a 'Postgis' table that
has no geometry column just a table with a 'cat' id. I would like to export
to 'sqlite'. I have both postgres an sqlite login details stored in
'db.login'. How do i switch between the two or at least make sqlite the
default? If I change settings with 'db.connect' to 'sqlite' it fails (error
below) but still keeps holding onto the 'grass_gis' schema form the Postgis
connection!

r.to.vect
input=APGB_aerial_2_i_segment_drained_peat_with_exposed_haggs@PERMANENT
output=test1 type=area
DBMI-SQLite driver error:
Error in sqlite3_prepare():
unknown database grass_gis
DBMI-SQLite driver error:
Error in sqlite3_prepare():
unknown database grass_gis
ERROR: Unable to create table: create table grass_gis.test1 ( cat integer,
value integer, label varchar(10))
WARNING: Table  linked to vector map  does not exist

Is there a preferred option to change databases more cleanly.

Many thanks,


-- 
*Paul J. Shapley *MSc CGeog (GIS) FRGS
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] how to use r.mapcalc in GRASS

2018-07-02 Thread marion-brunet
Hello,

I am trying to calculate the difference between two raster layers. For that, I 
am using GRASS in QGIS. I use the command r.mapcalc. In the field "expression 
to evaluate" I wrote
r.mapcalc expression=diff 
=TIN_12_17-TIN_06_18
TIN_12_17 and TIN_06_18 are the 
names of my two rasters.
I then select the region on my canevas.
When I click "run" I don't have any error but no file is created in my project. 
I would like to have a new raster file with the difference of the two previous 
ones.

What am I doing wrong?

Thank you,
Marion___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user