[mapserver-users] Open Source solution to display PNG maps converted from SVG in a map viewer with labels and possibly tiles

Jeremy Short jshort at lodgingcompany.com
Fri May 9 19:54:33 EDT 2008


The original data is stored in SVG and it is not georeferenced.  It is a 
collection of hand-rendered maps in Inkscape, an SVG editor, with 
geographical measuring units like latitude or longitude.

We wanted to stay away from serving up SVG because Firefox supports SVG 
but not IE and we didn't want to force people to have to install a 
plugin. I tried the link (http://www.carto.net/williams/yosemite/) and 
it looks good but it looks like the plugin is needed for IE.

Any ideas for non-georeferenced SVG/PNG source files to serve up PNG 
files which can be used as a base layer for a map?  Can I even use a 
non-georeferenced SVG/PNG with Mapserver?

Andreas Neumann wrote:
> So, if I understand you correctly, your original map data is stored in 
> SVG files.
>
> In that case you can use Apache Batik to render into georeferenced PNG 
> files (if your SVG data is georeferenced). You can trigger this 
> rasterization process whenever there was a change in the SVG data. 
> This georeferenced raster data can be fed into UMN Mapserver for fast 
> delivery. My guess is, while the quality of the Apache Batik rendering 
> process is excellent, it won't be as fast as the UMN Mapserver, when 
> delivering maps.
>
> Alternatively, you can consider to serve the SVG data directly, 
> without going through PNG files. You can also combine SVG with Postgis 
> where the vector data is stored in Postgis and the SVG is generated on 
> the fly. You can see an example of this approach at 
> http://www.carto.net/williams/yosemite/ - for bigger SVG files it is 
> certainly faster if you store your geodata in a spatial database and 
> deliver customized extents, simplified versions and sub-selects 
> appropriate to the chosen mapscale.
>
> Hope this helps,
> Andreas
>
>
> Jeremy Short wrote:
>> My goal is to render an SVG image map to PNG to display on our 
>> website within a mapviewer of some sort with panning and zooming 
>> capability. We have many maps. I want to use an Open Source solution. 
>> Our web server is running Apache.
>>
>> Additionally we want to add a "layer" of text labels which will not 
>> get bigger when we zoom in. Too, since we have large pictures so they 
>> don't degrade when one zooms in, we would like to explore the ability 
>> to send only "tiles" of the map picture if it's required.
>>
>> What I have found thus far:
>>
>> 1. Using OpenLayers as a client gives us the ability to load a PNG 
>> file, pan, and zoom.
>>
>> 2. For the ability to add layers of text labels and transport tiles 
>> of data I explored the possiblity to use Mapserver. It appears 
>> Mapserver requires a map file like an SHP file as input and it will 
>> output a PNG. I would like to feed it as input a PNG file but I don't 
>> know if Mapserver is designed for this.
>>
>> Looking further into this I see one can possibly use a tool like 
>> gvSIG or AB Viewer to translate a PNG to a SHP file but I want to 
>> automate the process without this extra step because people will be 
>> modifying the SVG file periodically.
>>
>> There seems like there must be a better way to accomplish what I want 
>> which is to render PNG images in a client web browser with the 
>> ability to navigate within the map and to render text labels and 
>> transport tiles of information. Is there?
>>
>>
>>
>
>

-- 
Jeremy Short
IT Programmer
The Lodging Company
http://www.skihills.com/


More information about the mapserver-users mailing list