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

Gis objects cleaning #181

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
14 changes: 14 additions & 0 deletions src/Speckle.Objects/Data/GisObject.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Speckle.Sdk.Models;

namespace Speckle.Objects.Data;

/// <summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should be updated - I will add this class in another pr, so no need to fix

/// Represents an Autodesk.Revit.DB.Element object in Revit
/// </summary>
[SpeckleType("Objects.Data.GisObject")]
public class GisObject : Base, IGisObject
{
public required string name { get; set; }
public required string type { get; set; }
public required IReadOnlyList<Base> displayValue { get; set; }
}
12 changes: 12 additions & 0 deletions src/Speckle.Objects/GIS/GisLayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Speckle.Sdk.Models;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we need this extra class - you could use the layer:collection class and just add the missing props from crs dynamically

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be hard to enforce required properties, without which GisLayers don't make sense

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is CRS required for data extraction? it seems like it's only used on send, not receive

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, for GIS data, the data must have the georeference

using Speckle.Sdk.Models.Collections;

namespace Speckle.Objects.GIS;

[SpeckleType("Objects.GIS.GisLayer")]
public class GisLayer : Collection
{
public required CRS crs { get; set; }
public required string units { get; set; }
public required string type { get; set; }
}
19 changes: 0 additions & 19 deletions src/Speckle.Objects/GIS/GisMultipatchFeature.cs

This file was deleted.

18 changes: 0 additions & 18 deletions src/Speckle.Objects/GIS/GisMultipatchGeometry.cs

This file was deleted.

9 changes: 0 additions & 9 deletions src/Speckle.Objects/GIS/GisNonGeometricFeature.cs

This file was deleted.

21 changes: 0 additions & 21 deletions src/Speckle.Objects/GIS/GisPointFeature.cs

This file was deleted.

16 changes: 0 additions & 16 deletions src/Speckle.Objects/GIS/GisPolygonFeature.cs

This file was deleted.

21 changes: 0 additions & 21 deletions src/Speckle.Objects/GIS/GisPolylineFeature.cs

This file was deleted.

17 changes: 0 additions & 17 deletions src/Speckle.Objects/GIS/PolygonGeometry.cs

This file was deleted.

6 changes: 0 additions & 6 deletions src/Speckle.Objects/GIS/PolygonGeometry3d.cs

This file was deleted.

52 changes: 0 additions & 52 deletions src/Speckle.Objects/GIS/RasterElement.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src/Speckle.Objects/GIS/RasterLayer.cs

This file was deleted.

20 changes: 0 additions & 20 deletions src/Speckle.Objects/GIS/VectorLayer.cs

This file was deleted.

16 changes: 16 additions & 0 deletions src/Speckle.Objects/Geometry/Polygon.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Speckle.Sdk.Models;

namespace Speckle.Objects.Geometry;

[SpeckleType("Objects.Geometry.Polygon")]
public class Polygon : Base
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a required keyword to the boundary, and reconsider the proeprty names based off of other apps that may use polygons

public string units { get; set; }
public ICurve boundary { get; set; }
public List<ICurve> voids { get; set; }

public Polygon()
{
voids = new List<ICurve>();
}
}
13 changes: 5 additions & 8 deletions src/Speckle.Objects/Interfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ public interface ITransformable : ISpeckleObject

#endregion

#region GIS
public interface IGisFeature : ISpeckleObject
{
Base attributes { get; set; }
}

#endregion

#region Data objects

/// <summary>
Expand Down Expand Up @@ -159,4 +151,9 @@ public interface ITeklaObject : IDataObject
[DetachProperty]
IReadOnlyList<ITeklaObject> elements { get; }
}

public interface IGisObject : IDataObject
{
string type { get; }
}
#endregion