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

Milo van der Linden mlinden at zeelandnet.nl
Sat May 10 02:38:09 EDT 2008


Even data that is not georeferenced has some sort of projection being it 
0,0 for the lower left corner and 600,600 for the upper right. So you 
should be able to put that in Mapserver with a self created projection 
(1). Problems arise when you want to combine your maps with for instance 
satellite imagery because in that case you will need transformations to 
do the matching, and for transformations you need parameters to convert 
one projection to another (2). A quick and dirty solution for (2) would 
be to create images and georeference them manually with a GIS. qGIS has 
a nice georeferencing plugin that will help you in that process.

As you state in (2) "Mapserver requires a mapfile like a SHP"; that 
assumption is wrong. A mapfile is a metafile and in that way more like 
a  mapinfo wor file (workspace, I don't know the equivalent for esri) 
which has the great possibility to create meta descriptions for layers 
of an (almost) unlimited amount of known GIS sources.

So, the most important think to ask yourself is:
- Am I going to combine my SVG data source with layers that are 
georeferenced?

Because then you have some extra work at hand, but using mapserver to 
host your data is always an option.

Kind regards,

Milo van der Linden


Jeremy Short wrote:
> 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?
>>>
>>>
>>>
>>
>>
>



More information about the mapserver-users mailing list