Re: [Geotools-devel] GeoTools Confluence problems

2009-02-11 Thread Ben Caradoc-Davies
Jody Garnett wrote:
> - the edit button is hidden under "news operations", this used to be called 
> "page operations" but got mangled due to a recent update I guess

Thanks, Jody, you are life saver.

> - coffee = yum

Sleep = better.

-- 
Ben Caradoc-Davies 
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] GeoTools Confluence problems

2009-02-11 Thread Jody Garnett
A couple of things:
- geotools.codehaus.org is a site "Scripted" up by codehaus in order to
place adds around and make it look pretty. it takes content from the raw
wiki
- docs.codehaus.org is the raw wiki (and the only thing I bother to work
with)
- the edit button is hidden under "news operations", this used to be called
"page operations" but got mangled due to a recent update I guess
- any problems (such as above) can be reported as a haus chore here:
http://jira.codehaus.org/browse/HAUS
- coffee = yum

On Thu, Feb 12, 2009 at 4:22 PM, Ben Caradoc-Davies
 wrote:

> GeoTools Confluence is giving me grief. Pages accesses through
> geotools.codehaus.org have an Edit button. For example:
>
> http://geotools.codehaus.org/OnlineTestCase+support+for+failure+on+failed+connection
>
> If I edit this page, I am returned to the same page now rendered with an
> older style, served from docs.codehaus.org, and I cannot for the life of
> me find an Edit button. This can be worked around by navigating to the
> page from the top level from geotools.codehaus.org (painful), but it
> gets worse ...
>
> I get the same old style with apparently uneditable pages if I go to
> developer docs pages, for example:
> http://docs.codehaus.org/display/GEOT/5.+7+Testing
>
> Is this a permissions problem, or do I need more coffee?
>
> Kind regards,
>
> --
> Ben Caradoc-Davies 
> Software Engineer, CSIRO Exploration and Mining
> Australian Resources Research Centre
> 26 Dick Perry Ave, Kensington WA 6151, Australia
>
>
> --
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> ___
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] GeoTools Confluence problems

2009-02-11 Thread Ben Caradoc-Davies
GeoTools Confluence is giving me grief. Pages accesses through 
geotools.codehaus.org have an Edit button. For example:
http://geotools.codehaus.org/OnlineTestCase+support+for+failure+on+failed+connection

If I edit this page, I am returned to the same page now rendered with an 
older style, served from docs.codehaus.org, and I cannot for the life of 
me find an Edit button. This can be worked around by navigating to the 
page from the top level from geotools.codehaus.org (painful), but it 
gets worse ...

I get the same old style with apparently uneditable pages if I go to 
developer docs pages, for example:
http://docs.codehaus.org/display/GEOT/5.+7+Testing

Is this a permissions problem, or do I need more coffee?

Kind regards,

-- 
Ben Caradoc-Davies 
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Proposal: OnlineTestCase support for failure on failed connection

2009-02-11 Thread Ben Caradoc-Davies
OK, I think I have a formal +1 from Jody, support from Andrea (I have 
taken this as +1, it that OK?), and a week has elapsed. Is the proposal 
approved? Would you like me to commit the changes and update the 
developer docs?

Kind regards,
Ben.


Jody Garnett wrote:
> Got it. Checking that the proposal says what you mean... you even found the 
> developers guide page that needs to change :-D
> +1
> 
> Jody
> 
> On Wed, Feb 4, 2009 at 3:04 PM, Ben Caradoc-Davies 
>  wrote:
> Jody Garnett wrote:
> Hrm you are right; Justin wanted proposals for things that effect the build. 
> I think he was mostly focused on maven; but broad changes to the entire test 
> process would qualify. I think you are just asking the super class to support 
> a new option which you are going to make use of in your module however?
> 
> Correct. But better than that, anyone deploying a continuous integration 
> instance can use this option if they choose, for any online test fixture. For 
> example, I might have fail-on-failed-connect for my setup, but if your test 
> online resource is often unavailable, you might want to keep the 
> disable-on-failed-connect behaviour. Two different test fixture 
> configurations for the same test case. Or just leave the online test turned 
> off you you do not want it to run.
> 
> 
> Understood; we also need to make sure the tests do not run for someone who is 
> offline; or who cannot connect to your server due to firewall issues.
> 
> The default behaviour is retained: online tests do not run for a user until 
> that user has configured the test fixture.
> 
> 
> Right; so you want to add something to your fixture that will ask it to 
> "fail" if a connection is not made. That sounds much better than hardcoding 
> it into the choice of super class...
> 
> Yes. The hardcoding was my first idea. Andrea pointed out the problem with 
> this and suggested the skip.on.failure alternative, which is what the patch 
> implements and the proposal describes.
> 
> 
> Kind regards,
> 
> --
> Ben Caradoc-Davies 
> Software Engineer, CSIRO Exploration and Mining
> Australian Resources Research Centre
> 26 Dick Perry Ave, Kensington WA 6151, Australia
> 
> 


