Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ddohler committed Jan 26, 2018
1 parent 1516a8d commit 284ea45
Showing 1 changed file with 35 additions and 17 deletions.
52 changes: 35 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
GDAL JS
==============
An [Emscripten](https://github.com/kripken/emscripten) port of [GDAL](http://www.gdal.org).

Developing
-----------
1. Install Docker
2. Run `./scripts/setup`, which will build the Docker container.
3. Run `./scripts/make gdal`. The make script just calls `make` from inside the Docker container.
4. `./scripts/make clean` works as expected.
5. To package up a release, run `./scripts/make VERSION=<number> release`
An [Emscripten](https://github.com/kripken/emscripten) port of [GDAL](http://www.gdal.org) 2.1.

Usage
---------------
*Caution!* It is strongly recommended to run this code inside of a web worker.
To see complete examples for how to do this, checkout the `examples` directory.
From simplest to most complex, these are:

1. `inspect_geotiff`
2. `map_extent`
3. `thumbnail`
4. `thumbnail_map`
5. `tile_tiff`

If you want to use GDAL from within a Node application, you are probably looking
for [https://www.npmjs.com/package/gdal](https://www.npmjs.com/package/gdal).

This library exports the following GDAL functions:
- CSLCount
- GDALSetCacheMax
Expand All @@ -26,30 +31,43 @@ This library exports the following GDAL functions:
- GDALGetRasterCount
- GDALGetRasterDataType
- GDALGetRasterBand
- GDALGetRasterStatistics
- GDALGetRasterMinimum
- GDALGetRasterMaximum
- GDALGetRasterNoDataValue
- GDALGetProjectionRef
- GDALSetProjection
- GDALGetGeoTransform
- GDALSetGeoTransform
- OSRNewSpatialReference
- OSRDestroySpatialReference
- OSRImportFromEPSG
- OCTNewCoordinateTransformation
- OCTDestroyCoordinateTransformation
- OCTTransform
- GDALCreateGenImgProjTransformer
- GDALDestroyGenImgProjTransformer
- GDALGenImgProjTransform
- GDALDestroyGenImgProjTransformer
- GDALSuggestedWarpOutput
- GDALTranslate
- GDALTranslateOptionsNew
- GDALTranslateOptionsFree
- GDALWarpAppOptionsNew
- GDALWarpAppOptionsSetProgress
- GDALWarpAppOptionsFree
- GDALWarp
- GDALReprojectImage

To see full-fledged examples using all of these functions from within a WebWorker, check out the
`examples` directory. From simplest to most complex, these examples are:
For documentation of these functions' behavior, please see the
[GDAL documentation](http://www.gdal.org/gdal_8h.html)

1. `inspect_geotiff`
2. `map_extent`
3. `thumbnail`
4. `thumbnail_map`
5. `tile_tiff`
In order to limit build size, GDAL is currently built with support for GeoTIFFs and PNGs only.

In order to limit Javascript build size, GDAL is currently built with support for GeoTIFFs and PNGs only.
Developing
-----------
1. Install Docker
2. Run `./scripts/setup`, which will build the Docker container.
3. Run `./scripts/make gdal`. The make script just calls `make` from inside the Docker container.
4. `./scripts/make clean` works as expected.
5. To package up a release, run `./scripts/make VERSION=<number> release`

0 comments on commit 284ea45

Please sign in to comment.