I'm trying to export postgis points as blocks to DXF format. I have a simple table in postgis with columns:

CREATE TABLE pod_com_azimuth
  ogc_fid integer,
  rotation double precision,
  pointtype text,
  geom geometry(Point)

I'm converting it to DXF with an ogr2ogr utility:

ogr2ogr -f DXF angle_test.dxf 
PG:"dbname='coms' host='localhost' port='5432' user='mofo' password='mofo' schemas=public"
-sql "select ogc_fid, rotation as blockangle, pointtype as blockname, 'rblk' as layer, geom 
from pod_com_azimuth"

But when I open the resulting file in AutoCAD i get a layer with POINT objects. But I need them to be blocks with a blockname and blockangle values taken from postgresql fields. How do I export them as blocks (inserts) ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.