Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Create methods for way and relation from keyvalues only #34

Merged
merged 1 commit into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions OpenStreetMap_Engine/Create/Relation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2020, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
*
*
* The BHoM is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3.0 of the License, or
* (at your option) any later version.
*
* The BHoM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this code.If not, see<https://www.gnu.org/licenses/lgpl-3.0.html>.
*/
using BH.oM.OpenStreetMap;
using System.Collections.Generic;

namespace BH.Engine.OpenStreetMap
{
public static partial class Create
{
/***************************************************/
/**** Public Methods ****/
/***************************************************/
public static Relation Relation(Dictionary<string, string> keyvalues)
{
return new Relation()
{
KeyValues = keyvalues
};
}
}
}
40 changes: 40 additions & 0 deletions OpenStreetMap_Engine/Create/Way.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2020, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
*
*
* The BHoM is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3.0 of the License, or
* (at your option) any later version.
*
* The BHoM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this code.If not, see<https://www.gnu.org/licenses/lgpl-3.0.html>.
*/
using BH.oM.OpenStreetMap;
using System.Collections.Generic;

namespace BH.Engine.OpenStreetMap
{
public static partial class Create
{
/***************************************************/
/**** Public Methods ****/
/***************************************************/
public static Way Way(Dictionary<string, string> keyvalues)
{
return new Way()
{
KeyValues = keyvalues
};
}
}
}
2 changes: 2 additions & 0 deletions OpenStreetMap_Engine/OpenStreetMap_Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
<Compile Include="Create\Node.cs" />
<Compile Include="Create\QueryBuilder.cs" />
<Compile Include="Create\QueryString.cs" />
<Compile Include="Create\Relation.cs" />
<Compile Include="Create\Way.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Convert\ToUTMPolyline.cs" />
<Compile Include="Query\AverageNode.cs" />
Expand Down