[gdal-dev] GDAL PDF - Styling options don't work

snorimaps snori at geovista.in
Fri Jan 1 07:32:10 PST 2021


I'm trying to create a geopdf using gdal_translate. However, the basic
styling options provided by GDAL don't work. viz:

- PEN: dash patterns for Linestrings don't work
- LABEL: angle (a:) option for Points doesn't work, when {angle} needs to be
read from feature
properties (ex: a:{rotation}). Manual angle value entry works (ex: a: 60).

Can anyone help resolve this? Or I would appreciate anyone who had
experienced similar issues to comment on this.



My vst code for reference:
<OGRVRTDataSource>
    <OGRVRTLayer name="ParcelLines">
        <SrcDataSource>parcellines_json.geojson</SrcDataSource>
		<SrcSQL>SELECT *, 'PEN(c:#000000,w:10px)' as OGR_STYLE from
"ParcelLines"</SrcSQL>
        <GeometryType>wkbLineString</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
    </OGRVRTLayer>
	<OGRVRTLayer name="GLines">
        <SrcDataSource>glines_json.geojson</SrcDataSource>
		<SrcSQL>SELECT *, 'PEN(c:#FF0000,w:2px,p:"10mm 15mm")'  as OGR_STYLE from
"GLines"</SrcSQL>
		<GeometryType>wkbLineString</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
    </OGRVRTLayer>	
    <OGRVRTLayer name="Label">
        <SrcDataSource>labels_json.geojson</SrcDataSource>
		<SrcSQL>SELECT *, 'LABEL(c:#000000,s:20px,a:{"lrotationd"},t:{length})' as
OGR_STYLE from "Label"</SrcSQL>
		<GeometryType>wkbPoint</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
    </OGRVRTLayer>
</OGRVRTDataSource>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list