Ticket #40 (closed defect: fixed)

Opened 18 months ago

Last modified 12 months ago

Need an error if you use postgis input without having it installed

Reported by: mapnik@… Owned by: artem
Priority: Milestone: 0.5.0
Component: Core Library Version: SVN Trunk
Severity: Normal Keywords:
Cc: Patch Needs Improvement:
Needs Docmentation: Has Patch?:
Design Decision Needed:

Description

When using Mapnik and the PostGIS input driver, if you don't have the postgis driver installed mapnik simply assumes no data exists for the layer and continues on, when instead it should throw an error of some kind.

Steps to reproduce:

  • Build Mapnik without the PostGIS driver
  • Ask it to render a map that uses a PostGIS source

Expected behaviour:

  • Mapnik errors, telling you that the driver doesn't exist.

Actual behaviour:

  • Mapnik assumes the layer is blank, and renders an entirely blank map.

Change History

Changed 12 months ago by dave

This has been fixed as far as I can tell. If I remove the shape plugin, or try load a PostGIS datasource (I haven't built the PostGIS input plugin), I get an error:

Traceback (most recent call last):

File "displacement.py", line 64, in <module>

road_layer.datasource = Shapefile(file='../data/test/displacement')

File "/usr/lib/python2.5/site-packages/mapnik/init.py", line 72, in Shapefile

return CreateDatasource?(keywords)

UserWarning?: Could not create datasource. No plugin found for type 'shape'


Traceback (most recent call last):

File "displacement.py", line 68, in <module>

table='bmpolygon_joined_current')

File "/usr/lib/python2.5/site-packages/mapnik/init.py", line 76, in PostGIS

return CreateDatasource?(keywords)

UserWarning?: Could not create datasource. No plugin found for type 'postgis'

Changed 12 months ago by dave

Duplicate ticket #21

Changed 12 months ago by artem

  • status changed from new to closed
  • resolution set to fixed

Changed 12 months ago by artem

  • version set to SVN Trunk
  • milestone set to 0.5.0
Note: See TracTickets for help on using tickets.