Hi Justin,

Thanks for your email. I apologise for getting back to you only now.. I've
been preoccupied with other stuff here at work and didn't get to test your
suggestion until now.

So I downloaded geodb-0.6 and followed the instructions they've provided in
the wiki to create a spatial table. I also had to revert back to an older
version of H2 (1.1.118 instead of 1.3.161) to make it compatible with the
H2 version packaged with geodb-0.6.

After going through that, I still got the same issue, CRS equals to null
and ReferenceEnvelope with a value [0.0 : -1.0, 0.0 : -1.0]. :-(

I don't think I'm doing anything wrong because when I wired the Postgis
DataStore into my test, it just worked.

Regards,
Gerson



On Wed, Nov 30, 2011 at 4:04 AM, Justin Deoliveira <[email protected]>wrote:

> Getting back a null crs from the feature type makes me thing your
> geometry_columns table is out of sync... or perhaps one of the columns
> (schema/table/column) might not be exactly correct.
>
> The geotools h2 datastore uses a library called geodb [1] to encapsulate
> all the spatial stuff, including hatbox. You may want to try creating your
> table and adding your geometry columns with that.
>
> [1] https://github.com/jdeolive/geodb/wiki
>
> On Tue, Nov 29, 2011 at 5:34 AM, Andrea Aime <[email protected]
> > wrote:
>
>> On Tue, Nov 29, 2011 at 12:20 AM, Gerson Galang 
>> <[email protected]>wrote:
>>
>>> Hi Andrea,
>>>
>>> I hacked your unit test to create the spatial table outside of the
>>> hatbox UI but it gave me the same output as yesterday. The
>>> ReferenceEnvelope for the new table is still [0.0 : -1.0, 0.0 : -1.0] even
>>> if I have a point inside it with the following coordinate (150, 30).
>>>
>>> Here's how I created the table
>>>
>>>         create.runSafe("DROP TABLE T2; COMMIT;");
>>>         create.runSafe("DROP TABLE T2_HATBOX; COMMIT;");
>>>         create.runSafe("DELETE FROM geometry_columns WHERE f_table_name
>>> = 'T2'");
>>>
>>>         String sql = "CREATE TABLE T2 (id int AUTO_INCREMENT(1) PRIMARY
>>> KEY, "
>>>                 + "geometry POINT, stringProperty varchar)";
>>>         create.run(sql);
>>>
>>>         sql = "CALL AddGeometryColumn('PUBLIC', 'T2', 'geometry', 4326,
>>> 'POINT', 2)";
>>>         create.run(sql);
>>>
>>>         sql = "INSERT INTO T2 (geometry, stringProperty) VALUES ("
>>>                 + "ST_GeomFromText('POINT(150 30)',4326), 'first');";
>>>         create.run(sql);
>>>
>>> I can get the FeatureCollection fine. It's only the methods relating to
>>> the schema that are giving me null or the wrong output. Any other
>>> suggestions?
>>>
>>
>> Nope, I don't actually use the H2 store, just happened to look a bit in
>> its sources from
>> time to time as I make new tests for PostGIS and Oracle (all the test
>> suite is shared among
>> the various databases).
>>
>> I've cc'ed the H2 module maintainer, he might know more
>>
>> Cheers
>> Andrea
>>
>>
>> --
>> -------------------------------------------------------
>> Ing. Andrea Aime
>> GeoSolutions S.A.S.
>> Tech lead
>>
>> Via Poggio alle Viti 1187
>> 55054  Massarosa (LU)
>> Italy
>>
>> phone: +39 0584 962313
>> fax:      +39 0584 962313
>>
>> http://www.geo-solutions.it
>> http://geo-solutions.blogspot.com/
>> http://www.youtube.com/user/GeoSolutionsIT
>> http://www.linkedin.com/in/andreaaime
>> http://twitter.com/geowolf
>>
>> -------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to