[GRASS-user] OpenFileGDB input error

Markus Metz markus.metz.giswork at gmail.com
Mon Sep 25 13:24:21 PDT 2017


On Mon, Sep 25, 2017 at 8:23 PM, Even Rouault <even.rouault at spatialys.com>
wrote:
>
> On lundi 25 septembre 2017 11:04:35 CEST Rich Shepard wrote:
>
> > On Mon, 25 Sep 2017, Markus Metz wrote:
>
> > > these multi-surfaces are in the layer with multi-polygons. OGR calls
these
>
> > > geometries multi-surfaces. Investigating a bit more, I found
>
> > > curve-polygons within these multi-surfaces. Curve-polygons are in
turn not
>
> > > ordinary polygons, but defined by curves, and v.in.ogr (most GIS
software
>
> > > in general) does not support curves.
>
> >
>
> > Markus,
>
> >
>
> > Thanks for exploring the data files. Please suggest how I could extract
>
> > the useful polygons and attribute data. I know that agencies assume
everyone
>
> > buys ESRI's software and they're not concerned with accommodating those
of
>
> > us who do not. In the mid-1990s everyone used ESRI's export format
(.e00)
>
> > and it was easy to write input filters for grass back then.
>
>
> You could for example use ogr2ogr to convert the curve geometries to
linear ones with
>
>
> ogr2ogr -f sqlite out.db in.gdb -nlt CONVERT_TO_LINEAR
>
Thanks a lot for this suggestion! How are these curves converted to linear
features, i.e. how does ogr2ogr decide on reasonable conversion parameters
such as distance between vertices?

Regarding the dataset in question, it would be interesting to know what
kind of information is provided with these multi-surfaces, if it is the
same as in the multi-polygons or something different.

A summary on the OpenFileGDB import issues:

NHDmajor.gdb is available at
ftp://www.ecy.wa.gov/gis_a/inlandWaters/NHD/NHDmajor.gdb.zip

and contains 3 layers
1: NHD_MajorStreams (3D Measured Multi Line String)
2: NHD_MajorAreas (3D Multi Polygon)
3: NHD_MajorWaterbodies (3D Multi Polygon)

all are imported just fine with v.in.ogr in=NHDmajor.gdb out=NHDmajor

OGR layers are translated to GRASS layers, i.e. features of OGR layer 1:
NHD_MajorStreams are in GRASS layer 1, features of OGR layer 2:
NHD_MajorAreas are in GRASS layer 2, and features of OGR layer 3:
NHD_MajorWaterbodies are in GRASS layer 3.
Check with v.category input=NHDmajor option=report

2016WSDACropDistribution.gdb is available at
https://agr.wa.gov/PestFert/NatResources/docs/2016WSDACropDistribution.gdb.zip

and contains 2 layers
1: WSDACrop_2016 (Multi Polygon)
2: CropData (None)

the second layer is, according to OGR, empty, so it might be better to skip
it
Importing 2016WSDACropDistribution.gdb with
v.in.ogr in=2016WSDACropDistribution.gdb layer=WSDACrop_2016
out=2016WSDACropDistribution
succeeds if multi-surface geometries are skipped by v.in.ogr (as of trunk
r71508).

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170925/c4b94b6b/attachment.html>


More information about the grass-user mailing list