Hi,
I'm in the process of upgrading from Mapnik 2.2 to 3. I use Mapnik through the Python bindings, primarily through PythonDatasource. Is PythonDatasources still supported in Mapnik 3?
Mapnik 2.1 introduced a Python plugin ([1], [2]) that enabled python data sources. That is, libmapnik would call back into Python to get the features for a given bounding box. One would use this via `mapnik.Python` [3] and `mapnik.PythonDatasource` [4]. This function/class is still defined in the Python bindings, but the supporting code in mapnik appears to have been removed when the Python bindings were split into their own repo.
When I run the following code (simplified from an example on the wiki [5])
class TestDatasource(mapnik.PythonDatasource):
def features(self, query):
ds = mapnik.Python(factory='TestDatasource')
I get the following error:
RuntimeError: Could not create datasource for type: 'python' (searched for datasource plugins in '/var/lib/conda/envs/nextdoor/lib/mapnik/input')
I'm building libmapnik & python-mapnik from source, so it is possible that I've built them incorrectly. That said, this looks like PythonDatasource is no long supported and `mapnik.Python` and `mapnik.PythonDatasource` are vestigial. Can someone more familiar with the guts of Mapnik confirm that this is indeed the case?
-matt
PS I have conda builds for libmapnik and python-mapnik if anyone is interested in reproducing my error. [6]
[6] conda install -c mrterry python-mapnik