The usability features related to the loading process into GISCloud is probably the crucial element of the tool. To import data into GISCloud, we can choose between shapefile, mapinfo or KML. But, what can we do after….

Of course, you can make a map, but you can have access to editing and analysis functions. To do this, you must transfer the data you already loaded into your GISCloud account in PostGIS is also available in your GISCloud servers.

The map is not OpenLayers interface but rather a flash control. So for most browsers, plugin is already integrated. The tiling update in the case of WMS layers is irregular and sometimes lack of refreshing to some level, but map image quality is good.

Finally, one of my best option of this tool is sharing and Web publishing. The map produced into GISCloud is automatically available in WMS. The result of the XML GetCapabilities lack of finish and would need some adds to make it really convenient to use but the service is consistent with version 1.1.1 of the OGC . I enabled the option of mailing the card and is available for viewing without restriction. I test it with Gaia and QGIS ( www. ” strong> qgis . org )

http://www.giscloud.com/wms/ba47979ecaef94062c2f37d04764f1d7?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

Another interesting point, we also have access to “Embed JS code” that can quickly be added to a page (which does not work in this wordpress?) Or a popup preview :


<script type='text/javascript' src='http://www.giscloud.com/api.js?v=1.0' ></script>
<div id="fn_embed_map" style="border:1px solid #C5C5C5;width:450px; height:400px;">
</div>
<script type="text/javascript" >
<!--
new FnEmbedMAP({map:1379, container:"fn_embed_map", slider:true, onload:function()
{
this.viewer.setViewBound(-180, -89.1086723319328, 179.99995, 93.9165123319328);
}});
-->
</script>
//

I asked few questions to Dino Ravnica (Owner, CEO) for the business subscription aspet, data security and price of the subscription.

1)How much space that I have to upload data on the cloud?
For now we don’t have limitations on free beta accounts.

2)When I upload data, It is on your server? Do you kown where those data are?
Yes, uploaded data is on our server. Each user has separate space that is private and available only for their account.

3)Do you protect those data?
We plan to offer a way to store the data on encrypted disk partitions. This means when you log in you will have to enter additional password to decrypt your disk partition. Only then your data will become available. When you log out you partition encrypt it self back.

4)If I need more space to upload data, How it works?
We are currently defining commercial services.

5)How it cost?
When ready price list will be publicly available.

A new startup from Croatie has just arrived online and offer us a very nice new option for Gis web apps: GISCloud. According to Dino Ravnić (Owner, CEO) Omnisdata main operation business model is software-as-a-Service ( SaaS ) in form of free or commercial services . By being the first of its kind(Gis) in the Cloud supply Omnisdata be well positioned to achieve success, because they pushing the limits of “Gis web desktop”.

With GISCloud, you have a free access to standard mapping features. You have also for free, a new tool to build and publish a map of your GeoData in a OGC Web map services. Of cours, if you wanted more, you have a pricing option for analysis and editing geodata according of your storage and network bandwidth needs. Mr. Ravnić assured me that “price list will be available and publicly when ready”.

The website is very intuitive and easy to use. In a seconds, you can open a free account, upload data into the Cloud and build a map without effort. The interface is simple to use, efficient and the display process is very fast(tiling process). We have access to a toolbar rather simplistic but effective.

After creating a Workspace , you can create a map in which we will add layers.

To do my first little test, I uploaded a shapefile coverage Ocean from Natural Earth . But Surprise! The configuration options for the layers are very well. You can easily edit apperance layer and even have access to advanced display options. There was even an option to refresh a dataset in regular frequency.

This free tool is really simple and interesting because it allows a Geomatics specialist to provide fast and cheap new option for our users.

The second part shows the sharing and the use of Web Map Service, and the Data privacy issue and security needs with your GISCloud account

If you have a hillshade GRID(or exported tiff) and DEM you can build a nice color hillshape map with Mapserver…  It’s not really simple and well documented, but it’s possible. I think this trick was add in Mapserver in ‘experimental’ mode in the trunk and gets released, but never realy discuss in the mailling list Mapserver-dev.

To build this kind of service, we must have a DEM and Hillshade. It’s not necessary to have a GRID format for this trick. A simple black and white tif format is fine.

First you must know the pixel range to process in your DEM. You need it to let GDAL reader a pre-scale from incoming raster data to get the pixel range to process. You can easely use the gdalinfo utilities.


...
Upper Left (-1051654.551, 2174097.741) ( 88d52'54.70"W, 62d14'24.12"N)
Lower Left (-1051654.551, -201102.259) ( 80d59'1.05"W, 41d23'0.63"N)
Upper Right ( 1359945.449, 2174097.741) ( 42d36'0.34"W, 61d21'52.09"N)
Lower Right ( 1359945.449, -201102.259) ( 52d27'53.73"W, 40d50'27.53"N)
Center ( 154145.449, 986497.741) ( 66d11'34.47"W, 52d52'40.66"N)
Band 1 Block=256x256 Type=Int16, ColorInterp=Gray
Min=-10.000 Max=706.000
Minimum=-32768.000, Maximum=1890.000, Mean=-185.108, StdDev=3252.745
...

In the example I have in Band 1, a min elevation of -10 to a max of 706. This resulte in the mapfile with PROCESSING “SCALE=-10,706″. Then, you have to process the DEM dynamically with a COLORRANGE in TRANSPARENCY mode and overlay it on a hillshade. To get the DEM and the process hillshade in a single layer in your map, simply GROUP them in your mapfile.

Example in the mapfile GROUP on “Ombrage_bleu_250K”…


...
LAYER
    NAME "ombre250k_blue"
    GROUP "Ombrage_blue_250K"
    DATA "mne250k/ombre250k.tif"
    TYPE RASTER
    MAXSCALE 4000000
    MINSCALE 1
    METADATA
        "wms_group_title"       "Ombrage blue 250K"
        "wms_name"              "ombre250k_blue"
        "wms_title"             "ombre250k blue"
        INCLUDE                 "../include/ec/ec_meta_layer.map"
    END
    PROJECTION
         "init=epsg:32198"
    END
END
LAYER
    NAME "mne250k_blue"
    GROUP "Ombrage_blue_250K"
    DATA "mne250k/mne250k.tif"
    TRANSPARENCY 30
    TYPE RASTER
    PROCESSING "SCALE=-1,706"
    METADATA
        "wms_group_title"       "Ombrage bblue 250K"
        "wms_name"              "mne250k_blue"
        "wms_title"             "mne250k blue"
        INCLUDE                 "../include/ec/ec_meta_layer.map"
    END
    PROJECTION
        "init=epsg:32198"
    END
    CLASS
        STYLE
            COLORRANGE 255 255 255   0 0 255
            DATARANGE -1 706
        END
    END
END
...

End the getMap query, use the group layer name “Ombrage_bleu_250K”…

http://your.server.com/cgi-bin/mapserv?map=demshade&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=Ombrage_bleu_250K&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=87557.4046920096,498799.484254657,182346.544021857,583840.349445035&WIDTH=739&HEIGHT=663

In next example, I have tree layer that I can call with the GROUP tag “HILLSHAPE_GREEN_BLUE”. First I add the hillshape in background. Then I overlay two MNE rasters layers that show elevation from -63 to 1280. So I coloring for the first -63 to 500 metre elevation with a green to blue colo rampe, and from 300 to 1280 with a blue to green color rampe. Not that all thos layer are add in the mapfile as Arc/INFO GRID TILEINDEX.


LAYER
    NAME  "Ombre_vert_bleu"
    GROUP  "HILLSHAPE_GREEN_BLUE"
    TYPE  RASTER
    TILEINDEX  "mneomb20k/omb"
    TILEITEM  "location"
    MAXSCALE  200000
    MINSCALE  1
    METADATA
        "wms_group_title"    "Ombrage  vert  bleu  20K"
        "wms_name"           "Ombre_vert_bleu"
        INCLUDE              "../include/ec/ec_meta_layer.map"
        "wms_title"          "Ombre"
    END
    PROJECTION
        "init=epsg:32198"
    END
END
  #-------------------------
LAYER
    NAME  "MNE_comp_green_blue"
    GROUP  "HILLSHAPE_GREEN_BLUE"
    TILEINDEX  "mneomb20k/mne"
    TILEITEM  "location"
    TRANSPARENCY  40
    TYPE  RASTER
    PROCESSING  "SCALE=-63,500"
    MAXSCALE  200000
    MINSCALE  1
    METADATA
        "wms_name"         "MNE_comp_green_blue"
        INCLUDE            "../include/ec/ec_meta_layer.map"
        "wms_title"        "MNE  comp  green"
    END
    PROJECTION
            "init=epsg:32198"
    END
    CLASS
        STYLE
            COLORRANGE  34  139  34  255  255  255
            DATARANGE  -63  500
        END
    END
END
#--
LAYER
    NAME  "MNE_comp_blue_green"
    GROUP  "HILLSHAPE_GREEN_BLUE"
    TILEINDEX  "mneomb20k/mne"
    TILEITEM  "location"
    TRANSPARENCY  40
    TYPE  RASTER
    PROCESSING  "SCALE=300,1280"
    MAXSCALE  200000
    MINSCALE  1
    METADATA
        "wms_name"      "MNE_comp_blue_green"
        INCLUDE         "../include/ec/ec_meta_layer.map"
        "wms_title"     "MNE  comp  bleu"
    END
    PROJECTION
        "init=epsg:32198"
    END
    CLASS
        STYLE
            COLORRANGE  255  255  255  0  0  205
            DATARANGE  300  1280
        END
    END
END

The result of this combination show here

Hillshade green-blue

Tutorial Guide

February 4, 2010

Tutorial training guide(2008) for newbie. Thank’s to Jeff McKenna

http://www.scribd.com/doc/22648773/Mapserver-Users-Manual

Sometime we find something such simple as stupide … I think that Spatialite is one of that.  If you look for a GIS storage format AND tabular data, very simple, open, easy to use and manage with Mapserver, python or php, take a look to this solution. Note that with a single database file you can build, query and manage your data like MySql or Postgresql.

For my test, I use the open data Natural Earth, and it work at my first try ..! :) Rock On!! My NaturalEarth.sqlite file can be dowload here. (Natural Earth. Free vector and raster map data @ naturalearthdata.com). I load it with the Spatiallite-gui tools and than visualize them with the Spatiallite-gis… It take’s me 15 minutes… Including the download and install steps…

To make my first WMS Spatialite data test, I build a mapfile for Mapserver with this cool free vector dataset of Natural Earth. I just have to replace the shapefiles connection string with a OGR connection type and specify the table name:


        CONNECTIONTYPE OGR
        CONNECTION ”path_to_spatialite_file”
        DATA ”50m-geography-marine-polys”

Also, note that you HAVE to use the latest GDAL/OGR(version 1.7.0). If you use MS4W, you can download the beta10 or later.

My first impression is that is not as fast as shapefile format. I gona test for larger dataset later… But, according to OGR specification web page, this driver still don’t take advantage of spatial index?. So it’s not a negative tips of this format…

My mapfile test is here:


MAP
    NAME ”spatialite”
    EXTENT -180 -90 180 90  
    SIZE 700 500
    IMAGETYPE PNG
    IMAGECOLOR 0 0 0  
    UNITS METERS
    SYMBOLSET                   ”/ms4w/msp/symbols/commun/symbols.map”
    FONTSET                     ”/ms4w/msp/fonts/commun/fonts.txt”
    CONFIG MS_ERRORFILE         ”/ms4w/tmp/mapserv.log”
    WEB
        QUERYFORMAT     ”text/xml”
        BROWSEFORMAT    ”text/xml”
        IMAGEPATH       ”/srv/www/msp/services/tmp/”
        IMAGEURL        ”/ms_tmp/”    
        METADATA
           ”wms_title”                  ”spatialite test”
           ”wms_name”                   ”spatialite”
           ”wms_abstract”               ”"
           ”wms_description”            ”"
           ”wms_keywordlist”            ”Spatialite test”
           ”wms_onlineresource”         ”http://localhost/cgi-bin/mapserv.exe?map=C:/Travail/spatialite/spatialite.map&#8221;
        END
    END
    PROJECTION
        ”init=epsg:4326″
    END
    LAYER
        NAME ”50m-admin-1-states-provinces-shp”
        DATA ”C:/Travail/spatialite/NaturalEarth/50m-admin-1-states-provinces-shp.shp” 
        TYPE polygon
        PROJECTION
            ”init=epsg:4326″
        END
        METADATA
            ”wms_name”              ”50m-admin-1-states-provinces-shp”
            ”wms_title”             ”states-provinces shapefiles”
            ”wms_keywordlist”       ”"
            ”wms_server_version”    ”1.1.1″
        END
        CLASS
            NAME ”states-provinces”
            STYLE
                COLOR 255 90 90
            END
        END
    END    
    LAYER
        NAME ”50m-admin-0-countries”
        CONNECTIONTYPE OGR
        CONNECTION ”C:/Travail/spatialite/NaturalEarth/NaturalEarth.sqlite”  # full path to SQLite db file
        DATA ”50m-admin-0-countries”
        TYPE polygon
        PROJECTION
            ”init=epsg:4326″
        END
        METADATA
            ”wms_name”              ”50m-admin-0-countries”
            ”wms_title”             ”50m-admin-0-countries”
            ”wms_keywordlist”       ”"
            ”wms_server_version”    ”1.1.1″
            ”wms_extent”            ”-180 -90 180 90″
        END
        CLASS
            NAME ”states-provinces”
            STYLE
                COLOR 255 190 190
            END
        END
    END 
    LAYER
        NAME ”50m-geography-marine-polys”
        CONNECTIONTYPE OGR
        CONNECTION ”C:/Travail/spatialite/NaturalEarth/NaturalEarth.sqlite”  # full path to SQLite db file
        DATA ”50m-geography-marine-polys” 
        TYPE polygon
        PROJECTION
            ”init=epsg:4326″
        END
        METADATA
            ”wms_name”              ”50m-geography-marine-polys”
            ”wms_title”             ”50m-geography-marine-polys”
            ”wms_keywordlist”       ”"
            ”wms_server_version”    ”1.1.1″
            ”wms_extent”            ”-180 -90 180 90″
        END
        CLASS
            NAME ”states-provinces”
            STYLE
                COLOR 24 116 205
            END
        END
    END 
END 

Build a mapfile for Mapserver from plain text is not an easy job.  We can use a Syntax coloring Editor like SciTE, PsPad or UltraEdit, but we all hope have a nice and easy  mapfile editor for build our web map service.  Sice version 5.6, Mapserver has a XML schema has been defined to encode mapfiles in XML format. We can get some input from Mapserver Wiki for example, how to implement it and how to convert existing mapfile.

<?xml version=”1.0″ encoding=”UTF-8″?>
<Map name=”GMAP-DEMO” version=”5.6.0″ status=”ON” xmlns=”http://www.mapserver.org/mapserver&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://www.mapserver.org/mapserver”&gt;
<extent>-2200000 -712631 3072800 3840000</extent>
<fontSet>../etc/fonts.txt</fontSet>
<imageColor red=”255″ green=”255″ blue=”255″/>
<Layer name=”bathymetry” type=”RASTER” status=”ON”>
<data>bath_mapserver.tif</data>
<Metadata>
<item name=”DESCRIPTION”>Elevation/Bathymetry</item>
</Metadata>
</Layer>
<Layer name=”popplace” type=”POINT” status=”ON”>
<Class name=”Cities”>
<color red=”0″ green=”0″ blue=”0″/><
expression>1</expression>
<Label type=”TRUETYPE”>
<align>LEFT</align>
<color red=”255″ green=”0″ blue=”0″/>
<font>sans-italic</font>
<outlineColor red=”255″ green=”255″ blue=”255″/>
<partials>FALSE</partials>
<position>AUTO</position>
<size>8</size>
</Label
>
…So this feature is not realy exciting BUT now we have a tool to parse any mapfile and option to build new client interface for Mapfile.  This is a prety good news… :-)

I read on the net lots of confusion with Resolution in OpenLayers and TileCache.  Consider resolution like map scale.  We have to get resolution rather than scale because OpenLayer use the relationship between image size and number of pixels per tile. To compute this relationship we have to start with the extent layer.  Openlayers must know exactly where to go, when you decreasing levels.

For this example I use an Overlay layer extent for Google maps in metres(EPSG:900913).  If the extent is for planet(-20037508.34,-20037508.34,20037508.34,20037508.34) and have a tile of 256×256 pixels, we can computed the resolution like this:

Resolution = |Delta x| / number of pixel per tile
-20037508.34 – 20037508.34 / 256 = 156543,0339

The sacale of this resolution will be compute by the relationship of pixel and dot per inch of your image map.  If your map have 96 dpi we just have to convert this relationship in metres to get the number of metre by pixel:

nb metre per pixel = pixels / dpi * Convertion factor to inch to metre
256 / 96 * 0.0254 = 0,06773333333

Finaly,  the scale of each levels of this map in OpenLayers will be  calculated like this

Scale = Resolution * nb pixel per tile / nb metre per pixel
156543,0339 * 256 / 0,0677333333 = 591 658 711

For all others levels resolution MUST be divided by 2 by the preceding level because OpenLayers does not support irregular decreasing resolution.

m / pixel Scale taille image resolution Openlayers
Levels
0,06773333 591 658 711 256 156543,0339 0
0,06773333 295 829 355 256 78271,51695 1
0,06773333 147 914 678 256 39135,75848 2
0,06773333 73 957 339 256 19567,87924 3
0,06773333 36 978 669 256 9783,939619 4
0,06773333 18 489 335 256 4891,969809 5
0,06773333 9 244 667 256 2445,984905 6
0,06773333 4 622 334 256 1222,992452 7
0,06773333 2 311 167 256 611,4962262 8
0,06773333 1 155 583 256 305,7481131 9
0,06773333 577 792 256 152,8740565 10
0,06773333 288 896 256 76,43702827 11
0,06773333 144 448 256 38,21851414 12
0,06773333 72 224 256 19,10925707 13
0,06773333 36 112 256 9,554628534 14
0,06773333 18 056 256 4,777314267 15
0,06773333 9 028 256 2,388657133 16
0,06773333 4 514 256 1,194328567 17
0,06773333 2 257 256 0,597164283 18
0,06773333 1 128 256 0,298582142 19
0,06773333 564 256 0,149291071 20
0,06773333 282 256 0,074645535 21

Follow

Get every new post delivered to your Inbox.