Skip to content

Commit 2ef8bd3

Browse files
committed
update proj4; ignore projection if it throws error
1 parent 24e9d08 commit 2ef8bd3

9 files changed

+6234
-45
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ libs/CesiumUnminified
3030
/pointclouds/sjl2
3131
/pointclouds/morro_bay_converted
3232
/pointclouds/helimap_epalinges
33+
pointclouds/F

libs/proj4/LICENSE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
##Proj4js -- Javascript reprojection library.
1+
## Proj4js -- Javascript reprojection library.
22

33
Authors:
44
- Mike Adair madairATdmsolutions.ca
@@ -26,4 +26,4 @@ Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons
2626
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2727
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2828
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29-
DEALINGS IN THE SOFTWARE._
29+
DEALINGS IN THE SOFTWARE._

libs/proj4/README.md

+29-22
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# PROJ4JS [![Build Status](https://travis-ci.org/proj4js/proj4js.svg)](https://travis-ci.org/proj4js/proj4js)
22

33
Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.
4-
Originally a port of [PROJ.4](http://trac.osgeo.org/proj/) and [GCTCP C](http://edcftp.cr.usgs.gov/pub//software/gctpc) it is
5-
a part of the [MetaCRS](http://wiki.osgeo.org/wiki/MetaCRS) group of projects.
4+
Originally a port of [PROJ](https://proj.org/) ([then known as PROJ.4](https://proj.org/faq.html#what-happened-to-proj-4)) and GCTCP C ([Archive](https://web.archive.org/web/20130523091752/http://edcftp.cr.usgs.gov/pub/software/gctpc/)) it is
5+
a part of the [MetaCRS](https://trac.osgeo.org/metacrs/wiki) group of projects.
66

77
## Installing
88

@@ -11,17 +11,16 @@ Depending on your preferences
1111
```bash
1212
npm install proj4
1313
bower install proj4
14-
jam install proj4
1514
component install proj4js/proj4js
1615
```
1716

18-
or just manually grab the file `proj4.js` from the [latest release](https://github.com/proj4js/proj4js/releases).
17+
or just manually grab the file `proj4.js` from the [latest release](https://github.com/proj4js/proj4js/releases)'s `dist/` folder.
1918

20-
if you do not want to download anything, Proj4js is also hosted on [cdnjs](http://www.cdnjs.com/libraries/proj4js) for direct use in your browser applications.
19+
If you do not want to download anything, Proj4js is also hosted on [cdnjs](https://www.cdnjs.com/libraries/proj4js) for direct use in your browser applications.
2120

2221
## Using
2322

24-
the basic signature is:
23+
The basic signature is:
2524

2625
```javascript
2726
proj4(fromProjection[, toProjection, coordinates])
@@ -57,7 +56,7 @@ proj4(secondProjection,firstProjection).inverse([2,5]);
5756
// [-2690666.2977344505, 3662659.885459918]
5857
```
5958

60-
and as above if only one projection is given, it's assumed to be coming from wgs84
59+
And as above if only one projection is given, it's assumed to be coming from wgs84:
6160

6261
```javascript
6362
proj4(firstProjection).forward([-71,41]);
@@ -89,7 +88,7 @@ proj4.defs([
8988
]);
9089
```
9190

92-
you can then do
91+
you can then do
9392

9493
```js
9594
proj4('EPSG:4326');
@@ -106,48 +105,56 @@ instead of writing out the whole proj definition, by default proj4 has the follo
106105
- 'EPSG:900913'
107106
- 'EPSG:102113'
108107

109-
defined projections can also be accessed through the proj4.defs function (`proj4.defs('EPSG:4326')`).
108+
Defined projections can also be accessed through the proj4.defs function (`proj4.defs('EPSG:4326')`).
110109

111110
proj4.defs can also be used to define a named alias:
112111

113112
```javascript
114113
proj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326'));
115-
```
114+
```
115+
116+
## TypeScript
117+
118+
TypeScript implementation was added to the [DefinitelyTyped repository](https://github.com/DefinitelyTyped/DefinitelyTyped).
119+
120+
```bash
121+
$ npm install --save @types/proj4
122+
```
116123

117124
## Developing
118-
to set up build tools make sure you have node and grunt-cli installed and then run `npm install`
125+
To set up build tools make sure you have node and grunt-cli installed and then run `npm install`.
119126

120-
to do the complete build and browser tests run
127+
To do the complete build and browser tests run:
121128

122129
```bash
123-
grunt
130+
node_modules/.bin/grunt
124131
```
125132

126-
to run node tests run
133+
To run node tests run:
127134

128135
```bash
129136
npm test
130137
```
131138

132-
to run node tests with coverage run
139+
To run node tests with coverage run:
133140

134141
```bash
135-
node test --coverage
142+
npm test --coverage
136143
```
137144

138-
to create a build with only default projections (latlon and Mercator) run
145+
To create a build with only default projections (latlon and Mercator) run:
139146

140147
```bash
141-
grunt build
148+
node_modules/.bin/grunt build
142149
```
143150

144-
to create a build with only custom projections include a comma separated list of projections codes (the file name in 'lib/projections' without the '.js') after a colon, e.g.
151+
To create a build with only custom projections include a comma separated list of projections codes (the file name in 'lib/projections' without the '.js') after a colon, e.g.:
145152

146153
```bash
147-
grunt build:tmerc
154+
node_modules/.bin/grunt build:tmerc
148155
#includes transverse Mercator
149-
grunt build:lcc
156+
node_modules/.bin/grunt build:lcc
150157
#includes lambert conformal conic
151-
grunt build:omerc,moll
158+
node_modules/.bin/grunt build:omerc,moll
152159
#includes oblique Mercator and Mollweide
153160
```

0 commit comments

Comments
 (0)