0

I am setting up a new environment for OpenLayers using a MrSid file on our network as our source for the map. I have an Aerial in MrSID format that I want to use in OpenLayers. I could not find an example on how to set the map layer to use a MrSID file. Basically I am trying to do something like this:

var map = new ol.Map({
  layers: [
    new ol.layer.Tile({
      source: new ol.source.Source({file: 'http://server01/aerial.sid'})
    }),
    vectorLayer
  ],
  renderer: 'canvas',
  target: 'map',
  view: new ol.View2D({
    center: [0, 0],
    zoom: 1
  })
});

But it is not working. Any help would be appreciated. Thanks Before Hand.

Update: From the research I have been doing waiting for an answer, this is what I have found so far: OpenLayers does not support MrSID. An application server such as mapserver must be used between the MrSID file and OpenLayers. If this is true, will not this greatly affect the performance of loading the data from mapserver as opposed to finding a way to go directly from OpenLayers to MrSID?

1 Answer 1

0

OpenLayers doesn't support MrSID because it is a binary format as well as it doesn't support SHAPE files, because it is binary as well. There would be many problems occurring when processing binary formats in javascript and I am sure that it won't be any faster then if you did it in your mapServer and requested the server in a more "standard" way. The processing of KML and WKT simmple text formats is more client-meant than binary formats.

3
  • Thank you Mochi. Now I understand.
    – Rob
    Commented Mar 19, 2014 at 14:19
  • What would be the best way for performance to show it in OpenLayers? Would it be by using mapserver and if so which format? Thanks!
    – Rob
    Commented Mar 19, 2014 at 14:21
  • link here is a thread about importing SID into QGIS and than you decide what you want with it. I can't tell you exactly what to use, but my favourite is import into a database and have a WMS over that table to show the data in an openLayers WMS layer.
    – Mochi
    Commented Mar 19, 2014 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.