open source basecamp

RSS
Twitter
 
Blog

Archive for February, 2009

KISS: spatialite in 5 minutes

Saturday, February 14th, 2009 by Cédric Moullet

3,2,1, GO !

1. Open http://www.gaia-gis.it/spatialite/, download spatialite-gui GUI and unzip it.


2. Start Spatialite-gui.exe (I tested it with Windows ;-) and click on Files / Creating a new (empty) SQLite DB


3. Download “the init_spatialite.sql script required in order to initialize the Spatial MetaData tables” and start it with Spatialite GUI

4. Download from GeoFabrik the OpenStreetMap data of your country as shapefile.

5. Use the function Load Shapefile of spatialite-gui to load the roads, for example. It takes some seconds to load 125256 roads, in my case.


6. Build a spatial index on the geometry attribute


7. And start playing with the spatial functions: select * from roads where MBRContains(BuildMBR(7.5,46.5,7.6,46.6),Geometry) = 1; Pretty fast, you will see !


8. If you don’t like the GUI, use the command line:

FINISHED ! It should have taken less than 5 minutes. It took more time to write this blog…

Nothing really new (Personal Geodatabase, SDF, others exist for a while) except the extrem simplicity, the file portability (cross plattforms), the possibility to access the shapefile as “virtual tables” (you can start SQL statements directly on shapefiles) and the OS license.

Of course PostGIS or Oracle Spatial will provide more functions or will extract data faster but I can imagine dozen of applications where the simplicity of spatialite is an huge advantage (SQLite is the most widely deployed SQL database engine in the world). Imagine a complete GIS system on an iPhone or Apache as cartographic server.

Thanks to Alessandro Furieri.

Keep It Simple… but not Stupid !

KISS: spatialite in 5 minutes

Saturday, February 14th, 2009 by Cédric Moullet

3,2,1, GO !

1. Open http://www.gaia-gis.it/spatialite/, download spatialite-gui GUI and unzip it.


2. Start Spatialite-gui.exe (I tested it with Windows ;-) and click on Files / Creating a new (empty) SQLite DB


3. Download “the init_spatialite.sql script required in order to initialize the Spatial MetaData tables” and start it with Spatialite GUI

4. Download from GeoFabrik the OpenStreetMap data of your country as shapefile.

5. Use the function Load Shapefile of spatialite-gui to load the roads, for example. It takes some seconds to load 125256 roads, in my case.


6. Build a spatial index on the geometry attribute


7. And start playing with the spatial functions: select * from roads where MBRContains(BuildMBR(7.5,46.5,7.6,46.6),Geometry) = 1; Pretty fast, you will see !


8. If you don’t like the GUI, use the command line:

FINISHED ! It should have taken less than 5 minutes. It took more time to write this blog…

Nothing really new (Personal Geodatabase, SDF, others exist for a while) except the extrem simplicity, the file portability (cross plattforms), the possibility to access the shapefile as “virtual tables” (you can start SQL statements directly on shapefiles) and the OS license.

Of course PostGIS or Oracle Spatial will provide more functions or will extract data faster but I can imagine dozen of applications where the simplicity of spatialite is an huge advantage (SQLite is the most widely deployed SQL database engine in the world). Imagine a complete GIS system on an iPhone or Apache as cartographic server.

Thanks to Alessandro Furieri.

Keep It Simple… but not Stupid !

GeoBI en français

Friday, February 13th, 2009 by Cédric Moullet

Mon petit google analytics vient de me dire que beaucoup des lecteurs de ce blog sont francophones, alors voici une traduction d’un document décrivant une implémentation de GeoBI (ou informatique décisionnelle spatiale, pour les puristes ;-)

GeoBI en français

Friday, February 13th, 2009 by Cédric Moullet

Mon petit google analytics vient de me dire que beaucoup des lecteurs de ce blog sont francophones, alors voici une traduction d’un document décrivant une implémentation de GeoBI (ou informatique décisionnelle spatiale, pour les puristes ;-)

Some MapFish doc on VerySpatial

Thursday, February 12th, 2009 by Cédric Moullet

Mel Meng has written some HowTo’s on the VerySpatial blog. Thanks !

Some MapFish doc on VerySpatial

Thursday, February 12th, 2009 by Cédric Moullet

Mel Meng has written some HowTo’s on the VerySpatial blog. Thanks !

MapFish for agriculture

Wednesday, February 11th, 2009 by Cédric Moullet

Some nice web mapping applications based on MapFish made by Agriculture and Agri-Food Canada: Soil Order Map of Canada, Cropland Intensity 2006, Average Farm Area 2006 and Plant Hardiness Zones of Canada 2000

MapFish for agriculture

Wednesday, February 11th, 2009 by Cédric Moullet

Some nice web mapping applications based on MapFish made by Agriculture and Agri-Food Canada: Soil Order Map of Canada, Cropland Intensity 2006, Average Farm Area 2006 and Plant Hardiness Zones of Canada 2000

New tool for web mapping site administration

Saturday, February 7th, 2009 by Cédric Moullet

Do you want to create your own web mapping application ? Do you want to share your geospatial data with others ? Do you want to define your own symbology ? If the answer is yes, then you are probably interested in the administration suite that we are currently developing.
This administration suite is a web 2.0 application and has 3 main goals:
- Allow the administration of data sources like WFS, WMS, GIS database or files, with function like “upload shapefile”
- Allow the definition of symbology for your data with an online MapFile editor.
- Allow the creation of MapFish applications. With this part, it will be possible to configure widgets (map panel, layer tree panel, overview panel for example) inside a web page.
Some of these developments will be part of GeoExt and we will also use nice GeoExt widgets like the styler proposed by OpenGeo.
So if you are interested in the source code, you can have a look here and you are welcome to contribute ;-)
I will post soon more information !

New tool for web mapping site administration

Saturday, February 7th, 2009 by Cédric Moullet

Do you want to create your own web mapping application ? Do you want to share your geospatial data with others ? Do you want to define your own symbology ? If the answer is yes, then you are probably interested in the administration suite that we are currently developing.
This administration suite is a web 2.0 application and has 3 main goals:
- Allow the administration of data sources like WFS, WMS, GIS database or files, with function like "upload shapefile"
- Allow the definition of symbology for your data with an online MapFile editor.
- Allow the creation of MapFish applications. With this part, it will be possible to configure widgets (map panel, layer tree panel, overview panel for example) inside a web page.
Some of these developments will be part of GeoExt and we will also use nice GeoExt widgets like the styler proposed by OpenGeo.
So if you are interested in the source code, you can have a look here and you are welcome to contribute ;-)
I will post soon more information !