Skip to content

Commit

Permalink
Merge pull request #137 from Esri/bugfix/exports
Browse files Browse the repository at this point in the history
👍
  • Loading branch information
dmfenton committed Apr 1, 2015
2 parents b2a701c + 7b66fce commit c7588c1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.1] - 2015-04-01
### Changed
* Forcing status processing on progress reporting from export worker jobs
* Wrapping projection WKT in single quotes for calls to ogr2ogr

## [2.0.0] - 2015-03-31
### Changed
* Replaced logic in `lib/Extent.js` with [esri-extent](https://github.com/ngoldman/esri-extent) ([#130](https://github.com/Esri/koop/issues/130)).
Expand Down Expand Up @@ -148,6 +153,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.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
[1.1.2]: https://github.com/Esri/koop/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/Esri/koop/compare/v1.1.0...v1.1.1
Expand Down
6 changes: 4 additions & 2 deletions lib/Exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ exports.exportLarge = function( koop, format, id, key, type, options, finish, do
});

job.on('progress', function(progress){

koop.Cache.getInfo( table, function( err, info ){
info.status = 'processing';
if (info.generating) {
info.generating.progress = progress + '%';
}
Expand Down Expand Up @@ -393,10 +395,10 @@ function getOgrParams( format, inFile, outFile, geojson, options ){
cmd.push('GEOMETRY=AS_XY');
}
} else if (format === 'zip' || format === 'shp'){
// only project features for shp when wkid != 4326 or 3857
// only project features for shp when wkid != 4326 or 3857 or 102100
if ( options.wkid ){
cmd.push('-t_srs');
cmd.push('"'+ projCodes.lookup(options.wkid).wkt +'"');
cmd.push('\''+ projCodes.lookup(options.wkid).wkt +'\'');
} else if (options.wkt){
cmd.push('-t_srs');
cmd.push('\''+ options.wkt +'\'');
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.0",
"version": "2.0.1",
"description": "A node module/express middleware for converting GeoJSON to Esri Feature Services.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/models/exporter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('exporter Model', function(){
};

var params = exporter.getOgrParams(format, inFile, outFile, null, options).split(' ');
params[9].should.equal('"PROJCS["NAD_1983_CSRS_UTM_Zone_21N",GEOGCS["GCS_North_American_1983_CSRS",DATUM["D_North_American_1983_CSRS",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-57.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]"');
params[9].should.equal('\'PROJCS["NAD_1983_CSRS_UTM_Zone_21N",GEOGCS["GCS_North_American_1983_CSRS",DATUM["D_North_American_1983_CSRS",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-57.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]\'');
done();
});
});
Expand Down

0 comments on commit c7588c1

Please sign in to comment.