Boost logo

Geometry :

Subject: [ggl] [Shp & Boost.Geometry] How to load?
From: Barend Gehrels (barend)
Date: 2011-04-29 08:50:17


Hi,

> I'm quite new in Boost.Geometry and GIS stuff.

Welcome to the list!

> I have a set of geometries
> stored in a shapefile and I would like to load that information to the
> Boost.Geometry classes and then, manage the geometries from there.
>
> My problem is that I don't know if Boost.Geometry has implemented this
> shapefile load/store functions or it should be implemented. If the second
> option is the correct, I guess that any library must be used to manage
> shapefiles: which one will you recommend me? Shapelib? OGR?

I recommend shapelib, and there is a sample here:
<http://svn.boost.org/svn/boost/trunk/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp>

Writing shapelib objects is also supported, and there is a small wrapper
around shapelib available (to write, not yet to read). It is used here:
<http://svn.boost.org/svn/boost/trunk/libs/geometry/example_extensions/gis/io/shapelib/shapelib.cpp>

Regards, Barend


Geometry list run by mateusz at loskot.net