You can either:
a) advertise multiple attributes (you would need to give them different names 
"Location" and "Area"). The geometry attribute one is usually "the default"; 
but you can specify the default explicitly if you like. When you make your 
style you can say which geometry you want to use.
b) or you can specify your "Location" to be of type Geometry.class (and then 
throw whatever Point, Line or Polygons you like in the mix). It will often draw 
a bit slower but whatever.


-- 
Jody Garnett


On Wednesday, 10 August 2011 at 2:54 AM, mortac8 wrote:

> Ok I understand that my first shape will be the default shape for my
> DataStore (in this case, Point). I guess my question is: is there any way
> to have both Points and Polygons available to a client app that accesses my
> DataStore/Layer via WFS? Right now my client app just sees Points but not
> Polygons.
> 
> I apologize if my question is hard to understand. Can you straighten me
> out?
> 
> 
> mortac8 wrote:
> > 
> > Hey guys thanks for the help! I got it working.
> > 
> > I see that the SimpleFeatureTypeBuilder uses Point.class for its
> > "Location". This might be a stupid question but is there a way I can have
> > the location be either a Point or a Polygon? Would I create two Location
> > objects or??? What is the proper way to do something like that?
> > 
> > builder.add( "CITY", String.class );
> > builder.add( "NUMBER", String.class );
> > builder.add( "Location", Point.class ); 
> > builder.add( "Location", Polygon.class ); //?
> > 
> > Thanks again!
> > Ashley
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Adding-CSVDataStore-to-GeoServer-tp6600438p6668857.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com 
> (http://Nabble.com).
> 
> ------------------------------------------------------------------------------
> uberSVN's rich system and user administration capabilities and model 
> configuration take the hassle out of deploying and managing Subversion and 
> the tools developers use with it. Learn more about uberSVN and get a free 
> download at: http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to