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

Implement IsSimple on all Geometry types. #135

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Conversation

tonystone
Copy link
Owner

Implementing isSimple with complete tests for all Geometry types.

…mple

* 'master' of github.com:tonystone/geofeatures2:
  Update _resizeIfNeeded to use the buffer.header.
  Reimplement Polygon using CollectionBuffer for storage.
  Update GeometryCollection.swift.gyb to use new CollectionBuffer basic methods for insert, update, etc.
  Update CoordinateCollection.swift.gyb to use new CollectionBuffer basic methods for insert, update, etc.
  Update CollectionBuffer.swift adding in an extension for basic collection operations such as insert.
  Processed file to add new tests to SPM builds.
  Update Tokenizer.swift using isEmpty instead of character view to get an accurate indication of empty.
  Update WKTReaderTests.swift adding read(data:) tests.
  Update WKTReader.swift - Added basic class and method documentation. - Added read(data:encoding:) method. - Renamed parameter tag in read(wkt:) to read(string:) to match GeoJSONReaders interface.
  Correcting access levels on Reader and Writer classes.
  Update GeoJSONReader.swift factored out failable call to String.data(using:) to eliminate failure point.
  Update GeoJSONReaderTests.swift - Added func testReadWithMissingGeometries - Added func testReadWithInvalidGeometriesStructure - Added func testReadWithInvalidRoot
  Update Polygon+SurfaceTests.swift adding a space before Mark comment.
  Completed initial version of GeoJSONReader with tests.
  Update WKTReaderTests.swift to adjust for changes to main class and added new method to test invalid number of coordinates.
  Update WKTReader.swift - Renamed ParseError to WKTReaderError - Removed commented out operator == - Removing code that adds to the Coordinate array size - Added code to catch Coordinates new throwing init method.
  Update all CoordinateType tests to test init(array:) bounds and throw if out.
  Update all CoordinateTypes to use new _ArrayConstructable throwing init method and enforcing bounds checking on the input array.
  Update ArrayConstructable.swift making init throw and adding _ArrayConstrucableErro.invalidArraySize to be thrown when the array size is invalid.
  Adding initial structure, interface and test class.
@tonystone
Copy link
Owner Author

tonystone commented Nov 19, 2016

Current coverage is 97.31% (diff: 86.73%)

Diff Coverage File Path
0% new Sources/GeoFeatures/Segment.swift
0% Sources/GeoFeatures/MultiPolygon+Geometry.swift
•••••• 60% Sources/GeoFeatures/Polygon+Geometry.swift
••••••••• 94% Sources/GeoFeatures/LineString+Geometry.swift
•••••••••• 100% Sources/GeoFeatures/MultiPoint+Geometry.swift
•••••••••• 100% Sources/GeoFeatures/Point+Geometry.swift
•••••••••• 100% Sources/GeoFeatures/Geometry.swift

No coverage report found for master at 0136cb7.

Powered by Codecov. Last update 0136cb7...82b6c3d

tonystone and others added 21 commits November 22, 2016 07:49
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Update Tokenizer.swift - Fixed crash with column counting uncovered by adding unicode tests with multiple code unit characters. - Changing matchRange to be computed from the stringStream instead of the param that was passed in.
  Adding unicode tests for Tokenizer class.
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Changing CoordinateReferenceSystem to CoordinateSystem so as not to confuse it with spatial reference systems which are also know as coordinate reference systems in OGC and others.
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Misc. format adjustments. - Update all file headers with updated license formatting - Correct misc. typos. - Made all access method types consistently on the same line as the type or func definition. - Misc other changes in format.

# Conflicts:
#	Sources/GeoFeatures/Geometry.swift
#	Sources/GeoFeatures/MultiPoint+Geometry.swift
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Removing the Math.swift file which defines max since all platforms now support Swift.max and Swift.min.
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Updating code to conform to new rules in swiftlint version 0.13.1.

# Conflicts:
#	Tests/GeoFeaturesTests/LineString+GeometryTests+XCTest.swift
#	Tests/GeoFeaturesTests/MultiPoint+GeometryTests+XCTest.swift
#	Tests/GeoFeaturesTests/Point+GeometryTests+XCTest.swift
…mple

* 'master' of github.com:tonystone/geofeatures2:
  AVL Tree Implementation (#140)
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Looks like swiftlint corrected a name of one of their rules redundant_nil_coalescing, we are making the change on our side to match.
  Update AVLTreeTests.swift adding insert/delete best and worst performance tests.
- Added space_after_comment_mark
- Added identifier_colon
- Added comma_after_identifier
- Removing @discardableResults from fileprivate rotation and insert methods.
- Corrected root access modifier making it fileprivate.
- Typo correction nide -> node
- Adding the playground code for linting.
- Opening up comma_after_identifier to all text (removed match_kinds).
- Disabling rules that conflict with tests.
- Updating comma_after_identifier making it specific to certain types.
- Adding comma_after_identifier_comment to catch special cases in comments when specifying number like 10,000 which require a comma with no spaces.
- Adding bracket custom_rule.
- Adding empty_brackets rule to enforce {} brackets when there is no body.
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Update README.md
  Update WKTReaderTests.swift removing unneeded disabling of lint rules for the file.
  Update .swiftlint.yml adding warning for disabling rules.  Note this will become an error in future builds.
  Update all file comments to match preferred triple_line_comments style (specified in .swiftlint.yml).
  Update .swiftlint.yml adding triple_line_comments to enforce that style.
  Updating all files to conform to new swiftlint rules.
  Update .swiftlint.yml - Disabling rules that conflict with tests. - Updating comma_after_identifier making it specific to certain types. - Adding comma_after_identifier_comment to catch special cases in comments when specifying number like 10,000 which require a comma with no spaces. - Adding bracket custom_rule. - Adding empty_brackets rule to enforce {} brackets when there is no body.
  Removing Tests/.swiftlint.yml so Tests use the main file.
  Update GeoFeature.playground to correct all swiftlint errors.
  Update .swiftlint.yml - Adding the playground code for linting. - Opening up comma_after_identifier to all text (removed match_kinds).
  Update AVLTree.swift - Removing @discardableResults from fileprivate rotation and insert methods. - Corrected root access modifier making it fileprivate. - Typo correction nide -> node
  Correcting playground to match swiftlint rules and to compile properly.
  Correcting space_after_comment_mark swiftlint rule to exclude playground style //: comments.
  Updated files to conform to new swiftlint rules.
  Update .swiftlint.yml added new custom rules for swiftlint. - Added space_after_comment_mark - Added identifier_colon - Added comma_after_identifier
  Added swiftlint custom rule to enforce new line before where clause.
  Double indent where clause in func def on new line for easier reading.
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Correcting warnings for unused parameters but switching to `withUnsafeMutablePointerToHeader` instead of `withUnsafeMutablePointers`
  Updating to Xcode recommended settings.
  Removing disabled_rule rule from swiftlint so the build builds clean.
  Correcting warnings for unused parameters but switching to `withUnsafeMutablePointerToHeader` instead of `withUnsafeMutablePointers`
  No throw _ArrayConstructable (#154)
  Update .swiftlint.yml correcting several typos.
  Adjusting files to fit new rules (declaration_attributes_on_newline, access_control_on_same_line, and empty_first_line) in .swiftlint.yml.
  Update .swiftlint.yml - Added declaration_attributes_on_newline rule to force @declaration_attributes to be on their own line. - Added access_control_on_same_line to force access control modifiers to be on the same line as the type. - Added empty_first_line to force a new line after the definition of a type.
…mple

* 'master' of github.com:tonystone/geofeatures2:
  Update Coordinate Systems (#170)
  Fixing bundle install step.
  Adding .swift-version for CocoaPods and updating to 1.4.0 of Cocoapods in the Gemfile.
  Update to latest Swift toolchain 4.0.3 and Xcode 9.2.
  Updating LinuxMain.swift with changes to tests.
  Updates to support swift 4.0.3's deprecations.
  Update to xcode recommended settings.
  Changes to comply with new rules in siwftlint that we've accepted as standard for the project.
  Update to latest Swiftlint 0.25. - Changed .swiftlint.yml to new syntax for Regex. - Update .travis.yml to use new 0.25 brew build.
  Update readme2 (#167)
  Update README.md (#165)
  Update README.md to reflect changes in vagrant-swift behavior. (#164)
  Updating README.md to add command line sample for vagrant. (#163)
  Externalize Vagrant (#162)
  Update README.md
  Conversion to Swift 4
@codecov-io
Copy link

codecov-io commented Feb 28, 2018

Codecov Report

Merging #135 into master will decrease coverage by 0.59%.
The diff coverage is 87.5%.

@@            Coverage Diff            @@
##           master     #135     +/-   ##
=========================================
- Coverage   99.37%   98.78%   -0.6%     
=========================================
  Files          40       40             
  Lines        2096     2228    +132     
  Branches      137      158     +21     
=========================================
+ Hits         2083     2201    +118     
- Misses         13       24     +11     
- Partials        0        3      +3
Impacted Files Coverage Δ
Sources/GeoFeatures/MultiPolygon+Geometry.swift 89.65% <0%> (-10.35%) ⬇️
Sources/GeoFeatures/Point+Geometry.swift 100% <100%> (ø) ⬆️
Sources/GeoFeatures/MultiPoint+Geometry.swift 100% <100%> (ø) ⬆️
Sources/GeoFeatures/Polygon+Geometry.swift 85.71% <40%> (-14.29%) ⬇️
Sources/GeoFeatures/LineString+Geometry.swift 92.72% <91.01%> (-7.28%) ⬇️
Sources/GeoFeatures/LinearRing+Geometry.swift 100% <0%> (ø) ⬆️
Sources/GeoFeatures/MultiLineString+Geometry.swift 100% <0%> (ø) ⬆️
... and 9 more

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.

3 participants