[gdal-dev] Re: DXF Writer and labels: encoding,
angle and anchor position?
Andreas Neumann
a.neumann at carto.net
Thu Nov 4 12:10:43 EDT 2010
Hi Frank,
Regarding the encoding:
It seems like ogr2ogr just writes everything out as UTF-8. My data source
(postgres database) is also utf-8. Autocad and FME however, don't like the
utf-8 encoding. They probably expect some Windows encoding (either
ISO-8859-15 or Latin 1 or whatever Windows uses by default). However, I
can't provide any hard facts on this. Is there some information about
encoding in the dxf specification?
I still can't get label angles to work and I can't test the symbol angles
yet, because I can't get my own blocks to display.
It seems like ogr2ogr inserts the block definitions (I can see them in the
output file), but they either aren't properly inserted or referenced. When
I go into the block editor in autocad I can only see the block definition
of the first block.
Again - I will send the header.dxf and provide a bug report.
Thanks,
Andreas
On Thu, November 4, 2010 12:14 am, Frank Warmerdam wrote:
> On Mon, Nov 1, 2010 at 10:19 AM, Andreas Neumann <a.neumann at carto.net>
> wrote:
>> Hi,
>>
>> Again some question on the dxf-writer, now with regards to labels:
>>
>> * some of my special characters don't display correctly, e.g. the
>> Unicode
>> 2030 sign (german Promille sign) doesn't display (neither in the FME
>> viewer nor in Autocad Design Review) - some other "strange characters"
>> are
>> displayed instead. Do I have to set an encoding for the target dxf? My
>> source Postgis table is in UTF-8.
>
> Andreas,
>
> Hmm, encoding in DXF is not something I have given any
> consideration to so far. The PostGIS driver should be
> returning the text in utf-8, but I do nothing special to
> process text read or written from/to DXF. I ought to be.
>
> Could you file a ticket on this issue? It would be helpful
> to include a small example DXF created with autocad that
> does display the character(s) in question properly and then
> an example of what happens with OGR.
>
>> * should label angle work? (in my case it doesn't)
>
> I have confirmed that when trying to write MTEXT
> entities the style string is checked for angle and
> trying to write it. There might be problems with this
> though I thought it was working in my test suite. If
> you file a ticket, with example input I will dig into the
> details.
>
>> * should anchor position work?
>
> Yes, it should. There is code to translate the anchor.
> If it isn't working please file a ticket.
>
>> Here is an example OGR feature-style that I am testing:
>>
>> LABEL(f:"Cadastra Cn,Arial",s:1.5g,t:"PVC 150
>> -6.96-",c:#FF0000,a:72,p:3)
>>
>> In the above example, the label angle does not work - I am unsure about
>> the anchor position.
>
> 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
>
--
Andreas Neumann
http://www.carto.net/neumann/
http://www.svgopen.org/
More information about the gdal-dev
mailing list