<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Jody Garnett&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/" />
<modified>2008-05-20T06:38:11Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/jive/271</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, jive</copyright>
<entry>
<title>How 2 Map</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2008/04/geohack.html" />
<modified>2008-05-20T06:38:11Z</modified>
<issued>2008-04-08T23:34:17Z</issued>
<id>tag:weblogs.java.net,2008:/blog/jive/271.9498</id>
<created>2008-04-08T23:34:17Z</created>
<summary type="text/plain">Starting up an industry specific blog - GeoHack</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>I will be using this blog a little less; it seems the vast majority of my postings are of interest to those involved in open source spatial (and Java is just the canvas I enjoy working with). </p>

<p>As such I will be making use of the following blog: <a href="http://how2map.blogspot.com/">http://how2map.blogspot.com/</a>.</p>

<p>I would like to thank Java.net for hosting, and hope the spam comments problem abates.<br />
</p>]]>

</content>
</entry>
<entry>
<title>Community 1 Maven 0 Eclipse -1</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2008/02/community_1_mav.html" />
<modified>2008-02-02T20:54:22Z</modified>
<issued>2008-02-02T20:54:17Z</issued>
<id>tag:weblogs.java.net,2008:/blog/jive/271.9121</id>
<created>2008-02-02T20:54:17Z</created>
<summary type="text/plain">I cottoned on to the current blog fest on the merits of Maven. I have been running with Maven since version 1.0; but mostly I recommend going into Maven (or any build system) with a couple of friends, nothing wastes time like a build system.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[An open source mailing list I am on recently took up the <a href="http://www.infoq.com/news/2008/01/maven-debate">interesting debate about the Merits of Maven</a> going on in the blogosphere. Occasionally I remember I have a blog; and most of my email is too long anyways ...
<p>
Frank Hardisty asked: For projects the size and complexity of GeoTools and GeoServer, is there currently a viable alternative to Maven?
<p>
<h1>Is there an alternative to Maven</h1>
<p>
Good question - I think the alternative would be more organization on our part:
<ul>
<li>less dependencies</li>
<li>and to commit the jars into svn</li>
</ul>

There are two downsides:
<ul>
<li>writing a lot more of our own software; and end up in a not invented here situation like many other projects.</li>
<li>at the end of the day all we would be left with is a simple build</li>
</ul>
Personally I would rather share the burden of making a build system with other projects; ant is at the same primitive level as make. Scrips are produced and copied from project to project; and after a while it gets so fragile everyone is scared to touch it.
<p>
What I like about maven is the chance to look into some coverage tools (for example), notice that they support maven, and quickly try out a few by running maven a couple of times. I have to hand it to people like Justin and Martin who have gone ahead and made a few maven plug-ins for the community; I am so glad our build is not a mess of ant scripts, and hacks that only work on linux, and ... well lets say I have worked on a smaller project that took 40 mins to build.
<p>
On a related note I am stuck maintaining a simple build that does the exact same dependency management work (since it uses GeoTools jars) - the uDig application uses an ant script to suck down jar files from the maven repository. Maintaining this is a pain and we really wish we could make use of maven.
<p>
The uDig project is stuck between two evils; something called PDE Build which makes maven look like a cake walk; and Maven (who would solve our problems except that the eclipse foundation is a big pay to play mess).
<p>
Jody
<p>PS. My rant here ends up being pro community; rather than pro maven
<p>
PPS. A cake walk is actually an American dance tradition; with the best dancer literally "taking the cake"
<p>
PPPS. There is a couple of Java Community Process module proposals going around trying to learn from both Spring, OSGi and the maven repository system]]>

</content>
</entry>
<entry>
<title>Java at FOSS4G wrap up Article</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/10/java_at_foss4g.html" />
<modified>2007-10-09T18:27:26Z</modified>
<issued>2007-10-09T18:27:05Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.8399</id>
<created>2007-10-09T18:27:05Z</created>
<summary type="text/plain">GeoTools was really well represented at this years Free and Open Source Geospatial conference.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>One of the advantages of being a library is that we can really be everywhere. The downside is that even if you attended the conference (wasn't it great!) you could not of managed to catch all that we had going on.</p>

<p>I have written up an article over on the GeoTools wiki: <a href="http://docs.codehaus.org/display/GEOTOOLS/GeoTools+at+FOSS4G+2007">GeoTools at FOSS4G Article</a>. For those that wanted to see how the <a href="http://www.foss4g2007.org/presentations/view.php?abstract_id=120">MapServer vs GeoServer</a> performance testing turned out follow the link and have a look at the pdf.</p>

<p>My favourite development this year was represented by two tag team presentations on twisting Java Advanced Imaging into some simply amazing raster work (<a href="http://www.foss4g2007.org/presentations/view.php?abstract_id=241">Next generation of raster support for the GeoTools-GeoServer stack</a>) including a combination PostGIS / File system combo for x,y,z,t rasters (<a href="http://www.foss4g2007.org/presentations/view.php?abstract_id=225">Managing WMS and WCS multidimensional NetCDF Datasets with Geoserver</a>).</p>

<p><a href="http://docs.codehaus.org/plugins/advanced/gallery-slideshow.action?imageNumber=1&pageId=14876688&decorator=popup"><img src="http://docs.codehaus.org/download/thumbnails/14876688/ThisTruckIsSlow.jpg"></a></p>

<p>I am going to talk about about the two Labs I was involved in. Labs are a great feature of the FOSS4G experience. So often at these conferences all you get it talk, talk and more talk.</p>

<p>Labs are the opposite of that - hands on time with real software.</p>

<h2>How to Cope with GeoSpatial</h2>

<p>This was the only <a href="http://www.foss4g2007.org/labs/L-13/">hard-core hands on programming lab</a> at the conference this year. Thanks to everyone who attended! GeoTools was used to access a Web Map Server, generate a Shape file, hack away at PostGIS (using Common Query Language and Filter 1.0). Students that finished early got a chance to visualization with Images and Shapefiles.</p>

<p>Thanks to Martin, Brock an Melisa for pulling this one together. Special thanks to Andrea and Jesse for the code review</p>

<p>If anyone wants to see more GeoTools documentation please hire me for a training course ;-)</p>

<h2>An Introduction to the uDig Open Source Desktop</h2>

<p><a href="http://www.foss4g2007.org/labs/L-08/">This lab<a/> was my highlight of FOSS4G this year. I have been teaching the uDig training course for several years now - but it is focused on getting development teams up and going. This is was my first time showing uDig to a room of users - and it was great to see how happy it made everyone.</p>

<p>I had originally planned this course as an intro workshop (so people could hunt down he projects they thought were fun over the course of the week). The fates of scheduling were against me - this was the last Lab on the last day. On the bright side everyone had something they wanted to "see in action".</p>

<p>If you would like to try this workshop at home it is available online:<br />
<ul><li><a href="http://udig.refractions.net/confluence/display/UDIG/Walkthrough+1">Walkthrough 1</a></li><li><a href="http://udig.refractions.net/confluence/display/UDIG/Walkthrough+2">Walkthrough 2</a></li></ul><br />
We had several members of the uDig development team in attendance for some one-on-one help (mostly they stood around with big grins on their faces). At one point a circle of mac laptops gathered like a fairy ring at the back of the room as a flash drive was passed around.</p>

<h2>What is Next?</h2>

<p><a href="http://docs.codehaus.org/plugins/advanced/gallery-slideshow.action?imageNumber=13&pageId=14876688&decorator=popup"><img src="http://docs.codehaus.org/download/thumbnails/14876688/Fun.jpg"></a><br />
Silvia (above) used the FOSS4G code sprint to create a brand new Italian translation. Thank you! I would like to ask for additional languages - if you are able to translate please stop by the <a href="http://lists.refractions.net/mailman/listinfo/udig-devel>udig devel email list</a> and let me know. We have French and Spanish translations started.</p>

<p>Over the next several weeks I will be doing my best to make a stable release of uDig. I am not looking to add any more features at this time, so please <a href="http://udig.refractions.net/confluence/display/UDIG/Downloads">download the latest</a> let me know how well it works in your organization.<br />
</p>]]>

