开发者

Creating Google Map Overlay with Geotools

Good morning,

I want to create a Google Maps overlay from GeoTiff data I read with Geotools. I'm new to Geotools and I wasn't abl开发者_高级运维e to find any documentation about creating map tiles with this framework. Do you guys know of any such possibility or plugin? Or is it dead simple to manually tile the images?

EDIT: I now understand there is a PyramidBuilder for building image pyramids, there is now the problem of aligning my tiles to the google maps tiles.

If any of you has some experience or good intuition on this problem, glad to hear it:)

Thanks! Patrick


You are working too hard; install GeoServer (which is built using GeoTools) and it can serve your data out as KML for a google maps overlay. You can dive into GeoTools and look at its KML classes; but life is short.

To answer your GeoTools provides:

    Encoder encoder = new Encoder(new KMLConfiguration());
    encoder.setIndenting(true);
    encoder.encode(features, KML.kml, outputstream );

I will add this to the documentation for kml:

  • http://docs.geotools.org/latest/userguide/extension/xsd/kml.html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