Skip to content

Commit

Permalink
Merge pull request #141 from Esri/lambert-proj-fix
Browse files Browse the repository at this point in the history
forcing Lambert_Conformal_Conic_1SP on lambert proj strings
  • Loading branch information
ungoldman committed Apr 5, 2015
2 parents 2483884 + a79e218 commit ad20bd3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.3] - 2015-04-03
### Changed
* Forcing export shapefiles with Lambert_Conformal_Conic proj strings to use Lambert_Conformal_Conic_1SP. For more info see: http://trac.osgeo.org/gdal/ticket/2072

## [2.0.2] - 2015-04-02
### Changed
* Small data exports in worker mode now use the regular exportToFormat workflow in Exporter.js
Expand Down Expand Up @@ -166,6 +170,7 @@ Koop is now just a node module that exposes an express middleware app with hooks
- koop-server is no more; all central code is in the koop project
- to use Koop you must use it as middleware in an app that boots up an http server

[2.0.3]: https://github.com/Esri/koop/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/Esri/koop/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/Esri/koop/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/Esri/koop/compare/v1.1.2...v2.0.0
Expand Down
8 changes: 6 additions & 2 deletions lib/Exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,20 +399,24 @@ function getOgrParams( format, inFile, outFile, geojson, options ){
} else if (format === 'zip' || format === 'shp'){
// only project features for shp when wkid != 4326 or 3857 or 102100
if ( options.wkid ){
var wkt = projCodes.lookup(options.wkid).wkt;
// always replace Lambert_Conformal_Conic with Lambert_Conformal_Conic_1SP
// open ogr2ogr bug: http://trac.osgeo.org/gdal/ticket/2072
wkt = wkt.replace('Lambert_Conformal_Conic', 'Lambert_Conformal_Conic_1SP');
cmd.push('-t_srs');
cmd.push('\''+ projCodes.lookup(options.wkid).wkt +'\'');
cmd.push('\''+ wkt +'\'');
} else if (options.wkt){
cmd.push('-t_srs');
cmd.push('\''+ options.wkt +'\'');
}

// make sure field names are not truncated multiple times
cmd.push('-append');
cmd.push('-fieldmap');
cmd.push('identity');

}

cmd.push('-append');
cmd.push('-skipfailures');
cmd.push('-lco');
cmd.push('ENCODING=UTF-8');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "koop",
"version": "2.0.2",
"version": "2.0.3",
"description": "A node module/express middleware for converting GeoJSON to Esri Feature Services.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ad20bd3

Please sign in to comment.