</content>
</entry>
<entry>
<title>FOSS4G 2007 2 days and counting</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/09/foss4g_2007_2_d.html" />
<modified>2007-09-22T20:59:51Z</modified>
<issued>2007-09-22T20:59:39Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.8302</id>
<created>2007-09-22T20:59:39Z</created>
<summary type="text/plain">The Free and Open Source Software for Geospatial conference is ramping up and Java should be everywhere. I have the privileged of working with a number of people doing presentations this year - and it has been great watching the GeoServer project (running Java EE) catch up to the long time king of the hill MapServer (written in C).</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[The <a href="http://www.foss4g2007.org/">Free and Open Source Software for Geospatial</a> conference is ramping up and Java should be everywhere. I have the privileged of working with a number of people doing presentations this year - and it has been great watching the GeoServer project (running Java EE) catch up to the long time king of the hill MapServer (written in C).
<p>
If you want to see how close these two are be sure to attend the presentation: <a href="http://www.foss4g2007.org/presentations/view.php?abstract_id=120">WMS Performacne: Mapserver vs. Geoserver</a>.
<p>
It is a good thing I got a sneak peek at the results, because I am going to be busy ...here are a couple of things to see out of the way of the main program.

<h3>Demo Theatre</h3>

This year at FOSS4G we have a full on <a href="http://www.foss4g2007.org/exhibition/demotheatre/">Demo Theatre </a> set up; think of these as a lightning talk combined with actual running software. I can think of  few better ways to get a feel for what is going on then sitting back and watching these programs actually run.

The Demo Theatre is happening during the coffee and lunch breaks; and there is a speak Google Summer of Code slot Wednesday Morning where you can take a look at what the next generation of developers are working on.

<h3>Developer Gatherings</h3>

If you want to hunt me down and talk shop please visit the Refractions booth. We will have a live PostGIS and uDig demos going as part of the <a href="http://www.foss4g2007.org/exhibition/integration/">integration showcase</a>. The other place I will at least visit is the OSGeo booth, with OSGEO formally running the show this year we may have the place to ourself?
<p>
There are two places to hunt down the developer community and see them in action:
<ul>
<li><a href="http://wiki.osgeo.org/index.php/FOSS4G2007_BOF_Sessions">Bird of a Feather Sessions</a>; and
<li><a href="http://www.foss4g2007.org/code_sprint/">Code Sprint</a>.
</ul>
See you there!]]>

</content>
</entry>
<entry>
<title>JSR-275 And why GeoTools does not care yet</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/07/jsr275_and_why.html" />
<modified>2007-07-05T20:43:13Z</modified>
<issued>2007-07-05T20:40:49Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.7795</id>
<created>2007-07-05T20:40:49Z</created>
<summary type="text/plain">The deadline for JSR0275 is coming up on July 8th, as one of the top users of the JSR108 (which was withdrawn) you would think GeoTools would care about what is going on ... here is why we don&apos;t: Java 1.4</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>JSR-275 is almost ready! And there is much rejoicing to be had - but not quite yet.</p>

<p>In my last blog post I talked about GeoAPI and how we use it to define interfaces for a lot of the spatial goodness happening in the Java world.  One of the constructs discussed was the interface for CoordinateReferenceSystem. This interface is implemented by a couple of projects:<br />
<ul><br />
<li><a href="http://docs.codehaus.org/display/GEOTOOLS/Home">GeoTools</a><br />
<li><a href="http://jscience.org/">JScience</a><br />
</ul><br />
Central to the idea of a CoordianteReferenceSystem is what unit of measure the numbers are in (meters, feet, sexidecimal degrees, etc...).</p>

<p>JSR-275 defines a really amazing concept of "Unit of Measure" (as described in Fowlers Analysis Patterns Book). This idea is powerful, and allows you all kinds of runtime safety checks so that you do not (in the proverbially case) mix up meters and feet and fly into Mars by accident.</p>

<p>In JSR-275 they broke out Java Generics system and made a lot of this goodness into something the compiler can check for.</p>

<h4>So why doesn't GeoTools use JSR-275</h4>

<p>Problem is the reference implementation (also provided by JScience) is Java 5 only :-) So for the moment GeoTools community is hanging back so we can work with all those Java 1.4 J2EE projects that pay the bills.</p>

<h4>JSR-108 Where art thou</h4>

<p>Actually the GeoTools project still uses a units-0.1.jar provided by the earlier JSR-108. This earlier JSR-108 was withdrawn - and that seems to have scared the voting parties.</p>

<p>From the <a href="http://www.jcp.org/en/jsr/results?id=3216">JSR #275 Units Specification JSR Review Ballot</a>:<br />
<quote><br />
On 2005-06-09 Sun Microsystems, Inc. voted No with the following comment:<br />
Sun is voting "no" on this JSR based on concern over whether there<br />
is broad need for this JSR and concern that this is essentially<br />
equivalent to an earlier JSR (108) which was previously withdrawn.</p>

<p>It is possible that this topic may eventually benefit from a JSR.<br />
However, it is not yet clear that there is broad Java community interest<br />
in a Java standard in this space.   There appeared to be only fairly<br />
limited community interest in JSR-108.</p>

<p>I would like to suggest that the submitters continue investigating and<br />
developing their API as a standalone class library.  Once they have more<br />
experience and can demonstrate broader community interest, it may be<br />
appropriate to launch a JSR.<br />
                                                          - Graham<br />
</quote></p>

<p>There are a lot of very similar comments, even the positive votes call into question the existence of JSR-275 based on the perception of JSR-108 as a failure.</p>

<h4>Why Units Matter</h4>

<p>Please be assured that the concept of a unit system is vital to using Java for scientific purposes. Even the old JSR-108 code is in day to day use around the world - in my projects it is used to explain how the world is round.</p>

<p>Be assured JSR-275 would be an instant success if it was not battling a community that is still bound by Java 1.4. The availability of JSR-275 will be added motivation for us to upgrade. The value and utility of JSR-108 is also holding us back; be assured that when we do upgrade the reference implementation of JSR-275 will be test from all kinds of angles.</p>

<h4>GeoTools and Java 5 - now is the Time</h4>

<p>GeoTools is tabling a proposal right now about when to upgrade to Java 5. The success of JSR-275 on July 8th will be instrumental in this decision.</p>

<p>We will do our best to upgrade to JSR-275 - The only other thing you can do to help is is to kick websphere (and others) into releasing a proper Java EE implementation. You will find that the scientific community, much like the rest of Java, is splintered between versions.</p>

<p>Units with generics is great, it makes for a better example of Generics pulling their weight in the Java language than the usual example of Collections.</p>]]>

</content>
</entry>
<entry>
<title>Java GIS - So why don&apos;t we work together?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/06/java_gis_so_why.html" />
<modified>2007-06-13T21:11:04Z</modified>
<issued>2007-06-13T21:10:56Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.7626</id>
<created>2007-06-13T21:10:56Z</created>
<summary type="text/plain">Yet another project has come out, and it includes a GIS component! Problem is we are not sharing code, I wonder if our approach is wrong ...</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Open Source</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>Someone pointed me at an interesting new project .... actually an interesting old project in new cloths. <a href="http://www.eclipse.org/ohf/components/stem/index.php">The Spatiotemporal Epidemiological Modeler</a> is a little component for the eclipse Open Healthcare Framework.</p>

<p>And it includes one feature (out of many) of interest to this discussion: A GIS.</p>

<h4>Perfect!</h4>

<p>This is exactly what I want to see happen; GIS as a widget that can be rolled into your application de jour.</p>

<p>The actual widget is kind of fun; the data format makes use of Geography Markup Language (GML) to define its polygons and so on. Yes it is an Eclipse RCP application, and no they did not talk to us about using uDig. You can uDig in your own RCP applications - but what they have is nice and specific to their <a href="http://wiki.eclipse.org/index.php/Welcome_STEM_Developers#An_Introduction_to_STEM_Map_Files">data format</a>. They even have google earth integration - looks like they could of talked to GeoServer and saved some effort.</p>

<p>I assume there was just not enough time / energy / benefit to the developers to work with a larger community on this one. uDig offers an intergration platform so you can roll all kinds of data formats into the same projection and see it on the screen - making use of a number of open source projects to get the job done.</p>

<h2>What do we have to work on?</h2>

<p>There are several areas of neutral grounds for Java open source projects to meet, greet, and share common geospatial interfaces.</p>

<p>At a low technical level most projects are making use of the JTS Topology Suite to get their polygon game on. Sometimes they wrap the beast up in modern ISO Geometry clothing, and sometimes they just punt raw coordinates onto the screen until JTS is needed for actual work.</p>

<p>At a high level we are often working against the same file formats (shapefile, JPEG2000, etc..) and against the same web services (Web Feature Server, Web Map Sever).</p>

<p>It is in between where things get a bit messy. Geospatial projects often use the same concepts (Feature is something that can be drawn on a Map, A Map is made up of layers of features styled up and made to look pretty, etc...). Occasionally these concepts are based on a specification (the referencing specification describes where a coordinate end up on your map, the geometry specification defines what a surface is, that GML specification defines an XML file format for features, and so on...).</p>

<p>Basically the model is the same - why can't we share code.</p>

<h2>How can we work together?</h2>

<p>The <a href="http://geoapi.sourceforge.net/stable/site/charter.html">GeoAPI</a> project defines common interfaces for much of the middle ground. It even has a procedure for projects to collaborate together.</p>

<p>Here is an example: that idea of "Referencing" has a set of interfaces, and there are two implementations:<ul><li>Java 1.4: in the <a href="http://geotools.codehaus.org/">GeoTools</a> project<br />
<li>Java 5: in <a href="http://jscience.org/">JScience</a> project.<br />
</ul></p>

<p>If you are building an application you can pick and choose.</p>

<p>It would be great if we could pull this off for some more concepts. The process is in place, but perhaps our approach (our sales pitch) has been wrong.</p>

<h2>Why don't we work together?</h2>

<p>One (bad) design trick you can play to get collaboration started is to present a design that is mostly right, and let others find and correct the mistake. By getting everyone to contribute it becomes much more of a shared property and of interest to all.</p>