-- 
Ben Caradoc-Davies 
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] [jira] Created: (GEOT-2335) Allow transactions to work against an externally provided connection

2009-02-11 Thread Andrea Aime (JIRA)
Allow transactions to work against an externally provided connection


 Key: GEOT-2335
 URL: http://jira.codehaus.org/browse/GEOT-2335
 Project: GeoTools
  Issue Type: Improvement
  Components: data jdbc-ng
Affects Versions: 2.5.3
Reporter: Andrea Aime
Assignee: Andrea Aime
 Fix For: 2.5.4


When the jdbc datastore are integrated with a larger application working 
against a database we have the case in which the external app is in control of 
the connection pool and the transaction is controlled outside.
The current jdbc-ng code already avoids grabbing a connection and closing it 
provided the current transaction already has a connection associated to it.
In the case of external control it would be nice to have a method like 
createJ2eeTransaction(Connection cx) that has the following features:
- builds a transaction with a user provided connection
- never tries to grab another connection for methods that do get the 
transaction as a param, and from all the methods in FeatureSource/FeatureStore 
provided the connection is set
- never closes the connection manually (this is already happening provided the 
transaction is not AUTO_COMMIT)
- never calls directly commit/rollback
The latter can be achieved if we build a special transaction that never 
actually calls commit/rollback on the connection. Actually, it would be 
sufficient that the user never manually calls commit/rollback on the 
transaction, but let's try to be extra sure about it.

>From what I see this would be sufficient to perform an integration into a J2EE 
>enviroment where the pool and transaction lifecycles are controlled by a 
>container (provided there is a way to get the current transactions's 
>connection, something that can be done with Spring, not sure with standard 
>J2EE).
Of course it would also be good for any app that has its own (eventually 
manual) transaction demarcation and connection pool handling

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] ArcSDE raster suppor refurbished, concept check and call for review

2009-02-11 Thread Saul Farber




Gabriel,

I think the move to JAI is *awesome*.  I haven't looked at the code
specifically yet, but I really like that you've offloaded the
implementation details that can be handled by JAI to code that doesn't
need to be supported inside geotools.

There's a little on the LZERO_ORIGIN_TILE parameter here
http://docs.codehaus.org/display/GEOTDOC/ArcSDE+Raster+Support but the
deeper explanation is below:

In ArcSDE 9.1 or below, when you load a raster using a sequence of
tiles the *first* tile that you load gets to be the "0,0" tile, and the
raster "origin" is set to the lower-left corner of that tile.  This is
unmodifiable after the raster is created.

When querying a raster, one needs to know the x/y location of the
upper-left tile and then work out the actual tiles to be queried based
on the requested world-extent.  On raster pyramid levels 1 or above,
the x/y position of the 0,0 tile is trustworthy and will be the
upper-left tile in the raster.

However, at level zero, there can be a problem in this specific case:
* You're using ArcSDE 9.1 or below
* You didn't set a raster_origin point before loading the raster
* You loaded the raster using a sequence of files (probably .tif files)
and you didn't load the upper-left tile as the FIRST tile

If the above three conditions are true, then the ArcSDE Java API will
happily tell you that the level zero 0,0 tile is at the upper-left of
the raster, but when you actually ask for that tile, you'll find out
that at level zero the 0,0 tile is the FIRST TILE LOADED.

Therefore, in order to access tiles above or to the left of the first
tile loaded, you would need to trick ArcSDE into fetching you data from
"negatively indexed" tiles, but the Jsde api doesn't allow negatively
indexed queries, so that's out.  This means that the data that is above
or to the left of the first loaded tile is unavalaible at level zero,
and you have to return level 1 (or 2, if skipLevelOne is set) data
instead.  The LZERO_ORIGIN_TILE parameter allows you to tell geotools
exactly which tile is the "first loaded" tile so that queries of tiles
above or to the left of that tile at level zero can be returned with
level 1 or 2 data.

