Tag Info

Hot answers tagged

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} ), ...


4

EDIT: Update, having belatedly realized this is a Map Server question. In general, to get the convex hull, you will want to group by id/gid, as producing the hull(s) is an aggregate operation. So, without the Mapserver part, the query would look like: SELECT id, ST_ConvexHull(ST_Collect(the_geom)) as the_geom from xyz group by id; Now, to get MapServer ...


4

For example: let's say you have a 10 megabyte raster/vector file that covers a large area. If you include the file directly into OpenLayers, it will download the entire file to the browser and render whatever part of it the map needs even if it's a small area. What mapserver will do for you is always deliver to the browser a small image of exactly what ...


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

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

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

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

Step-by-step for GeoServer. Note: As @michal-mackiewicz writes, the WPS extension for GeoServer must be installed. Acquire some point data, for example Natural Earth populated places http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip Import data into Postgis for example with ogr2ogr ogr2ogr ...


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 ...


3

How about using GDAL_Grid? Just pass the arguments over to GDAL and return the raster file or render it in the web browser. It does IDW, Nearest neighbor, and averaging and has a robust set of input parameters.


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

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

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

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

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

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

Mapserver can do it with the current development version which will be soon released as v7.0. How it works is best documented here: http://mapserver.org/development/rfc/ms-rfc-108.html For testing the heatmap feature install MapServer 6.5-dev into your environment. Next download "pnts" shapefile (.shp, .shx, .dbf, and .prj) from github ...


2

Thinking that you need heat maps rendered on the fly, I would go for these options instead: Leaflet: http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html OpenLayers: http://www.websitedev.de/temp/openlayers-heatmap-layer.html Both LL and OL: http://www.patrick-wied.at/static/heatmapjs/examples.html Some on-the-fly examples: ...


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 ...


2

With MapServer the pixel value of a raster layer that should be interpreted as "nodata" and which should therefore be transparent is defined in the LAYER section of mapfile with the OFFSITE parameter. This is explained in MapServer documention at http://mapserver.org/mapfile/layer.html?highlight=offsite%20raster.


2

Turns out it is as easy as this: MIMETYPE "application/json; subtype=geojson; charset=utf-8" Without the setting, no content encoding is returned by the server.


1

I can't quite tell what our question is, but here is an attempt to answer it. I am assuming you want a web-map with points overlaid on top. You can load OSM tiles from a variety of sources. For example, say you use Leaflet you could load a map with an OSM baselayer using the following approach: http://switch2osm.org/using-tiles/getting-started-with-leaflet/ ...


1

The filter you are trying to apply can only be applied from the client side. To apply a filter on the server side, you have to use an EXPRESSION at the CLASS level or a FILTER at the LAYER level. Note that spatial filter/expression may not work in FILTER. Here's an example: LAYER DATA ....shp NAME "test" ... CLASS NAME "test" ...


1

How to Generate a Simple Map using Mapserver and a Shapefile.


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 ...



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