Questions tagged [mapfile]

A data file that represents a complete map

Filter by
Sorted by
Tagged with
3 votes
1 answer
51 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 ...
user avatar
  • 131
0 votes
2 answers
24 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> ...
user avatar
0 votes
0 answers
23 views

why loadStyle(): Unknown identifier. Parsing error near (LINECAP) and (PATTERN)?

I'm just learning about MapServer. I am trying to display geom polygon data from the database to a map using a mapfile. But when using the mapfile I have an error loadStyle(): Unknown identifier. ...
user avatar
0 votes
0 answers
24 views

Rendering OSM data in Windows in MapServer causing error during generating Mapfile

I am following the documentation steps at https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows. This is great documentation and everything is clear. However, I am getting the following ...
user avatar
  • 103
0 votes
1 answer
15 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 (...
user avatar
  • 103
1 vote
1 answer
26 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&...
user avatar
0 votes
1 answer
23 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 ...
user avatar
  • 1,121
1 vote
1 answer
41 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&...
user avatar
2 votes
0 answers
83 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 ...
user avatar
1 vote
2 answers
392 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 ...
user avatar
1 vote
0 answers
30 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 ...
user avatar
  • 11
2 votes
1 answer
81 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 ...
user avatar
  • 55
0 votes
0 answers
52 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 ...
user avatar
  • 1
-1 votes
1 answer
90 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 ...
user avatar
1 vote
1 answer
210 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', ...
user avatar
  • 530
1 vote
2 answers
394 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: ...
user avatar
0 votes
0 answers
146 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 ...
user avatar
  • 973
0 votes
2 answers
239 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 ...
user avatar
1 vote
0 answers
311 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 ...
user avatar
1 vote
0 answers
95 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 ...
user avatar
5 votes
2 answers
375 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 ...
user avatar
  • 165
1 vote
1 answer
135 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/...
user avatar
2 votes
1 answer
156 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 ...
user avatar
2 votes
0 answers
45 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 ...
user avatar
  • 266
0 votes
0 answers
183 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 ...
user avatar
  • 203
0 votes
1 answer
51 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 ...
user avatar
  • 21
2 votes
2 answers
1k 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. ...
user avatar
  • 3,497
2 votes
1 answer
55 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 ...
user avatar
  • 83
4 votes
1 answer
3k 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 ...
user avatar
0 votes
1 answer
250 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 ...
user avatar
1 vote
0 answers
46 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]" ...
user avatar
  • 21
1 vote
1 answer
292 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 ...
user avatar
  • 151
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 ...
user avatar
  • 3,497
1 vote
1 answer
567 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 ...
user avatar
  • 123
2 votes
2 answers
742 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&...
user avatar
  • 115
1 vote
1 answer
564 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\-]+...
user avatar
  • 267
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')) ...
user avatar
  • 267
2 votes
1 answer
412 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"....
user avatar
  • 173
1 vote
1 answer
185 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 ...
user avatar
  • 123
0 votes
1 answer
448 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 ...
user avatar
  • 2,845
0 votes
2 answers
1k 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?
user avatar
  • 3
2 votes
2 answers
392 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 ...
user avatar
2 votes
1 answer
1k 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 (...
user avatar
  • 31
1 vote
1 answer
842 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 ...
user avatar
2 votes
1 answer
810 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 ...
user avatar
  • 1,594
1 vote
1 answer
86 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
user avatar
  • 21
1 vote
1 answer
649 views

use date(now) equivalent in mapserver

I want to use present year in a CLASS in a map file. I managed to write permanent expressions like: LAYER CLASSITEM "YEAR" ... CLASS NAME "Previous years" EXPRESSION ('[YEAR]'&...
user avatar
2 votes
1 answer
286 views

Using pictures (JPEG) from web as symbol in MapServer 7 mapfile?

Is it possible to configure the mapfile so, that it shows for every point on the map a different picture from the web recognized by an id?
user avatar
  • 159
1 vote
2 answers
601 views

Dynamic raster layers served via MapServer

I have some processing that runs on my machine producing between five to ten rasters layer a day. I want to serve these layers using MapServer. I initially start with a folder that has 300 raster ...
user avatar
  • 1,141
2 votes
1 answer
60 views

coordinates point in any reference system

I have a coordinates point like this "01010000003413056727B71D41C7F1A68B1ADC4141", but I don't know it is what. Can you aswer What is this?
user avatar