<p>Currently we have been driving GeoAPI from mostly one view point - the specifications. This is easy to understand - since the specifications have all the hard naming choices figured out. However by starting with a specification, the process does not feel "open" to collaboration.</p>

<p>In practise the specifications always have mistakes, and collaboration is vital for success. I just wish I could make that point more: <b>Got Java? Got Geography? GeoAPI needs you!</b></p>

<p>I wish we could stress community building as much as correctness.</p>

<p>Here is where our approach can be fixed: by saying "<b>We should work together</b>" we are being too timid - the statement is easy to agree to - but chances are it will never happen. Enthusiasm, funding and deadlines drive software here rather than good intentions.</p>

<h2>We should work together on THIS?</h2>

<p>So here is the statement I would like us to make (rather than working on something "abstract"). Let's work together on something specific.</p>

<p><b>What is a Map</b></p>

<p>I just want to capture the data model here, we can bust out different widgets to visualize the thing after.</p>

<p>A couple of suggestions:<ul><li>Have a look around and see what projects do in the wild<br />
<li>GeoTools is sick of its representation (it does not do WMS layers) and would love to collaborate on this<br />
<li>OpenJUMP may be in a similar situation?<br />
<li>GeoWidgets would love to be the keeper of a Map widget<br />
<li>OSGeo has a a SoC student working on a 3D widget<br />
</ul></p>

<p>If we really get stuck on names - the file format for <b>Open Web Context Document</b> is around. I want to read in and display the result in a number of widgets. The file format is not finished yet (so we provide feedback if we see something we hate). Treat this as an opportunity not a constraint. Sample code exists in uDig to read the file format.</p>

<p>All the best and happy hacking.</p>]]>

</content>
</entry>
<entry>
<title>FOSS4G show me the Performance</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/06/show_me_the_per.html" />
<modified>2007-06-12T21:50:40Z</modified>
<issued>2007-06-12T21:50:36Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.7620</id>
<created>2007-06-12T21:50:36Z</created>
<summary type="text/plain">One interesting thing with open source development is the lack of comparisons with proprietary solutions. I just watched this happen in the geoserver developers IRC meeting - as we look toward content for the &quot;Free And Open Source Software for Geoinformatics&quot; conference.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Open Source</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>What a silly situation performance (and benchmarks are) have put us in. As developers we really want to know how well things will perform - even if it is just so we can figure out how much hardware we will need at the end of the day.</p>

<p>I first ran into this problem with PostGIS (a set of spatial extensions for the PostgreSQL database). The oracle spatial license does not let you run benchmarks and publish.  So the only thing I can do is tell you "it is really good". PostGIS is such a success that most spatial data wranglers check it out, and measure for themselves, before going further with Oracle.</p>

<p>Oracle does do somethings very well, the security model is awesome. With their "Free for Development" download they are even getting more open source love ... but until we can place that jdbc driver in a maven repository there will not be very many turn key open source oracle solutions.</p>

<h4>FOSS4G Presentation Material</h4>

<p>In todays GeoServer IRC meeting the subject of presentations for the <a href="http://www.foss4g2007.org/">Free And Open Source Software for Geoinformatics</a> was on the agenda.</p>

<p>One thing the community is really proud of is how much GeoServer has improved in the last year. The community has been really brave, rewriting their raster support to the point it shines, and putting together a really nifty dispatch system in order to take on the monster that is WFS 1.1.</p>

<p>Of course all of that is technical and does not make a good presentation (except to other developers so it will be a good beer garden subject). </p>

<p>What does make a good presentation is <b>performance</b>. And this is where open source volunteers shy away from the legal mess that is benchmarking.</p>

<p>Specifically we can set up a nice chart comparing the usual open source subjects. This mostly means MapServer since we enjoy talking to Frank about GDAL performance.</p>

<p>But for the commercial offerings? Like a comparison with ArcIMS?</p>

<p>We did think of a couple of ways:<br />
<ul><br />
<li>Report the performance of some publicly available ArcIMS instance<br />
<li>Run our performance test during the presentation (it would not be on the slides but the audience could see)<br />
</ul><br />
Sadly it will not make the cut, life is too short to figure out what we are and are not allowed to say.</p>

<h4>So what can you tell me? How good is GeoServer?</h2>

<p>So here is the best idea we can offer you - if you want to know how insanely great GeoServer has become download the (open source) tool we used for testing and measure it yourself.</p>

<p>And just because we want you to come to FOSS4G - please attend our presentation (fingers crossed that it will be accepted) and learn where to download said performance testing tool.</p>

<p>You could also engage one of several consulting companies to produce a report for you.</p>

<p>If you do find out how good GeoServer is keep it on the hush hush.<br />
</p>]]>

</content>
</entry>
<entry>
<title>The code always knows ... how to reproject</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/02/the_code_always_2.html" />
<modified>2007-02-23T01:38:02Z</modified>
<issued>2007-02-23T01:37:43Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.6673</id>
<created>2007-02-23T01:37:43Z</created>
<summary type="text/plain">Part three on the road to support reprojection as part of the GeoTools Query API, now that the FeatureType is all straigtened out lets change the actual information to match.
</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>The code knows .. how to reproject data</title>
</head>
<body>
Part three on the road to support reprojection as part of the GeoTools
Query API, now that the FeatureType is all straigtened out lets change
the actual&nbsp;information to match.<br>
<h4>To Review</h4>
The GeoTools API has fallen into a trap where we promissed to reproject
data when asked the correct Query. Problem is none of the
implementations picked up on this change. Here is what we want to make
possible.<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">CoordinateReferenceSystem world = CRS.decode("EPSG:4326"); // world lon/lat<br>CoordinateReferenceSystem local = CRS.decode("EPSG:3005"); // british columbia<br>        <br>FeatureSource road = store.getFeatureSource( "road" );<br><br>DefaultQuery query = new DefaultQuery( "road", Filter.INCLUDE, new String[]{ "geom", "name" } );       <br>query.setCoordinateSystem( local );<br>query.setCoordinateSystemReproject( world );<br>                <br>FeatureCollection features = road.getFeatures( query );</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Since this is needed functionality the developer community quickly
hacked around the problem, leaving us with several working examples to
grab the right answer from.<br>
<br>
Here is the "fix" for reprojecting the data:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">if (forcedCS != null)<br>    results = new ForceCoordinateSystemFeatureResults(results, forcedCS);<br>if (reprojectCS != null)<br>    results = new ReprojectFeatureResults(results, reprojectCS);</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
<h3>The Review</h3>
In&nbsp;<a
 href="http://weblogs.java.net/blog/jive/archive/2007/02/the_code_always.html">part
one</a> we applied the example that changed the FeatureType, now
we need to look at reprojecting the data.<br>
<br>
In <a
 href="http://weblogs.java.net/blog/jive/archive/2007/02/the_code_always_1.html">part
two</a> we got distracted by some inconsistent error handling ...
and made a choice between fail siliently, fail with an exception and
doing the right thing. In this case it was easy - the query is
experssed using set theory and we made a nice empty set.<br>
<br>
Returning to our origional problem &nbsp;we
had&nbsp;test&nbsp;failure when checking to see that the
FeatureType in fact changed -&nbsp;turns out I was testing the
wrong thing:<br>
<ul>
  <li>FeatureCollection.getFeatureType() - returns the type of a
the collection. Surprisingly collections are features as well. Makes
sense if you consider that a feature is something that can be drawn on
a map.</li>
  <li>FeatureCollection.getSchema() - is the type of the&nbsp;<span
 style="font-weight: bold;">contents</span> of the
collection</li>
</ul>
Bah! When testing the FeatureCollection.getSchema() we found that that
our FeatureType has indeed changed. <br>
<h2>Looking at the Solution</h2>
The two utility classes employed by the "fix" are pretty straight
forward:<br>
<ul>
  <li>ForceCoordinateSystemFeatureResults - this one just changes
the FeatureType ... something we have already accomplished.</li>
  <li>ReprojectFeaureResults - takes an existing
FeatureCollection and grinds through the data applying a MathTransform
to each Geometry</li>
</ul>
Lets look at the part that does the magic: ReprojectFeatureIterator<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">Feature next = reader.next();<br>Object[] attributes = next.getAttributes(null);<br><br>for (int i = 0; i &lt; attributes.length; i++) {<br>    if (attributes[i] instanceof Geometry) {<br>        attributes[i] = transformer.transform((Geometry) attributes[i]);<br>    }<br>}<br>return schema.create(attributes, next.getID());</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Well that is pretty clear; grab the next Feature suck the attributes
out into an array. For each Geometry use a MathTransform to reproject.
And then use the FeatureType to create a new Feature with the results.<br>
<br>
The MathTransform is produced using a utility class:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">this.transform = CRS.findMathTransform(originalCs,destinationCS, true);</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
It sure would be nice if implementors made an optimized version
avaialble, I will do this for PropertyDataStore as the last step.<br>
<h2>Applying the Solution .. to AbstractFeatureSource? No</h2>
So we *could* just apply the wrapping classes as is &nbsp;... <br>
<table style="text-align: left; width: 100%; font-family: monospace;"
 border="1" cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">    public FeatureCollection getFeatures(Query query) throws IOException {<br>        FeatureType schema = getSchema();        <br>        String typeName = schema.getTypeName();<br>        <br>        if( query.getTypeName() == null ){ // typeName unspecified we will "any" use a default<br>            DefaultQuery defaultQuery = new DefaultQuery(query);<br>            defaultQuery.setTypeName( typeName );<br>        }<br>        else if ( !typeName.equals( query.getTypeName() ) ){<br>            return new EmptyFeatureCollection( schema );<br>        }<br>        FeatureCollection collection = new DefaultFeatureResults(this, query);<br>        if( collection.getDefaultGeometry() == null ){<br>            return collection; // no geometry no reprojection needed<br>        }        <br>        if ( query.getCoordinateSystem() != null ){<br>            collection = new ForceCoordinateSystemFeatureResults(collection, query.getCoordinateSystem() );        <br>        }<br>        if ( query.getCoordinateSystemReproject() != null){<br>            collection = new ReprojectFeatureResults(collection, query.getCoordinateSystemReproject() );                        <br>        }<br>        return collection;<br>     }</span></pre>
      </td>
    </tr>
  </tbody>
</table>
That would work we would be done .. or would we?<br>
<br>
Since we changed the FeatureType of DefaultFeaureResults (to reflect
what should be happening) the traditional wrapping approach would be
broken. When the ReprojectFeatureResults wrapper goes to produce a math
transform it will see the expected CRS already ... and do nothing!<br>
<br>
Since DefaultQueryResults is accepting a query I would like to see it
do the work, let's get started.<br>
<h2>Applying the Solution to DefaultFeatureResults</h2>
We need to pick up the correct MathTransform in the constructor (if we
cannot do the work we may as well let them know early). Here is the
code snip:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">        CoordinateReferenceSystem origionalCRS = origionalType.getDefaultGeometry().getCoordinateSystem();<br>        if( query.getCoordinateSystem() != null ){<br>            origionalCRS = query.getCoordinateSystem();<br>        }<br>        try {<br>            transform = CRS.findMathTransform( origionalCRS, cs, true);<br>        } catch (FactoryException noTransform) {<br>            throw (IOException) new IOException("Could not reproject data to "+cs).initCause( noTransform );<br>        }  </span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
We are going to use the utility class
GeometryCoordinateSequenceTransformer mentioned above to do the actual
work.<br>
<br>
The next part is to look at the code that does the reading ..
getReader():<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">    public FeatureReader reader() throws IOException {<br>        FeatureReader reader = featureSource.getDataStore().getFeatureReader(query,<br>                getTransaction());<br>        <br>        int maxFeatures = query.getMaxFeatures();<br>        if (maxFeatures == Integer.MAX_VALUE) {<br>            return reader;<br>        } else {<br>            return new MaxFeatureReader(reader, maxFeatures);<br>        }<br>    }</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Oh look they already have a "wrapper" in place here ...
MaxFeatureReader will cut off the feature supply when a specific max is
reached.<br>
<br>
Lets go shopping:<br>
<ul>
  <li>ReprojectFeatureIterator ... utility class used when your
collection is memory based</li>
  <li>ReprojectFeatureReader ... perfect!</li>
</ul>
Applying this is straight forward:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">    public FeatureReader reader() throws IOException {<br>        FeatureReader reader = featureSource.getDataStore().getFeatureReader(query,<br>                getTransaction());<br>        <br>        int maxFeatures = query.getMaxFeatures();<br>        if (maxFeatures != Integer.MAX_VALUE) {<br>            reader = new MaxFeatureReader(reader, maxFeatures);<br>        }        <br>        if( transform != null ){<br>            reader = new ReprojectFeatureReader( reader, schema, transform );<br>        }<br>        return reader;<br>    } </span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
That should be it ... getBounds uses reader() and so on.<br>
<br>
So we have two solutions:<br>
<ul>
  <li>An example of how to support reprojection directly as part
of your FeatureCollection&nbsp;(ie use of ReprojectFeatureReader or
ReprojectFeatureIterator wrappers)</li>
  <li>An example of how to support reprojection after the fact ..
modify your getFeatures( Query method ) to &nbsp;use
ReprojectFeatureResults (or its colleciton based
ReprojectingFeatureCollection)</li>
</ul>
It is very cool to get the reprojection as close to the data read as
possible, creating Features, unpacking the attributes to reproject and
then folding them back into Features again is a bit of a pain.<br>
<h2>Almost done </h2>
Tomorrow we will try testing and see what sorts of problems this occurs
in two real applications. If there is time we will review the javadocs
that started this problem ... and explore ways of preventing this in
the future.<br>
</body>
</html>]]>

</content>
</entry>
<entry>
<title>The code always knows .. how to handle Query</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/02/the_code_always_1.html" />
<modified>2007-02-21T18:40:37Z</modified>
<issued>2007-02-21T18:40:33Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.6658</id>
<created>2007-02-21T18:40:33Z</created>
<summary type="text/plain">One of the questions that came up in yesterdays debug hunt was this ...
&quot;what to do when the query does not match the data&quot;. Lets see what the code has to say.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Open Source</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>The code knows ... how to handle Query</title>
</head>
<body>
One of the questions that came up in yesterdays debug hunt was this ...
"what to do when the query does not match the data". Lets see what the code has to say.<br>
<br>
We have a couple of options on the table, and actually all of them are
implemented! While this is horrible for client code (they cannot know
what to expect) it is great for us since we will have working tested
code snipets to choose from when we decide what behavior is woth
keeping.<br>
<br>
To review this problem (pretending we are using Query to
access&nbsp;a database) the client code has asked for all the
"Rivers" to be returned, but by mistake they asked the "Roads" table.<br>
<br>
What to do?<br>
<h2>Ignore the Problem</h2>
Always an option, sometimes this is phrased as "do what I mean not what
I say", by convention code is supposed to LOG a warning when this
occurs.<br>
<br>
So when the user asked all the&nbsp;"rivers" in the "roads" table
...&nbsp; we should actually change their query to "roads".<br>
<br>
Here is what that looks like (from yesterdays debugging session):<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">public DefaultFeatureResults(FeatureSource source, Query query) {<br>    this.featureSource = source;        <br>    FeatureType origionalType = source.getSchema();<br>    <br>    String typeName = origionalType.getTypeName();        <br>    if( typeName.equals( query.getTypeName() ) ){<br>        this.query = query;<br>    }<br>    else {<br>        this.query = new DefaultQuery(query);<br>        ((DefaultQuery) this.query).setTypeName(typeName);<br>    }<br>    ... handle query<br>}</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
I hate things that fail siliently in the night (geotools policy is to
produce a warning ... it just has not followed here yet).<br>
<h2>Exceptionally Annoying</h2>
The next option is to throw an exception ... this is a popular approach
(implementors no longer have to worry about the problem, it is visible
to client code, and if the exception message is good developers can
figure out what went wrong and try again).<br>
<br>
This is however an approach we are trying to move away from ... for two
reasons:<br>
<ul>
  <li>Failure during rendering sucks; you get an empty screen.
Much nicer to see the data that worked ... and then sift through the
LOG messages to discover why your rivers did not show up.</li>
  <li>Failure during long running process hurts; GIS data is
large usually you will need to try</li>
  <ul>
    <li>Something quick and simple for 80% of the work</li>
    <li>Break out something harder for 15%</li>
    <li>4% for data cleaning. Perhaps it was collected wrong
(perhaps the lines are invalid .. or were made so by loss of percision)</li>
    <li>1%... and then you are down to a manual process</li>
  </ul>
</ul>
This approach is taken by the WFSFeatureSource:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre>public FeatureCollection getFeatures(Query request) throws IOException {<br>    String typeName = featureType.getTypeName();<br><br>    if ((request.getTypeName() != null) &amp;&amp; !typeName.equals(request.getTypeName())) {<br>        throw new IOException("Cannot query " + typeName + " with:" + request);<br>    }<br>    if (request.getTypeName() == null) {<br>        request = new DefaultQuery(request);<br>        ((DefaultQuery) request).setTypeName(featureType.getTypeName());<br>    }<br>    return new JDBCFeatureCollection(this, request);<br>}</pre>
      </td>
    </tr>
  </tbody>
</table>
<h2>Or be correct</h2>
The last option, and the one suggested by Andrea is to do what the user
said ... if they asked for all the rivers in the roads table give it to
them! The collection will however be empty.<br>
<br>
This is easy enough to arrange .. from the final AbstractFeatureSource:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre>public FeatureCollection getFeatures(Query query) throws IOException {<br>    FeatureType schema = getSchema();        <br>    String typeName = schema.getTypeName();        <br>        <br>    if( !typeName.equals( query.getTypeName() ) ){<br>        return new EmptyFeatureCollection( schema );<br>    }<br>    else {<br>        return new DefaultFeatureResults(this, query);    <br>    }        <br>}</pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
I like it.<br>
<h2>How Query is Handled</h2>
Here is the final result .. I have stolen code from all three examples
to cover such matters as a *null* typeName.<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre>public FeatureCollection getFeatures(Query query) throws IOException {<br>    FeatureType schema = getSchema();        <br>    String typeName = schema.getTypeName();<br>    <br>    if( query.getTypeName() == null ){ // typeName unspecified we will "any" use a default<br>        DefaultQuery defaultQuery = new DefaultQuery(query);<br>        defaultQuery.setTypeName( typeName );<br>    }<br>    <br>    if( !typeName.equals( query.getTypeName() ) ){<br>        return new EmptyFeatureCollection( schema );<br>    }<br>    else {<br>        return new DefaultFeatureResults(this, query);    <br>    }        <br>}</pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Thanks for the idea&nbsp;Andrea!
</body>
</html>
]]>