This is a "filed and known" bug in the JSDE api, and in ArcSDE 9.2 or
above you can re-set the raster origin using "sderaster -o ..." which I
believe recalculates the various tables that cause this problem.

I'd say that unless you have just such a setup to test against, I
wouldn't worry about keeping support for the LZERO_ORIGIN_TILE
parameter.  If someone can come up with an sde raster that has this,
err, "issue" and they can reproduce the problem, then all the code is
in-place to support the fix...but without a working example it's a
tough thing to code.

hope that help gabriel,
--saul




Gabriel Roldan wrote:

  
  
  Hi guys,
  As you know I've been
working on refurbishing the geotools arcsde module to support more
raster formats. In the process, I've found the previous Saul work
invaluable to understand how the arcsde raster api works, started
adding support for some specific formats (16-bit unsigned, 32-bit
float, 8bit-u colormapped) following the initial Saul's design. As a
parallel inspiration I started spiking how to better integrate with
JAI. It turned out to be easier than expected (once I learned a lot,
remember I'm a newbie in gce land). In the end, I refactored a lot of
code and come up with a new design, which makes use of an
ImageInputStream implementation that reads arcsde tiles and is wrapped
by a RawImageInputStream.
  So far so good, we have now
a single raw arcsde raster format reader to rule them all.
  So, I would like to kindly
ask you to answer a couple questions, before I go forward in wraping up
the work and backporting to 2.5.x.
  - Saul: what is the
intended use of the LZERO_ORIGIN_TILE parameter? I would need to check
if it still applies.
  - All: I would love a
concept check on the following explanation of the new workings of the
module, and even a bit of a code review would be highly appreciated.
Though there may be still a couple rough edges, I think I could make
good use of your higher experience with gce to early catch on
conceptual missunderstandings or technical mistakes.
   * How it used to work:
   Given a read request to
the GT arcsde AbstractGridCoverage2DReader implementation:
   1- connect to the raster
table and gather raster layout and metadata information
   2- create a BufferedImage
compatible with the raster format, backed by the appropriate colormodel
and samplemodel, and with the requested dimensions. Fail if there's no
support for the raster's format and number of bands.
   3- find out the most
appropriate pyramid level to fullfill the requested extent and image
dimension, as well as the matching tiles.
   4- look up for a specific
ArcSdeRasterReader(tm) for the given pixel depth and number of bands.
   5- start fetching the
raster tiles, for each tile, pass it to the ArcSdeRasterReader,
together with the targ

[Geotools-devel] ArcSDE raster suppor refurbished, concept check and call for review

2009-02-11 Thread Gabriel Roldan

Hi guys,

As you know I've been working on refurbishing the geotools arcsde module to 
support more raster formats. In the process, I've found the previous Saul work 
invaluable to understand how the arcsde raster api works, started adding 
support for some specific formats (16-bit unsigned, 32-bit float, 8bit-u 
colormapped) following the initial Saul's design. As a parallel inspiration I 
started spiking how to better integrate with JAI. It turned out to be easier 
than expected (once I learned a lot, remember I'm a newbie in gce land). In 
the end, I refactored a lot of code and come up with a new design, which makes 
use of an ImageInputStream implementation that reads arcsde tiles and is 
wrapped by a RawImageInputStream.
So far so good, we have now a single raw arcsde raster format reader to rule 
them all.

So, I would like to kindly ask you to answer a couple questions, before I go 
forward in wraping up the work and backporting to 2.5.x.

- Saul: what is the intended use of the LZERO_ORIGIN_TILE parameter? I would 
need to check if it still applies.

- All: I would love a concept check on the following explanation of the new 
workings of the module, and even a bit of a code review would be highly 
appreciated. Though there may be still a couple rough edges, I think I could 
make good use of your higher experience with gce to early catch on conceptual 
missunderstandings or technical mistakes.

 * How it used to work:
  Given a read request to the GT arcsde AbstractGridCoverage2DReader 
implementation:
 1- connect to the raster table and gather raster layout and metadata 
information
 2- create a BufferedImage compatible with the raster format, backed by the 
appropriate colormodel and samplemodel, and with the requested dimensions. 
Fail if there's no support for the raster's format and number of bands.
 3- find out the most appropriate pyramid level to fullfill the requested 
extent and image dimension, as well as the matching tiles.
 4- look up for a specific ArcSdeRasterReader(tm) for the given pixel depth 
and number of bands.
5- start fetching the raster tiles, for each tile, pass it to the 
ArcSdeRasterReader, together with the target BufferedImage's WritableRaster and 
the offset and band where to write the tile's content. The reader takes care of 
writing only the samples that match the target extent.
6- create and return the coverage backed by the BufferedImage. It matches 
exactly the requested extent and image size.

 * How it works now:
  Given a read request to the GT arcsde AbstractGridCoverage2DReader 
implementation:
1- Gather the raster layout and metadata. It is cached so fetch it if not 
yet available. It contains the raster dimensions, band, and pyramid info.
2- use the OVERVIEW_POLICY argument to determine the most appropriate 
pyramid level, default to QUALITY if not provided. This leverages the code in 
AbstractGridCoverage2DReader.setReadParams to select the overview (ie, pyramid 
level)
3- based on the requested extent and pyramid level, calculate the matching 
tiles that overlap the requested extent for the selected pyramid level, as 
well as the resulting image size and extent. This may well be different than 
the requested extent and image dimension, but we're going to return the native 
resolution and only the matching pixels, letting the client code deal with 
interpolating if needed.
   4- If the request does not match the raster extent, create a zero area 
image, and return a null extent coverage. Otherwise create an 
ArcSDEImageInputStream to fetch the raw byte[] data for the whole matching 
tiles, and call the JAI ImageRead operation with an appropriate 
ImageTypeSpecifier and ImageLayout.
   5- since the read image contains an area covered by full tiles, use the JAI 
crop operation to crop it to the image dimension that better match the 
requested extent.
   6-  create and return the coverage backed by the actual RendedImage and 
resulting extent, in native (pyramid level) resolution.

Tha's quite it. Any comments will be appreciated.


-- 
Gabriel Roldan
OpenGeo - http://www.opengeo.org

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] [jira] Created: (GEOT-2334) Add a way to grab a new connection or to get the connection for a given Transaction

2009-02-11 Thread Andrea Aime (JIRA)
Add a way to grab a new connection or to get the connection for a given 
Transaction
---

 Key: GEOT-2334
 URL: http://jira.codehaus.org/browse/GEOT-2334
 Project: GeoTools
  Issue Type: New Feature
  Components: data jdbc-ng
Affects Versions: 2.5.3
Reporter: Andrea Aime
Assignee: Andrea Aime
 Fix For: 2.5.4


Add a getConnection(Transaction) to allow grabbing the connection for a given 
transaction. Allow the parameter to be null, in that case return a new 
connection.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] [jira] Created: (GEOT-2333) Implement removeSchema in JDBCDataStore

