Hot answers tagged

5

There are two mode in MapServer in fact and it can be confusing for end users without knowledge about the project history. The first one, the now mostly outdated mode cgi (the url contains mode=browse) way where you don't rely on standards OGC webservices. It was supported in OpenLayers 2 by default because of history (more Mapserver instances not using ...


4

You can render your data from PostgreSQL directly. Documentation here. PostgreSQL layer example: LAYER NAME "province" STATUS ON TYPE POLYGON CONNECTIONTYPE POSTGIS CONNECTION "host=127.0.0.1 port=5432 dbname=xyz user=postgres password=postgres" DATA "the_geom from xyz" CLASS STYLE COLOR 128 128 128 ANTIALIAS true END ...


4

According to a recent comparison of different mapping engines in performing tile seeding (see Section 4.3), MapServer should be much faster than GeoServer. Is there any re-projection of geometries in your rendering stack? An old version of MapServer might have the same issue with proj4 lib as Mapnik had.


3

Kaarel´s answer should be marked as the correct answer. You need to call the loadFeatures function from the AJAX call. I created three jsfiddle to demonstrate ol 3.5.0 calls via AJAX for ol.format.GeoJSON (JSON and JSONP) as well as ol.format.WFS. WFS http://jsfiddle.net/goldrydigital/9d3jzpna/ JSON http://jsfiddle.net/goldrydigital/ucspgvx0/ JSONP ...


2

The plugin is still alive, now named RT mapserver exporter: https://plugins.qgis.org/plugins/rt_mapserver_exporter/ To get it, you need to allow for experimental plugins, and you need the python-mapscript package on Linux (part of the ubuntugis mapserver package), or the mapscript-python package from OSGEO4W on Windows. If you run into troubles, see QGis ...


2

I just faced the same problem and solved it by copy the mapscript.py and _mapscript.so into my virtual env. cd venv/lib/python2.7/site-packages cp /usr/lib/python2.7/dist-packages/_mapscript.so . cp /usr/lib/python2.7/dist-packages/mapscript.py . At least the following script in a python web-app worked fine, based on the mapserver demo files I got here. ...


2

Looks like there's no current indent implementation for map files so you'll most likely have to write your own. However, if you're not already aware mapserver.org provides both syntax coloring and folding vim plugins. The files were written a while ago, so you may need to tweak it or find a newer one. To install: mkdir ~/.vim/syntax/ cd ~/.vim/syntax ...


2

Gery, I am in a similar situation. I don´t need to hide or show the different rasters separately. If that's OK for you, this is what I did: As far as I know, in the mapfile - Layer - Data you can only specify one file, but you can create several identical layers with the very same name, each one of them pointing to a different raster. Loading this WMS ...


2

I just ran into this issue and found that the problem was because I had not installed the ‘proj-epsg’ package. yum install proj-epsg


2

I just remembered the last time I used 8-bit signed for anything, and now I feel very old! :) QGIS doesn't appear to support 8-bit signed (nor does gdal) - see the list of supported types here. The byte type is unsigned, so will be interpreted as such. Not familiar with Mapserver, but I imagine the issue is the same. I think you might need to write some ...


2

I think you mix up OSGEo4W and MS4W. These are different packages for Windows. OSGeo4W is a source for several FOSS4G project, among other MapServer and QGIS. MS4W contains programs, tools necessary to run/maintain a MapServer instance on Windows (Apache, Mapserver, Mapserver utilities, several libraries). You can use any of them but do not mix them up.


1

I have used an arrow symbol as: SYMBOL NAME "arrow" TYPE vector FILLED true POINTS 0 0.4 3 0.4 3 0 5 0.8 3 1.6 3 1.2 0 1.2 0 0.4 END # POINTS ANCHORPOINT 1 0.5 END # SYMBOL This style adds an arrowhead to endpoints of lines ...


1

This is not exactly what you asked for, but it could be a suitable starting point for your heatmap. I created a simple python script for converting geohashes to 3d Google Earth representations. This isn't exactly what you asked for, but if you'd like to create a cool looking thematic map (based on geohash) this will get you started. You can get the code ...


1

You can check the code out of the repository and do pretty much anything you like with it. You might also want to look at the GeoTools code that underlies much of the GeoServer code. GeoServer code is licensed under the GPL - so there are some restrictions on what you can do with it, mostly related to releasing programs without releasing your changes to ...


1

You have done right way because you got this message. mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided. You just need to add some GET parameter in url... like this (depend on your mapfile content): ...


1

This is the solution: <!-- mapserver template --> [metadata_variable_name] = [item name="value_0" precision="1"] [metadata_unit]<br>


1

The easiest way to achieve the same in OpenLayers 3 is to use WMS GetFeatureInfo. Your code could look something like this (assuming mymap is your layer with a WMS source, and map is your ol.Map instance): var parser = new ol.format.WMSGetFeatureInfo(); var highlightOverlay = new ol.FeatureOverlay({ // style: (customize your highlight style here), map: ...


1

You are correct that you need a server to be able to process and send small chunks of the data at the request of your web client. This is the promise of many web-based GIS. This is achieved via 'tiling'. There are a few different approaches Static pre-rendered tiles: There are tools which will allow you to create pre-rendered image tiles from your vector ...


1

Found one on GitHub : MapserverSyntaxHighlighting It adds a user defined language in N++ (check this, if you want to create your own). Just put the two files given here : userDefineLang.xml -> %appdata%\Notepad++ mapfile.xml -> %programfiles(x86)%\Notepad++\plugins\APIs You may need to restart N++ or reopen the mapfile.


1

I suggest you to use MapProx (http://mapproxy.org/) which does what you need. Alternatively, see this answer which develops your procedure a bit further: How do I create a mapserver config file for tiles downloaded from WMTS service? .


1

As noted in a comment by neuhausr there is a documented solution for this problem on the GDAL site GDAL info page for ESRI Personal GeoDatabase, but the solution is only for Linux. If like me you find yourself on a 64-bit Windows platform and have 64-bit MapServer/GDAL you might find yourself scratching your head, as yes you can get the same error :-( ...


1

Try the ANCHORPOINT property of SYMBOL object (You will need mapserver >=6.2) I use this to align symbols that have their tip at middle bottom. SYMBOL NAME "symbol_name" TYPE PIXMAP IMAGE "icons/photo-marker.png" ANCHORPOINT 0.5 1 END see: http://mapserver.org/mapfile/symbol.html


1

It's weird because I never had any problem with this feature. If you take a look at https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=1.1.0&request=GetFeature&outputFormat=geojson&typename=pvo_patrimoine_voirie.pvostationvelov you will notice MapServer produces geojson with double-quoted strings which can handle single ...


1

I would try those steps: Update the mapfile with a generic request for the layer ( i.e. DATA "geodata from geo_data"); Add EPSG:3857 in the METADATA (i.e. "wms_srs" "EPSG:4326 EPSG:3857"); this is the default SRS used by OL3. Test the WMS service in a Desktop application and request the layer in EPSG:3857.


1

the previous code does not yet work with ol3. So use the following syntax: is tested with POSTGIS and Mapserver ! var map = new ol.Map({ target: 'map', renderer: 'canvas', maxResolution: 156543.0399, controls: ol.control.defaults().extend([ new ol.control.ScaleLine({ units:'metric' }) ]), layers: layers, view: new ol.View({ ...


1

Just start playing! Get yourself a virtual server (Windows or Linux, whatever you're comfortable with), and install the OpenGeoSuite. I run a small production server with around 2 GB of ram and two processors and it works fine. As John Barca says, you can scale up to very big, with load balancing and separate, redundant database servers. But to start ...


1

Replace the geom for the_geom (note the underscore). If the column really includes a space then you must reference it with double quotes: "the geom". This later case is not such a good idea, I would advise you to rename the table column to the_geom.


1

If you want to cache tiles from the backend WMS without having to know the layer names beforehand use either "combined_mirror" or "split_mirror" mode. This doesn't seem to be properly documented, but it is mentioned in this issue "combined_mirror" makes a tileset for each combination of layers encountered. "split_mirror" will make a tileset for each layer ...


1

Here's an example of a MapServer service (version 7.1-dev) providing a WCS 2.0 service using GeoTiffs as the data source. Here we have a GetCoverage request for an image/png output format: ...



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