Custom shp/dbf handling

View: New views
2 Messages — Rating Filter:   Alert me  

Custom shp/dbf handling

by Brian M Dube :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings,

I see in the OpenMap FAQ that a generic system to handle the
associations between a shape file and its attribute table has not been
implemented. I'm working on a custom implementation, and I'm stuck.

I'm working with r2054 from the svn repository. One of the shape files
I want to use is a Census TIGER/Line file that describes all edges at
the county level (roads, water features, railways, etc.) and is quite
a large file. I was running out of heap space in
DbfInputStream.readData() because of the size of the file, and
readData() is called directly from DbfInputStream.<init> (the constructor).

So I copied DbfInputStream to my project and, with some modifications,
made a small tool to populate HSQLDB tables with the records in the
dbf file passed to the tool. This worked really well.

This is where I'm stuck. I don't know which OpenMap component to
customize to use the attributes that are now in the HSQLDB tables. Is
it ShapeLayer? or a new DbfHandler that reads from the database?

The goal is to use SQL queries on the attribute table to limit what
geometry is drawn from the shape file. Highways and streets, for
example.

Thanks,
Brian

--
Brian M. Dube
Aircraft Owners and Pilots Association, Member 05135381
Experimental Aircraft Association, Member 1002851

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe openmap-users"]

Re: Custom shp/dbf handling

by Brian M Dube :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Aug 23, 2009 at 02:04:55PM -0700, Brian M Dube wrote:
> Greetings,
>
> I see in the OpenMap FAQ that a generic system to handle the
> associations between a shape file and its attribute table has not been
> implemented. I'm working on a custom implementation, and I'm stuck.

Can I improve or clarify my question, or did I overlook where this has
been handled in the archives or documentation?

> I'm working with r2054 from the svn repository. One of the shape files
> I want to use is a Census TIGER/Line file that describes all edges at
> the county level (roads, water features, railways, etc.) and is quite
> a large file. I was running out of heap space in
> DbfInputStream.readData() because of the size of the file, and
> readData() is called directly from DbfInputStream.<init> (the constructor).
>
> So I copied DbfInputStream to my project and, with some modifications,
> made a small tool to populate HSQLDB tables with the records in the
> dbf file passed to the tool. This worked really well.
>
> This is where I'm stuck. I don't know which OpenMap component to
> customize to use the attributes that are now in the HSQLDB tables. Is
> it ShapeLayer? or a new DbfHandler that reads from the database?
>
> The goal is to use SQL queries on the attribute table to limit what
> geometry is drawn from the shape file. Highways and streets, for
> example.
>
> Thanks,
> Brian

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe openmap-users"]