2009-02-11 Thread Andrea Aime (JIRA)
Implement removeSchema in JDBCDataStore
---

 Key: GEOT-2333
 URL: http://jira.codehaus.org/browse/GEOT-2333
 Project: GeoTools
  Issue Type: New Feature
  Components: data jdbc-ng
Affects Versions: 2.5.3
Reporter: Andrea Aime
Assignee: Andrea Aime
 Fix For: 2.5.4


For data management oriented applications it would be real nice to be able and 
drop schemas, not only to create and alter them. Something like:

dataStore.dropSchema("typeName");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] [jira] Created: (GEOT-2332) Cannot import multilinestrings in Oracle NG

2009-02-11 Thread Andrea Aime (JIRA)
Cannot import multilinestrings in Oracle NG
---

 Key: GEOT-2332
 URL: http://jira.codehaus.org/browse/GEOT-2332
 Project: GeoTools
  Issue Type: Bug
  Components: data jdbc-ng
Affects Versions: 2.5.3
Reporter: Andrea Aime
Assignee: Andrea Aime
 Fix For: 2.5.4


The following app, trying to import a multilinestring shapefile, fails:

{code}
import java.io.File;
import java.util.HashMap;
import java.util.Map;

import org.geotools.data.DataStore;
import org.geotools.data.FeatureStore;
import org.geotools.data.oracle.OracleNGDataStoreFactory;
import org.geotools.data.shapefile.ShapefileDataStore;
import org.geotools.data.store.ReTypingFeatureCollection;
import org.geotools.feature.FeatureCollection;
import org.geotools.jdbc.JDBCDataStore;
import org.geotools.jdbc.JDBCDataStoreFactory;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;