</content>
</entry>
<entry>
<title>The code always knows</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/02/the_code_always.html" />
<modified>2007-02-21T04:47:33Z</modified>
<issued>2007-02-21T04:45:24Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.6655</id>
<created>2007-02-21T04:45:24Z</created>
<summary type="text/plain"><![CDATA[For the last couple of months the GeoTools community has been
creeping&nbsp; around a problem ... one of quality. I am going to
wade in and do something about it; a code reivew. The catch? It is
probably going to be my own code.]]></summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Open Source</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>The code always knows</title>
  <meta content="Jody Garnett" name="author">
</head>
<body>
Abstract: <i>For the last couple of months the GeoTools community has been
creeping&nbsp; around a problem ... one of quality. I am going to
wade in and do something about it; a code reivew. The catch? It is
probably going to be my own code.</i><br>
<br>
The problem? We have some plugin implementations that do not follow a
coding contact. Normally this is not such a big deal (you throw those
plugins out of the build until they shape up). Problem is this time it
is *every* plugin.<br>
<h4>Unimplemented functionality - how did this Happen?</h4>
When this happens it usually means that we
(the GeoTools community) have let a user request change our api
(probably because some
functionality is commonly requested), but we did not take the trouble
to get buy in (and time) from the plugin implementors.<br>
<br>
Without
client code around at the same time as implementations are being built
this kind of thing falls through the cracks (<span
 style="font-weight: bold;">release early release
often</span> is the mantra, <span style="font-weight: bold;">feedback
early when developers care</span> is the reality).<br>
<br>
The DataStore API has suffered this same fate
before; currently uDig only supports three DataStores. As a client
application needs events to be fired when editing; but since
uDig&nbsp;arrived on the scene a bit late later then the
implementations&nbsp;it was not around
to ensure this functionality worked as advertised.<br>
<h4>Unimplemented functionlaity - why Fix it?</h4>
A really easy alternative is to just remove the functionality (it is
not being implemented that should tell us something is in a WONT FIX
state).<br>
<br>
Here
is why I am not going to do that ... hacking around this problem is
producing the same boiler plate code in a number of spots:<br>
<ul>
  <li>In our
Renderer .. I saw this back in November when we hooked up Expression (a
query langague) so that POJOs (ie normal objects) could be drawn onto a
map</li>
  <li>In other applications .. GeoServer noticed this problem and
talked about it in last weeks IRC meeting</li>
  <li>In other applications .. uDig developers noticed and hacked around the problem so quickly they forgot to report it</li>
</ul>
It is good practice to only allow a hack three times; and it looks like
we are at that number. Since we have three working hacks to draw on the
fix should be easy, and removing the hacks and running the test cases
should provide us confidence that we have done a good job..
<h1>Broken - using Query to Reproject</h1>
This is what a simple data access query looks like:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre>FeatureSource source = dataStore.getFeatureSource( "road" );<br>FeatureCollection features = source.getFeatures();</pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
And here is one that uses a Query:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre>FeatureSource source = dataStore.getFeatureSource( "road" );<br><span
 style="font-family: monospace;">DefaultQuery</span> query = new DefaultQuery( "road, Filter.INCLUDE );<br>FeatureCollection features = source.getFeatures();</pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
And finally here is the <span style="font-weight: bold;">problem</span>
- using Query to ask for something in another projection:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">CoordinateReferenceSystem world = CRS.decode("EPSG:4326"); // world lon/lat<br>CoordinateReferenceSystem local = CRS.decode("EPSG:3005"); // british columbia<br>        <br><br>FeatureSource road = store.getFeatureSource( "road" );<br>DefaultQuery query = new DefaultQuery( "road", Filter.INCLUDE, new String[]{ "name" } );<br>        <br>query.setCoordinateSystem( local ); // FROM, optional, will ignore actual data and force CRS<br>query.setCoordinateSystemReproject( world ); // TO, optional, will reproject data into CRS<br>                <br>FeatureCollection features = road.getFeatures( query ); // will reproject the features        </span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
You can see why this is a popular request - it actuall does something a
bit more then just data access.<br>
<ul>
  <li>setCoordinateSystem() - changes the "Metadata", the
information will be returned as is (same values) but the meaning will
be changed - the FeatureType will report back that the information is
in the provided CRS</li>
  <li>setCoordianteSystemReproject() - changes the actual "Data",
in addition to changing the FeatureType the actual data values will be
reprojected and the result returned</li>
</ul>
<h4>Solution? The code always knows...</h4>
The needed code is around, it has just not been hooked up behind that
getFeatures( query ) method.<br>
Here is the first HACK needed to set the FeatureType up correctly (from
DefaultView.java)::<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">FeatureType origionalType = source.getSchema();<br><br>CoordinateReferenceSystem cs = null;<br>if (query.getCoordinateSystemReproject() != null) {<br>    cs = query.getCoordinateSystemReproject();<br>} else if (query.getCoordinateSystem() != null) {<br>    cs = query.getCoordinateSystem();<br>}<br>schema = DataUtilities.createSubType(origionalType, query.getPropertyNames(), cs, query.getTypeName(), null);</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Here is the second HACK, &nbsp;the utility classes to do the hard
work are right there, they just have not been connected.<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">if (forcedCS != null)<br>    results = new ForceCoordinateSystemFeatureResults(results, forcedCS);<br>if (reprojectCS != null)<br>    results = new ReprojectFeatureResults(results, reprojectCS);</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
So the solution is to "wrap" the origional feature collection in a
helper class that does the work. You can see these same utility classes
used in the Renderer, and in GeoTools and in ... your application.
(that is the nature of a workaround).<br>
<span style="font-family: monospace;"></span>
<h1>First of All the Test Case</h1>
In order to debug a problem you need to be able to reproduce it.
&nbsp;Here in java land that tends to mean a test case, for bonus
points it means the failure will have a hard time coming back from the
dead.<br>
<br>
I am going to pick on a *really simple* data store that uses Java
property files, simply because I am the implementor responsible for it
and I feel guilty :-)<br>
<br>
Here is the test case:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>&nbsp;&nbsp;&nbsp; public void
testQueryReproject() throws Exception {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CoordinateReferenceSystem world = CRS.decode("EPSG:4326"); // world
lon/lat<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CoordinateReferenceSystem local = CRS.decode("EPSG:3005"); // british
columbia<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FeatureSource road = store.getFeatureSource( "road" );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FeatureType origionalType = road.getSchema();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DefaultQuery query = new DefaultQuery( "road", Filter.INCLUDE,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
new String[]{ "name" } );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
query.setCoordinateSystem( local ); // FROM<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
query.setCoordinateSystemReproject( world ); // TO<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FeatureCollection features = road.getFeatures( query );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FeatureType resultType = features.getFeatureType();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
assertNotNull( resultType );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
assertNotSame( resultType, origionalType );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
GeometryAttributeType resultGeometryType =
resultType.getDefaultGeometry();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
assertEquals( world, resultGeometryType.getCoordinateSystem() );<br>
&nbsp;&nbsp;&nbsp; }</td>
    </tr>
  </tbody>
</table>
<br>
<h1>Using a Debugger with Binary Search</h1>
This technique works like peanut butter and chocolate.<br>
<br>
The first trick is to set a debugger break point somewhere in your code
at the "half way point" and make sure you see what you expected to see.<br>
<br>
After a bit of a wild ride (through some AbstractDataStore code) turns
out that that the&nbsp;DefaultFeatureResults class is going to be
doing most of the work.<br>
<br>
<h2>DefaultFeatureResults Constructor</h2>
So let's make sure that we got the Query where we need it - Here is
what the code looks like:<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">public DefaultFeatureResults(FeatureSource source, Query query) {<br>    this.featureSource = source;<br>    String typeName = source.getSchema().getTypeName();<br><br>    if( typeName.equals( query.getTypeName() ) ){<br>        this.query = query;<br>    }<br>    else {<br>        this.query = new DefaultQuery(query);<br>        ((DefaultQuery) this.query).setTypeName(typeName);<br>        ((DefaultQuery) this.query).setCoordinateSystem(query.getCoordinateSystem());<br>        ((DefaultQuery) this.query).setCoordinateSystemReproject(query.getCoordinateSystemReproject());<br><br>    }<br>}</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
This looks "odd" if they query type name (say "roads" equals the
feature souce typeName then we use the query as is. Okay fine). The odd
part is the "else" statement it should really throw an error (we are
being asked to look for some content, say "rivers", that we do not
have!). &nbsp;The code goes on to copy the CRS information we are
interseted in, but does not pay attention to things like requested
attributes ... oh wait it does (they Query was passed in as a
constructor argument my bad).<br>
<br>
If we want to know who did this work we can use "svn blame":<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">cholmesny     public DefaultFeatureResults(FeatureSource source, Query query) {<br>cholmesny         this.featureSource = source;<br>     jive         String typeName = source.getSchema().getTypeName();<br>  groldan<br>     jive         if( typeName.equals( query.getTypeName() ) ){<br>  groldan             this.query = query;<br>     jive         }<br>     jive         else {<br>    aaime             this.query = new DefaultQuery(query);<br>    aaime             ((DefaultQuery) this.query).setTypeName(typeName);<br>    aaime             ((DefaultQuery) this.query).setCoordinateSystem(query.getCoordinateSystem());<br>    aaime             ((DefaultQuery) this.query).setCoordinateSystemReproject(query.getCoordinateSystemReproject());<br>     jive         }<br>cholmesny     }</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Looks like our friend Andrea was working on this .. lets check to see
if it was needed<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">    public DefaultQuery(Query query) {<br>      this(query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(),<br>          query.getPropertyNames(), query.getHandle());<br>      this.sortBy = query.getSortBy();<br>      this.coordinateSystem = query.getCoordinateSystem();<br>      this.coordinateSystemReproject = query.getCoordinateSystemReproject();<br>    }</span></pre>
      </td>
    </tr>
  </tbody>
</table>
Looks like this is redundent; coordinateSystem and
coordinateSystemReproject are getting changed twice! We can ask Andrea
if he was ignoring the TypeName on purpose (or if it was mistake),
While we wait to hear back lets have a look at the state of our object.<br>
<br>
Looks like the query made it this far okay.<br>
<img alt="qa1.PNG" src="http://weblogs.java.net/blog/jive/archive/qa1.PNG" width="994" height="327" />

<h2>DefaultFeatureResults getSchema()</h2>
The first hack is about making sure the correct FeatureType is produced
... lets set a break point and see if DefaultFeatureResults.getSchema()
is up to the task.<br>
<br>
Here is what the code looks like - does not look like CRS is mentioned
at all!<br>
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">    public FeatureType getSchema() {<br>        if (query.retrieveAllProperties()) {<br>            return featureSource.getSchema();<br>        } else {<br>            try {<br>                return DataUtilities.createSubType(featureSource.getSchema(),<br>                    query.getPropertyNames());<br>            } catch (SchemaException e) {<br>                return featureSource.getSchema();<br>                //throw new DataSourceException("Could not create schema", e);<br>            }<br>        }<br>    }</span></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Well we can cut and paste the working code in from DefaultQuery
(remember the Hack example?). However since this work is going to be
*the same* every time we run it - we may as well place the work into
the consructor and have it called once.<br>
<br>
Munching up the various examples we end up with:<br>
<table style="text-align: left; width: 100%; font-family: monospace;"
 border="1" cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <pre><span style="font-family: monospace;">public DefaultFeatureResults(FeatureSource source, Query query) {<br>    this.featureSource = source;        <br>    FeatureType origionalType = source.getSchema();<br>    <br>    String typeName = origionalType.getTypeName();        <br>    if( typeName.equals( query.getTypeName() ) ){<br>        this.query = query;<br>    }<br>    else {<br>        this.query = new DefaultQuery(query);<br>        ((DefaultQuery) this.query).setTypeName(typeName);<br>    }<br>    CoordinateReferenceSystem cs = null;        <br>    if (query.getCoordinateSystemReproject() != null) {<br>        cs = query.getCoordinateSystemReproject();<br>    } else if (query.getCoordinateSystem() != null) {<br>        cs = query.getCoordinateSystem();<br>    }<br>    try {<br>        if( cs == null ){<br>            if (query.retrieveAllProperties()) { // we can use the origionalType as is                <br>                schema = featureSource.getSchema();<br>            } else { <br>                schema = DataUtilities.createSubType(featureSource.getSchema(), query.getPropertyNames());                    <br>            } <br>        }<br>        else {<br>            // we need to change the projection of the origional type<br>            schema = DataUtilities.createSubType(origionalType, query.getPropertyNames(), cs, query.getTypeName(), null);<br>        }<br>    }<br>    catch (SchemaException e) {<br>        LOGGER.log( Level.WARNING, "Could not change projection to "+cs, e );<br>        schema = null; // client will notice something is amiss when getSchema() return null<br>    }<br>}</span><br></pre>
      </td>
    </tr>
  </tbody>
</table>
<br>
Not something to be proud of:<br>
<ul>
  <li>That SchemaException is being gobbled up; the origional
code just "faked it" by using the origionalSchema; this would result in
data being returned, with no indication that it was not as asked for!</li>
</ul>
What does the debugger say? The debugger says that the resulting schema
has a "null" GeometryAttribute! Looks like our stop tomorrow will be in
DataUtilities createSubType.
</body>
</html>]]>

</content>
</entry>
<entry>
<title>Why should you donate code to an Open Source Project</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2007/01/why_should_you.html" />
<modified>2007-01-30T01:07:27Z</modified>
<issued>2007-01-30T01:07:23Z</issued>
<id>tag:weblogs.java.net,2007:/blog/jive/271.6436</id>
<created>2007-01-30T01:07:23Z</created>
<summary type="text/plain">I have had to field this question a couple times in the last week; here is my answer.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>I have had to field this question a couple times in the last week; most recently from a old GeoTools buddy by the name of Cameron. Apparently I am working on Open Location Services and he knows a buddy who is working on the same thing.</p>

<p>How would you answer a question like that? We all know the default answers, they form mantras for the open source movement. Things like many eyeballs just don’t seem that relevant when you are working in a niche like GIS (where data is king and programs are often “write once, run once”).</p>

<p>So why donate your code to GeoTools?</p>

<p>Here is my answer:<br />
1. Do you expect others to contribute "plug-ins" or additional functionality to your work? </p>

<p>If so donating your API to an open source project is a great way to slurp up additional functionality. The OpenLS spec defines the ability to look up addresses, this is an ‘open ended problem’ (where 100% success is not possible) so using an open ended solution such as a plug-in mechanism combined with community involvement would really shine.</p>

<p>2. Donating the implementation allows you to share your maintenance cost with others. </p>

<p>This is especially important when your implementation is defined against a specification that is going to be changing in the future. . The future is risky; share the risk (and work) with others.</p>

<p>Cameron responded with the other possibility:<br />
3. Is someone else planning to write an OS version of your code? Thus removing the value from selling.</p>

<p>That would be the stick.</p>]]>

</content>
</entry>
<entry>
<title>WMS Tiling, or why OSGeo is not a standards body</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2006/11/wms_tiling_or_w.html" />
<modified>2006-11-02T21:41:21Z</modified>
<issued>2006-11-02T20:11:16Z</issued>
<id>tag:weblogs.java.net,2006:/blog/jive/271.5854</id>
<created>2006-11-02T20:11:16Z</created>
<summary type="text/plain">On why the &quot;Tile Map Service Specification&quot; is not a standard...</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Business</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<p>At the FOSS4G conference I was charmed to see a bunch of cross project hacking ... in the form of a meeting about "Tiling".</p>

<p>The result of this meeting is just now been made available:<br />
<ul><br />
<li><a href="http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation">WMS_Tiling_Client_Recommendation</a><br />
</ul><br />
The origional that I linked to earlier is here:  <a href="http://wiki.osgeo.org/index.php/Tile_Map_Service_Specification">Tile Map Service Specification</a> (thanks to Schyler for the correction).</p>

<p>While this is an exciting concept, the excitement has spread to the media - in this case Directions Magazine: <A href="http://www.directionsmag.com/article.php?article_id=2329">OSGeo Offers Up a Tiling Specification</a></p>

<p>The article explores the idea of OSGeo as a standards body, and I thought I may offer a clarification in this specific instance.</p>

<p>The tiling "specification" is currently a bunch of hackers bashing away at the problem. Standardization comes later, the document will be submitted to the OGC where I imagine it will be treated as an extension to WMS (much like the SLD specification).</p>

<p>It should be noted that this has been done carefully at a technical level, the requests made conform to the WMS specification. It was very tempting to do something closer to nasa worldwind where tiles are asked for row/col.</p>

<p>I always respect a standard that is backed by an implementation, more so when several implementations are available. The fact that OSGeo plays hosts to open source projects, that by definition need to work together, provide a great environment for collaboration in this manner.</p>

<p>This is the same approach used by the OGC for their interoptability experiments. Please view this tiling experiment in the same manner, the documents are not offical but we may learn enough to inform a standard.</p>

<p>Aside: The OGC does provide a nice venue for "Open standards"; personally I find their direct use of ISO standards is starting to "close" the door. A house with an open door, does no good if the front gate is locked.</p>]]>

</content>
</entry>
<entry>
<title>OPPSLA Part I</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2006/10/oppsla_part_i.html" />
<modified>2006-10-25T05:04:15Z</modified>
<issued>2006-10-25T05:04:08Z</issued>
<id>tag:weblogs.java.net,2006:/blog/jive/271.5788</id>
<created>2006-10-25T05:04:08Z</created>
<summary type="text/plain">The only real reason to attend a mad scene like OOPSLA is for that wack
to the side of the head that shakes lose some of your preconceptions,
and hopefully allows you some room for those ideas that seem to
gravitate to such occasions.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>OPPSLA Part I</title>
</head>
<body>
OOPSLA As a wack to the side of the head<br>
<br>
The only real reason to attend a mad scene like OOPSLA is for that wack
to the side of the head that shakes lose some of your preconceptions,
and hopefully allows you some room for those ideas that seem to
gravitate to such occasions.<br>
<br>
Here was the advice given at the start of the day:<br>
<ul>
  <li>three new acquaintances</li>
  <li>gain an in site, lose a preconception</li>
  <li>explore the next big thing</li>
</ul>
We will see how well I do.
<h3>But First</h3>
Lets get a few things out of the way:<br>
<ul>
  <li>Most Improved Player Award - Microsoft Cooperation had a
horrible
showing at OOPSLA 2004 where they misread their audience, this year
they are taking care of the student volunteers who make the event a
success. I tracked down at least one of their representatives
personally, way to go guys.</li>
</ul>
<ul>
  <li>Most Impressive Use of Multimedia - Ron and Richard
presented an
amazing production of multi media tag team stage craft along the
subject of "Conscientious Software" with references to Eric Clapton and
Micro-Biology feedback systems. Fun stuff.</li>
  <li>Cool - The KeyNote bringing together a feedback from poetry
and expression &nbsp;to the massively multiplayer experience. And
heck 1/f pink noise was around in the form of water and wind chimes to
close the gap with music as an expression of nature.</li>
</ul>
So with all that out of the way what the heck can I possible
communicate about OOPSLA? &nbsp;Well for one this creative lot puts
on a&nbsp; fine show. It is almost like they communicate ideas for
a living.<br>
<h3>New Acquaintances</h3>
Well I did find one interesting spatial application here at OOPSLA, and
me the author: Mr. Steffen Schaefer. Here is a link to <a
 href="http://www.oopsla.org/2006/submission/practitioner_reports/secure_trade_lane:_a_sensor_network_solution_for_more_reliable_and_more_secure_container_shipments.html">A
Sensor Network Solution for reliable and more secure Container Shipments</a>.<br>
<br>
I was also amused during <a
 href="http://www.oopsla.org/2006/submission/panels/the_ultra_challenge:_software_systems_beyond_big.html">The
Ultra Challenge: Software Beyond Big</a> to find a Mr. Gregor
Kiczales using GeoSpatial emergency response as one of these impossibly
hard problems, citing "24" as the gold standard by which success could
be measured (a show lasts 55 minuets can you create an operational
picture?).<br>
<br>
Many of the scalability questions are relevant to the ongoing catalog
debates raging in the Geospatial community right now. &nbsp;I will
cite a couple of&nbsp; reason why we have a chance of success where
other fields such as health care are rather doomed. &nbsp;By
definition our user community thinks in terms of FeatureTypes (every
map has a key to guide the reader in interpretation), and we have the
wonderful escape of "integration by eyeball" (so information from
different sources can appear on the same map regardless).<br>
<br>
I did love the panel and previous keynote on the subject as both
Software Engineering and the Agile approaches break down under SCALE.
&nbsp;Always great to find another way to look at things.<br>
<h3>Lose a Preconception</h3>
The Onward! <a
 href="http://www.oopsla.org/2006/submission/onward/the_geography_of_programming.html">The
Geography of Programming</a> was a fun insight other ways of
looking at things. This time it was based on cultural differences.
&nbsp;A fascinating break down of a picture (that apparently has
historical object oriented significant as a teach aid), where the
cultural interpretation ranged from horrified at the disharmony
presented, to a fascinating interplay and insight into the motivation
of the actors present.<br>
<br>
Here was the part that stuck in my mind as being just on the edge of my
awareness was the following subtle insights offering by the following: <br>
<ol>
  <li>Natural Resting State - or the concept of "Harmony". The is
an under current of "fear" present in a lot of the talks and material -
how can stability be achieved?&nbsp; Suggestions buffet from all
sides, several talks searching to nature. A goal of 60% test coverage
looks rather sad, if you are comparing against nature where QA
functions seem to account for more of the material for life then actual
function. The Ultra people tend to agree as they consider failure as
always part of the system, and change as a continual aspect of the
environment.</li>
  <li>Group Action - a local resonance where a bunch of objects
respond to the same stimulus. This is slightly different then the
emergent behavior, or the web 2.0 quest to turn mob behavior into
money. &nbsp;The picture example was a table of party goers
pointing to their cake at the other end of the picture, or a group of
gossips laughing at a man who was unable to pay his bill (both of which
I missed on first inspection)</li>
  <li>Object and Field - and this is the nice one for me. By
paying attention to the whole, the system rather then the parts becomes
visible. If I break into a discussion of negative space or something
you can blame a multi media high.</li>
</ol>
Just as a parting note, at FOSS4G (and recently on the OSGeo email
list) it is becoming more and more apparent that Korea is where the
action is for open source Geospatial cell phone and sensor fun. Now it
could be they have less geography then say Canada (allows production of
new cell phone network generations rather quickly), but I also suspect
that the outlooks mentioned above will assist those cooperating on
messy network based collaborative efforts.<br>
<br>
So will your next language be English based? I find UML diagram in
Kanji hard, but darn if Ruby is not a good time.
<h3>Explore The Next Big Thing</h3>
Well the Ultra Large Systems do qualify as the next BIG thing (because
SCALE changes everything). But so far this seems to be a mess of
questions with little answers.<br>
<br>
So what is the next big thing? Patterns (by definition you have seen
this already), Agile (now proved and boring), Aspects (reduced to the
pragmatic by Spring).<br>
<br>
Good thing I have a couple more days to keep my ears open.
<h3>Design Patterns Reception and Panel</h3>
In the words of John (who will be missed) the&nbsp;challenge of
software development is all about&nbsp; "People, People, People".
As a great instigator John is missed by the community.
</body>
</html>]]>

</content>
</entry>
<entry>
<title>Alternate Layers as the web wobbles</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2006/10/alternate_layer_1.html" />
<modified>2006-10-06T10:00:32Z</modified>
<issued>2006-10-06T10:00:09Z</issued>
<id>tag:weblogs.java.net,2006:/blog/jive/271.5694</id>
<created>2006-10-06T10:00:09Z</created>
<summary type="text/plain">What to do when an OGC Open Web Service is unavailable? Try another ...</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Alternate Layer data as the web wobbles</title>
  <meta content="Jody Garnett" name="author">
</head>
<body>
I enjoyed Matt Perry's post of <a
 href="http://www.perrygeo.net/wordpress/?p=35">ten favorite
WMS services</a> some months back, he is back today with a <a
 href="http://www.perrygeo.net/wordpress/?p=57">nice
observation</a> on (lack of) reliability. Many of the solutions
proposed in the comments focus on the service aspect of the problem ...<br>
<ul>
  <li>data replication</li>
  <li>tacking status for a quality of service estimate</li>
  <li>cache the results (ie tile schemes)</li>
  <li>and the ever present request for metadata</li>
</ul>
Some of these are very attractive - a tile cache helps reliability and
performance for example. But something is askew with
these&nbsp;approaches ... the problem of service availability needs
to
be recognized and handled by those effected by it - the clients.<br>
<h3>Client Solution One: Use more WMS Servers</h3>
One of the the things I noticed when meeting up with <a
 href="http://www.geotango.com/">GeoTango</a>
(and most commercial offerings) is that they offer WMS support, but
never in isolation. When setting up their "basemap" layer they will
make use of several WMS services, often switching based on availability
and zoom level. This is not something I am doing currently - much to my
regret during a few demos.<br>
<br>
This solution of ganging up on WMS Servers&nbsp;also provides a
"lazy"
solution to the Quality of Service "metadata" question. Rather then
track service performance brute force the problem. Make two requests of
different servers, the one that comes back first is the one you keep
(and obviously performing better that day). While such an approach
lacks finesse I can always appreciate the easy solution.<br>
<h3>Client Solution Two: Sharing a Vision</h3>
As part of a recent project <a
 href="http://udig.refractions.net/confluence/display/UDIG/Home">uDig</a>
was responsible for producing a common operational picture for disaster
relief. Mr Perry's original point is well taken that WMS services are
not reliably available for use this sort of situation. &nbsp;But
there
is still an advantage to their use. &nbsp;Because the various
parties
involved are making use of standards to collect a shared vision, when a
service goes down one *can* make use of another.<br>
<br>
In the <a href="http://www.opengeospatial.org/demo/ows3/">OWS-3</a>
project we automated the process of posting a "Open Web Service"
context document to a wiki page for use with other applications.
Needless to say that when most our services *did* go down (and they did
I was mortified) we were able to quickly build up and publish and
distribute a revised&nbsp;picture made up of working services.<br>
<a
 href="http://udig.refractions.net/confluence/download/attachments/6619/ng1deploy.png"><img
 style="border: 2px solid ; width: 266px; height: 200px;" alt=""
 src="http://udig.refractions.net/confluence/download/thumbnails/6619/ng1deploy.png"></a><br>
