Skip to main content

Questions tagged [mapfile]

A data file that represents a complete map

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

How to vary both color and size of circles using expressions?

I created a MapServer WMS point layer with circle symbols. I would like to vary both circle size and color by expression - is that possible, if yes how? As a workaround, I reverted to classifying ...
Christa Rohrbach's user avatar
1 vote
1 answer
51 views

Attributes of MapServer WFS service all stay NULL

I did an update on my MapServer and database and now in QGIS all attributes of the updated WFS stay NULL. The WFS works fine in our web application. Just it is not showing any attribute data in QGIS. ...
Stephan's user avatar
  • 161
2 votes
1 answer
66 views

MapServer POST request from GET string

I have a very long GET request to the MapServer due to a large number of objects in a dynamic variable "object_id". (object_id=1,2,3,4,5,6,7,.........) My query string is: "https://wms-...
Vitaliy's user avatar
  • 23
0 votes
0 answers
134 views

MapServer wms_layer_group, set title

We want to group wms layers in mapfiles and give the group a title that is different from the name. Until now we did this with GROUP and wms_group_title, but GROUP is deprecated and we want to use &...
Vera's user avatar
  • 11
1 vote
0 answers
51 views

MapServer UVraster layer with two data sources

I have wind data that I want to use in a UVraster layer. The problem I have is that my data for the U and V components are in separate files. While I know I could combine the U and V files into one ...
Almaniac's user avatar
1 vote
1 answer
53 views

Mapserver - RGB Composite - Keep Color with exception

I am currently having the issue that I want to give my nodata-values a specific color and keep the rest of the Map in the given RGB-values. This is my standard-Map: I added the following statement to ...
Felix's user avatar
  • 165
3 votes
1 answer
162 views

MapServer 7 arithmetic expressions do not work on STYLE attributes

I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 (PostgreSQL), but I am encountering a issue when trying to apply arithmetic expressions in the style class. So previously in ...
Andi Domi's user avatar
  • 131
0 votes
2 answers
520 views

why error msProcessProjection(): Projection library error?

I'm using mapserver in Centos 7. I'm using fgs from this (http://www.maptools.org/fgs/index.phtml?page=downloads.html). I'm using mapfile with epsg:4326, but I get error <ServiceException> ...
aja9812's user avatar
0 votes
1 answer
224 views

One of the multiple layers with different extents not visible in MapServer

I have 2 layers in the map file with different extents. In QGIS, I am able to see them one over the other in proper positions. However, when I am adding those 2 layers in the map file for MapServer (...
shanti's user avatar
  • 103
1 vote
1 answer
507 views

MapServer HTML Legend How-to

I am trying to build my first HTML legend with MapServer, but I can't find any full example. As I understand: mylayer.map (just after the classes END): LEGEND TEMPLATE "../path/mylegend.html&...
marieneige's user avatar
0 votes
1 answer
192 views

Combining POINT and POLYGON Layer in mapfile

I have two layers defined in a mapfile, for displaying either polygons or points dependent on a query parameter of the accessing WMS Request. Is it possible to combine them in a UNION layer or ...
Lokomotywa's user avatar
  • 1,191
1 vote
1 answer
199 views

UMN MapServer PostGIS vector layer Background transparent

How to set background transparent in UMN Mapserver mapfile for the layer coming from postgis. executed map file is MAP PROJECTION "init=epsg:4326" END NAME "layername&...
Satya Chandra's user avatar
2 votes
0 answers
294 views

Can't reference an MVT layer from Mapfile

I'm trying to add an MVT layer to my Mapfile, but it doesn't work and I ran out of ideas. Some info about the layer I'm trying to add: https://support.regrid.com/articles/using-the-tileserver/ This is ...
Benedek Petrovicz's user avatar
2 votes
2 answers
2k views

How to serve a GeoJSON file through WMS with MapServer?

Could you please provide a working example of WMS mapfile with GeoJSON layer for the MapServer? Mine is not working: MAP EXTENT -120 34 -119 35 # Geographic SIZE 800 400 LAYER TYPE polygon ...
David Osipyan's user avatar
1 vote
0 answers
87 views

How to get the layer name of the WMS in the legend of the user interface

I have a problem with displaying the name of the layer in the legend of the user interface. I prepare the mapfile and I access with the WMS in my local test interface. When I add it to the user ...
UTM18N's user avatar
  • 11
2 votes
1 answer
223 views

MapServer symbology: how to draw a line inside polygons following the outline?

Is it possible to create a symbology in MapServer/Mapfiles that would draw a line following the outline of the polygon, inside the polygon? Example with a simple rectangle: I can't find any info in ...
Marc's user avatar
  • 75
0 votes
0 answers
108 views

No Data holes with Mapfile / Python

I am working with Python with GDAL and Mapfile and I used the following cmd line in order to remove NoData: cmd = ["gdal_edit.py", src_img , "-unsetnodata"] And then in my ...
Toto D's user avatar
  • 1
-1 votes
1 answer
158 views

Using INCLUDES with MapManager (Gisinternals)

Does anybody have any experience with using Mapmanager to manage their MapServer mapfiles? My question is specifically about using INCLUDES in mapfiles. Since having an INCLUDE in a mapfile results in ...
ousekmatej's user avatar
1 vote
1 answer
317 views

Display all mapfile layers with Openlayers

I'm using the following code to display my mapfile layers: var wmsSource = new ol.source.ImageWMS({ url: 'http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/GEO/test.map', ...
imre's user avatar
  • 550
1 vote
2 answers
766 views

GetFeatureInfo template of MapServer not replacing values

I am using MapServer 7.4.2 and I am trying to setup a WMS GetFeatureInfo using OUTPUTFORMAT instead of direct TEMPLATE but variables are not replaced On MapServer file layer definition using: ...
Jorge Mendes's user avatar
0 votes
0 answers
266 views

Passing SLD Body in Mapfish style parameter

I have a vector layer in Geoserver 2.15.1 and displaying it on map div using Openlayers v5 API. When displaying the vector data on map, I am using custom style body and passing it to the layer's style ...
venkat's user avatar
  • 1,051
0 votes
2 answers
502 views

Mapserver INCLUDE using multiple .map files

I am currently testing out a new way to display my Mapserver WMS's. Here is the context. I have a script that generates an individual .map file for each of my rasters. These mapfiles are fully ...
rossv49's user avatar
1 vote
0 answers
450 views

Mapserver NODATA affects valid raster data pixels (zero)

I have NOAA nightlight rasters cropped to country boundaries that I am trying to display using Mapserver. As such, I am trying to have NODATA pixels i.e. those outside the country boundaries be ...
Chris Njuguna's user avatar
1 vote
0 answers
174 views

Hiding NoData values of a raster in MapServer

In a MapServer NoData value pixels can be hide by using the following code inlcusion in a mapfile: `PROCESSING 'BANDS=3,2,1'` Now I have raster with multiple combinations of NoData Values other than ...
Satya Chandra's user avatar
5 votes
2 answers
519 views

Configuring TileCache on Windows and Linux

I want to do tile caching for MapServer map files by using TileCache application. For this I have installed Python 2.7 and TileCache 2.11 and applied the following sequence of steps: Extracted ...
swamy's user avatar
  • 165
1 vote
1 answer
217 views

PostGIS mapfile [closed]

I am new to GIS and have been assigned a task to publish a map to the web. So I want to ask if anyone can give me a map file example that basically can: Load the OpenStreetMap and zoom to a area/...
B Cheng Wong's user avatar
2 votes
1 answer
202 views

Can I Use GeoWebCache for seeding UMN MapServer Mapfiles?

I have installed GeoServer and MapServer in a single system and also enabled GeoWebCache for GeoServer (Integrated Version of GeoServer). Can I use same GeoWebcache for caching UMN MapServer ...
Satya Chandra's user avatar
2 votes
0 answers
82 views

Encode MapServer tile pixels with data values

Is it possible to encode values from raster bands into pixel output using a MapServer .map file? More and more I'm finding that a commonly adopted method for moving geographical data for rendering ...
maeneak's user avatar
  • 276
0 votes
0 answers
318 views

OpenLayers forEachLayerAtPixel and MapServer .MAP file COLOR

I'm trying to use map.forEachLayerAtPixel in OpenLayers to see what layers are clicked, but I have a layer in the background that is a grid served by Mapserver with a grid.map file that is just a ...
Andrew T's user avatar
  • 301
0 votes
1 answer
62 views

Display all values in MapServer layer

I have a MapServer map file that gets data from PostGIS tables. One of the tables holds several linestrings that I set as points in the map file. They show up based on the zoom-level in my map. Is ...
Hansi's user avatar
  • 21
2 votes
2 answers
2k views

Style MapServer layers easily (or as easy as possible)

I am working with MapServer WMS in the form of mapfiles and consuming them into a OpenLayers map. I am trying to find out a way to ease the symbolization process of the various layers in a mapfile. ...
umbe1987's user avatar
  • 3,785
2 votes
1 answer
64 views

Which value fits the best for Parameter SIZEUNITS for Googles Web Mercator Projection EPSG 3857 to show a radius in meters

In my mapfile there is a WMS definition, which shows a circle buffer and it's radius in meters. I offer UTM-Systems and Googles Pseudo Mercator. In UTM and SIZEUNIT meters it works fine. Please, could ...
Max's user avatar
  • 83
4 votes
1 answer
4k views

Creating mapfile for MapServer in QGIS? [closed]

How can I create mapfile (.map) for MapServer 7.0 in QGIS 2.18 or 3.0? Or are there any tools which are part of the core MapServer distribution? And what is the best visual tool for create mapfile ...
t_huanghai's user avatar
0 votes
1 answer
319 views

How can I show a text column on MapServer?

I'm working on a project with MapServer with PostGIS and I need to retrieve from my table and display a layer that shows some information like a street name. What I have? I have my map rendered ...
Adenir Souza's user avatar
1 vote
0 answers
71 views

a broken PNG output in mapserver

i want to show my shapefile on the web my template file is: <html> <head><title>Simple Mapserver Template HTML Document</title></head> <body> <img src="[img]" ...
ali's user avatar
  • 21
1 vote
1 answer
399 views

MapServer dynamic label

I managed to get this working with GeoServer but I'd like to see if it's also possible with MapServer. I need to generate a dynamic copyright. I have a polygon layer in Oracle Spatial which contains ...
Olyster's user avatar
  • 171
1 vote
2 answers
2k views

mapserver: accessing mapfile with localhost instead of system path

Don't know if GIS SE is the right place to ask this question. Otherwise, please feel free to suggest me where should I migrate it. I need to access my mapfile with localhost to test my service via my ...
umbe1987's user avatar
  • 3,785
1 vote
1 answer
706 views

A simple label for an entire MapServer mapfile?

I want to incorporate a simple text label into a mapfile-based map, such that the file's resulting images always display a specific text string (ideally in white over a black background) along the top ...
Lenoxus's user avatar
  • 123
2 votes
2 answers
977 views

MapServer WMS client - blank image

I set up WMS server using MapServer, and the following requests work: http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example2_wms.map&SERVICE=WMS&VERSION=1.1.1&...
Eylül's user avatar
  • 115
1 vote
1 answer
670 views

How to send multiple value for one param to mapserver through openlayers (encode_uri)

Here's my filter on Mapserver's Side : PROCESSING "NATIVE_FILTER=(ct in ('%ct%'))" It allows me to select several values for my column. My validation looks like : VALIDATION 'ct' '^[a-zA-Z\-]+...
So4ne's user avatar
  • 287
0 votes
2 answers
1k views

IN operator in FILTER in my Mapfile

I'd like to select multiple values on my column (undefined number) and as long as I know, IN operator doesn't work on Mapserver's filter. Example : FILTER (([ct] IN ('%ct%')) or ('%ct%' = '1')) ...
So4ne's user avatar
  • 287
2 votes
1 answer
565 views

Expression to convert string to float (MapServer)

Is it possible to convert a value string into a float in a mapfile? The code is in CLASS / TEXT, so I can use expression. For example my value is always displaying ".7". I would like to display "0.7"....
Michael's user avatar
  • 173
1 vote
1 answer
226 views

Can I use existing .tfw (of georeferenced .tif images) as the extent in a MapServer Mapfile?

I have a set of aerial georeferenced tiff and tfw files, I want to be able to access them using MapServer. Now the mapfile requires an EXTENT parameter with coordinates which i think they are already ...
konzo's user avatar
  • 123
0 votes
1 answer
584 views

How to auto rotate labels for Polygons in MapServer?

I want to auto rotate labels of polygons in Mapfile, all options that exist in MapServer refers to linear features only and not polygons. Is there any algorithm I can implement in the Mapfile to auto ...
Shiko's user avatar
  • 2,893
0 votes
2 answers
2k views

How to convert tif to map

I need to convert a .tif file into a .map format. How can I do it? Is it possible using GDAL?
Alba's user avatar
  • 3
2 votes
2 answers
663 views

mapfile validation

I'm looking for something that will do validation of a mapfile. Some googling for the terms mapfile validation isn't coming up with hints of such a utility. Is there anything that will verify ...
Marcel Wilson's user avatar
2 votes
1 answer
2k views

Make "Nodata" transparent in raster - Mapfile/Mapserver

I have a raster and I'm trying to make it display in Openlayers2, using Mapserver 7.0 in backend. My problem is, I think, that because the online map is not the same projection as my data, Mapserver (...
JSROY's user avatar
  • 31
1 vote
1 answer
1k views

How to style feature in mapserver mapfile based on values from database?

We have a table "Shapes" in PostGIS that consists of (among other things) a geometry column (the_geom) and an ID column (type_id) which is a foreign key to another table called "ShapeTypes". A given ...
oneleftfoot's user avatar
2 votes
1 answer
1k views

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

In a MapServer map file, it is possible to set up a variety of output formats for WFS GetFeature requests. However, it doesn't seem possible to do the same for a WFS GetPropertyValue request, which ...
songololo's user avatar
  • 1,724
1 vote
1 answer
108 views

Mapserver's mapfile

Is there possible to load a mapfile file from a client to a server running a Mapserver? e.g. http://server/cgi-bin/mapserv?**map=**client/example/htdocs/example1-1.map&layer=states&mode=map
Dacos's user avatar
  • 21