{"id":24530705,"url":"https://github.com/tbbuck/sqlspatial.simplify","last_synced_at":"2025-03-15T18:42:20.407Z","repository":{"id":246445589,"uuid":"821173276","full_name":"tbbuck/SqlSpatial.Simplify","owner":"tbbuck","description":"SqlGeography Simplification: implementation of Visvalingam's algorithm for SQLGeography Simplification - SQL Server SqlCLR","archived":false,"fork":false,"pushed_at":"2024-06-28T01:15:43.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T08:17:22.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbbuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-28T01:11:58.000Z","updated_at":"2024-06-28T01:15:46.000Z","dependencies_parsed_at":"2024-06-28T01:39:57.861Z","dependency_job_id":"afd386fd-9a96-4c25-b177-e3b1c0b0d51a","html_url":"https://github.com/tbbuck/SqlSpatial.Simplify","commit_stats":null,"previous_names":["tbbuck/sqlspatial.simplify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbbuck%2FSqlSpatial.Simplify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbbuck%2FSqlSpatial.Simplify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbbuck%2FSqlSpatial.Simplify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbbuck%2FSqlSpatial.Simplify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbbuck","download_url":"https://codeload.github.com/tbbuck/SqlSpatial.Simplify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243776424,"owners_count":20346351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T08:17:24.499Z","updated_at":"2025-03-15T18:42:20.375Z","avatar_url":"https://github.com/tbbuck.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polygon + LineString Simplification SqlClr for SQL Server Spatial Geographies\n\n## Install\n```sql\nDROP ASSEMBLY IF EXISTS SqlSpatialClr; \n\nCREATE ASSEMBLY SqlSpatialClr FROM '/where/uploaded/to/mssql/server/SqlSpatial.Simplify.dll' WITH PERMISSION_SET = SAFE; \n\nCREATE FUNCTION dbo.SimplifyByArea(@polygon GEOGRAPHY, @tolerance FLOAT) RETURNS GEOGRAPHY AS EXTERNAL NAME SqlSpatialClr.[SqlSpatial.Simplify.SqlClrWrapper].SimplifyByMinimumArea; GO\nCREATE FUNCTION dbo.SimplifyByPercentage(@polygon GEOGRAPHY, @perentage FLOAT) RETURNS GEOGRAPHY AS EXTERNAL NAME SqlSpatialClr.[SqlSpatial.Simplify.SqlClrWrapper].SimplifyByPercentagePointsRetained; GO\n \nGO\n\n\n````\n\n## Update\nYou may need to DROP the functions first if the code's C# signatures have changed.\n\n```sql\nALTER ASSEMBLY SqlSpatialClr FROM '/where/uploaded/to/mssql/server/SqlSpatial.Simplify.dll'; \n````\n\n## Uninnstall\n```sql\nDROP FUNCTION IF EXISTS dbo.SimplifyByArea; GO\nDROP FUNCTION IF EXISTS dbo.SimplifyByPercentage; GO\n\nDROP ASSEMBLY IF EXISTS SqlSpatialClr; \n````\n\n## Example usage\n```sql\n\n-- simplify by retaining 5% of the largest-area points\nDECLARE @percentage FLOAT = 5.0;\nDECLARE @geography GEOGRAPHY = (SELECT SomeHugeBoundary FROM lovely_big_city_table WHERE id = 31415);\nSELECT dbo.SimplifyByPercentage(@geography, @percentage) AS simplified; \n\n-- simplify by dropping points with a triangular area under 200m\nDECLARE @tolerance FLOAT = 200.0;\nDECLARE @geography GEOGRAPHY = (SELECT SomeHugeBoundary FROM lovely_big_city_table WHERE id = 31415);\nSELECT dbo.SimplifyByArea(@geography, @tolerance) AS simplified;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbbuck%2Fsqlspatial.simplify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbbuck%2Fsqlspatial.simplify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbbuck%2Fsqlspatial.simplify/lists"}