Hi,
I’m now setting attribute OGR_STYLE in my postGis db for a testlayer (line)
I’m now setting attribute OGR_STYLE in my postgis db for a test layer 
(LineString):
… SET \"OGR_STYLE\"= 'PEN(c:#FF3333,id:ogr-pen-4,w:1px)'
Does anyone know why the pen symbol (id) is ignored when exporting the PDF, 
it’s always a solid line?
Color and width is ok.
I’ve tried to draw a ogr-symbol together with a point layer and it worked like 
a charm.
Kind regards,
Paul

Från: Andreas Neumann [mailto:a.neum...@carto.net]
Skickat: den 11 november 2019 08:35
Till: Malm, Paul (Operations AIM)
Kopia: gdal-dev@lists.osgeo.org
Ämne: Re: [gdal-dev] ogr2ogr PDF


Hi Paul,

ogr2ogr usually doesn't care much about styling, unless you use ogr feature 
styles:

https://svn.osgeo.org/gdal/trunk/gdal/ogr/ogr_feature_style.html

Or you use QGIS 3.10* which has a nice GeoPDF export built in. But if you want 
to automate things, I understand that the automated solution might be better 
for your workflow.

*Disclaimer: QGIS 3.10 must be compiled with GDAL >= 3.0 and proj6, which as 
far as I know is currently not the case for QGIS Windows standalone builds. See 
also 
https://gis.stackexchange.com/questions/340030/create-geospatial-pdf-geopdf-is-greyed-out-in-pdf-export-options-in-qgis-3-10

Greetings,

Andreas

On 2019-11-11 08:28, paul.m...@lfv.se wrote:


Hi list,

I have a question on how to export a PDF file from PostGIS with a color on the 
lines instead of the default black lines. I have searched on the internet but 
have not reached all the way…

I have 2 tables that I would like to export into test.pdf (rivers and roads)

ogr2ogr -f "PDF" c:\Temp\test.pdf PG:"host=xxx.xxx.xxx.x user=yyyy 
dbname=testdb password=pwd" rivers roads



I would, for instance set like to set line width to 1 px and color to 4040FF on 
rivers,

Width 3 px and color FF4040 on roads.



Thanks,

Paul

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to