Hello,
Looking for the best way to do; I'd rather ask the community before to
reinvent the wheel ...
So, I have an application to generate tiles from XML and shape files
everywhere on the Globe.
The point is that I have one shapefile for each country.
Then when I want to draw something on a border, I have to load two or more
shape files.
E.G. If I draw the roads between France and Spain, I will have
road_spain.shp ans road_france.shp to load.
How can I handle it ?
I made it by adding 2 different layers to my XML config but 2 layers with
the exact same style list looks redundant to me ...
[XML]
...
<Layer name="road_france" srs="...">
<StyleName>nw_bg</StyleName>
<StyleName>nw_fill_78</StyleName>
<StyleName>nw_fill_56</StyleName>
<StyleName>nw_fill_34</StyleName>
<StyleName>nw_fill_12</StyleName>
<StyleName>nw_fill_0</StyleName>
<Datasource>
<Parameter name="type">shape</Parameter>
<Parameter
name="file">C:/data/shape/road_france</Parameter>
</Datasource>
</Layer>
<Layer name="nw_fr" srs="...">
<StyleName>nw_bg</StyleName>
<StyleName>nw_fill_78</StyleName>
<StyleName>nw_fill_56</StyleName>
<StyleName>nw_fill_34</StyleName>
<StyleName>nw_fill_12</StyleName>
<StyleName>nw_fill_0</StyleName>
<Datasource>
<Parameter name="type">shape</Parameter>
<Parameter
name="file">C:/data/shape/road_spain</Parameter>
</Datasource>
</Layer>
[/XML]
I felt much more like adding several <datasource /> tags on the same layer
but in this case only the last one is loaded.
What if I want to give the shape file list as a parameter of my application
? So that XLM style would be static and data source dynamically set at
runtime. (using Layer::set_datasource(...) C++ method)
Is it possible to think about uploading all my shape files into a database
with the billions of road elements in term of efficiency ?
Thank you for your light :)
--
View this message in context:
http://www.nabble.com/1-layer-many-shapes-tp25294863p25294863.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users