Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-20 Thread Moritz Lennert

On 20/07/17 01:12, Jeshua Lacock wrote:



On Jul 19, 2017, at 5:07 PM, Jeshua Lacock  wrote:

I created the location with Grass 7.2, so if it is the default, I don’t 
understand why SQLite wasn’t used?


Actually; correction: The location I imported the vector data into was created 
with GRASS 7.2 and I can see its using SQLite. The location it was projected to 
is using DBF.

Short of creating a new location, is there a way to change it to SQLite?


db.connect to change the backend of the mapset. All new vectors created 
will use that backend.


v.db.reconnect.all to reconnect existing vector maps to a new backend.

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

Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Martin Landa
Hi,

2017-07-20 1:07 GMT+02:00 Jeshua Lacock :
> Interesting!

It is ;-)

> I created the location with Grass 7.2, so if it is the default, I don’t 
> understand why SQLite wasn’t used?

Does your GRASS installation have SQLite support included?

db.drivers -p

> Is there any documentation for switching to/using SQLIte?

Try v.db.reconnect.all module [1].

Ma

[1] https://grass.osgeo.org/grass72/manuals/v.db.reconnect.all.html

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Jeshua Lacock

> On Jul 19, 2017, at 5:07 PM, Jeshua Lacock  wrote:
> 
> I created the location with Grass 7.2, so if it is the default, I don’t 
> understand why SQLite wasn’t used?

Actually; correction: The location I imported the vector data into was created 
with GRASS 7.2 and I can see its using SQLite. The location it was projected to 
is using DBF.

Short of creating a new location, is there a way to change it to SQLite?


Thanks,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com

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

Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Jeshua Lacock

> On Jul 19, 2017, at 3:58 AM, Moritz Lennert  
> wrote:
> 
> That's linked to your use of the DBF format for attribute tables. Switch to 
> SQLite (current default).

Interesting!

I created the location with Grass 7.2, so if it is the default, I don’t 
understand why SQLite wasn’t used?

Is there any documentation for switching to/using SQLIte?

I looked at this page, but don’t see any information how to select what backend 
is used:

https://grass.osgeo.org/grass72/manuals/sql.html


Thanks,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com

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

Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Micha Silver

  
  


On 07/19/2017 10:55 AM, Jeshua Lacock
  wrote:


  

  
On Jul 19, 2017, at 1:01 AM, Jeshua Lacock  wrote:

I can’t seem to patch two vectors together with an attribute table then use the v.overlay command on the patched vector. I can use v.overlay if I don’t use v.patch's -e option, but I need the attribute table. Any way around this?

  
  
I was able to get it to work by using v.db.renamecolumn to rename columns that would be duplicates when truncated by v.patch.

I am kind of surprised we can only use columns with 10-characters, and using v.patch uses two of the characters (it appends a_ etc.). 8 characters isn’t exactly a lot. Is there are reason why columns have this limitation?



You should consider to change all your vectors to use the sqlite
database backend (now the default). Then you'll avoid problems like
this.


  
Cheers,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com

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


-- 
Micha Silver
cell: +972-523-665918
  

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

Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Moritz Lennert

On 19/07/17 09:55, Jeshua Lacock wrote:



On Jul 19, 2017, at 1:01 AM, Jeshua Lacock  wrote:

I can’t seem to patch two vectors together with an attribute table then use the 
v.overlay command on the patched vector. I can use v.overlay if I don’t use 
v.patch's -e option, but I need the attribute table. Any way around this?


I was able to get it to work by using v.db.renamecolumn to rename columns that 
would be duplicates when truncated by v.patch.

I am kind of surprised we can only use columns with 10-characters, and using 
v.patch uses two of the characters (it appends a_ etc.). 8 characters isn’t 
exactly a lot. Is there are reason why columns have this limitation?


That's linked to your use of the DBF format for attribute tables. Switch 
to SQLite (current default).


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

Re: [GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Jeshua Lacock

> On Jul 19, 2017, at 1:01 AM, Jeshua Lacock  wrote:
> 
> I can’t seem to patch two vectors together with an attribute table then use 
> the v.overlay command on the patched vector. I can use v.overlay if I don’t 
> use v.patch's -e option, but I need the attribute table. Any way around this?

I was able to get it to work by using v.db.renamecolumn to rename columns that 
would be duplicates when truncated by v.patch.

I am kind of surprised we can only use columns with 10-characters, and using 
v.patch uses two of the characters (it appends a_ etc.). 8 characters isn’t 
exactly a lot. Is there are reason why columns have this limitation?


Cheers,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com

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

[GRASS-user] Can't use v.overlay on patched vector

2017-07-19 Thread Jeshua Lacock

Greetings,

I can’t seem to patch two vectors together with an attribute table then use the 
v.overlay command on the patched vector. I can use v.overlay if I don’t use 
v.patch's -e option, but I need the attribute table. Any way around this?

If I run these commands:

v.patch -e input=Road,Road2 output=RoadAll
v.overlay  ainput=RoadAll binput=bounds operator=and output=RoadAll_crop

I get these warnings and error:

WARNING: Database connection not defined for layer 1
WARNING: DBMI-DBF driver: column name 'a_PERMANENT_' truncated to
 'a_PERMANEN'
WARNING: DBMI-DBF driver: column name 'a_SOURCE_FEA' truncated to
 'a_SOURCE_F'
WARNING: DBMI-DBF driver: column name 'a_SOURCE_DAT' truncated to
 'a_SOURCE_D'
WARNING: DBMI-DBF driver: column name 'a_SOURCE_D00' truncated to
 'a_SOURCE_D'
DBMI-DBF driver error:
Column 'a_SOURCE_D' already exists (duplicate name)

DBMI-DBF driver error:
Unable to create table.Unable to execute statement.

DBMI-DBF driver error:
Unable to create table.Unable to execute statement.

ERROR: Unable to create table: 'create table RoadAll_crop (cat integer
   , a_cat integer, a_TEMP varchar(200), a_TNMFRC varchar(200),
   a_PERMANENT_ varchar(200), a_SOURCE_FEA varchar(200), a_SOURCE_DAT
   varchar(200), a_SOURCE_D00 varchar(200), a_SOURCE_ORI varchar(200),
   a_LOADDATE varchar(200), a_INTERSTATE varchar(200), a_INTERSTA00
   varchar(200), a_INTERSTA01 varchar(200), a_INTERSTA02 varchar(200),
   a_US_ROUTE varchar(200), a_US_ROUTE_A varchar(200), a_US_ROUTE_B
   varchar(200), a_US_ROUTE_C varchar(200), a_STATE_ROUT varchar(200),
   a_STATE_RO00 varchar(200), a_STATE_RO01 varchar(200), a_STATE_RO02
   varchar(200), a_COUNTY_ROU varchar(200), a_FEDERAL_LA varchar(200),
   a_STCO_FIPSC varchar(200), a_FULL_STREE varchar(200), a_MTFCC_CODE
   varchar(200), a_SHAPE_LENG varchar(200), b_cat integer )'


Thanks,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com

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