>
> Basically, has anyone done any work with storing gridded spatial data? I
>> see
>> lot's of info on Geospatial data, but it's usually cities, stations, etc.,
>> not a regular grid that doesn't change...
>>
>
> well, you could play around with storing information in arrays.
> storing record for each point gives you the most flexibility of
> querying and indexing but is extremely inefficient from storage
> perspective.   arrays are better from that point of view and can work
> pretty well as long as you read/write the data in blocks in a fairly
> regular way (and hopefully the layout of your grid doesn't change that
> often).
>

Thanks for your help, I've stored a 2-dimensional array in Postgres,
inserted like this:

{{1,1,3},{2,2,1},{3,1,2}}

But I'm having trouble retrieving it from Java. My jdbc driver is loaded
fine and I'm connecting to the database, but I don't know how to get from a
java.sql Array to an int[] array in Java. I'm using this piece of code to
pull the data from the ResultSet:

Array categoryArray = rs.getArray("category").getArray();

But I don't know what to do with this. I want to end up with an int[] array.
Can anyone suggest something?

Thanks a lot,

--
Mike

Reply via email to