So I'd like to run the JDBC unit tests regularly while I'm hacking
around to make sure I don't break anything. I went to gt-jdbc and ran
"mvn test" but that doesn't seem to run very many tests. Do I need to
run all the tests in org.geotools.jdbc, and if so how?
Thanks,
Lee
On 5/8/2011 2:30 PM, Jody Garnett wrote:
On Monday, 9 May 2011 at 12:07 AM, lee-verizon wrote:
I'm making (slow) progress on the CSV store. I have the count() thing
fixed. Now moving on to the actual updating.
Cool.
A couple more questions:
1. It looks like ContentFeatureStore.getWriter(Query, int) does not
(yet) implement any of the query processing (like that seen in
ContentFeatureSource.getReader(Query)). Needs doing, right?
I imagine so; I liked the design for getWriter as it was easy to
extend and override.
We will however need to keep Justin in mind as we make changes to the
base class to support query processing (his JDBCFeatureStore already
does its own query processing in SQL).
2. SimpleFeatureStore declares these three methods:
public SimpleFeatureCollection getFeatures() throws IOException;
public SimpleFeatureCollection getFeatures(Filter filter)
throws IOException;
public SimpleFeatureCollection getFeatures(Query query)
throws IOException;
but it also extends SimpleFeatureSource which already has those three
methods. Seems that SimpleFeatureStore should not be duplicating
them. Right?
Correct; this is where we have an interesting design problem. If you
take a moment to look at the JDBCFeatureStore; you can see that Justin
has solved it by having a delegate JDBCFeatureSource.
- http://docs.geotools.org/latest/userguide/library/jdbc/internal.html
Not sure if you can make it out in the pictures on that page?
P.S. Should I be cc'ing the -devel list when asking these kind of
questions?
Yes; that way Justin can point out any other interesting tricks he has
done for us to copy.
Jody
On 5/5/2011 12:55 AM, Jody Garnett wrote:
So, CSVFeatureSource>getCountInternal() is broken. It ignores the
query parameter. I suppose I should try to fix that?
Gak! Yes it was obviously something missed by the only subclasses we
have in operation (which are all database driven).
Related question: It would be nice if Iterable was added to some of
these collections so the new java 'for each' construct could be
used. Is that on the todo list?
Actually it most definitely is *not*.
The reason is that we need to close our iterator (so we can close
our file input stream in this case). We were quite content to use
iterator() up until Java 5 introduced teh "for each" construct - at
which point we needed to drop it :(
I better add this question to the FAQ if it is not there already.
Jody
Lee
On 5/5/2011 12:18 AM, Jody Garnett wrote:
I was under the impression that the super classes handle it for
us. Let me check the code ...
In ContentFeatureSource.getReader( Query ) is the logic that goes
through the query and handles everything; we have the option of doing
some of the work ourselves (by overriding key methods).
Here is part of that method as an example:
if ( !canFilter() ) {
if (query.getFilter() != null && query.getFilter() !=
Filter.INCLUDE ) {
reader = new
FilteringFeatureReader<SimpleFeatureType, SimpleFeature>( reader,
query.getFilter() );
}
}
So if our subclass wanted to do its own filtering; we would do so;
and make sure canFilter() returns true.
--
Jody Garnett
On Thursday, 5 May 2011 at 4:51 PM, lee-verizon wrote:
Hi Jody. I'm finally getting a few minutes to work on
CSVFeatureStore/Writer. I started by writing some unit tests and
getting more familiar with all these new (to me) concepts. It
look like CSVDataStore/FeatureSource/FeatureReader do not
actually support filtering/querying -- is that correct? Should
they? I realize this is just for training purposes, but seems
like the impl should be complete. Please advise.
Thanks,
Lee
On 4/24/2011 10:38 PM, Jody Garnett wrote:
Okay I have finished up to Part 4 of the abstract datastore
tutorial; and am going to go down to the pub to celebrate ANZAC
day (all australian holidays are celebrated at the pub).
I will be around later on email or IRC if you have questions or
need a code review.
--
Jody Garnett
On Monday, 25 April 2011 at 3:11 PM, Jody Garnett wrote:
I should have a commit for you to review shortly; I am
foolishly making sure the abstractdatastore tutorial code
examples compile; and finding
mistakes as I go :(
If you can have a go CSV FeatureStore / FeatureWriter that
would be great.
--
Jody Garnett
On Monday, 25 April 2011 at 2:53 PM, lee-verizon wrote:
ok. let me know what, if anything, you'd like me to do.
Lee
On 4/23/2011 5:07 PM, Jody Garnett wrote:
I decided it would be easier to do this in two parts;
1) fix up datastore tutorial (that uses abstract datastore):
http://docs.geotools.org/latest/userguide/tutorial/advanced/abstractdatastore.html
I am cutting code examples into Java code to make sure they
compile/run.
2) use it as a model for completing content datastore
http://docs.geotools.org/latest/userguide/tutorial/advanced/contentdatastore.html
--
Jody Garnett
On Friday, 22 April 2011 at 1:24 PM, lee-verizon wrote:
On 4/20/2011 6:24 AM, Jody Garnett wrote:
3. "To be continued" -- your email said "One thing you
could do is
try them out", but I'm not sure what you mean. You want me
to try
writing a 'main' that uses your CSVDataStore?
There are three java files there; do they make sense to you?
The next step is to make a CSVFeatureStore (backed by a
CSVFeatureWriter); I have not looked into how to generate
csv files
with that library yet.
Jody
The files do make sense. Do you want me to take a shot at
'finishing'
the tutorial, or at least filling out the
FeatureStore/Writer? Seems
pretty straightforward. What's the timeframe/deadline? As
I've said, I
don't have that much time to work on this - maybe an hour or
two per day.
Lee
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel