|
3 | 3 | GeoScript Groovy Releases
|
4 | 4 | =========================
|
5 | 5 |
|
| 6 | +1.6.0 (in progress) |
| 7 | +------------------- |
| 8 | + |
| 9 | + The 1.6.0 release of GeoScript is build on Groovy 2.4.4, GeoTools 14.0, and the Java Topology Suite 1.13. |
| 10 | + |
| 11 | + Significant new features include support for Geobuf, a OGR Workspace, and improvements to the Tile module. |
| 12 | + |
| 13 | + **GeoHash** |
| 14 | + |
| 15 | + GeoHash support was ported from the excellent node-geohash module. It supports encoded and decoding Points and Bounds.:: |
| 16 | + |
| 17 | + GeoHash geohash = new GeoHash() |
| 18 | + geohash.encode(new Point(112.5584, 37.8324)) |
| 19 | + >>> "ww8p1r4t8" |
| 20 | + |
| 21 | + geohash.encodeLong(new Point(112.5584, 37.8324)) |
| 22 | + >>> 4064984913515641 |
| 23 | + |
| 24 | + Bounds bounds = geohash.decodeBounds("ww8p1r4t8") |
| 25 | + >>> "(112.55836486816406,37.83236503601074,112.5584077835083,37.83240795135498)" |
| 26 | + |
| 27 | + **Geobuf** |
| 28 | + |
| 29 | + Geobuf is an emerging new format from MapBox. GeoScript support for Geobuf includes a Workspace and Geometry, Feature, and Layer |
| 30 | + readers and writers:: |
| 31 | + |
| 32 | + File directory = new File("data") |
| 33 | + Geobuf geobuf = new Geobuf(directory) |
| 34 | + |
| 35 | + // Create an in memory Layer |
| 36 | + Memory memory = new Memory() |
| 37 | + Layer memoryLayer = memory.create('locations',[new Field("geom", "Point"), new Field("name", "String")]) |
| 38 | + memoryLayer.add([new Point(1,1), "Seattle"]) |
| 39 | + memoryLayer.add([new Point(2,2), "Portland"]) |
| 40 | + memoryLayer.add([new Point(3,3), "Tacoma"]) |
| 41 | + |
| 42 | + // And add it to Geobuf |
| 43 | + geobuf.add(memoryLayer) |
| 44 | + |
| 45 | + GeobufWriter writer = new GeobufWriter() |
| 46 | + Schema schema = new Schema("houses", [new Field("geom","Point"), new Field("name","string"), new Field("price","float")]) |
| 47 | + Feature feature = new Feature([new Point(111,-47), "House", 12.5], "house1", schema) |
| 48 | + String hex = writer.write(feature) |
| 49 | + >>> "0a046e616d650a057072696365100218062a1f0a0c08001a0880e7ed69ffa6e92c6a070a05486f7573656a060a0431322e35" |
| 50 | + |
| 51 | + **Workspace** |
| 52 | + |
| 53 | + In addition to the new Geobuf Workspace, a OGR Workspace was also added. This requires the GDAL/OGR native library |
| 54 | + to be installed with Java/JNI support.:: |
| 55 | + |
| 56 | + File shpFile = new File("states.shp") |
| 57 | + Layer shpLayer = new Shapefile(shpFile) |
| 58 | + |
| 59 | + File file = new File("states.sqlite") |
| 60 | + OGR ogr = new OGR("SQLite", file.absolutePath) |
| 61 | + Layer layer = ogr.create(shpLayer.cursor, options: [ |
| 62 | + "SPATIALITE=YES" |
| 63 | + ]) |
| 64 | + |
| 65 | + WFS support upgraded to the new WFS-NG library. Major thanks to Scottie and Neils who helped trouble shoot. |
| 66 | + |
| 67 | + **Geometry** |
| 68 | + |
| 69 | + The Geometry module some small improvements. A LineString.close() method creates a LinearRing. The GeometryCollection.narrow() method |
| 70 | + returns the most specific geometry type possible. If all geometries are Points, narrow will return a MultiPoint. Finally, |
| 71 | + The Bounds.getCorners() returns a list of the 4 corners as Points. |
| 72 | + |
| 73 | + **Layer** |
| 74 | + |
| 75 | + The major improvement to the Layer module is the wrapping of the GeoTools gt-grid module in a Graticule class that makes creating |
| 76 | + graticule based vector grids extremely easy.:: |
| 77 | + |
| 78 | + Layer layer = Graticule.createSquares(new Bounds(110.0, -45.0, 160.0, -5.0, "EPSG:4326"), 10, -1) |
| 79 | + |
| 80 | + File dir = new File("squares") |
| 81 | + Workspace workspace = new Directory(dir) |
| 82 | + Layer layer = Graticule.createSquares(new Bounds(110.0, -45.0, 160.0, -5.0, "EPSG:4326"), 10, 1, |
| 83 | + workspace: workspace, layer: "squares") |
| 84 | + |
| 85 | + Schema schema = new Schema("hexagon", [ |
| 86 | + new Field("geom", "Polygon"), |
| 87 | + new Field("color", "java.awt.Color") |
| 88 | + ]) |
| 89 | + Bounds b = new Bounds(0,0,100,100) |
| 90 | + Layer layer = Graticule.createHexagons(b, 5.0, -1.0, "flat", schema: schema, setAttributes: { GridElement e, Map attributes -> |
| 91 | + int green = (255 * e.center.x / b.width) as int |
| 92 | + int blue = (255 * e.center.y / b.height) as int |
| 93 | + attributes["color"] = new Color(0, green, blue) |
| 94 | + }) |
| 95 | + |
| 96 | + **Raster** |
| 97 | + |
| 98 | + The Raster module saw some minor improvements. A Format.has(String name) checks to see if a Raster by that name exists. |
| 99 | + A few more Raster functions were added: log, exp, and absolute. Finally, this version adds support for file names and |
| 100 | + String urls when loading Rasters using the Format.getFormat() method. |
| 101 | + |
| 102 | + **Tile** |
| 103 | + |
| 104 | + The Tile module continued to improve with help from gpotts. |
| 105 | + |
| 106 | + * gpotts fixed a bug that assumed all Tile Grids started at 0 |
| 107 | + |
| 108 | + * You can now delete tiles from a TileLayer:: |
| 109 | + |
| 110 | + GeoPackage layer = new GeoPackage(newFile, "states") |
| 111 | + Tile tile = layer.get(4, 2, 3) |
| 112 | + layer.delete(tile) |
| 113 | + |
| 114 | + * The TileGenerator has an option to only generate missing tiles:: |
| 115 | + |
| 116 | + TileGenerator generator = new TileGenerator() |
| 117 | + generator.generate(mbtiles, renderer, 0, 2, missingOnly: true) |
| 118 | + |
| 119 | + * TileLayer can now be loaded from a connection parameter string (which is very useful for command line apps):: |
| 120 | + |
| 121 | + TileLayer tileLayer = TileLayer.getTileLayer("type=mbtiles file=states.mbtiles") |
| 122 | + |
| 123 | + TileLayer tileLayer = TileLayer.getTileLayer("type=tms file=/Users/geoscript/tiles format=jpeg") |
| 124 | + |
| 125 | + TileLayer tileLayer = TileLayer.getTileLayer("type=vectortiles file=vectortilesdir format=mvt pyramid=GlobalMercator") |
| 126 | + |
| 127 | + * The TileLayer.getTileRenderer() static method returns a default TileRenderer for the given TileLayer. |
| 128 | + |
| 129 | + * PBF Vector Tiles now check for empty sub fields. |
| 130 | + |
| 131 | + * MVT support was rewritten to avoid creating huge empty byte buffers, support for dates was added, and the reader and write can round trip. |
| 132 | + |
| 133 | + * Pyramid readers and writers were added. Formats include gdal tms mini driver xml fiels, xml, and json. |
| 134 | + |
| 135 | + * The Grid class now has min and max methods. |
| 136 | + |
| 137 | + * Pyramid support now supports geodetic, mercator, and global geodetic as well known names and Pyramid hash a static createGlobalGeodeticPyramid() method. |
| 138 | + |
| 139 | + **Color** |
| 140 | + |
| 141 | + The Color module includes support for custom palettes in addition to color brewer. |
| 142 | + |
| 143 | + **Map** |
| 144 | + |
| 145 | + The Map and rendering modules inherits awesome improvements from GeoTools including dash an an expression and single and multiple layer z ordering. |
| 146 | + |
6 | 147 | 1.5.0
|
7 | 148 | -----
|
8 | 149 |
|
|
0 commit comments