Your log file looks ok, I assume you are always getting features from your base feature layer. Looking at your xml config file, I get confused.
distance="0.1" distance="0.01" distance="0.001" Distance means the minimum distance between two vertices. You are getting exacter, not generalizing. I think you mean distance="10" distance="100" distance="1000" Increasing the distance reduces the number of points. Cheers Christian Quoting Gis Mage <[email protected]>: > Yes, I've created reg_general and if I look at it - there is no INFO > message, and the geometries are not generalized. > I see geometries from initial the_geom field at every scale. > > My geoserver version is 2.1 RC3. > Generalizing plugin 2.1-SNAPSHOT. > > Please see an attached log file and xml config file. > Thank you so much for your help. > > Regards. > Nikolai. > > 2011/3/25 <[email protected]> > >> To summarize: >> >> You have successfully created a pregenerated feature called "reg_general" >> and if you look at it, you see the geometries, but no INFO messages in the >> log. >> >> Stop geoserver, remove logs/geoserver.log, restart geoserver, try to >> preview the reg_general layer. >> If you do not see any INFO lines, send me the logfile. >> >> What is your geoserver version ?. >> >> >> >> Quoting Gis Mage <[email protected]>: >> >> It doesn't work. >>> >>> It creates a store and then a layer publishes ok. >>> The I'm previewing it in openlayers and I don't see any generalized >>> geometries at small scales, also I don't get info messages in the >>> geoserver >>> log that generalized geometries are used. >>> >>> Any clues? >>> >>> >>> 2011/3/25 <[email protected]> >>> >>> Ahh, sorry, I forgot 2 Attributes for the <GeneralizationInfos> Element. >>>> >>>> >>>> <GeneralizationInfo dataSourceNameSpace="uno" dataSourceName="wizbase" >>>> .... >>>> >>>> It is not necessary to add these attributes to the <GeneralizationInfo> >>>> Elements, they are inherited form the parent Element. >>>> >>>> Please give me a short message if it works. >>>> >>>> >>>> >>>> >>>> Quoting Gis Mage <[email protected]>: >>>> >>>> Hi Christian! >>>> >>>>> >>>>> Thanks for your advice. >>>>> >>>>> I've made a normal postgis data store reggen layer - it works ok. >>>>> Datastore is called "wizbase". Namespace "uno". >>>>> >>>>> Then I've corrected an xml file as you proposed and I'm trying to add a >>>>> generalizing data store "reg_general". >>>>> When I hit save i get an error: "Error creating data store, check the >>>>> parameters. Error message: Datasource name missing" >>>>> I guess I have to put in the "dataSourceNameSpace" and "dataSourceName" >>>>> parameters in the xml tags, but I don't know what they mean and what to >>>>> put >>>>> in. >>>>> Can you help me out? >>>>> >>>>> Thanks for your help. >>>>> >>>>> Nikolai. >>>>> >>>>> >>>>> 2011/3/25 <[email protected]> >>>>> >>>>> 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. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> ---------------------------------------------------------------- >>>> This message was sent using IMP, the Internet Messaging Program. >>>> >>>> >>>> >>>> >>> >> >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> > ---------------------------------------------------------------- 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
