Justin,
What does "NG" stand for in PostgisNGDataStoreFactory? I tried the following
code
...prepare postgis connections params...
jdbcDataStore = pgNgDataStoreFactory.createDataStore(params);
SimpleFeatureType simpleFeatureType = jdbcDataStore.getSchema(typeNames[0]);
System.out.println("crs code: " +
simpleFeatureType.getCoordinateReferenceSystem().getName().getCode());
...
I am getting null on getCoordinateReferenceSystem(), but the table in my
PostGIS database has srid as 4326 if I execute something like:
SELECT ST_AsEWKT(the_geom) FROM table WHERE gid=1
Do you know why crs is null for a simple feature type?
Thanks.
On Thu, Aug 26, 2010 at 7:18 AM, Yingqi Tang <[email protected]> wrote:
> Thanks a lot, Justin. That solved the problem.
>
>
> On Thu, Aug 26, 2010 at 7:13 AM, Justin Deoliveira
> <[email protected]>wrote:
>
>> Hi Yinqi,
>>
>> Yeah, the group id for the new gt-jdbc-* modules is actually
>> org.geotools.jdbc, rather than just org.geotools. Change it and the new
>> artifact should be picked up.
>>
>> -Justin
>>
>> On Thu, Aug 26, 2010 at 8:01 AM, Yingqi Tang <[email protected]>wrote:
>>
>>> Thanks for the explanation, Ben.
>>>
>>> A follow up question though, when I follow the steps in GeoTools "Get
>>> Started" and include the gt-jdbc-postgis as a dependency in pom.xml like
>>> below:
>>>
>>> <dependency>
>>> <groupId>org.geotools</
>>> groupId>
>>> <artifactId>gt-jdbc-postgis</artifactId>
>>> <version>2.7-SNAPSHOT</version>
>>> </dependency>
>>>
>>> If I run "mvn install", I will get an error saying gt-jdbc-postgis
>>> missing or can not be found in the repository, something like that. Actually
>>> if you go to
>>> http://download.osgeo.org/webdav/geotools/org/geotools/gt-jdbc-postgis/,
>>> there is no jar file there, and also if I build GeoTools from source code
>>> myself the gt-jdbc-postgis will not be added into my local .m2 folder
>>> either.
>>>
>>> Anyone know what is the reason for that?
>>>
>>>
>>> On Wed, Aug 25, 2010 at 8:03 PM, Ben Caradoc-Davies
>>> <[email protected]> wrote:
>>>
>>>> On 26/08/10 05:39, Yingqi Tang wrote:
>>>>
>>>>> I'm trying to create a sample of using GeoTools reading features from
>>>>> PostGIS. Now I find there are two related modules gt-postgis and
>>>>> gt-jdbc-postgis, so just wonder what's the difference and which one
>>>>> should I
>>>>> use?
>>>>>
>>>>
>>>> gt-postgis is the old PostGIS module.
>>>>
>>>> gt-jdbc-postgis is the new PostGIS module, and is part of a suite of
>>>> jdbc modules that share common code and have improved features.
>>>>
>>>> You should use gt-jdbc-postgis.
>>>>
>>>> Kind regards,
>>>> Ben.
>>>>
>>>> --
>>>> Ben Caradoc-Davies <[email protected]>
>>>> Software Engineering Team Leader
>>>> CSIRO Earth Science and Resource Engineering
>>>> Australian Resources Research Centre
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
>>> Be part of this innovative community and reach millions of netbook users
>>> worldwide. Take advantage of special opportunities to increase revenue
>>> and
>>> speed time-to-market. Join now, and jumpstart your future.
>>> http://p.sf.net/sfu/intel-atom-d2d
>>> _______________________________________________
>>> 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.
>>
>>
>
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users