Ogre is a web client (service) that translates spatial files into GeoJSON using the ogr2ogr command line tool for use in web applications and frameworks.
You can perform Ogre transformations directly by making a HTTP POST request:
Convert to GeoJSON
http://ogre.adc4gis.com/convert with the following params:
upload
- the file being uploaded
sourceSrs
(optional) - the original projection
targetSrs
(optional) - the target projection
dialect
(optional) - SQL dialect (e.g., 'sqlite')
sql
(optional) - SQL query for filtering data
simplify
(optional) - Value for simplifying geometries (e.g., '0.1')
configDxfEncoding
(optional) - Set to any value to enable DXF_ENCODING=UTF-8 config
writeBbox
(optional) - Set to any value to enable WRITE_BBOX=YES
forcePlainText
(optional) - force `text/plain` instead of `application/json`
rfc7946
(optional) - Create Mapbox-compatible file (RFC7946)
callback
(optional) - a JSONP callback function name
Convert from GeoJSON to Shapefile (or specified format)
http://ogre.adc4gis.com/convertJson with
one of the following params:
json
- text of the GeoJSON file
jsonUrl
- the URL for a remote GeoJSON file
outputName
(optional) - the name for the resulting file
forceUTF8
(optional) - force utf-8
format
(optional) - File format supported by the
ogr2ogr wrapper
Convert to DWG
http://ogre.adc4gis.com/convertToDwg with the following params:
upload
- the spatial file to convert (GeoJSON, Shapefile, etc.)
outputName
(optional) - the name for the resulting DWG file (without extension)
Convert GeoJSON to Raster (gdal_rasterize)
http://ogre.adc4gis.com/rasterize with the following params:
upload
- the spatial file to rasterize (required, or use json/jsonUrl)
json
- GeoJSON string to rasterize (alternative to upload)
jsonUrl
- URL to GeoJSON file to rasterize (alternative to upload)
outputFormat
(optional) - Output format: 'GTiff' (only format supported)
width
(optional) - Output width in pixels (use with height)
height
(optional) - Output height in pixels (use with width)
xres
(optional) - Output X resolution (use with yres)
yres
(optional) - Output Y resolution (use with xres)
xmin, ymin, xmax, ymax
(optional) - Output extent coordinates
burn
(optional) - Fixed value to burn into raster (default: 255)
attribute
(optional) - Attribute name to get burn values from
nodata
(optional) - NoData value for output raster
init
(optional) - Initialize raster pixels with this value
srs
(optional) - Spatial reference system (e.g., 'EPSG:4326')
allTouched
(optional) - Set to any value to enable ALL_TOUCHED option
outputType
(optional) - Output data type (e.g., 'Byte', 'Int16', 'Float32')
bands
(optional) - Number of output bands
layerName
(optional) - Specific layer name to rasterize
sql
(optional) - SQL query for filtering data
dialect
(optional) - SQL dialect (e.g., 'sqlite')
where
(optional) - WHERE clause for filtering features
Translate Raster (gdal_translate)
http://ogre.adc4gis.com/translate with the following params:
upload
- the raster file to translate (required)
outputFormat
(optional) - Output format: 'JPEG', 'PNG', 'GTiff' (default: 'JPEG')
outputType
(optional) - Output data type (e.g., 'Byte', 'Int16', 'Float32')
band
(optional) - Band numbers to extract (comma-separated, e.g., '1,2,3')
mask
(optional) - Mask band number
expand
(optional) - Expand options: 'gray', 'rgb', 'rgba'
width, height
(optional) - Output size in pixels
scale_srcMin, scale_srcMax, scale_dstMin, scale_dstMax
(optional) - Scaling parameters for pixel values
srcwin_xoff, srcwin_yoff, srcwin_xsize, srcwin_ysize
(optional) - Source window (pixel coordinates) to extract
projwin_ulx, projwin_uly, projwin_lrx, projwin_lry
(optional) - Projection window (geographic coordinates) to extract
projwinSrs
(optional) - Spatial reference system for projection window (e.g., 'EPSG:4326')
quality
(optional) - JPEG quality (1-100, only for JPEG output)
compress
(optional) - Compression method: 'DEFLATE', 'LZW', 'PACKBITS', 'JPEG'
nodata
(optional) - NoData value for output raster
Get File Information (ogrinfo)
http://ogre.adc4gis.com/info with the following params:
upload
- the spatial file to analyze (required)
summary
(optional) - set to any value to show summary only
features
(optional) - set to any value to show features (default behavior)
al
(optional) - set to any value to list all layers
where
(optional) - attribute query (e.g., 'name="test"')
sql
(optional) - SQL query for filtering data
dialect
(optional) - SQL dialect (e.g., 'sqlite')
limit
(optional) - limit number of features (e.g., '10')
spat
(optional) - spatial filter 'xmin ymin xmax ymax'
geomfield
(optional) - geometry field name
fid
(optional) - feature ID to show
layerName
(optional) - specific layer name to analyze
Get GeoJSON Information
http://ogre.adc4gis.com/infoJson with
one of the following params:
json
- text of the GeoJSON file
jsonUrl
- the URL for a remote GeoJSON file
layerName
(optional) - specific layer name to analyze
Issues and feature requests can be submitted here and to watch, fork and/or contribute to the project, visit the github page .
"Orc Head" drawing by Jason J. Patterson