BETA VERSION
@since 3.0

Spatial Extensions are composed of several concepts:

  • a spatially enabled database, such as Oracle Spatial, MySQL, Postgis or Microsoft SQL Server 2008.
  • a specific property type to store / read geometries, such as POINT, LINE, ...
  • hibernate extensions to query data based on spatial attributes
  • built in services to integrate with 3rd party providers such as Google Maps or ViaMichelin for maps or geocoding
  • widgetry to show maps and position objects on maps

Spatial Database

A spatial enabled database has the following capabilities:

- Store a Geometry (POINT, ...) as a column in a table using a mapping coordinate system.
- Query on that column using spatial functions
- Optionally, index those spatial data for fast retrieval.

Spatially enabled database are:

  • Oracle 11g Standard and Enterprise Edition
  • MySQL 5.1 and above (indexing not supported as of 5.5)
  • Postgres with the GIS Extension (PostGis)
  • Microsoft SQL Server 2008

Other databases or version do not have spatial support.

Enabling the spatial components in Requea

By default, the spatial components are not enabled. You must specify that you want spatial functionalities in the requeadb.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
   <DbType>oracle11g</DbType>
**~    <DbSpatial>true</DbSpatial>**
   <DbDriver>oracle.jdbc.OracleDriver</DbDriver>
   <DbURL>jdbc:oracle:thin:@rhel6ws.requea.com:1522:ORCL</DbURL>
   <DbUser>requea</DbUser>
   <DbPassword>xxxx</DbPassword>
</config>

Storing spatial information

Spatial information (Geometries) are stored as special columns in the Dataabase.
In Requea, you should use the type "Geometry" in the Entity Property definition:

ScreenShot2011-10-13at3.50.13PM.png

Querying on spatial using HQL

 

Geo Services

There are 3 built in services that are available for spatial operations, in addition to storing and querying information:

  • Geocoding provides a WSG84 coordinate (Latitude, Longitude) based on the postal address.
  • Mapping provides Maps to show the position of a point, line, ... on the map.
  • Linking provides a URL to invoke the web site of a mapping provider to show one point on a map

GeoSpatial Providers

- GoogleMaps:

  • GeoCoding: Yes, subject to licence agreements. Should not be used on an Intranet or Extranet
  • Mapping: Yes, subject to licence agreements. Should not be used on an Intranet or Extranet
  • Linking: Yes

- GoogleMaps Premier:

  • GeoCoding: Yes
  • Mapping: Yes
  • Linking: Yes

- ViaMichelin:

  • GeoCoding: Yes
  • Mapping: Yes
  • Linking: Yes

- CloudMade:

  • GeoCoding: No / Poor
  • Mapping: Yes
  • Linking: Yes

NOTE that Services are subject to Usage condition. Please refer to their website.

Using Geocoding

JavaScript Reference:

Geocoder

Tags:
Created by Pierre Dubois on 2011/10/07 11:11
     
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation