<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Ralf,<br>
<br>
do you use the same ogr2ogr command to create dxf from polygon data
as I did? Or do you work with additional configure options?<br>
<br>
Greetings,<br>
<br>
Verena<br>
<br>
<br>
Am 27.01.2012 10:02, schrieb Ralf Suhr:
<blockquote cite="mid:201201271002.11346.Ralf.Suhr@itc-halle.de"
type="cite">
<meta name="qrichtext" content="1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;">Hi Verena,</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">I'm using gdal 1.8.1 for
the same task. ArcGIS, "Free DWG Viewer" and DWG True View 2012
are able to open all gdal output without any error messages.</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">Gr</p>
<p style="margin: 0px; text-indent: 0px;">Ralf</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">On Freitag 27 Januar
2012 09:12:15 Verena Diewald wrote:</p>
<p style="margin: 0px; text-indent: 0px;">> Hi Ralf,</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> Am 26.01.2012
17:20, schrieb Ralf Suhr:</p>
<p style="margin: 0px; text-indent: 0px;">> > Hi Verena,</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > can you
provide more information. What software version did you use</p>
<p style="margin: 0px; text-indent: 0px;">> > (gdal,
postgis).</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> PostgreSQL 9.0.4</p>
<p style="margin: 0px; text-indent: 0px;">> PostGIS 1.5</p>
<p style="margin: 0px; text-indent: 0px;">> GDAL 1.9dev</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> > What kind of
geometries is in the database.</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > psql -d mydb
-c "SELECT DISTINCT GeometryType( geom_column ) FROM</p>
<p style="margin: 0px; text-indent: 0px;">> > my_data"</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> POLYGON</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> > What happend
if you select only one geometrytype from database.</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > ogr2ogr -f
"DXF" -sql "SELECT * FROM my_data WHERE GeometryType(</p>
<p style="margin: 0px; text-indent: 0px;">> > geom_column )
= 'POLYGON'" my_data.dxf PG:'host=localhost password=xxx</p>
<p style="margin: 0px; text-indent: 0px;">> > user=xxx
dbname=MYDB'</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> Every dxf file I
create only contains one single geometrytype.</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> Best regards,</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> Verena</p>
<p style="margin: 0px; text-indent: 0px;">> </p>
<p style="margin: 0px; text-indent: 0px;">> > Gr</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > Ralf</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > On Donnerstag
26 Januar 2012 16:56:48 Verena Diewald wrote:</p>
<p style="margin: 0px; text-indent: 0px;">> > > Hi
Darren,</p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > I tried
that option, but the error still remains.</p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > Does
anyone have another idea?</p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > >
Greetings,</p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > Verena</p>
<p style="margin: 0px; text-indent: 0px;">> > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > Am
26.01.2012 16:00, schrieb Carman, Darren:</p>
<p style="margin: 0px; text-indent: 0px;">> > > > Try
adding -nlt POLYGON (also has POINT and LINESTRING options).</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > We
have this option on an older version that used the ODA libraries</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
directly, so can't guarantee it's still the same.</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Darren</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
*From:*gdal-dev-bounces@lists.osgeo.org</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
[<a class="moz-txt-link-freetext" href="mailto:gdal-dev-bounces@lists.osgeo.org">mailto:gdal-dev-bounces@lists.osgeo.org</a>] *On Behalf Of *Verena</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > Diewald</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
*Sent:* 26 January 2012 14:03</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
*To:* <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a></p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
*Subject:* [gdal-dev] Creating DXF with ogr2ogr</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > Hi
all,</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > I'm
trying to create DXF files from a PostgreSQL database using</p>
<p style="margin: 0px; text-indent: 0px;">> > </p>
<p style="margin: 0px; text-indent: 0px;">> > ogr2ogr:</p>
<p style="margin: 0px; text-indent: 0px;">> > > >
|ogr2ogr -nln my_data -a_srs EPSG:25832 -s_srs EPSG:25832 -t_srs</p>
<p style="margin: 0px; text-indent: 0px;">> > > > |</p>
<p style="margin: 0px; text-indent: 0px;">> > > >
|EPSG:25832 -f "DXF" my_data.dxf PG:'host=localhost password=xxx</p>
<p style="margin: 0px; text-indent: 0px;">> > > > |</p>
<p style="margin: 0px; text-indent: 0px;">> > > >
|user=xxx dbname=MYDB' -sql "SELECT * FROM my_data"|</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > It
works fine with point data, but I get an invalid dxf file for</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
polygon data. Opening the polygon dxf file results in the
following</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
error:</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > The
following error was encountered while reading</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > in
HATCH starting at line 1546:</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Error: expected group code 10</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Invalid or incomplete DXF input -- drawing discarded.</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > Do I
have to pass any more options to ogr2ogr when creating a polygon</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > dxf?
What did I do wrong?</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > Does
anyone have an idea about that?</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Greetings,</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Verena</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Infoterra Ltd. Is part of the Astrium GEO-Information Services</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Division and a wholly owned subsidiary of Astrium, Europe's
leading</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
space systems and services specialist.</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Disclaimer. The information contained in this e-mail and its</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
attachments are confidential and intended only for the use of
the</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
named addressee(s). If you are not the intended addressee,
please do</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > not
read, copy, use or disclose this message or its attachments. If</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > you
have received this message in error, please notify the sender</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
immediately and delete or destroy all copies of this message and</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
attachments in all media. Any views or opinions expressed are
solely</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
those of the author and do not necessarily represent those of</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Infoterra Ltd and shall not form part of any binding agreement.</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Infoterra Limited a company registered in England under number</p>
<p style="margin: 0px; text-indent: 0px;">> > > >
2359955</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > and
having its registered office at Atlas House, 41 Wembley Road,</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > >
Leicester, LE3 1UT. VAT number GB 476 0468 27.</p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > </p>
<p style="margin: 0px; text-indent: 0px;">> > > > P
Before printing, think about the environment</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
</pre>
</body>
</html>