public class OracleImporter {

public static void main(String[] args) throws Exception {
File f = new 
File("/home/aaime/devel/gs-1.7.x/data/release/data/shapefiles/states.shp");
ShapefileDataStore shp = new ShapefileDataStore(f.toURL());

System.out.println(shp.getSchema());

Map params = new HashMap();
params.put(JDBCDataStoreFactory.USER.key, "spatial");
params.put(JDBCDataStoreFactory.PASSWD.key, "postgis");
params.put(JDBCDataStoreFactory.HOST.key, "localhost");
params.put(JDBCDataStoreFactory.SCHEMA.key, "SPATIAL");
params.put(JDBCDataStoreFactory.DATABASE.key, "xe");
params.put(JDBCDataStoreFactory.PORT.key, 1521);
params.put(JDBCDataStoreFactory.DBTYPE, "Oracle");

OracleNGDataStoreFactory fac = new OracleNGDataStoreFactory();
JDBCDataStore ora = fac.createDataStore(params);

ora.createSchema(shp.getSchema());
String oraName = shp.getSchema().getTypeName().toUpperCase();
FeatureStore store = 
(FeatureStore) ora.getFeatureSource(oraName);
store.addFeatures(shp.getFeatureSource().getFeatures());
}
}
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Several problems using MemoryFea tureCollection/MemoryDataStore

2009-02-11 Thread fgdrf
Hi Jody,

thanks for the new constructor in MemoryDataStore. i checked it and it works 
with one exception: Creating a Layer with an empty collection using the 
constructor you defined the getBounds(Query query) function will return null.

If a DataStore can return null for getBounds() the calling functions should 
handle that (see AbstractDataStore Implemetation too expensive comment). 
BUT the org.geotools.map.DefaultMapLayer class does not handle it correctly. 
After the posted message (24th January) I patched the function (the the 
appended DefaultMapLayer.patch).

What do you think? 

Frank

> -Ursprüngliche Nachricht-
> Von: "Jody Garnett" 
> Gesendet: 27.01.09 08:48:38
> An: Frank Gasdorf 
> CC: geotools-devel@lists.sourceforge.net
> Betreff: Re: [Geotools-devel] Several problems using 
> MemoryFeatureCollection/MemoryDataStore


> Frank Gasdorf wrote:
> > Hi Jody,
> >
> > I used the CollectionDataStore and redesigned it a bit. I append three 
> > classes (MemoryService, CollectionsFeatureStore and a event class) and I 
> > would like to get some feedback, whether it fits into the architecture of 
> > geotools.
> >
> > Some use cases:
> > -   got some attribute filtered objects in client 
> > -   display them on map and interact with them to perform some spatial 
> > analysis
> > -   select some objects in a client table and select them in map to 
> > (FidFilter)
> > -   select some objects in map and get the selection in client table 
> > synchronized
> >
> > Are there any limitations in geotools we didnï¿œt reached yet if we would 
> > use the appended classes? Are ther other ways? Right now itï¿œs not a 
> > requirement to get Features edited in map. The map should be a viewer for 
> > this kind of data. In addition the user should be able to edit other 
> > datasources in future (WFS-T or perhaps shapefiles).
> >
> > Regards 
> > Frank
> >   
> I will need to look at these classes later in the week.
> 
> With respect to your uses cases you have an option to load things into 
> memory (easier programming but you may need lots of memory), or staying 
> general and only using Filter. I have experimented with both approaches; 
> and both work.
> 
> One word of advice; when you get to using massive FidFilters we may need 
> an optimization that can take advantage of any pattern in the stored 
> feature ids; ie if "foo.1", "foo.2", "foo.3" and "foo.5" are selected; 
> you may want to do something similar to run length encoding and store 
> "foo.1-3", "foo.5".
> 
> One of the ESRI APIs I looked at had a seperate data structure for 
> "selections" than for "filters"; and you could switch from one to the 
> other. The way the Filter specification is written you can see this 
> split in action; Fid filter is not really supposed to be used with other 
> Filters in a valid WFS request.
> 
> Jody
> 


__
Deutschlands größte Online-Videothek schenkt Ihnen 12.000 Videos!*
http://entertainment.web.de/de/entertainment/maxdome/index.html



DefaultMapLayer.patch
Description: Binary data
--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel