Mark,
The "string" option was added in trunk (so is only available in the upcoming
mapnik 2.x release). But It is only needed to avoid the relative paths logic of
XML loading from trying to "relativize" an actual geojson string.
So in Mapnik 0.7.1, when using python, you can just pass the geojson string
data to the 'file' parameter. Under the hood this does the same thing as
trunk's 'string' parameter, which is to dish off to ogr, which looks for a
string starting with '{', and interprets that a geojson.
Dane
On Aug 23, 2011, at 3:12 PM, Mark Ireland wrote:
> Hi folks,
> I’m trying to use the Mapnik ogr datasource, by passing a string of data to
> it.
> The documentation I found says:
>
> string: optional (replaces file parameter) string of literal OGR-datasource
> data, like GeoJSON
>
> But if I use the line:
> mapnik.Ogr(string='{"type":"Point","coordinates":[3130729.488686,10091615.590192]}')
>
> …then it returns “missing <file> parameter”.
>
> So, can anyone help me with the syntax to pass a GeoJSON string instead of a
> file name?
>
> Thanks
>
> Mark Ireland
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users