10 votes
Accepted

How to view URL of GetFeatureInfo request in QGIS?

Simple Right click your feature in your "Identify Results" right pane and select "Copy GetFeatureInfo requests URL": Advanced You can also go with PyQGIS. For example, with a single layer loaded ...
swiss_knight's user avatar
  • 10.3k
7 votes
Accepted

MapServer GeoJSON output template

Instead of templates I suggest to define an OGR outputformat for GeoJSON. Here are advice taken from https://lists.osgeo.org/pipermail/mapserver-users/2013-November/075559.html You can use OGR ...
user30184's user avatar
  • 65.5k
7 votes

How to view URL of GetFeatureInfo request in QGIS?

A nice way to see all remote requests such as GetFeatureInfo is to use the "QGIS Network Logger", which is available in all QGIS installations by default since since QGIS Pi / 3.14, by just ...
mapserving's user avatar
6 votes

MapServer vs QGIS Server for WebGIS with access control

For example, one of the advantages of combination 2 (PostGIS + QGIS Desktop + QGIS Server + QGIS Client) over 1 (PostGIS + MapServer + OpenLayers) is that you could create it and set up faster and ...
sys49152's user avatar
  • 1,691
6 votes

Copy features from one layer to another with ogr and python

You need to have "write" access to the data source. In this case the data source is a web page resulting from a query. One solution is to create a copy of the data source in the computer's memory, ...
Philip Whitten's user avatar
6 votes

Can I Use GeoWebCache for seeding UMN MapServer Mapfiles?

You can set up GeoWebCache to request WMS layers from any WMS server. This may be easiest with a standalone install of GWC but should be possible in the integrated version too. You need to edit the ...
Ian Turton's user avatar
  • 81.5k
6 votes
Accepted

Relationship between WMS styles and layers parameters for GetMap request in WMS 1.3.0?

The WMS 1.3.0 specification says in section 7.3.3.4: The mandatory STYLES parameter lists the style in which each layer is to be rendered. The value of the STYLES parameter is a comma-separated ...
CL.'s user avatar
  • 1,983
5 votes

Mapserver and postgis

If you want Mapserver to use only the rows where contourinterval = 40, you need to use a WHERE. I think you should use this connection string instead: CONNECTIONTYPE POSTGIS CONNECTION "dbname=...
TurboGraphxBeige's user avatar
4 votes

Is there a way to enable CSV or JSON output formats for MapServer WFS GetPropertyValue requests?

You can setup OUTPUTFORMAT declarations which leverage MapServer's use of OGR for custom output formats (including CSV, GeoJSON). See the documentation for further details. Update: this does not ...
tomkralidis's user avatar
  • 1,297
4 votes

How compile/install php-mapscript on Ubuntu 16.04

First answer Don't try to compile Mapscript on Ubuntu 16.04 with PHP as long as your PHP version is not 5.x. It will not work for the simple reason that supported PHP version in Ubuntu 16.04 is 7.0 ...
ThomasG77's user avatar
  • 30.8k
4 votes
Accepted

Can I use a GeoServer or MapServer service to perform the necessary spatial queries?

Well even a GeoServer service you are going to have to feed with data. That could mean just linking your shapefiles and not loading them or loading them in PostGIS and pointing GeoServer at them. In ...
Regina Obe's user avatar
  • 10.5k
4 votes
Accepted

Mapserver hide OGR exception

This is fixed in Mapserver-7.0.3 and backported to other versions (6.0.5, 6.2.3, 6.4.4). Looks like Kain's question was taken as a bug report which was subsequently fixed. See OGR error messages too ...
Pete's user avatar
  • 343
4 votes
Accepted

mapserver: accessing mapfile with localhost instead of system path

The map file is an internally referenced parameter, it should only be referenced using a file path, not a URL. On Apache, you can use SetEnvIf to remove it from your URL, something like: SetEnvIf ...
nmtoken's user avatar
  • 13.4k
4 votes

Mapserver map file reading WMTS and serving WMS?

The connection to the WMTS is made through the service configuration XML file of GDAL, which can be obtained through the following command: gdal_translate http://serviciosgis.catastrobogota.gov.co/...
SamTux's user avatar
  • 446
4 votes
Accepted

Creating mapfile for MapServer in QGIS?

The mapfile exporter plugin https://plugins.qgis.org/plugins/rt_mapserver_exporter/ is deprecated so unfortunately you can't create mapfiles with QGIS. It might be possible if you can install some ...
user30184's user avatar
  • 65.5k
4 votes

Style MapServer layers easily (or as easy as possible)

You can't use SLD to internally style a MapServer WMS map, you'll have to use the STYLE directives. However MapServer will take an SLD as part of a GetMap request, either by reference (you link to a ...
nmtoken's user avatar
  • 13.4k
4 votes
Accepted

Mapserver displays blank image of POINT layer data extracted from PostGIS database

MapServer does not have a default symbol for points so you must define the symbol in your mapfile. Include this in your mapfile SYMBOL NAME "point" TYPE ELLIPSE POINTS 1 1 END FILLED ...
user30184's user avatar
  • 65.5k
4 votes
Accepted

Which is more performant GeoJSON or WMS/WFS using OpenLayers?

Hard to answer without more info. Getting the data from the DB will be about the same in each case. Converting it to an image (WMS) or GeoJSON will depend on the number and size of the features. ...
Ian Turton's user avatar
  • 81.5k
4 votes
Accepted

Round number for label in MapServer

Certainly yes but is difficult to guess how to do it even it is somehow documented in https://www.mapserver.org/mapfile/expressions.html The function to use is "tostring" tostring ( n1, “Format1” )...
user30184's user avatar
  • 65.5k
4 votes

How does [attributename] work in MapServer templates?

The problem was that PostgreSQL/PostGIS, which is my backend, automatically converts geographicalName to geographicalname (unless you quote it) when the table is created. Using [geographicalname] ...
Antonis Christofides's user avatar
4 votes

How to serve a GeoJSON file through WMS with MapServer?

@david-osipyan I used your question as the excuse needed to create new documentation for GeoJSON access in MapServer, with a new page visible now at: https://mapserver.org/input/vector/geojson.html I ...
mapserving's user avatar
3 votes

MapServer very weak performance vs. GeoServer - Why?

Unless you have a requirement to dynamically manipulate the images created by MapServer you should use the CGI application to server WMS requests. If not PHP will need to create all those objects in ...
geographika's user avatar
  • 14.3k
3 votes

Notepad++ syntax highlighting support for .mapfiles?

I maintain an updated and accurate MapServer (7.6) syntax file for Notepad++ at: https://ms4w.com/trac/wiki/Notepad++MapServerStyle
mapserving's user avatar
3 votes

Group multiple rasters in MapServer?

In MapServer you can group layers together using the GROUP directive in the LAYER part of your map file. So for an India service, you might have MAP NAME "India" LAYER NAME "...
nmtoken's user avatar
  • 13.4k
3 votes

Server (MapServer) does not support the gml coverage

It would help a lot to mention where to get the test suite https://github.com/opengeospatial/ets-wcs20 and which exact test you run, and also study the test suite and try to analyze what is probably ...
user30184's user avatar
  • 65.5k
3 votes
Accepted

Implementing UTFGRID with MapServer and OpenLayers?

ol.source.TileUTFGrid is layer source for UTFGrid interaction data loaded from TileJSON format. url option of TileUTFGrid should point to json with data in TileJSON format. In your case it can be ...
drnextgis's user avatar
  • 6,938
3 votes
Accepted

How compile/install php-mapscript on Ubuntu 16.04

Thanks to @ThomasG77 i did compile and install php5-mapscript of Mapserver7.0.2 compiled and got loaded successfully: The manual is based on mapserver general compile documentations: http://www....
MSS's user avatar
  • 262
3 votes
Accepted

MapServer WMS background color in OpenLayers 3

By default, areas outside of the layers of a WMS are set as transparent by OpenLayers. So add this: var params = { transparent : false } in your variable params. Works for me. J.
juminet's user avatar
  • 1,285
3 votes
Accepted

Adding a MapServer WFS layer in OpenLayers 3

I presume it is most likely a MapServer associated error The error isn't a MapServer error, the error is that you have requested an outputFormat that is not supported by the MapServer WFS service. ...
nmtoken's user avatar
  • 13.4k
3 votes

Calculate a field in a GetFeatureInfo request with MapServer 7.0.4

I think in principle it should be possible with JavaScript, for example if you consider the following GetFeatureInfo request: http://ogc.bgs.ac.uk/cgi-bin/TFL-PSI/ows?language=eng&REQUEST=...
nmtoken's user avatar
  • 13.4k

Only top scored, non community-wiki answers of a minimum length are eligible