<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you Frank,<br>
<br>
I will test the wher clause, come up with the right quoting and post my
final result to the list.<br>
<br>
Kind regards!<br>
<br>
Milo van der Linden<br>
<br>
Frank Warmerdam schreef:
<blockquote cite="mid:474B0843.3070107@pobox.com" type="cite">Milo van
der Linden wrote:
<br>
<blockquote type="cite">Hello list,
<br>
<br>
I have a table in mapinfo format that contains different geometry
types. some are errors and when I filter out the errors, multipolygon
and polygon remain.
<br>
<br>
I try to use ogr2ogr with -nlt to only get polygons. This doesn't work
the way I want it. When I open the resulting table in OpenJUMP, there
are still multipolygons in my table which prevent me from saving
changes I make with OpenJump.
<br>
</blockquote>
<br>
Milo,
<br>
<br>
The -nlt switch sets the type of a layer, but doesn't - in itself -
<br>
alter what geometries get written to the layer.
<br>
<br>
<blockquote type="cite">What I would like to know is if it is
possible to split multipolygons to polygons with regards to maintaining
the attributes. Can this be done? kind regards,
<br>
</blockquote>
<br>
With GDAL/OGR 1.4+ you should be able to do something like:
<br>
<br>
ogr2ogr out.shp in.shp -where "OGR_GEOMETRY = 'POLYGON'" in
<br>
<br>
I'm not sure if I have the quoting right.
<br>
<br>
Basically, OGR_GEOMETRY is a special field that will contain
<br>
the OGC WKT name for the geometry per:
<br>
<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/wiki/rfc6_sqlgeom">http://trac.osgeo.org/gdal/wiki/rfc6_sqlgeom</a>
<br>
<br>
It can be used in attribute filters.
<br>
<br>
Best regards,
<br>
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<title>3DSite</title>
<meta http-equiv="Content-Type" content="text/html; ">
<style type="text/css">
<!--
body {
        background-color: #FFFFFF;
        margin-left: 5px;
        margin-top: 5px;
        margin-right: 5px;
        margin-bottom: 5px;
}
body,td,th {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #333333;
}
.style4 {font-size: 9px; }
.style5 {font-size: 9px; color: #CCCCCC; }
-->
</style>
<meta content="MSHTML 6.00.2900.2912" name="GENERATOR">
<br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td rowspan="3"
style="background-image: url(http://www.3dsite.nl/images/3dsitemail.gif); width: 250px; height: 120px; background-repeat: no-repeat;"
align="left" height="0" valign="top" width="268">
<table 100%="" width="">
<tbody>
<tr>
<td width="100"> </td>
<td colspan="2" align="left" height="78" valign="middle"
width="0">
<p class="style4">3DSite - Milo van der Linden - CTO<br>
A. Joachimi kade 3 F, 4461 BG Goes <br>
(Zeeland, Nederland)<br>
<a href="mailto:milo@3dsite.nl">milo@3dsite.nl</a><br>
<a href="http://www.3dsite.nl">http://www.3dsite.nl</a><br>
</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table cellpadding="17" cellspacing="0">
<tbody>
<tr height="5">
<td valign="top">
<p class="style5"><span lang="NL">De informatie verzonden met dit
e-mail bericht is uitsluitend bestemd voor de geadresseerde(n). Gebruik
van deze informatie door andere dan de geadresseerde(n) is verboden.
Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van
deze informatie aan derde is niet toegestaan. Kopiëren en/of misbruiken
van ingesloten afbeeldingen en/of bestanden is wettelijke verboden en
strafbaar. 3DSite staat niet in voor de juiste en volledige
overbrenging van de inhoud van een verzonden e-mail, noch voor tijdig
ontvangst daarvan. Op al onze leveringen, aanbiedingen en verkopen zijn
van toepassing onze Algemene Voorwaarden, zoals gedeponeerd bij de
K.v.K. te Middelburg. 3DSite</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>