mongoose-geojson-schema
Advanced tools
Comparing version 0.0.1 to 0.0.2
/** | ||
* * GeoJSON Schemas for Mongoose | ||
* * | ||
* * rough GeoJSON schemas for use with mongoose schema creation | ||
* * | ||
* * Based on GeoJSON Spec @ http://geojson.org/geojson-spec.html | ||
* * | ||
* * Created by Ben Dalton (ben@rideamigos) on 3/27/14. | ||
* * Copyright RideAmigos (http://rideamigos.com) | ||
* */ | ||
* GeoJSON Schemas for Mongoose | ||
* | ||
* rough GeoJSON schemas for use with mongoose schema creation | ||
* | ||
* Based on GeoJSON Spec @ http://geojson.org/geojson-spec.html | ||
* | ||
* Created by Ben Dalton (ben@rideamigos) on 3/27/14. | ||
* Copyright RideAmigos (http://rideamigos.com) | ||
**/ | ||
@@ -16,48 +16,58 @@ var GeoJSON; | ||
GeoJSON.Geometry = { | ||
'type': { type: String, required: true, enum:["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"] }, | ||
coordinates:[{type:"Mixed"}] | ||
'type' : { type: String, enum: ["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"] }, | ||
coordinates: [] | ||
} | ||
GeoJSON.Point = { | ||
'type': { type: String, required: true, default:"Point" }, | ||
coordinates:[{type:"Number"}] | ||
'type' : { type: String, default: "Point" }, | ||
coordinates: [ | ||
{type: "Number"} | ||
] | ||
} | ||
GeoJSON.MultiPoint = { | ||
'type': { type: String, required: true, default:"MultiPoint" }, | ||
coordinates:[{type:"Array"}] | ||
'type' : { type: String, default: "MultiPoint" }, | ||
coordinates: [ | ||
{type: "Array"} | ||
] | ||
} | ||
GeoJSON.MultiLineString = { | ||
'type': { type: String, required: true, default:"MultiLineString" }, | ||
coordinates:[{type:"Array"}] | ||
'type' : { type: String, default: "MultiLineString" }, | ||
coordinates: [ | ||
{type: "Array"} | ||
] | ||
} | ||
GeoJSON.Polygon = { | ||
'type': { type: String, required: true, default:"Polygon" }, | ||
coordinates:[{type:"Array"}] | ||
'type' : { type: String, default: "Polygon" }, | ||
coordinates: [ | ||
{type: "Array"} | ||
] | ||
} | ||
GeoJSON.MultiPolygon = { | ||
'type': { type: String, required: true, default:"MultiPolygon" }, | ||
coordinates:[{type:"Array"}] | ||
'type' : { type: String, default: "MultiPolygon" }, | ||
coordinates: [ | ||
{type: "Array"} | ||
] | ||
} | ||
GeoJSON.GeometryCollection = { | ||
'type': { type: String, required: true, default:"GeometryCollection" }, | ||
geometries:[GeoJSON.Geometry] | ||
'type' : { type: String, default: "GeometryCollection" }, | ||
geometries: [GeoJSON.Geometry] | ||
} | ||
GeoJSON.Feature = { | ||
id:{type:"String"}, | ||
'type': { type: String, required: true, default:"Feature" }, | ||
geometry:GeoJSON.Geometry, | ||
properties:{type:"Object"} | ||
id : { type: "String" }, | ||
'type' : { type: String, default: "Feature" }, | ||
geometry : GeoJSON.Geometry, | ||
properties: {type: "Object"} | ||
} | ||
GeoJSON.FeatureCollection = { | ||
'type': { type: String, required: true, default:"FeatureCollection" }, | ||
features: [ GeoJSON.Feature ] | ||
'type' : { type: String, default: "FeatureCollection" }, | ||
features: [ GeoJSON.Feature ] | ||
} | ||
{ | ||
"name": "mongoose-geojson-schema", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Schema definitions for GeoJSON types for use with Mongoose JS", | ||
@@ -5,0 +5,0 @@ "main": "GeoJSON.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60
3490