[GRASS-dev] Re: [GRASS GIS] #577: v.in.ogr: imported GPX file
results in N=0, W=0
GRASS GIS
trac at osgeo.org
Wed May 6 08:39:57 EDT 2009
#577: v.in.ogr: imported GPX file results in N=0, W=0
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Resolution: | Keywords: v.in.ogr, gpx
Platform: Linux | Cpu: x86-32
---------------------+------------------------------------------------------
Comment (by hamish):
Replying to [comment:3 mmetz]:
> Grass vector extends are calculated when topology is built,
> based on the primitives, which happens after all layers were
> imported by v.in.ogr, IOW grass vector extends should be
> calculated independent of the OGR layer extends. If all features
> are somewhere around 170, -46 and nowhere near 0,0, v.info
> should report extends accordingly. That's why I think there may
> be a bug in the vector libraries when building topology because
> v.out.ascii confirmed that no points where anywhere near 0,0.
>
> Hamish, can you do a bit more testing? Are the extends still wrong
> * after rebuilding topology with v.build?
yes
hmmm.... nodes 1 & 2:
{{{
G65> v.build gps_trk_gpx_import option=dump
---------- TOPOLOGY DUMP ----------
N,S,E,W,T,B: 0.000000, -46.055889, 170.724047, 0.000000, 0.000000,
0.000000
Nodes (3838 nodes, alive + dead ):
node = 1, n_lines = 1, xy = 0.000000, 0.000000
line = 1, type = 2, angle = -9.000000
node = 2, n_lines = 1, xy = 0.000000, 0.000000
line = -1, type = 2, angle = -9.000000
node = 3, n_lines = 4, xy = 170.641103, -45.827688
line = 7, type = 1, angle = -9.000000
line = 707, type = 1, angle = -9.000000
line = 2, type = 2, angle = 2.753561
line = 3, type = 2, angle = 2.753561
node = 4, n_lines = 2, xy = 170.189732, -46.050674
line = 706, type = 1, angle = -9.000000
line = -2, type = 2, angle = 0.575716
...
}}}
> * when importing track_points only from the GPX file?
> * when importing all shapefiles at once into one grass vector?
> * when importing the shapefile track_points only?
>
> v.in.ogr could also be modified to skip empty OGR layers (Feature Count:
0). I don't know if there are OGR-recognized vector formats where there
can be some info in a layer with no features, then empty layers should not
be skipped.
>
> Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/577#comment:4>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list