-2

I'm unfamiliar with the WMS data transfer but all the sites that I have connected through using WMS in QGIS only provide raster data.

Is it possible to share a shapefile through WMS?

If so do you have any examples of sites that share shapefile info via WMS I could take a look at as an example?


I understand that QGIS can load WMS/WFS data.

If I wanted to create a place online where I put shapefiles that I could connect to using WFS in QGIS is that a difficult thing to do?

How would you suggest I approach doing something like that?

1
  • 2
    Isn't that the point of WMS--all data is service/shown as a raster-based map? You can certainly include a shapefile or other vector data when publishing the WMS service...are you looking for a WFS?
    – mkennedy
    May 13, 2015 at 21:35

2 Answers 2

4

By definition, WMS is a raster. Wikipedia has an overview and OGC has several versions of the specification (website appears to be down as of 13 May 2015). This is often a raster image of a vector datasource like a shapefile. WMS can support things like GetFeatureInfo which allows you to query attributes of the underlying vector data.

If you want to share the shapefile through an OGC web service as a vector, consider WFS.

Yes, you can share shapefiles through WMS. Mapserver and QGIS and others can be WMS (or WFS) servers (in addition to clients). Running a WMS or WFS server requires that you run web server infrastructure like Apache. I've set up WMS services with MapServer following documentation similar to the above link and generally consider it an advanced process. There are sometimes workshops for this at conferences and they are typically 4-8 hours which gives an indication of the level of effort. Here is a GeoServer workshop online which includes setting up OGC services.

If you are looking for a service where you upload a shapefile and then that website offers your shapefiles as a WMS or WFS service, there are probably several options, although I've never used any. I think that MapMint does this. Searching for GIS hosting or OGC service hosting or GIS hosting might be a good start. There is this similar question too.

1

When I first read your title, I thought you meant can two (or more) WMS share (that is use) the same shapefile to create multiple layers and services; the answer to that question is YES.

I now read your question as meaning can a WMS provide to the user in a client (whether web based like some OpenLayers based page, or on the desktop like QGIS) a shapefile rather than an image; the answer to that question is NO, or not directly. You could set up a WMS that provides as part of the GetFeatureInfo request some link to a shapefile, but that would be a bit of a hack I feel.

If you want to provide the option to download a shapefile, then you should use a WFS, or an Atom feed, or a straight download link.

I have configured a MapServer WFS that provides as an option the ability to download a zipped shapefile for example.

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.