[gdal-dev] MapInfo mixed geometry
Frank Warmerdam
warmerdam at pobox.com
Wed Sep 1 08:54:10 EDT 2010
Sebastian E. Ovide wrote:
> Hi All,
>
> I have MapInfo mixed geometry files. As MapServer doesn't support layers
> wityh mixed geometry, Is it possible to use gdal for extracting its
> points, its polygaons etc... and save them in different files ?
Sebastian,
You can do something like:
ogr2ogr your_points.shp mixed.tab -where "ogr_geometry='point'"
ogr2ogr your_lines.shp mixed.tab -where "ogr_geometry='linestring'"
ogr2ogr your_lines.shp mixed.tab \
-where "ogr_geometry='polygon' or ogr_geometry='multipolygon'"
Note that MapServer can draw from a mixed file, but you would need
to define a layer for each type of geometry you want to draw and
there are inefficiencies since the other geometries are discarded
after some expense reading for the layers they don't apply to. So
splitting things, as above, is best for large files.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list