[OpenMap Users] tests for TIGER Shape files and associated?

From: Ray Kiddy <ray_at_ganymede.org>
Date: Sat, 11 Oct 2008 17:04:36 -0700

Hello -

I am new to OM, but have worked with several other java frameworks
over the years. OM looks really good in a lot of ways. I think I see
things that could be improved, but there is a lot of good stuff there
that I want to understand first.

I usually try to understand a framework by running and/or writing
tests. Are there unit tests, now, for the data classes in particular?
I am more of a data guy, so right now I am looking at the data in
TIGER files (eg ftp://ftp2.census.gov/geo/tiger/TIGER2007FE/
06_CALIFORNIA/06085_Santa_Clara/fe_2007_06085_edges.zip) and I am
trying to open and get data out of the shp and dbf files.

I saw that the com.bbn.openmap.layer.shape.ShapeFile class has a main
that can be invoked on the command line.

        % java -classpath $lib/openmap.jar
com.bbn.openmap.layer.shape.ShapeFile $dir/06085_Santa_Clara/
fe_2007_06085_edges.shp
        Shape file: /Users/ray/openmap/06085_Santa_Clara/
fe_2007_06085_edges.shp
        version: 1000
        length: 7577012
        bounds:
                min: ESRIPoint[-122.202476,36.894155]
                max: ESRIPoint[-121.208178,37.484637]
        records: 76910
        %

Very cool!

I see that there is a main method in
com.bbn.openmap.dataAccess.shape.DbfFile, but it launches an app with
a UI. Also, accessing that main from the command-line is not documented.

I am interested in using the OM framework for, at first, data access
only. Is this not a common use? The mixing of data and view
functionality throughout the framework would seem to suggest that. I
am used to framework that separate Model, View and Controller
classes, but there are probably good reasons for why this was not
done here. Are there things to watch out for if one is ony trying to
get to the data and not create a UI at the same time?

The shp files seem, at least at this initial point, to be well-
structured and I can get data out of them. But I am trying to get
info out the DBF files and even something simple like getting a
record iterator gets me an NPE, which seems not good....

If anyone has suggestions for how to start this, I would be
interested in creating unit tests that take data known to be good and
demonstrate and verify the various ways to access the data. Obviously
I am looking at the TIGER data, but there may be problems with that
data of which I am not aware. Does anyone have other suggestions?

cheers - ray

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sat Oct 11 2008 - 20:15:05 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT