eZ publish Spatial Extension (GIS)

Author Message

Bjørn Sandvik

Thursday 19 January 2006 5:28:12 am

The United Nations Association of Norway (UNA Norway) would like to develop a spatial extension to eZ publish. We are looking for partners and good ideas of how this can be achieved.

The goal is to get GIS (Geographic Information Systems) capabilities directly within eZ publish. It could be a new spatial datatype that store points, lines and polygons.

Part of the functionality we would like to see:
- Possibility to show automatic generated (and interactive) maps within an article/XML block.
- Possibility to specify geographic features in the admin interface. A user could click on an map to show where she lives, - and the coordinates are saved in an spatial database.

UNA Norway already have a tool, Globalis, where we want to use this functionality: http://www.globalis.no

So far this site is implemented using two web servers, one running Apache and eZ publish and the other running Internet Information Server and ArcIMS. The site is merged by using iframe and XML. We would like the next version of Globalis to be on one server and rely totally on open source technologies.

<b>SUGGESTED TECHNOLOGY PLATFORM</b>

<b>Web mapping server</b>
UMN MapServer is a popular open source development environment for building spatially-enabled internet applications.
http://mapserver.gis.umn.edu
http://mapserverfoundation.org
eZ publish Spatial Extension could be the bridge between eZ publish and UMN MapServer.

<b>Spatial databases</b>
None of the databases eZ publish can access have native support for spatial data. But it is possible to extend the databases to get this functionality:

PostgreSQL - PostGIS: http://postgis.refractions.net
MySQL - MySQL Spatial Extension
Oracle - Oracle Spatial: http://www.oracle.com/technology/products/spatial/

To make the eZ publish Spatial Extension independent of one database we should use the SFSQL specification

OpenGIS Simple Features Specification (SFSQL) is <i>an extension to the relational Structured Query Language standard that defines how Geographic spatial queries can be supported in relational databases. It defines such aggregate constructs as extent, collect and spatial functions such as distance, contains, overlaps.</i>
http://www.opengeospatial.org/docs/99-049.pdf

PostGIS has one of the most robust implementations of this specification. MySQL Spatial Extension implements a subset of the specification. I&#8217;m not sure how compatible Orcale Spatial is, but Oracle Corporation was one of the companies submitting the specification.


<b>Integration</b>
To make an integration between eZ publish and MapServer we could use the libraries PHP MapScript and eZ components.

<i>The PHP MapScript module is a PHP dynamically loadable module that makes MapServer 's MapScript functions and classes available in a PHP environment.</i>
http://www.maptools.org/php_mapscript/

<i>eZ components is an enterprise ready general purpose PHP platform. As a collection of high quality independent building blocks for PHP application development eZ components will both speed up development and reduce risks.</i>
http://ez.no/products/ez_components

I&#8217;m not sure if the eZ Database component can be used with spatial queries.

<b>Web Mapping</b>
To get interactive map functionality within eZ publish it might be sufficient with PHP MapScript, but we could extend the functionality with ka-Map or Chameleon (I have limited knowledge of these tools so far):

<i>ka-Map is an Open Source package that provides a javascript API for developing highly interactive web-mapping interfaces. It has been developed to work with MapServer, but can be easily integrated with other software packages.</i>
http://ka-map.maptools.org/

<i>Chameleon is a highly customizable and adaptable environment for deploying and managing Web mapping applications. </i>
http://chameleon.maptools.org

Look at http://www.maptools.org for other tools.

<b>TIME SCHEDULE</b>

I would like to wait for eZ publish 4 before we start developing this extension. That also gives us time to do some research about the possibilities of web mapping.

Spring 2006: Doing research and making a specification of eZ publish spatial extension
Autumn 2006: Development of eZ publish spatial extension.

We have some funding, but our resources are limited.

<b>Recommended reading:</b>
<i>&#8220;Web Mapping Illustrated. Using Open Source GIS Toolkits&#8221;</i> by Tyler Mitchell
http://www.oreilly.com/catalog/webmapping/

http://blog.thematicmapping.org
http://www.globalis.no

Paul Forsyth

Thursday 19 January 2006 6:40:47 am

Mmm, i've just built a 'location' datatype for use with google maps ;) Its only a simple prototype at the moment because its hard to find a good geocoding servers for anywhere apart from the US. With such servers simple address info can be converted into other types of position data such as longitude and latitude.

How much data would the datatype need to store?

Paul

Bjørn Sandvik

Thursday 19 January 2006 9:14:00 am

The Spatial Datatype should be able to store geometry data (it could alse be named <i>Geometry Datatype</i>):

- Point (coordinates for one place - could be the place where a person lives).
- Line (coordinates that makes up a line - could be a travelling route).
- Polygon (coordinates that makes up a polygon - could be a conflict area).

The type of geometry data to store could be set in the class definition.

In a simple version of the datatype the user could just type the coordinates in text boxes, but this is not very user friendly.

It would be better to present a map where the user can zoom in and click on the point/make a line/polygon - and where the results are stored as coordinates in the spatial database.

Maybe the coordinates should be stored in a separate table so the data are easily accessible in MapServer? One should be able to generate a map where all the points are marked by symbols. The object_id could be stored with the coordinates to make it possible to click on the symbol to get more information about the object.

http://blog.thematicmapping.org
http://www.globalis.no

Fraser Hore

Thursday 19 January 2006 12:01:18 pm

This sounds like a very interesting initiative. I do a lot of consulting work for the UN and I see a huge need for GIS applications but a lot of really bad ones. I want to introduce ez to my clients and a GIS application would be a big attractor!

Paul I'd love to hear more about your use of Google maps!

Cheers,

Fraser

Bjørn Sandvik

Thursday 19 January 2006 3:13:54 pm

A spatial datatype is only one part of an eZ publish Spatial Extension. Another possibility is to define a new Mapfile class.

<i>The Mapfile is the heart of MapServer. It defines the relationships between objects, points MapServer to where data are located and defines how things are to be drawn.</i>
http://mapserver.gis.umn.edu/docs/reference/mapfile/referencemanual-all-pages

The Mapfile class should define a standard set of attributes which defines the map (and should be extendable).

When an object is created from the Mapfile class, eZ publish should gather information about all the available map layers from the spatial database. The user could select which layers to show on the map, as well as settings like size, format (PNG, SVG) etc.

When the object is published eZ publish automatically generates the Mapfile. When the user view the node/embedded object the Mapfile is send to MapServer (maybe with some additional parameters) - and the map is shown within the template.

A third solution is to define a custom tag where the user can write the name of a Mapfile.

<custom name="mapfile" mapfile="example.map" [...] ]></custom>


The custom tag template could use an operator to ask for the map from MapServer using the mapfile as a parameter.

I just found this:
http://www.mapserver.ch/en/index.php?menu=Overview

http://blog.thematicmapping.org
http://www.globalis.no

Paul Forsyth

Friday 20 January 2006 1:49:51 am

For such datatypes there are two steps.

- provide a method to store the raw data, points, lines, groups of lines. i assume a point is a longitude/latitutde co-ordinate?
- provide a method to populate the data. at its simplest this is entering numbers into boxes. ideally a gui would provide a link to a map server to allow points to be extracted.

for the gui how would access to the server be acheived? is it free? is a client required on the server? i've hit this problem with google maps - its difficult to obtain the geocoding data required to populate the datatype.

paul

Bjørn Sandvik

Friday 20 January 2006 2:29:17 am

I agree on the methods. I think we would like to start with only points - because it fulfills our needs at this time. Selecting lines and polygons through a web map interface is more difficult than a single point. Yes, I'm thinking of a point as a longitude/latitude co-ordinate

I think we should use some Ajax based technology to make a GUI map interface. In edit-mode a map is loaded from the MapServer and presented with some basic functionality (zoom in/out etc.). When the user clicks on the map - the position is sent to MapServer, which returns the longitude/latitude co-ordinate. This value pair is stored in the (spatial) database.

I'm thinking of using the upcoming ka-Map (http://ka-map.maptools.org) to achieve this.

http://blog.thematicmapping.org
http://www.globalis.no

Paul Forsyth

Friday 20 January 2006 2:39:40 am

I had a look at the ka-map site and found the mailing list archives. So they want parity with google map on gui-like functionality. It looks promising.

I found this site using ka-map:

http://149.139.8.29/~rischio/regione/ka-map/htdocs/index.html?map=3DRischio=_idraulico

paul

Bjørn Sandvik

Saturday 21 January 2006 9:17:12 am

More about the Spatial Datatype (maybe the name "Location Datatype" is better?):

