[GRASS-dev] v.proj: line densification added for reprojection error minimization

Hi,

Markus Metz kindly added line densification to v.proj (r63307)

[neteler@oboe ~]$ grass70 ~/grassdata/latlong/grass7/

g.region n=60 s=40 w=0 e=30 res=10 -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 60N
south: 40N
west: 0
east: 30E
nsres: 10
ewres: 10
rows: 2
cols: 3
cells: 6

v.in.region box_latlong_10deg
exit

# EPSG 3035, metric EU LAEA:
grass70 ~/grassdata/europe_laea/user1/
GRASS 7.0.0svn (europe_laea): >

# "traditional way"
v.proj box_latlong_10deg out=box_latlong_10deg_no_densification
location=latlong mapset=grass7 smax=0

# with new line densification
v.proj box_latlong_10deg out=box_latlong_10deg_yes_densification
location=latlong mapset=grass7

g.region vect=box_latlong_10deg_no_densification

# compare:
d.mon wx0
d.vect box_latlong_10deg_no_densification color=red
d.vect box_latlong_10deg_yes_densification color=green fill_color=none

The result (see screenshot, maybe an extreme example but yet helpful
to show the improvement) shows how nicely the projection is performed
now (green color is new output).
Please benchmark this with other GIS...

Thank to Markus Metz for this implementation. I took liberty to
backport it to relbranch70 in r63532.

markusN

(attachments)

v_proj_line_densification_EU_LAEA.png

The result (see screenshot, maybe an extreme example but yet helpful
to show the improvement) shows how nicely the projection is performed
now (green color is new output).
Please benchmark this with other GIS...

attached, done with a GIS from redmont

<http://osgeo-org.1560.x6.nabble.com/file/n5177808/box_latlong_10deg_proj_laea.png&gt;

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-proj-line-densification-added-for-reprojection-error-minimization-tp5177786p5177808.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Helmut Kudrnovsky wrote

The result (see screenshot, maybe an extreme example but yet helpful
to show the improvement) shows how nicely the projection is performed
now (green color is new output).
Please benchmark this with other GIS...

attached, done with a GIS from redmont

to be fair, there is a tool there for densifying lines and polygons; applied
this first, vector reprojecting also works correctly there.

<http://osgeo-org.1560.x6.nabble.com/file/n5177819/box_latlong_10deg_densified_proj.png&gt;

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-proj-line-densification-added-for-reprojection-error-minimization-tp5177786p5177819.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Sun, Dec 14, 2014 at 6:14 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Helmut Kudrnovsky wrote

The result (see screenshot, maybe an extreme example but yet helpful
to show the improvement) shows how nicely the projection is performed
now (green color is new output).

BTW; now posted also here:
http://courses.neteler.org/grass-gis-7-vector-data-reprojection-automated-vertex-densification/

Please benchmark this with other GIS...

attached, done with a GIS from redmont

to be fair, there is a tool there for densifying lines and polygons; applied
this first, vector reprojecting also works correctly there.

<http://osgeo-org.1560.x6.nabble.com/file/n5177819/box_latlong_10deg_densified_proj.png&gt;

Good - but is that the default or requires extra tricks/knowledge?

And how about QGIS? Because ogr2ogr delivers only the trapezoid with
default settings.

Markus

<http://osgeo-org.1560.x6.nabble.com/file/n5177819/box_latlong_10deg_densified_proj.png&gt;

Good - but is that the default or requires extra tricks/knowledge?

2 steps with 2 different tools are needed: (1) densify polygon line, (2)
reproject to new SRS; and of course the knowledge that large polygons may
need some densifying.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-proj-line-densification-added-for-reprojection-error-minimization-tp5177786p5177823.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

And how about QGIS?

the same, 2 steps are needed: (1) densify data, (2) reproject vector

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-proj-line-densification-added-for-reprojection-error-minimization-tp5177786p5177825.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Sun, Dec 14, 2014 at 7:34 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

And how about QGIS?

the same, 2 steps are needed: (1) densify data, (2) reproject vector

for non-topological polygons, 3 steps are needed:
1) densify
2) snap
3) reproject

snapping is needed to avoid small overlapping areas and small gaps
between polygons. For topological areas composed of boundaries, this
is not an issue.

Markus M