Hi, looking deeper at your config, I would propose the following steps
1) Did you have a normal geoserver layer based on a postgis data
store called "reggen" ?
You need this layer, because this is the baseFeatureName. If this
normal layer works, the work is almost done.No pregeneralized code is
involved here.
2) Then you add a pregenealized feature store called "reggener". This
second layer acts as a multiplexer. Your xml config should be
<?xml version="1.0" encoding="UTF-8"?>
<GeneralizationInfos version="1.0">
<GeneralizationInfo featureName="reggener"
baseFeatureName="reggen" geomPropertyName="the_geom">
<Generalization distance="0.1" featureName="reggen"
geomPropertyName="the_geom01"/>
<Generalization distance="0.01" featureName="reggen"
geomPropertyName="the_geom001"/>
<Generalization distance="0.001" featureName="reggen"
geomPropertyName="the_geom0001"/>
</GeneralizationInfo>
</GeneralizationInfos>
This should do the job.
Cheers
Quoting Gis Mage <[email protected]>:
> Hello Christian!
>
> Can you help me with this schema problem.
> My postgis user is "wizserv" and his default schema is "public".
> He is the owner of the database "wizbase" and a table "reggen", containig
> geometry fields "the_geom", "the_geom01", "the_geom001", "the_geom0001".
>
> Where do I have to put info on user and schema of the tables?
>
> My xml file with GeneralizationInfos looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <GeneralizationInfos version="1.0">
> <GeneralizationInfo dataSourceNameSpace="uno" dataSourceName="wizbase"
> featureName="reggener" baseFeatureName="reggen"
> geomPropertyName="the_geom">
> <Generalization dataSourceNameSpace="uno" dataSourceName="wizbase"
> distance="0.1" featureName="reggen" geomPropertyName="the_geom01"/>
> <Generalization dataSourceNameSpace="uno" dataSourceName="wizbase"
> distance="0.01" featureName="reggen" geomPropertyName="the_geom001"/>
> <Generalization dataSourceNameSpace="uno" dataSourceName="wizbase"
> distance="0.001" featureName="reggen" geomPropertyName="the_geom0001"/>
> </GeneralizationInfo>
> </GeneralizationInfos>
>
> Thanks for helping me out!
>
> Nikolai.
>
> ----------------------------------
> Date: Thu, 24 Mar 2011 17:22:04 +0100
> From: [email protected]
> Subject: Re: [Geoserver-users] Generalizing data store from PostGIS
> problem
> To: Gis Mage <[email protected]>
> Cc: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
> format="flowed"
>
>
>
> The selected generalization depends on the pixel size in world
> coordinates. Look here for a simple
> explanation.
>
> http://docs.codehaus.org/display/GEOTDOC/Feature-Pregeneralized#Feature-Pregeneralized
>
> About your stack trace. I am not a POSTGIS expert but it looks like a
> db schema problem. The default schema of your postgis user is not the
> same as the schema of your tables.
>
>
> Quoting Gis Mage <[email protected]>:
>
>> Hello!
>>
>> I've got a table in postgis with fields the_geom, the_geom01, the_geom001.
>> Type is MULTIPOLYGON, SRS is 4326.
>> the_geom01, and the_geom001 are pregeneralized fields from the_geom (with
>> 0.1 and 0.01 degree steps).
>>
>> I've made an XML with GeneralizationInfos and created a generalizing
>> datastore. When I hit save, I get a WARN message in geoserver log. I've
>> listed it below.
>>
>> I can publish a layer from this store and even preview it with openlayers,
>> but I don't see generalized geometries at big scales, also I don't get
>> "INFO: Using generalization" message in the log - just usual GetMap
>> requests.
>>
>> What am I doing wrong here?
>> At what scale does geoserver choose the generalized geometry or a normal
>> one?
>>
>> The log listing:
>> --------------------------
>> 2011-03-24 18:25:30,351 INFO [geoserver.catalog] - Disposing datastore
>> 'DataStoreInfoImpl--6a14b620:12ee2c63cd7:-6a3d'
>> 2011-03-24 18:26:32,549 WARN [geotools.jdbc] - Failed to use
>> ST_Estimated_Extent, falling back on envelope aggregation
>> org.postgresql.util.PSQLException: ERROR: LWGEOM_estimated_extent:
> couldn't
>> locate table within current schema
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users