Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Data Import From In-Memory Data

Hi Jody

Thank you very much for your help.
I’m going to try out your hints tomorrow.

Thx

Silvan




Von: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Jody
Garnett
Gesendet: Donnerstag, 1. Oktober 2009 01:54
An: User-friendly Desktop Internet GIS
Betreff: Re: [udig-devel] Data Import From In-Memory Data



Hello udig developers

Moeninf.


I'm just reading the tutorials and samples about IGeoResource, IService,
Feature, and so on. (uDIG 1.2 M6)

Sounds good.


I'm trying to import and display data from an in-memory data source. What
is the best way to accomplish that?

There is a catalog method to make a temporary datastore for you to work
from; right now it produces a memory datastore - I am hoping the H2
DataStore shapes up and we can make use of a temporary database on disk -
when that switch occurs it should be seamless to your application.

The local catalog method needed is a bit non intuitive IMHO - you need to
give it a magic object describing what you want. A featuretype to produce a
datastore, and something else to produce a grid coverage.

createTemporaryResource( Object ) - used to create a temporary resources,
usually by using a FeatureType



Conditions:
- Longitude & Latitude are stored in internal java objects (mapped
through orm)
- Each longitude & latitude should be represented on the user interface by
a small image.

On this page it has
examples http://docs.codehaus.org/display/GEOTDOC/03+SimpleFeatureTypeBuilde
r+and+SimpleFeatureBuilder

Including...

 SimpleTypeBuilder builder = new SimpleTypeBuilder();
  builder.setName( "Flag" );
  builder.setNamespaceURI( "http://localhost/"; );
  builder.setCRS( DefaultGeographicCRS.WSG84 );
  
  //add attributes in order
  builder.add( "Location", Point.class );
  builder.add( "ID", Integer.class );
  builder.add( "Name", String.class );
  
  //build the type
  final SimpleFeatureType FLAG = builder.buildFeatureType();

If you pass the above FLAG SImpleFeatureType to createTemporaryResource you
should be good to go.


Are there UML diagrams which can enhance the appreciation of the internal
data structures such as IGeoResource, IService, =




Back to the top