[gdal-dev] ogr2ogr dxf multilinestring as block

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] ogr2ogr dxf multilinestring as block

andrew terry
Hi,

As per the documentation, i'm seeing mulitlinestring being split up into
LWPOLYLINE elements.

I'd like to make them a block and have tried adding a "blockname" column and
given each multilinestring a unique reference.

I've also tried the DXF_INLINE_BLOCKS set to FALSE option.

Is this possible and if so, is there an example anywhere?

Thanks

Andy



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr dxf multilinestring as block

Alan Thomas
Hi Andrew,

I'm assuming here that you are converting from another format to DXF.

The writer ignores DXF_INLINE_BLOCKS; this configuration option is
only used by the reader. To create blocks, you must place the features
that will compose the block on the "blocks" layer. (Clearly the format
that you are converting from must support multiple layers.) Be sure to
use the Block field instead of BlockName in GDAL 2.3+. Then, on the
"entities" layer, place POINT geometries, with the Block field
likewise set, at the positions where you want the block to be
inserted.

Alan


On Fri, 1 Feb 2019 at 01:35, andrew terry <[hidden email]> wrote:

>
> Hi,
>
> As per the documentation, i'm seeing mulitlinestring being split up into
> LWPOLYLINE elements.
>
> I'd like to make them a block and have tried adding a "blockname" column and
> given each multilinestring a unique reference.
>
> I've also tried the DXF_INLINE_BLOCKS set to FALSE option.
>
> Is this possible and if so, is there an example anywhere?
>
> Thanks
>
> Andy
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/gdal-dev



--
Alan Thomas
Software Developer
ThinkSpatial
http://www.thinkspatial.com.au
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr dxf multilinestring as block

andrew terry
Hi Alan,

Thanks for replying.

I'm creating from postgres as a source. I think i may have been confused by
the "layer" references as i am getting CAD layers nicely with a Layer field
from postgres but i'm suspecting now that there's some additional OGR Layer
i need to reference?

Is there a way to do this on the command line. In the python autotest for
ogr_dxf.py it seems to be: ds.CreateLayer('blocks'). Not quite sure how to
include that?

Andy





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr dxf multilinestring as block

andrew terry
In reply to this post by Alan Thomas
Hi Alan,

I've found that by having a postgres table "blocks", that is an ogr layer
and i can get a cad file out which has the block in it.

Not sure whether i can call two tables with ogr2ogr but at worst i can run
the command once to create a template dxf to use as a header for my entities
to output as.

Thanks

Andy



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev