Skip to content

Featureclasses - #145

Open
Rkleisley wants to merge 32 commits into
mainfrom
featureclasses
Open

Featureclasses#145
Rkleisley wants to merge 32 commits into
mainfrom
featureclasses

Conversation

@Rkleisley

Copy link
Copy Markdown
Collaborator

Parsers for feature classes and methods for feature class to Track / FeatureCollection

added from_featureclass
to_featureclass
added internal function to convert timestamp columns
Function to parse a featureclass using arcgis package
Added function to parse featureclasses using arcpy
converts a featureclass to a Track or FeatureCollection by creating a Spatial Enabled DataFrame (SEDF) and parsing it into GeoShapes
method to convert a feature class to Track or FeatureCollection using arcpy SearchCursor and featureclass parser

@ccbest ccbest left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Couple quick changes then good to go - let's talk Monday

Comment thread geostructures/parsers.py
TimeInterval: The time interval representing the start and end time.
"""
import pandas as pd
from geostructures.time import TimeInterval

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

move TimeInterval to top imports

Comment thread geostructures/parsers.py
import pandas as pd
from geostructures.time import TimeInterval

if pd.notnull(start_time) or pd.notnull(end_time):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

let's take a quick re-look at this block. If start_time/end_time is not null but is also not a timestamp it could cause issues

features=[x.to_fastkml_placemark() for x in self.geoshapes]
)

def to_featureclass(self, geodatabase, filename):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Needs a docstring

Comment thread geostructures/parsers.py
}


def _get_datetime_pandas(start_time, end_time):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

_PARSER_MAP not updated with new types that can show up

Comment thread geostructures/parsers.py Outdated

if geometry_type_str == 'POINT':
lon, lat = geometry.x, geometry.y
shape = parser(Coordinate(lon, lat), properties=properties)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

It looks like you're using __init__ - let's talk about this, I think we can simplify things a little

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants