Comments (5)
Just a small update, if you need I fund that enhancement it's not a problem but I can do that only until end of this year :/
from grass.
The result of v.out.ogr is correct, the result of v.out.postgis is wrong.
If I understand correctly, the vector to be exported has been imported previously with v.in.ogr
. Please provide a sample dataset for testing in shapefile, GeoPackage or similar format.
More detailed explanations:
When a vector with overlapping polygons is imported, the overlapping parts are converted to a topological vector representation: the overlapping parts are represented as separate topological areas and get the categories of all overlapping polygons. These category values are stored in layer 1, if only one OGR layer has been imported. In this case, the number of overlapping polygons is stored as category value in layer 2. Topological areas that represent overlapping parts of input polygons can be identified by selecting areas that have a category in layer 2. In a topological representation, overlaps are areas with more than one category in layer 1. Such overlaps can be resolved by deleting the wrong category value(s) from areas with several category values in layer 1. The user has to decide which category values are wrong.
See also vector categories
from grass.
Thanks for your explanation. I understand well now but I'm trying to find an automatic full GRASS way.
I will prepare tomorrow a sample dataset.
From now, example data from PostGreSQL :
Dark blue area are duplicates. Dark blue area with non white linear but light blue are underneath the bigger polygon.
Everything has unique gid value.
Import PostGIS > GRASS with v.clean - snap, v.clean - break
Everything has been cut out, got perfect topology with some duplicated geometries.
Got unique cat value except for exact duplicate object but other v.clean function, such remove duplicate geometries are not working due to what you explain during our training session and here.
From now, I've export with v.out.ogr to PostGIS and use following SQL query ;
DELETE FROM schema.layer AS a
USING schema.layer AS b
WHERE a.gid > b.gid AND ST_Equals(a.geom, b.geom);
Is there an automatic way in GRASS to do that or should we consider to add a new v.clean function for that (We can see how to fund that) ?
Result is fine, no duplicate and topology fit perfect.
from grass.
Dear @metzm
Please find a GPKG with sample data downloadable here : https://cloud.sirs-fr.com/index.php/s/emcazNaF7XaqagQ
It contains a landcover database after snap, clean process and with exact geometries duplicate
An other layer will help you to locate those cases.
from grass.
Solve by using v.out.ogr instead and then clean duplicate with PostGIS
from grass.
Related Issues (20)
- [Bug] Cannot remove/overwrite corrupt vector maps
- [Bug] grasswxpy_de.po: has a duplicate message definition HOT 2
- [Bug] temporal tools fail with SQLite 3.31 HOT 3
- [Feat] Missing example for grass.jupyter.SeriesMap in documentation HOT 1
- [Bug] Graphical Modeler: reading coordinates from map window does not work HOT 1
- [Bug] Outdated instructions: Unknown configure options HOT 1
- [Feat] `topoidx` needs a projected raster, but this is not documented HOT 2
- Develop a GRASS Conda package that will be useable across multiple OS platforms
- [Bug] Display commands for `d.mon` can take a long time *unexpectedly* to update the `cmd` file when first run. HOT 9
- [Bug] `d.erase red` doesn't work with d.mon wx0 HOT 1
- [Bug] `d.redraw` script doesn't redraw `d.rast.leg`
- QGIS r.sun.insoltime is CPU locked? HOT 2
- [Bug] REQUIREMENTS.md is outdated: SVM, PDAL and maybe more missing
- [Bug] r.univar returns nan for rasters with only negative values HOT 7
- [Bug] Zoom to saved region not working properly with "Constrain display resolution to computational settings"
- [Bug] d.rast.num not aligned right after Zoom to saved region HOT 1
- [Bug] d.rast.arrow not aligned with constraining display resolution right after Zoom to saved region HOT 8
- Build fails with strict-aliasing violations HOT 1
- r3.out.netcdf seems to output only one 2D map HOT 2
- [Feat] Add JSON output to r.what HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grass.