Refactor Entity, Node, Relation, Tags, Way from core to osm

This commit is contained in:
Bryan Housel
2016-10-11 22:41:24 -04:00
parent fd742518c6
commit 07fa5fcc34
52 changed files with 215 additions and 239 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { coreRelation, coreWay } from '../core/index';
import { osmRelation, osmWay } from '../osm/index';
import { geoIsSimpleMultipolygonOuterMember, geoSphericalDistance } from '../geo/index';
import { actionAddMember } from './add_member';
import { utilWrap } from '../util/index';
@@ -75,7 +75,7 @@ export function actionSplit(nodeId, newWayIds) {
function split(graph, wayA, newWayId) {
var wayB = coreWay({id: newWayId, tags: wayA.tags}),
var wayB = osmWay({id: newWayId, tags: wayA.tags}),
nodesA,
nodesB,
isArea = wayA.isArea(),
@@ -130,7 +130,7 @@ export function actionSplit(nodeId, newWayIds) {
});
if (!isOuter && isArea) {
var multipolygon = coreRelation({
var multipolygon = osmRelation({
tags: _.extend({}, wayA.tags, {type: 'multipolygon'}),
members: [
{id: wayA.id, role: 'outer', type: 'way'},