While this may be a case of fighting a standard with another standard
(almost the definition of an integration project), it was a great
example of being able to quickly respond to service availability and
demonstrate interoptibility under pressure and on the fly.<br>
<br>
Building the a list of&nbsp; "alternate" Open Web Services directly
into the OWSContext document would provide us the best of both worlds.<br>
<h3>Client Solution Three: Get Tricky</h3>
Recently, under a bit of collaboration pressure, the uDig catalog has
started to get some attention. &nbsp;We have finally defined an
extension point by which you can "associate" data sources together.
Being by definition a friendly application this extension points is <a
 href="http://svn.geotools.org/udig/trunk/plugins/net.refractions.udig.catalog/schema/friendly.exsd">friendly.xsd</a>
(yes I need to publish out the human readable version and write docs).<br>
<br>
Implementations of this
net.refractions.udig.catalog.friendly&nbsp;will make use of a
couple kinds of "metadata":<br>
<ul>
  <li>prior knowledge: simple pattern matching can account for
GeoServer and MapSever WMSLayer to FeatureType association</li>
  <li>included metadta: &nbsp;the description of a WMSLayer
can point
off to an external data URL, if we recognize that as a WFS link ...</li>
  <li>external metadata :given an interesting CSW2
&nbsp;profile to hit we can make use of associations tracked by a
third party</li>
</ul>
At a implementation level this means that uDig now sees a small cluster
of data resources that refer to the <span style="font-weight: bold;">same</span>
content, allowing us to provide fail over as needed. While not as slick
as tracking data that is "good enough" or "similar" the first steps are
being taken.<br>
<h3>What is Next?</h3>
So handling missing services is a well understood problem - that you
always need to take into account. For something really difficult we
need to look at the problem the other way around - how to handle a
missing client!<br>
<br>
The difficulty with having your client lose the Internet is the aspect
of disaster relief that is most troubling for an&nbsp;open web
services
like WMS. &nbsp;There are a couple of approaches to consider,
although
neither are available out of the box right now.<br>
<br>
Stay tuned next time for the Low/No Bandwidth WFS story.
</body>
</html>
]]>

</content>
</entry>
<entry>
<title>FOSS4G Notes - Day Four</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/jive/archive/2006/09/foss4g_notes_da_2.html" />
<modified>2006-09-30T00:19:13Z</modified>
<issued>2006-09-15T00:18:26Z</issued>
<id>tag:weblogs.java.net,2006:/blog/jive/271.5659</id>
<created>2006-09-15T00:18:26Z</created>
<summary type="text/plain">Mostly a day of presentations, interesting contrasts between development communities and the social effects of license choice between uDig and gvSig.</summary>
<author>
<name>jive</name>

<email>jgarnett@refractions.net</email>
</author>
<dc:subject>Open Source</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/jive/">
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>FOSS4G Day Four</title>
  <meta content="Jody Garnett" name="author">
</head>
<body>
<h3>GeoNetwork Presentation</h3>
I was able to attend this one, but only caught snatches of material as
I reviewed my presentations for the day. Nice to see some new catalog
profiles supported, I would really like to work against a public
catalog that actually mattered to people.<br>
<br>
I am looking forward to seeing GeoNetwork step up to OSGeo involvement
- it is one aspect of the software stack that OSGeo has been lax on,
although producing a useful understood profile may be another challange.
<h3>GeoTools Presentations</h3>
I had a couple of presentations, rather then talk about them much I
will simply link to them.<br>
<ul>
  <li><a
 href="http://www.foss4g2006.org/contributionDisplay.py?contribId=186&amp;sessionId=44&amp;confId=1">GeoTools
Getting Standards to Work</a> (with&nbsp;<a
 href="http://www.foss4g2006.org/materialDisplay.py?contribId=186&amp;amp;sessionId=44&amp;amp;materialId=slides&amp;amp;confId=1">slides</a>)</li>
  <li><a
 href="http://www.foss4g2006.org/contributionDisplay.py?contribId=187&amp;sessionId=44&amp;confId=1">GeoTools
Working on Standards</a> (with <a
 href="http://www.foss4g2006.org/materialDisplay.py?contribId=187&amp;amp;sessionId=44&amp;amp;materialId=slides&amp;amp;confId=1">slides</a>)</li>
</ul>
The first presentation was kind of like GeoTools 101 (with working code
examples - something our website lacks) and is recommend for anyone
wanting to start using the library.<br>
<br>
The second was a little less optimisitic (although subsequently
generated the most positive feedback) and talked about some of the
leasons learned through success and failure with GeoTools over the
years. I need to produce an update of this one capturing Simone's
experience of 15-20% synchornization overhead when working on branch
(yes developing with open source has a certaint expense to it).<br>
<br>
<h3>uDig Presentation</h3>
Once again Paul's slides speak better then what I can manage here:<br>
<ul>
  <li><a
 href="http://www.foss4g2006.org/contributionDisplay.py?contribId=132&amp;sessionId=44&amp;confId=1">uDig
Desktop Application Framework</a> (with <a
 href="http://www.foss4g2006.org/materialDisplay.py?contribId=132&amp;amp;sessionId=44&amp;amp;materialId=slides&amp;amp;confId=1">slides</a>)</li>
</ul>
The highlight of the talk for me occured during the break where I got
to see some of the uDig developers from around the world comparing
notes (in this case it was talking about upgrading to uDig 1.1).<br>
<br>
Paul did answer some very difficult questions on why uDig and gvSig
both exist, very similar to the questions I was asked last year as part
of the <a href="http://miles.asmoz.org/">MILES</a>
online conference thing. The answer amount to:<br>
<ul>
  <li>Both projects started at the same time</li>
  <li>They have different licenses (reflecting the different
roles they wish to play)</li>
  <li>Differences in&nbsp;design goals</li>
</ul>
We do try to collaborate with gvSig on matters such as network graph
analysis or GML handling. We tend to collaborate as a matter of course
through involvement with other projects like GeoTools, GeoAPI and
GeoServer.
<h3>DivaGIS Talk</h3>
Very fun to see a successful project based on the uDig &amp;
GeoTools
platform. Interesting to see how things that are often abstract to me
(wms layers), leap into focus as a climate prediction is compared to
species distribution. <br>
<br>
DivaGIS Highlights: workflow from GIS using a Grid Analysis tool to
generate out a "grid", and thend sending this grid off to there
existing analysis tools (based in R, etc...). &nbsp;Serving as a
very
friendly intergration platform. Fun to see custom "Style Views" that
are explicitly focused on the target data sets. Same deal with a
preference page set up to define database connections for the analysis
tools.<br>
<br>
Someone was else talking about uDig intergration with R (Adrian
Custer), interesting to
see it already done :-). Diva GIS&nbsp;made use of R "serve" (once
again defined with a preference page), and constructed an R bridge.
&nbsp;Seems to be outed as a uDig operation, this particular one
did
interpolation based on precanned settings.<br>
<br>
Next Steps for the DivaGIS project:<br>
- migration to grid manipulation<br>
- interoptability ICIS and BioCase by BioMoby protocol for bio
diversity data sets<br>
- connectivity to R for geo-stats analysis<br>
- GeoServer planned<br>
<h3>gvSig Talk</h3>
Nice talk, with <a
 href="http://www.foss4g2006.org/materialDisplay.py?contribId=151&amp;amp;sessionId=44&amp;amp;materialId=slides&amp;amp;confId=1">clear
presentation</a> of features. A few notes scattered notes were
all I had time for ...<br>
- deeply modular<br>
- table joins<br>
<br>
Interesting array of data sources:<br>
- WMS 1.1.0 - 1.3.0<br>
- WFS 1.0.0 + GML import/export 2.1.2<br>
- WCS 1.0.0<br>
- Catalog search tool ( OGC CSW 2.0, IDEC)<br>
- Gazetter search tool (WFS 1.0.0, WFS-G 0.9, ADL)<br>
<br>
GeoProcessing, made available as tree of "buffer" and so on (always
like to see how people end up sticking a user interface on these things
- I am more a circles and arrows kind of man myself - ie like FME).
Image georeferencing, use of control points etc... ArcIM Map and
Feature services. Image enhancing and pan-sharpening controls. Jython
scripting to simple for gui-based tools.<br>
<br>
And what is next for gvSig ...<br>
- initial needs are now met :-)<br>
- network and topology analysis<br>
- raster analysis<br>
- 3D and temporal<br>
- SDI authoring: OGC service plugins (generate of mapserver
configuration files)<br>
<br>
<span style="font-style: italic;">Ended up talking to one
of their developers about GeoServer export as well (you can produce raw
xml files or make use of java DTO objects directly).</span><br>
<br>
Short term<br>
- raster formats<br>
- image filters, historgrams, lookup tables<br>
- topology construction<br>
<br>
Network topology analysis<br>
- optimal path, service tree<br>
- raster analysis, reprojection, mosiacing and fushion tools,
classification / vectorization<br>
<br>
It would be very interesting to see what gvSig is doing (I have offered
them the GeoTools graph / network package before as a point of
collaboration but so far they have been quiet). I do have some hopes on
collaboration on GML parsing technology (we will see if they attend a
meeting).
</body>
</html>]]>

</content>
</entry>

</feed>