Tag Info

Hot answers tagged

5

I was looking for exactly the same thing some time ago. I did find some tools, but most of them are out of active development and only support old version of mapfile syntax. But anyway here is what I've found. Sribe UI: this is a very new project and looks promising (only support mapserver 6.0+). It is under active development but still in early phase, ...


4

This is a comparison between multiple tiles and single tile using WMS in OpenLayers: var map = new OpenLayers.Map({ div: "mapDiv", layers: [ new OpenLayers.Layer.WMS( "Single Tile", "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: "basic"}, {singleTile: true, ratio: 1} ), ...


3

ST_Intersects checks if 2 geometry really intersects && checks if the BBox of both geometries intersect. This use only the index if available. That's why it is really really fast. For the SRID error look at this answer: http://gis.stackexchange.com/a/12082/22703


3

You are using the deprecated CLASS->COLOR notation, where attribute binding does not work. You should be using the "new" CLASS->STYLE->COLOR syntax instead, e.g. class style color [SHAPE_COLOR] outlinecolor 0 255 0 end end


3

Your configuration looks good. Now you need a Mapnik-looking-like style file for your server. Maybe this can help you with Geoserver: http://osgeo-org.1560.x6.nabble.com/OSM-style-SLD-files-for-GeoServer-td5015615.html A working set of sld files can be found in the osminabox sources: https://git.hsr.ch/api/rest/help/repository-root/git.html Source -> ...


3

Thanks to your hints I found the solution elsewere. Maybe it also helps others: If OSM data is imported into PostGIS with osm2pgsql the resulting attribute names containing colons (addr:streetname etc.) must be renamed. Otherwise WFS server is creating invalid XML. osm2pgsql is converting some tags into attributes, and WFS server is converting attributes ...


3

The most common way to style OpenStreetMap data is with a Mapnik stylesheet. I'm going to assume you're doing so here. There are a number of different pieces of software that handle rendering tiles with Mapnik and could meet your needs. Three popular ones are Tilemill Tilemill is designed for developing map styles, but also allows you export tiles for a ...


3

For shapefiles you should write "mapserver style" filtering expressions, e.g. layer.setFilter("([id] = 1)") The syntax you are using would be OK for RDBMS backends only (passed to a SQL where clause)


3

a) No, you do not have Mapcache, it is an Apache module that must be installed separately b) Current MapCache version is effectively not available for us Windows users. However, a bit older version is included in MS4W 3.0.4-dev version that can be found from http://maptools.org/ms4w/index.phtml?page=downloads.html. That package contains MapServer version ...


3

Mapfiles are good for making standard WMS, WFS and WCS services. They are mostly stable even some limited set of the mapfile parameters can be changed on-the-fly by using the variable substitution mechanism. Static mapfiles are enough for serving data to GIS clients like ArcGIS, QGIS, OpenJUMP etc. and also for browser applications made with OpenLayers or ...


2

Since you already have solution 2 (Mapserver+OpenLayers) working I will just suggest how to improve the performance. The key is to add a caching subsystem between mapserver and Open Layers so that when the same imagine is retrieved twice from Mapserver the caching subsystem will return the previously generated one, saving lots of cpu and disk time. With ...


2

Looking at your call to L.tilelayer.WMS(), i'm noticing that you're passing an option with a key of 'SRS'. The leaflet docs list an option 'CRS': http://leafletjs.com/reference.html#tilelayer-wms-crs You may be attempting passing in an option that doesn't exist. That being said, you're trying to overlay a WMS in geographic unprojected 4326 against an OSM ...


2

MapServer does support label LEADER since 6.2. http://mapserver.org/mapfile/leader.html Example:


2

To my knowledge, there is no way to do that directly with mapserver. I have not tested this, but given you are using postgis you can probably get something close to what you want by creating a POINT layer and a specially crafted postgis query to extract the first point of each linestring. This would be something like: layer type point name ...


2

You cannot get information for features within a bbox using a WMS getFeatureInfo. Please have a look at the WMS reference for getFeatureInfo. You will see that according to the standards, you can only pass in points, not a bbox. Instead, you could use a getFeature Operation on the WFS service. The BBOX parameter allows you to search for features ...


2

As Julien pointed out in a comment, you should make sure you have defined a valid FONTSET and reference one of its fonts in your layer. Indeed, the images you are showing are using BITMAP labels (which are the default if not overridden in the mapfile), which do not support rotation. Here's a minimal set of keywords you might want to try: map ... fontset ...


2

This might help you move forward: by default, MapServer uses "ms:" as a prefix, and http://mapserver.gis.umn.edu/mapserver as a namespace: featurePrefix: "ms", featureNS: "http://mapserver.gis.umn.edu/mapserver" OpenLayers might/did have some quirks when specifying both of these, so you might want to try setting only one of those at a time, c.f. ...


2

In MapServer, your PostGIS LAYER can contain a subquery. This is the recommended way to do it. Note that your subquery must return all fields you are using in your layer label, class, etc. CONNECTIONTYPE POSTGIS CONNECTION "dbname=yourdatabasename user=yourdbusername" DATA "geom from (SELECT geom, attr1, attr2 FROM country WHERE country = 'usa') as subquery ...


2

The correct code is: var layern2 = new OpenLayers.Layer.MapServer("Tech", "ServerPathTo_mapserv.exe", { map: "ServerPathTo_My.map", layer: "Layer1", version: "1.1.1", transparent: "true" }, { isBaseLayer: false, visibility: true });


2

Try removing the 'as FOO' statement at the end of the select statement, it is not needed. As a reference this is the template for an Oracle Spatial DATA definition with a select instruction: 'geometry_column FROM (SELECT stmt) [USING UNIQUE <column> SRID srid# FUNCTION]' the parts in square parenthesis are optional. Reference retrieved straight ...


2

Openstreetmap uses the same tile numbering as Google, so you can use their formulas: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames


2

You should add at least one CLASS/STYLE to your LAYER block: CLASS STYLE COLOR 0 0 0 END END


2

Where did you get the FEATURE POINTS 1 1 END END from? This draws a point at x=1 y=1, and not at the coordinates from your shapefile:


2

You should use two different STYLE blocks, one for the fill and one for the stroke: CLASS STYLE OUTLINECOLOR r g b #stroke WIDTH 3 END STYLE COLOR r g b #fill OPACITY 50 END END Ordering is important, you'll get different visual results if you swap the order of the STYLE blocks.


2

Can I publish map services in geoserver like this? You can't publish services exactly like that in GeoServer - the ArcGIS Server Feature Layer is Esri's proprietary implementation for sending vectors to the client. If you're using GeoServer then as @user30184 noted you should look at a Web Feature Service to emulate the Esri Feature Layer. The ...


2

You'll want to do a spatial join in the DATA statemet DATA "geom from (SELECT poly.gid, poly.geom, Count(gid) AS ptcount FROM poly JOIN pts ON ST_Intersects(poly.geom, pts.com) GROUP BY poly.gid, poly.geom) using unique gid" If your data aren't changing very often, doing this for every map draw is probably not a good ...


2

It works in a similar way than tileindex with geotiffs. Actually I would recommend to test first with a geotiff tileindex and couple of images so that you know that everything else despite ECW is configured correctly. If changing to ECW breaks something you know where to start searching the reason for the issue. It can be that the GDAL of your Mapserver does ...


1

Your "shell" symbol definition (i.e. the SYMBOL .. END block) should be at the MAP level, not the LAYER level as you have it now. in your STYLE..END block, you should add a SIZE and a COLOR entry


1

Geoserver probably is the most known option among the open-source feature server applications. However, I personally use MapServer. Here you can check some info about both applications: http://www.slideshare.net/ssuser185516/mapserver-vs-geoserver-16107836 http://stackoverflow.com/questions/2670361/mapserver-vs-geoserver ...


1

Have you read the quickstart for mapserver? It is on the live dvd and also here: http://live.osgeo.org/en/quickstart/mapserver_quickstart.html You could for example use a wms request (adjust projectionllayers and bounding box to your map) ...



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