2

I'm trying to simply append a map to other map, without any sort of geometric operations as merge or intersects, just the original geometries with theirs attributes. This is what I already tried:

# input maps are poly2 and poly3
# First, i change the categories of poly3 to avoid categories conflicts:
# see http://grass.osgeo.org/grass64/manuals/v.patch.html 
v.category in=poly3 option=sum cat=10000 out=poly3_category --overwrite
g.remove vect=poly3
g.rename vect=poly3_category,poly3
# I update the cat column of the table as well (why this is not done 
# automatically by v.category??)
v.db.update poly3 col=cat qcol="cat+10000" 

# now the to maps are patched together
db.droptable -f table=polygons    
v.patch -e input=poly2,poly3 output=polygons --overwrite

# export to result as geojson:
v.out.ogr in=polygons olayer=polygons format=GeoJSON dsn=/tmp/polygons.json type=area

The geometries of the result map polygons.json look good, but the attributes are messy: I can not distinguish which records come from poly2 and which ones from poly3. Many records have only empty attributes. What I'm doing wrong?

1
  • Please, accept the answer or create a new answer with the solution you've used and accept that answer. (So, this question is marked as solved.)
    – wenzeslaus
    Dec 22, 2014 at 19:30

1 Answer 1

0

For the record, the question was answered in the GRASS User list:

http://lists.osgeo.org/pipermail/grass-user/2014-December/071451.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.