On Sat, May 4, 2013 at 11:27 PM, Nuno Miguel Carvalho Oliveira <
nmco51845@anonymised.com> wrote:
Hi,
I just made a pull request https://github.com/geoserver/geoserver/pull/226
.
Just merged it. Don't you have commit access yet?
Sorry I'm asking again but I don't remember, did you sign the contribution
agreement?
I only skimmed though the patch, but it seems the new KML architecture made
it easy enough to setup the
export of collada models.
Basically, this pull request extends W3DS to support the inclusion of
inline 3D models in SLDs. For example the following 3D style can be seen as
the default 3D style for 3D points for the X3D format (the red cone in the
print screens). To have the same for KML we will need to provide a COLLADA
model, which is the GoogleEarth supported format.
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor>
<NamedLayer>
<Name>Point Cone</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic model="true">
<href>http://localhost:8080/models/cone.x3d</href>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
This feature is available for KML and X3D(HTML5) response formats. Note,
the 3D horse is an export from a 3D model created in blender to the x3D
format (the model is available on X3DOM site).
Right, makes sense. So... in order to export in X3D you use a x3d graphics,
but in order to exit in KML you'd have to support collada?
Or, is there any runtime transformation between x3d and collada?
The print screens are the result of this request:
http://localhost:8080/geoserver/w3ds?version=0.4&service=w3ds&request=GetScene&crs=EPSG:27492&format=text/html&layers=dem_3d,interest_points&boundingbox=-16511.374635294116,198979.99271111112,-16099.38084929972,199372.85817777776&styles=,point_model
So, the request is generating a XD3 output that is then viewed with some
external tool?
What can one use to do the visualization?
Is the rendering mode, wireframe vs raytrace, controlled by the client?
Sorry for the dumb questions, it really shows I haven't tried to play with
W3DS yet
The dem_3D layer is a TIN stored in a POSTGIS database and the layer
interest_points is a list of georeferenced points with a description.
Ah ha, so you are getting data form PostGIS that is a multipoligon with z
values
on the point coordinates?
Or did you have to modify the GeoTools PostGIS store somehow?
The style used to produced the scene:
<?xml version="1.0" encoding="utf-8"?>
<StyledLayerDescriptor>
<NamedLayer>
<Name>Point Cone</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Filter>
<PropertyIsEqualTo>
<PropertyName>description</PropertyName>
<Literal>CONE</Literal>
</PropertyIsEqualTo>
</Filter>
<PointSymbolizer>
<Graphic model="true">
<href>http://localhost:8080/models/cone.x3d</href>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Filter>
<PropertyIsEqualTo>
<PropertyName>description</PropertyName>
<Literal>HORSE</Literal>
</PropertyIsEqualTo>
</Filter>
<PointSymbolizer>
<Graphic model="true">
<href>http://localhost:8080/models/horse.x3d</href>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Filter>
<PropertyIsEqualTo>
<PropertyName>description</PropertyName>
<Literal>HOUSE</Literal>
</PropertyIsEqualTo>
</Filter>
<PointSymbolizer>
<Graphic model="true">
<href>http://localhost:8080/models/house.x3d</href>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Filter>
<PropertyIsEqualTo>
<PropertyName>description</PropertyName>
<Literal>AIRPLANE</Literal>
</PropertyIsEqualTo>
</Filter>
<PointSymbolizer>
<Graphic model="true">
<altitudeMode>relativeToGround</altitudeMode>
<altitude>50</altitude>
<href>http://localhost:8080/models/airplane.x3d</href>
Hum, so to parse the above you have your own SLD3DParser, which seems to be
a forked and augmented version of SLDParser.
Any change the code duplication could be avoided by means of subclassing?
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
In the nexts days i will provide a tutorial.
Nice, looking forward to it
Cheers
Andrea
--
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------