Tag Info

Hot answers tagged

9

This can be done quite easy in SQL All the below examples can be tested directly on http://postgisonline.org/map.php. Just paste the query and press Map1 SELECT GENERATE_SERIES(FLOOR(ST_YMin(the_polygon))::int , CEILING(ST_YMax(the_polygon))::int,200) y_value, ST_XMin(the_polygon) x_min, ST_XMax(the_polygon) x_max from (SELECT the_geom AS ...


5

As both a GDAL and MapServer developer, I would consider the C# bindings of both projects "mature". Tamas Szekerest does a great job working to keep feature parity between the Python and C# bindings of GDAL/OGR. While the basics of both the C# and Python bindings are essentially the same in GDAL/OGR, niceties around the edges can and often are quite ...


3

According to http://mapserver.org/mapscript/mapfile.html, creating a layer object works differently: test_map = new mapscript.mapObj() new_layer = new mapscript.layerObj() li = test_map.insertLayer(new_layer)


3

Have a look at the PRIORITY option for LABELS - http://mapserver.org/mapfile/label.html It is unclear how you are generating your map, and what client you are using to view images, but it often makes sense to store labels as separate layers in the MAP file, and switch them on and off through the client application (OpenLayers, WMS client etc.)


3

You are doing it right and 1 is the status code (SUCCESS). Below is a complete (working) example of queryByShape implemented in Java mapscript (for a vector layer). Translating the sample into python should be a piece of cake, but I'm not sure how it works with raster layers. /** * query a single layer by specifying a shape (in map coordinates). * * ...


2

I use a similar approach in Python with MapScript on Windows and it works fine. Careful with the following code: pathVariable += MY_PATH_VARS Environment.SetEnvironmentVariable("PATH", MY_PATH_VARS) I believe it should be: pathVariable += MY_PATH_VARS Environment.SetEnvironmentVariable("PATH", pathVariable) I'd look at the C# sourcecode for ...


2

EPIC FAIL: I apologize, I just found out that the documentation I mentioned is not up to date. The correct API (taken from the swig interface file) is the following: shape=layer.getShape(result) where result is the resultObj returned by getResult. Opened ticket and updated documentation (will go live soon). DOCUMENTATION mentioned in the answer below ...


2

I would suggest looking into several options: Google Fusion Tables. Great way to import spreadsheet data with coordinates (or addresses), and display on a map. Exporting to KML I believe is an option. MapBox. Lots of big data implementations currently in the wild. http://mapbox.com/showcase/#bigdata ArcGIS Explorer Online (ESRI). From a big commercial ...


1

You might want to look into FME Server (Safe Software) as well. It can upload, process, tranform, reproject, and download in to pretty much any common format. It also has some very cool functions such as email/sms notifications and on demand feature streaming. Good luck!


1

Its basically telling you whats wrong- you have not 'opened' the layer Try this: if (resultado.numresults > 0) { // Open layer layerUtbs.open(); // here i got a error (you shouldn't now);. layerUtbs.getFeature(resultado.getResult(0).shapeindex, resultado.getResult(0).tileindex); ...


1

I'm a mapscript developer and I'm afraid that's not possible with the stock mapscript. You should implement the Memento pattern in your code as described here or you could use the clone() method to obtain a snapshot of the mapObj state to which you can eventually revert to. Safest option is to implement Memento. clone() might not work of even crash your ...


1

I've been having the same problem when trying to create a new CLASS object. I've logged it as a bug as the SWIG wrappers seem incorrect for both layerObj and classObj. The args variable is defined in neither: def __init__(self, map = None): this = _mapscript.new_layerObj(map) try: self.this.append(this) except: self.this = this if 1: ...



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