The values for lonitude and latitude should be supplied in decimal notation (45.5, -122.25) instead of degrees, minutes and seconds (45 degrees 30 minuetes North, 122 degrees 15 minutes West). In the decimal notation Western hemisphere longitudes and Southern hemisphere latitudes are negative.

This datatype could make GeoTagging possible within eZ publish:
http://en.wikipedia.org/wiki/GeoTagging

http://blog.thematicmapping.org
http://www.globalis.no

Paul Forsyth

Monday 23 January 2006 1:24:30 am

The datatype i have holds the longitude and latitude, plus space for an address. I'd like at some point to be able to refer to a geocoding service and translate between the two automatically.

Perhaps i should finish my google maps extension and then we could look to see how it should be extending to cover more general GIS apps. What do you think?

Paul

Bjørn Sandvik

Monday 23 January 2006 1:31:28 am

I think that's a good idea!

I didn't know about the Google Maps API
http://www.google.com/apis/maps/

http://blog.thematicmapping.org
http://www.globalis.no

Paul Forsyth

Monday 23 January 2006 2:09:21 am

Just out of curiosity how good is google maps in terms of GIS work? Is it lightweight or better?

Bjørn Sandvik

Monday 23 January 2006 2:29:12 am

I would say it's a lightweight GIS-application. But it really depends on your needs. Read this article:
http://hobu.biz/index_html/google_phenomenon

As far as I can see, Google Maps API has no support for GIS-standards like Web Feature Service (WFS) and Web Map Service (WMS). You can't add your own map layers, only points and lines.

But you never know what Google has in mind. Today I read on a blog that Google has joined the Open Geospatial Consortium as a principal member. That is good news. Maybe they will support such services in the near future?

http://blog.thematicmapping.org
http://www.globalis.no

laurent le cadet

Monday 23 January 2006 7:54:28 am

Hi,

You can have a look at http://ez.no/community/contribs/applications/geoposition , it's a kind of light "SIG" which can be suitable for positionning.

Laurent

Bjørn Sandvik

Friday 27 January 2006 2:05:45 am

More about Google Maps API:
http://www.pragmaticprogrammer.com/titles/sdgmapi/index.html
http://farm.tucows.com/blog/_archives/2006/1/5/1603306.html

http://blog.thematicmapping.org
http://www.globalis.no

Paul Forsyth

Friday 27 January 2006 3:13:13 am

Hi Bjorn,

I've almost got the extension ready. It works very well here but i need to add some docs and stuff like that. So i'll release sometime next week.

Paul

Björn [email protected]

Tuesday 28 March 2006 10:13:36 am

http://ez.no/community/contribs/applications/gis_global_information_systems_extension_pubsvn

Hi we created something for yahoo and google maps

including GEORSS, Yahoo GEOCODER plus mapping over YAHOO or GOOGLE

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Sebastian Schoeller

Monday 03 April 2006 12:20:55 pm

Hi folks,

thanks for the interesting debate. Since I have recently tried to dig into the department of GeoRSS for visualization purposes for our future NGO website, I came across the worldkit (http://www.worldkit.org). It seems to produce reasonable results for geocoding, based on city and country input on a worldwide scale in combination with satellite imagery. Due to being based on data from the GeoName Server, the coding data is not too precise, but delivers coverage on a larger scale. I think to remember a Wikipedia posting on this issue.
Currently our organisation cannot afford to employ anybody to implement this solution as brought forward by Björn Dieding recently, but no wonder we would be more than happy if somebody else engaged into this field.

Greetings

Sebastian

Bjørn Sandvik

Wednesday 05 April 2006 6:17:30 am

Björn, your GIS extension looks interesting.

If you only need a simple Flash map-application you can try DIY Map:
http://backspace.com/mapapp/

It's not open source, but it's free for uncommercial use and it's easy to load your data by XML. I have tried the application within eZ publish on:
http://demo.globalis.no/indikator/fruktbarhetstall/(show)/map

DIY map can also show points and lines using latitude and longitude.

http://blog.thematicmapping.org
http://www.globalis.no

Bjørn Sandvik

Monday 16 April 2007 1:54:27 pm

Call for a Geospatial CMS!

New blog entry:
http://earthimages.wordpress.com/2007/04/16/geospatial-cms/

http://blog.thematicmapping.org
http://www.globalis.no

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.