diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..60c637a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,268 @@ +root = true + +[*.csproj] +indent_style = space +indent_size = 2 + +[*] +# add guidelines +guidelines = 160 +insert_final_newline = true +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +indent_size = 4 +end_of_line = crlf +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion +dotnet_style_namespace_match_folder = true:suggestion +dotnet_style_readonly_field = true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion +dotnet_style_allow_multiple_blank_lines_experimental = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent +dotnet_code_quality_unused_parameters = all:suggestion + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 + +[*.sh] +indent_style = space +indent_size = 2 + +[*.props] +indent_style = space +indent_size = 2 + +[*.cs] +indent_size = 4 +indent_style = space +tab_width = 4 + +# Sort System namespaces alphabetically +dotnet_sort_system_directives_first = false + +# Treat missing xmldoc comments as suggestion instead of warning +dotnet_diagnostic.CS1591.severity = suggestion + +# Code style +csharp_new_line_before_members_in_object_initializers = false +csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion +csharp_space_after_cast = false +csharp_style_namespace_declarations = file_scoped:silent +csharp_style_prefer_primary_constructors = false:suggestion +dotnet_style_qualification_for_event = false:suggestion +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = false +csharp_indent_switch_labels = true + +# Naming rules +dotnet_naming_rule.private_constants_rule.severity = warning +dotnet_naming_rule.private_constants_rule.style = upper_camel_case_style +dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols +dotnet_naming_rule.private_instance_fields_rule.severity = warning +dotnet_naming_rule.private_instance_fields_rule.style = underscore_lower_camel_case_style +dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols +dotnet_naming_rule.private_static_fields_rule.severity = warning +dotnet_naming_rule.private_static_fields_rule.style = underscore_lower_camel_case_style +dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols +dotnet_naming_rule.private_static_readonly_rule.severity = warning +dotnet_naming_rule.private_static_readonly_rule.style = upper_camel_case_style +dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols + +# Naming styles +dotnet_naming_style.underscore_lower_camel_case_style.capitalization = camel_case +dotnet_naming_style.underscore_lower_camel_case_style.required_prefix = _ +dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case + +# Symbol specifications +dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field +dotnet_naming_symbols.private_constants_symbols.required_modifiers = const +dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static +dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly + +# Style aliases promoted to warnings: As styles don't have severity setting, they do not fail dotnet format checks. +# To make the checks fail, configure corresponding analyzer issue severity to warning. +# Only a subset of issues is listed here to avoid overly strict rules. +dotnet_diagnostic.IDE0003.severity = warning # Remove this or Me qualification - dotnet_style_qualification_for_* +dotnet_diagnostic.IDE0011.severity = suggestion # Add braces - csharp_prefer_braces +dotnet_diagnostic.IDE0016.severity = warning # Use throw expression - csharp_style_throw_expression +dotnet_diagnostic.IDE0019.severity = warning # Use pattern matching to avoid as followed by a null check - csharp_style_pattern_matching_over_as_with_null_check +dotnet_diagnostic.IDE0020.severity = warning # Use pattern matching to avoid is check followed by a cast (with variable) - csharp_style_pattern_matching_over_is_with_cast_check +dotnet_diagnostic.IDE0033.severity = warning # Use explicitly provided tuple name - dotnet_style_explicit_tuple_names +dotnet_diagnostic.IDE0034.severity = warning # Simplify default expression - csharp_prefer_simple_default_expression +dotnet_diagnostic.IDE0036.severity = warning # Order modifiers - csharp_preferred_modifier_order +dotnet_diagnostic.IDE0038.severity = warning # Use pattern matching to avoid is check followed by a cast (without variable) - csharp_style_pattern_matching_over_is_with_cast_check +dotnet_diagnostic.IDE0040.severity = warning # Add accessibility modifiers - dotnet_style_require_accessibility_modifiers +dotnet_diagnostic.IDE0044.severity = warning # Add readonly modifier - dotnet_style_readonly_field +dotnet_diagnostic.IDE0048.severity = suggestion # Add parentheses for clarity - dotnet_style_parentheses_in_* +dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references - dotnet_style_predefined_type_for_* +dotnet_diagnostic.IDE0055.severity = warning # Fix formatting +dotnet_diagnostic.IDE0059.severity = warning # Remove unnecessary value assignment - csharp_style_unused_value_assignment_preference +dotnet_diagnostic.IDE0060.severity = warning # Remove unused parameter - dotnet_code_quality_unused_parameters +dotnet_diagnostic.IDE0065.severity = warning # using directive placement - csharp_using_directive_placement +dotnet_diagnostic.IDE0130.severity = warning # Namespace does not match folder structure - dotnet_style_namespace_match_folder +dotnet_diagnostic.IDE0150.severity = warning # Prefer 'null' check over type check - csharp_style_prefer_null_check_over_type_check +dotnet_diagnostic.IDE0161.severity = warning # Use file-scoped namespace - csharp_style_namespace_declarations +dotnet_diagnostic.IDE0170.severity = warning # Simplify property pattern - csharp_style_prefer_extended_property_pattern +dotnet_diagnostic.IDE0200.severity = warning # Remove unnecessary lambda expression - csharp_style_prefer_method_group_conversion +dotnet_diagnostic.IDE0220.severity = warning # Add explicit cast in foreach loop - dotnet_style_prefer_foreach_explicit_cast_in_source +dotnet_diagnostic.IDE0250.severity = warning # Struct can be made 'readonly' - csharp_style_prefer_readonly_struct +dotnet_diagnostic.IDE0251.severity = warning # Member can be made 'readonly' - csharp_style_prefer_readonly_struct_member +dotnet_diagnostic.IDE0260.severity = warning # Use pattern matching - csharp_style_pattern_matching_over_as_with_null_check +dotnet_diagnostic.IDE1005.severity = warning # Use conditional delegate call - csharp_style_conditional_delegate_call + +# These are undocumented as they are for experimental analyzers but can be found in Roslyn sources: +# https://github.com/dotnet/roslyn/blob/b3dc95ebc77bcdf064617c3c4a85d1da0ea911ac/src/Analyzers/Core/Analyzers/IDEDiagnosticIds.cs#L211-L219 +dotnet_diagnostic.IDE2000.severity = warning # dotnet_style_allow_multiple_blank_lines_experimental +dotnet_diagnostic.IDE2002.severity = warning # csharp_style_allow_blank_lines_between_consecutive_braces_experimental +dotnet_diagnostic.IDE2003.severity = warning # dotnet_style_allow_statement_immediately_after_block_experimental +dotnet_diagnostic.IDE2004.severity = warning # csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental +dotnet_diagnostic.IDE2005.severity = warning # csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental + +# Others +dotnet_diagnostic.IDE0002.severity = warning # Simplify member access +dotnet_diagnostic.IDE0004.severity = warning # Remove unnecessary cast +dotnet_diagnostic.IDE0005.severity = warning # Remove unnecessary import +dotnet_diagnostic.IDE0070.severity = warning # Use 'System.HashCode.Combine' +dotnet_diagnostic.IDE0082.severity = warning # Convert typeof to nameof +dotnet_diagnostic.IDE0110.severity = warning # Remove unnecessary discard +dotnet_diagnostic.IDE0120.severity = warning # Simplify LINQ expression - Where followed by Any, First, Last, Count etc. without a predicate +dotnet_diagnostic.IDE0240.severity = warning # Nullable directive is redundant +dotnet_diagnostic.IDE0241.severity = warning # Nullable directive is unnecessary + +######################################################### +# Code quality - Design +######################################################### +# Do not declare visible fields +dotnet_diagnostic.CA1051.severity = warning +dotnet_diagnostic.CA1051.api_surface = all + +dotnet_diagnostic.CA1067.severity = warning # Override Equals when implementing IEquatable +dotnet_diagnostic.CA1068.severity = warning # CancellationToken parameters must come last + +# Do not declare event fields as virtual +dotnet_diagnostic.CA1070.severity = warning +dotnet_diagnostic.CA1070.api_surface = all + +######################################################### +# Code quality - Globalization +######################################################### +dotnet_diagnostic.CA1304.severity = warning # Specify CultureInfo +dotnet_diagnostic.CA1305.severity = warning # Specify IFormatProvider +dotnet_diagnostic.CA1310.severity = warning # Specify StringComparison for correctness + +######################################################### +# Code quality - Mantainability +######################################################### +dotnet_diagnostic.CA1507.severity = warning # Use nameof in place of string + +######################################################### +# Code quality - Performance +######################################################### +dotnet_diagnostic.CA1854.severity = warning # Prefer the IDictionary.TryGetValue(TKey, out TValue) method + +######################################################### +# Code quality - Reliability +######################################################### +dotnet_diagnostic.CA2016.severity = warning # Forward the CancellationToken parameter to methods that take one +dotnet_diagnostic.CA2012.severity = warning # Use ValueTasks correctly + +######################################################### +# Code quality - Usage +######################################################### +dotnet_diagnostic.CA2208.severity = warning # Instantiate argument exceptions correctly +dotnet_diagnostic.CA2211.severity = warning # Non-constant fields should not be visible +dotnet_diagnostic.CA2215.severity = warning # Dispose methods should call base class dispose +dotnet_diagnostic.CA2241.severity = warning # Provide correct arguments to formatting methods +dotnet_diagnostic.CA2242.severity = warning # Test for NaN correctly +dotnet_diagnostic.CA2244.severity = warning # Do not duplicate indexed element initializations +dotnet_diagnostic.CA2246.severity = warning # Do not assign a symbol and its member in the same statement +dotnet_diagnostic.CA2248.severity = warning # Provide correct enum argument to Enum.HasFlag +dotnet_diagnostic.CA2251.severity = warning # Use String.Equals over String.Compare +dotnet_diagnostic.CA2253.severity = warning # Named placeholders should not be numeric values (logging) +dotnet_diagnostic.CA2254.severity = warning # Template should be a static expression (logging) + +######################################################### +# Microsoft.VisualStudio.Threading.Analyzers +######################################################### +dotnet_diagnostic.VSTHRD003.severity = none # Avoid awaiting foreign Tasks (https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD003.md) +dotnet_diagnostic.VSTHRD012.severity = none # Provide JoinableTaskFactory where allowed (https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD012.md) +dotnet_diagnostic.VSTHRD100.severity = error # Avoid async void methods (https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD100.md) +dotnet_diagnostic.VSTHRD103.severity = none # Call async methods when in an async method - produces false positives with EF Core (https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD103.md) +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_prefer_system_threading_lock = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_throw_expression = true:suggestion +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent +csharp_prefer_static_anonymous_function = true:suggestion +csharp_prefer_static_local_function = true:suggestion +csharp_style_prefer_readonly_struct_member = true:suggestion +csharp_style_prefer_readonly_struct = true:suggestion +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:silent +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent +csharp_style_conditional_delegate_call = true:suggestion + +[*Builder{s,}.cs] # Apply to SomethingBuilder.cs as well as SomethingBuilders.cs +dotnet_diagnostic.IDE0003.severity = none # Allow this. qualification in builder types + +[*Tests{.*,}.cs] # Apply to SomethingTests.cs as well as SomethingTests.Part.cs +# Do not check for Async suffix in tests +dotnet_diagnostic.VSTHRD200.severity = none # Use Async suffix for async methods \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6dd9634..71fd6c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,12 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' + + - name: Install dotnet-format + run: dotnet tool install -g dotnet-format + + - name: Check code format + run: dotnet format --no-restore --verify-no-changes - name: Restore dependencies run: dotnet restore diff --git a/fixed-issues.json b/fixed-issues.json new file mode 100644 index 0000000..d8cb283 --- /dev/null +++ b/fixed-issues.json @@ -0,0 +1,7274 @@ +[ + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "bc32bfd4-d4ac-4eea-b11e-3db5154170b4" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "93bc939e-0308-4f3d-ae59-93a592e9b2db" + }, + "FileName": "NodeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0870c5ba-8152-4c5f-bc26-d8d5b81fc3ca" + }, + "FileName": "RelationMemberTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "64f601f5-8bac-46ba-bd1e-8684a16941c1" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "bc37fab0-a749-4a7d-9f29-f46b231045c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "c3031663-ae75-478f-aa99-e3adebfa9fa0" + }, + "FileName": "OsmReaderSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmReaderSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "a04f610e-1457-4b4b-b98a-691565cd4db7" + }, + "FileName": "OsmWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "c2de3379-b0ab-475a-8616-3a1e6d29a97e" + }, + "FileName": "PbfWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "be122f27-6289-4e52-b503-0bd9a3b24a4b" + }, + "FileName": "NodeInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/NodeInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d6a88c59-9b64-45e2-a2a4-2a6a3508265d" + }, + "FileName": "RelationInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/RelationInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "3494aece-9bea-496b-bc18-d63be00115bf" + }, + "FileName": "RelationMemberInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/RelationMemberInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "3fe9b312-d096-4829-ba34-67c2374b3390" + }, + "FileName": "TagTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8ac04eca-7311-492d-9d50-22aeeecfc006" + }, + "FileName": "WayInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/WayInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "52bb6d4b-3328-4e1f-8fbd-66b263062c57" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "52bb6d4b-3328-4e1f-8fbd-66b263062c57" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "67ad1dd5-5964-4a9a-bedf-26c7e226456c" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 38, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 62, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 106, + "CharNumber": 13, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 110, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 114, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 118, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 122, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 126, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "40b32acd-4560-4165-83e5-1a2b3eb1c8a4" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 130, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 41, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 190, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 327, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 328, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 400, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 401, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 482, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 481, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 531, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 530, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 580, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 579, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 629, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 628, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 649, + "CharNumber": 106, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 649, + "CharNumber": 117, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "52009b7b-a8dd-4b4d-a9bb-2d9edc3b0063" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 26, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "efb5d85f-724a-44d0-a28d-d25be59e22dc" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 356, + "CharNumber": 98, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "efb5d85f-724a-44d0-a28d-d25be59e22dc" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 356, + "CharNumber": 109, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 133, + "CharNumber": 13, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 137, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 141, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 145, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 149, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 153, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "ce3eb91d-566b-4882-aac7-be031ebeb09f" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 157, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "56817a13-5005-47ae-aa04-81de12d6f097" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 8, + "CharNumber": 29, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "56817a13-5005-47ae-aa04-81de12d6f097" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 29, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "56817a13-5005-47ae-aa04-81de12d6f097" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 10, + "CharNumber": 29, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "56817a13-5005-47ae-aa04-81de12d6f097" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 29, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "72d7030b-75ea-4aa5-8828-e7b5be2bed4a" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 36, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "812bac79-24fa-4fc0-a7c1-d986ca4690a4" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "812bac79-24fa-4fc0-a7c1-d986ca4690a4" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "812bac79-24fa-4fc0-a7c1-d986ca4690a4" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "812bac79-24fa-4fc0-a7c1-d986ca4690a4" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "812bac79-24fa-4fc0-a7c1-d986ca4690a4" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "71a7208d-3728-4eb4-b648-c65f1d819869" + }, + "Id": "8415e92a-6983-476c-af5b-b8bb9ba852af" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 487, + "CharNumber": 38, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027expected\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "bc32bfd4-d4ac-4eea-b11e-3db5154170b4" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0870c5ba-8152-4c5f-bc26-d8d5b81fc3ca" + }, + "FileName": "RelationMemberTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 37, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 37, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "64f601f5-8bac-46ba-bd1e-8684a16941c1" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 13, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 13, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 37, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 468, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 15, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 19, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "357b0ac2-a5dc-4a91-937c-7862f8ede1bb" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "3fe9b312-d096-4829-ba34-67c2374b3390" + }, + "FileName": "TagTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagTests.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "357b0ac2-a5dc-4a91-937c-7862f8ede1bb" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "357b0ac2-a5dc-4a91-937c-7862f8ede1bb" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "357b0ac2-a5dc-4a91-937c-7862f8ede1bb" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "64f601f5-8bac-46ba-bd1e-8684a16941c1" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "64f601f5-8bac-46ba-bd1e-8684a16941c1" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "64f601f5-8bac-46ba-bd1e-8684a16941c1" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 90, + "CharNumber": 46, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "e0437398-81ae-4d1a-81bd-709217687aac" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 15, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 19, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 10, + "CharNumber": 11, + "DiagnosticId": "IDE0130", + "FormatDescription": "warning IDE0130: Namespace \u0022Tests.SpatialLite.Osm.Geometries\u0022 does not match folder structure, expected \u0022Tests.SpatialLite.Osm\u0022" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 126, + "CharNumber": 84, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 6, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 167, + "CharNumber": 86, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 144, + "CharNumber": 29, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027target\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 155, + "CharNumber": 29, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027target\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 89, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 110, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 95, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 104, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 111, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 126, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 197, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 250, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 258, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 266, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 389, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 340, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 172, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 181, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 206, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 215, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 224, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 233, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 242, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 275, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 284, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 293, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 302, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 311, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 320, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 329, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 351, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 352, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 364, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 365, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 377, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "fada21b7-db63-4faf-8028-2119ddf28398" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 378, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 13, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 13, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 29, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0fca1f3b-9472-47e1-8ccb-9174d1393d36" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 99, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 26, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 548, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 161, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 175, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 217, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 203, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 231, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 245, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 259, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 301, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 287, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 315, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 329, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 343, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 357, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 371, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 385, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 399, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 414, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 429, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 445, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 498, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 499, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 500, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 510, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 511, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 523, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 524, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 536, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "7b485e90-2b34-47b2-9791-517335508481" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 537, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "0870c5ba-8152-4c5f-bc26-d8d5b81fc3ca" + }, + "FileName": "RelationMemberTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "bc32bfd4-d4ac-4eea-b11e-3db5154170b4" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "bc32bfd4-d4ac-4eea-b11e-3db5154170b4" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 28, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027entityM\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 212, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "1d33d565-9db7-4987-82c1-941c348333b8" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 221, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 95, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 26, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 378, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 117, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027read\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 317, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 313, + "CharNumber": 13, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027aaa\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 196, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 187, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 214, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 232, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 223, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 250, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 259, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 268, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 277, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 286, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 295, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 340, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 341, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 353, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 354, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 366, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "863e8e60-96f1-4ec8-bd60-df4a6d9ad360" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 367, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "63cda3c8-68fc-40f5-8028-1317f3eb65c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 445, + "CharNumber": 35, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027result\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 99, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 26, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 460, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 100, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 138, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 164, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 199, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 225, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 212, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 260, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 286, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 299, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 312, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 349, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 364, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 379, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 410, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 411, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 412, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 422, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 423, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 435, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 436, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 448, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9651ad0a-44e9-4a86-b71a-2f644e240066" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 449, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "93bc939e-0308-4f3d-ae59-93a592e9b2db" + }, + "FileName": "NodeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 11, + "DiagnosticId": "IDE0130", + "FormatDescription": "warning IDE0130: Namespace \u0022Tests.SpatialLite.Osm.Geometry\u0022 does not match folder structure, expected \u0022Tests.SpatialLite.Osm.Geometries\u0022" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "93bc939e-0308-4f3d-ae59-93a592e9b2db" + }, + "FileName": "NodeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "bc37fab0-a749-4a7d-9f29-f46b231045c0" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "a67f1e23-3df1-4b1f-8e1f-31f076301c74" + }, + "FileName": "AssemblyInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Properties/AssemblyInfo.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 106, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 67, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 77, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "8d1ab9ca-9bba-4528-89f6-b145c7dd2270" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 83, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 170, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 65, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 69, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 80, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 88, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 101, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 109, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 122, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 130, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 143, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "8c7cafa4-e754-449f-a37c-07982ce3bdb3" + }, + "Id": "5e65b245-7f22-4157-a80e-40f79ededc84" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 36, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "8c7cafa4-e754-449f-a37c-07982ce3bdb3" + }, + "Id": "481a65ce-e8b7-4bb4-9c43-19432d870a35" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 18, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027result\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "8c7cafa4-e754-449f-a37c-07982ce3bdb3" + }, + "Id": "481a65ce-e8b7-4bb4-9c43-19432d870a35" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 415, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "8c7cafa4-e754-449f-a37c-07982ce3bdb3" + }, + "Id": "493926ca-4277-4a81-9597-648e581b2597" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 354, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "56cdf2f5-5363-4b78-9022-64b088cf1991" + }, + "Id": "d89817ed-fdd4-4d31-a1d8-873e23250557" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 39, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027args\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "52009b7b-a8dd-4b4d-a9bb-2d9edc3b0063" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 30, + "DiagnosticId": "CA2211", + "FormatDescription": "warning CA2211: Non-constant fields should not be visible" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "afad0e2f-a3b1-4308-bac6-4338a03bbeaf" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 28, + "DiagnosticId": "CA2211", + "FormatDescription": "warning CA2211: Non-constant fields should not be visible" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 175, + "CharNumber": 37, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027WktReader.ParseGeometryTaggedText(WktTokensBuffer)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 701, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027WktReader.Expect(TokenType, WktTokensBuffer)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "e17dd4ca-3729-40c0-bbde-6a5ac2e5c5f2" + }, + "Id": "e7233b69-2233-4c56-bfef-0bbd562fdda6" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 720, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027WktReader.Expect(string, WktTokensBuffer)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "f5c02abf-1e71-4b6a-b132-781ff554bd31" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 23, + "DiagnosticId": "CA1051", + "FormatDescription": "warning CA1051: Do not declare visible instance fields" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "f5c02abf-1e71-4b6a-b132-781ff554bd31" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 19, + "DiagnosticId": "CA1051", + "FormatDescription": "warning CA1051: Do not declare visible instance fields" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "f5c02abf-1e71-4b6a-b132-781ff554bd31" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 17, + "DiagnosticId": "CA1051", + "FormatDescription": "warning CA1051: Do not declare visible instance fields" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "77a4ef26-a24b-4770-8bf4-cbbd8d9faba8" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 86, + "CharNumber": 23, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method Write passes \u0027Entity.Metadata.User cannot be null.\u0027 as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method\u0027s parameter names. Note that the provided parameter name should have the exact casing as declared on the method." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "edb0e786-ea3d-462d-9fa5-57ff3adb8dc8" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 19, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method .ctor passes \u0027Parameter \u0027key\u0027 can\u0027t be null.\u0027 as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method\u0027s parameter names. Note that the provided parameter name should have the exact casing as declared on the method." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "edb0e786-ea3d-462d-9fa5-57ff3adb8dc8" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 33, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method .ctor passes \u0027Parameter \u0027value\u0027 can\u0027t be null.\u0027 as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method\u0027s parameter names. Note that the provided parameter name should have the exact casing as declared on the method." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "87f54854-56dd-479e-8950-69bbdd4e0246" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 230, + "CharNumber": 50, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmXmlWriter.WriteRelation(RelationInfo)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "87f54854-56dd-479e-8950-69bbdd4e0246" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 268, + "CharNumber": 49, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmXmlWriter.WriteMetadata(EntityMetadata)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "87f54854-56dd-479e-8950-69bbdd4e0246" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 269, + "CharNumber": 51, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027DateTime.ToString(string)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmXmlWriter.WriteMetadata(EntityMetadata)\u0027 with a call to \u0027DateTime.ToString(string, IFormatProvider)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "9608afb3-f9b1-4700-98eb-949370e03fb8" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 107, + "CharNumber": 45, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027RelationMember.FromRelationMemberInfo(RelationMemberInfo, IEntityCollection\u003CIOsmGeometry\u003E, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "1db3f4b4-ebed-4410-820e-a6c3bb75c293" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 112, + "CharNumber": 49, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Way.FromWayInfo(WayInfo, IEntityCollection\u003CIOsmGeometry\u003E, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "2cd44d1c-833e-46db-9906-ea3dc07acf03" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 101, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027TagsCollection.Add(Tag)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "2cd44d1c-833e-46db-9906-ea3dc07acf03" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027TagsCollection.GetTag(string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "2cd44d1c-833e-46db-9906-ea3dc07acf03" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 37, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027TagsCollection.GetTag(string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "c2c28496-5280-47df-b525-69a9c43259b7" + }, + "FileName": "OsmGeometryDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs", + "FileChanges": [ + { + "LineNumber": 54, + "CharNumber": 57, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmGeometryDatabase.Load(IOsmReader, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "c2c28496-5280-47df-b525-69a9c43259b7" + }, + "FileName": "OsmGeometryDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs", + "FileChanges": [ + { + "LineNumber": 82, + "CharNumber": 53, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmGeometryDatabase.Load(IOsmReader, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d4ffe564-7b3a-4eef-97e5-ce8cf40b3465" + }, + "Id": "96f17232-e6d4-41be-bfca-0c02bd160f9e" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 251, + "CharNumber": 49, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027PbfReader.ProcessOsmHeader(OsmHeader)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.XmlOsmWriterWritesFilesCompatibleWithOsmosis()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "9db43cf8-62ef-4b26-a668-9e7243cbdf3f" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.XmlOsmReaderReadsFilesCreatedByOsmosis()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_NoDenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_DenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 50, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_NoDenseDeflateCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 64, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_DenseDeflate()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 87, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 108, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseDeflate()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 129, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_DenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "d95b7e5f-5f52-464b-a0d7-a3592f4d8dde" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 150, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_DenseDeflate()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "5a2fda55-e67b-4ccd-911f-3f653ab3c9e7" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 116, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 116, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 148, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Empty instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5cb25fe8-3013-415a-a68c-f5b2f2a2cb80" + }, + "Id": "4912a107-841e-4f3d-afee-799cf0c3dfaa" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 158, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "08da9533-1a49-45f5-9d2b-7d7a4ab8d3f8" + }, + "Id": "0da41dc6-843a-4974-9d00-56bcb7fd2657" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 307, + "CharNumber": 52, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027GpxReader.InitializeReader()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "8c7cafa4-e754-449f-a37c-07982ce3bdb3" + }, + "Id": "070e8087-eef4-4eef-831a-4158c41cde83" + }, + "FileName": "XDocumentExtensions.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 21, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027XDocumentExtensions.XMLCompare(XElement, XElement)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "8c7cafa4-e754-449f-a37c-07982ce3bdb3" + }, + "Id": "070e8087-eef4-4eef-831a-4158c41cde83" + }, + "FileName": "XDocumentExtensions.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 45, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027XDocumentExtensions.XMLCompare(XElement, XElement)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "56cdf2f5-5363-4b78-9022-64b088cf1991" + }, + "Id": "d89817ed-fdd4-4d31-a1d8-873e23250557" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 34, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.Main(string[])\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "56cdf2f5-5363-4b78-9022-64b088cf1991" + }, + "Id": "d89817ed-fdd4-4d31-a1d8-873e23250557" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 53, + "CharNumber": 27, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.DoTest(Action, string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "56cdf2f5-5363-4b78-9022-64b088cf1991" + }, + "Id": "d89817ed-fdd4-4d31-a1d8-873e23250557" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 58, + "CharNumber": 27, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.DoTest(Action, string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "56cdf2f5-5363-4b78-9022-64b088cf1991" + }, + "Id": "d89817ed-fdd4-4d31-a1d8-873e23250557" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 66, + "CharNumber": 31, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.DoTest(Action, string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + } +] \ No newline at end of file diff --git a/issues.json b/issues.json new file mode 100644 index 0000000..e0171f7 --- /dev/null +++ b/issues.json @@ -0,0 +1,28874 @@ +[ + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 6, + "DiagnosticId": "WHITESPACE", + "FormatDescription": "Fix whitespace formatting. Replace 8 characters with \u0027\\r\\n\\r\\n\\s\\s\\s\\s\u0027." + }, + { + "LineNumber": 36, + "CharNumber": 1, + "DiagnosticId": "WHITESPACE", + "FormatDescription": "Fix whitespace formatting. Replace 2 characters with \u0027\\s\\s\\s\\s\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "a55d525e-168e-422a-9293-36fd45d37f51" + }, + "FileName": "GpxMetadata.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpxMetadata.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 2, + "DiagnosticId": "WHITESPACE", + "FormatDescription": "Fix whitespace formatting. Replace 6 characters with \u0027\\r\\n\\s\\s\\s\\s\u0027." + }, + { + "LineNumber": 11, + "CharNumber": 1, + "DiagnosticId": "WHITESPACE", + "FormatDescription": "Fix whitespace formatting. Replace 61 characters with \u0027\\s\\s\\s\\s///\\sGets\\sor\\ssets\\sthe\\sname\\sof\\sthe\\sentity\\r\\n\\s\\s\\s\\s///\\s\u003C/summary\u003E\\r\\n\u0027." + }, + { + "LineNumber": 13, + "CharNumber": 1, + "DiagnosticId": "WHITESPACE", + "FormatDescription": "Fix whitespace formatting. Replace 2 characters with \u0027\\s\\s\\s\\s\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "75041a3b-4d43-4707-a335-0901e5f60cc5" + }, + "FileName": "Euclidean2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6e12caee-c6aa-477f-a73c-10dab5336ee1" + }, + "FileName": "Euclidean2DLocator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "e892f746-e2c3-4394-ab91-2847a6088566" + }, + "FileName": "CoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/CoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "3dc4c961-d6f5-4238-aab2-9e9524dcaa71" + }, + "FileName": "Geometry.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Geometry.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "11bae556-c9ec-49db-a791-9f5367cddbeb" + }, + "FileName": "GeometryCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/GeometryCollection.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "f827447e-c54e-414f-8f5f-fd08f1e8ad5f" + }, + "FileName": "LineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/LineString.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "06efe365-b64f-4c1a-98a4-2e9e2c28dc59" + }, + "FileName": "MultiLineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/MultiLineString.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "274d8bc9-4826-4280-b046-fec01a65b8a3" + }, + "FileName": "MultiPoint.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/MultiPoint.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "8c24d6c7-94fb-49ac-a33e-32b2f4ae3949" + }, + "FileName": "MultiPolygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/MultiPolygon.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "bdf84ed1-ddb5-4bf9-b6f0-08a96daa9011" + }, + "FileName": "Point.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Point.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "b2e10966-f98a-47c4-af38-e91db2be3ee9" + }, + "FileName": "ReadOnlyCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9b283f59-4990-42c7-bc8a-d4762c88444e" + }, + "FileName": "OsmGeometryDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "61ba3949-455c-49f9-8b6c-af74267480ca" + }, + "FileName": "Relation.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Relation.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1f21c98c-72d4-4006-819e-fddebed6c524" + }, + "FileName": "WayCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9583e21f-9041-4bca-b05e-175c194f14d7" + }, + "FileName": "IOsmWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/IOsmWriter.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "db77dd80-1c2d-48f3-8462-f958863200a7" + }, + "FileName": "OsmHeader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/OsmHeader.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "3d3894b8-7c71-4d06-8efc-ea998754890f" + }, + "FileName": "PbfDenseMetadata.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfDenseMetadata.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dda5c3a0-e514-4779-8301-d291881e183d" + }, + "FileName": "PbfDenseNodes.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfDenseNodes.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "8d8a63cf-0610-4369-ad77-9e7403f4eed5" + }, + "FileName": "PbfNode.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfNode.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "63989854-a73c-4226-9a22-c1e02f44bbe4" + }, + "FileName": "PbfRelation.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfRelation.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "cd7cd8e2-a488-41cd-839a-452e6c8eac2c" + }, + "FileName": "PbfWay.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfWay.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "0a6d9449-8710-4958-879e-bf3de80731e7" + }, + "FileName": "PrimitiveBlock.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PrimitiveBlock.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "17a434a2-e27e-4513-af92-0ea693a767df" + }, + "FileName": "PrimitiveGroup.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PrimitiveGroup.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dcf6636b-91f3-4dc2-9526-68018cf31a00" + }, + "FileName": "StringTable.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/StringTable.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4df70cec-104e-413c-912d-08ba1e533f53" + }, + "FileName": "OsmEntityInfoDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmEntityInfoDatabase.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "6a150094-33df-4fa8-bb5c-8f9541dfd546" + }, + "FileName": "Euclidean2DCalculatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "2f66a141-11fb-4594-9a50-754aab7acd30" + }, + "FileName": "Euclidean2DLocatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "812f3ecb-7dfb-4792-bd59-4b2ec6b17c78" + }, + "FileName": "Sphere2DCalculatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Sphere2DCalculatorTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a919bc18-1560-466b-9f62-9d14fd785b93" + }, + "FileName": "CoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "078f4d47-a4db-4a77-be70-902102fd42f3" + }, + "FileName": "ReadOnlyCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "33a3b8da-40ae-4b0b-8aa2-9307f6605a09" + }, + "FileName": "WkbWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "e6c95d9e-be28-4a4f-a6ea-e3bf3a4dbbd3" + }, + "FileName": "WktTokensBufferTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1455b65b-a7c8-44da-add6-ed8d29df7dab" + }, + "FileName": "WktWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "d241403d-67a8-468f-8d15-94a931784386" + }, + "FileName": "MeasurementsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/MeasurementsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1a79cfbb-a729-4a79-975d-30676deba772" + }, + "FileName": "TopologyTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/TopologyTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "fe6e73f1-3cc8-4c9a-923e-e9a61ab1d637" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "ce33ccbc-5f31-4f98-9621-96fedc016dd9" + }, + "FileName": "NodeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "6e82c77f-c724-4056-85b5-8c81f0f54980" + }, + "FileName": "RelationMemberTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "08b15a22-fb75-4e43-8cd7-c960954c519c" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9b25f26f-0a00-4d89-8884-080e787f94c5" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "ee78d45e-19f3-493d-bfd0-56c0f3b03f63" + }, + "FileName": "OsmReaderSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmReaderSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "48c800d5-26f4-44b1-b0c0-3a2b1ba2aa01" + }, + "FileName": "OsmWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "3cd2c787-e010-4610-8f2a-c94cce0dc70b" + }, + "FileName": "PbfWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "52576f7c-dc5c-4a2b-8fd0-cab97bd3bf11" + }, + "FileName": "NodeInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/NodeInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5653253b-9d63-4c59-a567-caa32e7e7dc3" + }, + "FileName": "RelationInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/RelationInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "bb70de32-1d46-4daf-bf58-44106c265dee" + }, + "FileName": "RelationMemberInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/RelationMemberInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "1bd755f7-d2da-4e31-a6c4-9eb7feabfc1f" + }, + "FileName": "TagTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5b4b319e-8745-4323-8c0c-e87db9ec5d15" + }, + "FileName": "WayInfoTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/WayInfoTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "8c562c79-f037-4ee8-98a9-d617d01e4d76" + }, + "FileName": "GpsPoint.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpsPoint.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "782b100c-f1fd-4d23-bd15-3f461a09f58c" + }, + "FileName": "GpsTrackBase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "a4e63528-c667-442a-9c1c-8f8b3947fc1c" + }, + "FileName": "GpxPoint.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpxPoint.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "973d1dfe-2d78-48b2-a954-9ca80ff393f3" + }, + "FileName": "GpxTrack.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpxTrack.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "7ee37872-480a-4a4a-9663-4dac76ca63a5" + }, + "FileName": "IGpsPoint.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IGpsPoint.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "a1ad78cb-15de-4246-b26f-7466e49810c0" + }, + "FileName": "GpsTrackBaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "dcc11bef-e730-4d04-bee0-458157278b25" + }, + "FileName": "GpxFixHelperTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxFixHelperTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "456cb2e4-a93f-49fd-9808-58ce57d0eefa" + }, + "FileName": "GpxLinkTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxLinkTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "743331fd-7ef9-4cca-9fd5-8dc08aab5929" + }, + "FileName": "GpxMetadataTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxMetadataTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "40a28b68-592b-4eca-b580-253cc1d44b66" + }, + "FileName": "GpxRouteTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxRouteTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "28afdc35-2c53-41c4-907f-5e4e2980aa63" + }, + "FileName": "GpxTrackSegmentTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxTrackSegmentTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "1a292658-a968-40dd-96db-a51059999192" + }, + "FileName": "GpxDocumentTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/GpxDocumentTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "2e1d2b36-7e46-4cf8-b1c4-7a0868a9792f" + }, + "FileName": "GpxReaderSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f04a8e8e-2bad-4e56-a6af-b306af78fdfb" + }, + "FileName": "GpxWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IMPORTS", + "FormatDescription": "Fix imports ordering." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 407, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "1cfb33c2-1c3d-4ce8-8bbe-f2dbe4bfae5a" + }, + "FileName": "WkbWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 62, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 68, + "CharNumber": 24, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 79, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 83, + "CharNumber": 47, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 104, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 121, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "83cb8cbd-c53c-4724-9cf8-9fe84d313796" + }, + "FileName": "Topology.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Topology.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 13, + "DiagnosticId": "IDE0016", + "FormatDescription": "warning IDE0016: Null check can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 24, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 166, + "CharNumber": 32, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 49, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 40, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 58, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 133, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 150, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 166, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 207, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 260, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 270, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 270, + "CharNumber": 60, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 292, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 297, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 297, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 297, + "CharNumber": 83, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 271, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 308, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 313, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 314, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 315, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 316, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 271, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 336, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 272, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 341, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 342, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 343, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 344, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 272, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 365, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 369, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 274, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 385, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 411, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 389, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 415, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 393, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 274, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 419, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 423, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 275, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 275, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 276, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 276, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 277, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 277, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 254, + "CharNumber": 9, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "f827447e-c54e-414f-8f5f-fd08f1e8ad5f" + }, + "FileName": "LineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/LineString.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "f827447e-c54e-414f-8f5f-fd08f1e8ad5f" + }, + "FileName": "LineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/LineString.cs", + "FileChanges": [ + { + "LineNumber": 69, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "f827447e-c54e-414f-8f5f-fd08f1e8ad5f" + }, + "FileName": "LineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/LineString.cs", + "FileChanges": [ + { + "LineNumber": 120, + "CharNumber": 24, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "f827447e-c54e-414f-8f5f-fd08f1e8ad5f" + }, + "FileName": "LineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/LineString.cs", + "FileChanges": [ + { + "LineNumber": 120, + "CharNumber": 42, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "f827447e-c54e-414f-8f5f-fd08f1e8ad5f" + }, + "FileName": "LineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/LineString.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "e892f746-e2c3-4394-ab91-2847a6088566" + }, + "FileName": "CoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/CoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 30, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6386a667-7f7e-4d86-83c3-3c0d8e684bf9" + }, + "FileName": "WktTokensBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktTokensBuffer.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6386a667-7f7e-4d86-83c3-3c0d8e684bf9" + }, + "FileName": "WktTokensBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktTokensBuffer.cs", + "FileChanges": [ + { + "LineNumber": 74, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6386a667-7f7e-4d86-83c3-3c0d8e684bf9" + }, + "FileName": "WktTokensBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktTokensBuffer.cs", + "FileChanges": [ + { + "LineNumber": 140, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 24, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 183, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 188, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 206, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 213, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 230, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 267, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 280, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 287, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 331, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 338, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 358, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 363, + "CharNumber": 21, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 380, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 387, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 405, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 410, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 426, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 433, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 451, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 456, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 472, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 479, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 79, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 117, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 121, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 125, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 129, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 133, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 137, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 244, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 251, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 304, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 309, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 314, + "CharNumber": 21, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 496, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 501, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 111, + "CharNumber": 13, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 119, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 123, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 131, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 135, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "81c2a7a7-e75f-4023-ab79-a0ed61a8d087" + }, + "FileName": "WktWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktWriter.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 13, + "DiagnosticId": "IDE0016", + "FormatDescription": "warning IDE0016: Null check can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 32, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 24, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 24, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 59, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 94, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 222, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 223, + "CharNumber": 34, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 224, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 240, + "CharNumber": 20, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 246, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 304, + "CharNumber": 25, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 310, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 311, + "CharNumber": 29, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 326, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 327, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 333, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 336, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 339, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 360, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 361, + "CharNumber": 42, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 362, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 378, + "CharNumber": 25, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 384, + "CharNumber": 29, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 399, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 400, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 406, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 409, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 412, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 459, + "CharNumber": 22, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 465, + "CharNumber": 26, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 480, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 481, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 487, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 490, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 493, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 514, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 515, + "CharNumber": 54, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 516, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 529, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 530, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 536, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 539, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 542, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 563, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 564, + "CharNumber": 44, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 565, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 578, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 579, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 585, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 588, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 591, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 612, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 613, + "CharNumber": 48, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 614, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 627, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 628, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 634, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 637, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 640, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 70, + "CharNumber": 27, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 104, + "CharNumber": 27, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 144, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 148, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 152, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 156, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 164, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 168, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 188, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 195, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 198, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 201, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 263, + "CharNumber": 22, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 266, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 268, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 276, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 278, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 284, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 286, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 433, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 435, + "CharNumber": 47, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 443, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 661, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 664, + "CharNumber": 31, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 670, + "CharNumber": 35, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 674, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 192, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 191, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 329, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 330, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 402, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 403, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 484, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 483, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 533, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 532, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 581, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 582, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 630, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 631, + "CharNumber": 14, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 651, + "CharNumber": 117, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 651, + "CharNumber": 106, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 770, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 74, + "CharNumber": 13, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 108, + "CharNumber": 13, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 24, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 205, + "CharNumber": 24, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 246, + "CharNumber": 31, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 259, + "CharNumber": 47, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 305, + "CharNumber": 35, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 325, + "CharNumber": 35, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 345, + "CharNumber": 35, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 39, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 94, + "CharNumber": 27, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 140, + "CharNumber": 20, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 222, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 226, + "CharNumber": 48, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 227, + "CharNumber": 53, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 228, + "CharNumber": 50, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 229, + "CharNumber": 53, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 230, + "CharNumber": 58, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 231, + "CharNumber": 55, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 232, + "CharNumber": 61, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 279, + "CharNumber": 44, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 284, + "CharNumber": 48, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 365, + "CharNumber": 35, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 358, + "CharNumber": 98, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027is3D\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 358, + "CharNumber": 109, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027isMeasured\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 156, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 391, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 98, + "CharNumber": 13, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0bd6c64a-e9a9-4971-a701-aa9b0ed31c31" + }, + "FileName": "WkbReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbReader.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 13, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 195, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 213, + "CharNumber": 32, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 214, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 225, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 226, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 236, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 237, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 254, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 258, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 270, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 274, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 285, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 289, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 90, + "CharNumber": 17, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 112, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 9, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 135, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 139, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 143, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 147, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 155, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 159, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 300, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 304, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 315, + "CharNumber": 28, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 319, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 35, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 112, + "CharNumber": 42, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 133, + "CharNumber": 13, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 137, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 141, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 145, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 149, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 153, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6db61c6d-6054-4957-a1eb-100449f96e32" + }, + "FileName": "WkbWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriter.cs", + "FileChanges": [ + { + "LineNumber": 157, + "CharNumber": 18, + "DiagnosticId": "IDE0038", + "FormatDescription": "warning IDE0038: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 42, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 69, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 138, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 181, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 168, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 185, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "9c0f1362-ce6d-43e7-8456-4165c1ef6993" + }, + "FileName": "Measurements.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Measurements.cs", + "FileChanges": [ + { + "LineNumber": 202, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 23, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 76, + "CharNumber": 67, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 76, + "CharNumber": 136, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 32, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 65, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 57, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 70, + "CharNumber": 28, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 71, + "CharNumber": 28, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 25, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 84, + "CharNumber": 32, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 85, + "CharNumber": 32, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 93, + "CharNumber": 24, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 124, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 124, + "CharNumber": 71, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "0b19eb46-963f-4865-aa40-210e95a55408" + }, + "FileName": "Sphere2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 124, + "CharNumber": 130, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "8c24d6c7-94fb-49ac-a33e-32b2f4ae3949" + }, + "FileName": "MultiPolygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/MultiPolygon.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 22, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "274d8bc9-4826-4280-b046-fec01a65b8a3" + }, + "FileName": "MultiPoint.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/MultiPoint.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 22, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "06efe365-b64f-4c1a-98a4-2e9e2c28dc59" + }, + "FileName": "MultiLineString.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/MultiLineString.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 22, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "36b2b417-5fab-4089-a485-5eefe1f681d0" + }, + "FileName": "WktTokenizer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktTokenizer.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 16, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "36b2b417-5fab-4089-a485-5eefe1f681d0" + }, + "FileName": "WktTokenizer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktTokenizer.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 31, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "36b2b417-5fab-4089-a485-5eefe1f681d0" + }, + "FileName": "WktTokenizer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktTokenizer.cs", + "FileChanges": [ + { + "LineNumber": 46, + "CharNumber": 31, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 9, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 100, + "CharNumber": 9, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 28, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 170, + "CharNumber": 25, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 180, + "CharNumber": 17, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 158, + "CharNumber": 17, + "DiagnosticId": "IDE0251", + "FormatDescription": "warning IDE0251: Member can be made \u0027readonly\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 91, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 102, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 105, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 113, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 121, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 129, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 150, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 182, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 182, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 161, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 183, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 183, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 161, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 162, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 162, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 163, + "CharNumber": 15, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 163, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "b2e10966-f98a-47c4-af38-e91db2be3ee9" + }, + "FileName": "ReadOnlyCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "b2e10966-f98a-47c4-af38-e91db2be3ee9" + }, + "FileName": "ReadOnlyCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 29, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "b2e10966-f98a-47c4-af38-e91db2be3ee9" + }, + "FileName": "ReadOnlyCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 47, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "b2e10966-f98a-47c4-af38-e91db2be3ee9" + }, + "FileName": "ReadOnlyCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 107, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "b2e10966-f98a-47c4-af38-e91db2be3ee9" + }, + "FileName": "ReadOnlyCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 119, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 29, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 64, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 64, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 84, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 84, + "CharNumber": 77, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 93, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "59e94908-8bbd-4609-92a9-732619b952ff" + }, + "FileName": "Polygon.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Polygon.cs", + "FileChanges": [ + { + "LineNumber": 93, + "CharNumber": 41, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "bdf84ed1-ddb5-4bf9-b6f0-08a96daa9011" + }, + "FileName": "Point.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Point.cs", + "FileChanges": [ + { + "LineNumber": 106, + "CharNumber": 29, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "bdf84ed1-ddb5-4bf9-b6f0-08a96daa9011" + }, + "FileName": "Point.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/Point.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 22, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "11bae556-c9ec-49db-a791-9f5367cddbeb" + }, + "FileName": "GeometryCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Geometries/GeometryCollection.cs", + "FileChanges": [ + { + "LineNumber": 102, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "1cfb33c2-1c3d-4ce8-8bbe-f2dbe4bfae5a" + }, + "FileName": "WkbWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "1cfb33c2-1c3d-4ce8-8bbe-f2dbe4bfae5a" + }, + "FileName": "WkbWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WkbWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "75041a3b-4d43-4707-a335-0901e5f60cc5" + }, + "FileName": "Euclidean2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 38, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "75041a3b-4d43-4707-a335-0901e5f60cc5" + }, + "FileName": "Euclidean2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 68, + "CharNumber": 24, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "75041a3b-4d43-4707-a335-0901e5f60cc5" + }, + "FileName": "Euclidean2DCalculator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 24, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6e12caee-c6aa-477f-a73c-10dab5336ee1" + }, + "FileName": "Euclidean2DLocator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs", + "FileChanges": [ + { + "LineNumber": 83, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "6e12caee-c6aa-477f-a73c-10dab5336ee1" + }, + "FileName": "Euclidean2DLocator.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs", + "FileChanges": [ + { + "LineNumber": 213, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e255aaa0-569d-4345-aff5-11faa2924be1" + }, + "FileName": "OsmReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6549a1e4-5d6e-49f3-9765-a3a636b695b2" + }, + "FileName": "OsmWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6549a1e4-5d6e-49f3-9765-a3a636b695b2" + }, + "FileName": "OsmWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1c19696f-4747-43d7-8113-0efa1f90773e" + }, + "FileName": "Blob.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/Blob.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2967dede-101a-4e2d-b848-66e15c186cf1" + }, + "FileName": "BlobHeader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/BlobHeader.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "90271839-641d-4acb-8fb6-bbcc65b6941e" + }, + "FileName": "HeaderBBox.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/HeaderBBox.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ed31c426-be9f-45bd-a79f-e9968a81be2c" + }, + "FileName": "PbfChangeset.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfChangeset.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2c9b7d1e-fcb1-4a11-a445-4bea51335ec8" + }, + "FileName": "PbfMetadata.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfMetadata.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "8d8a63cf-0610-4369-ad77-9e7403f4eed5" + }, + "FileName": "PbfNode.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PbfNode.cs", + "FileChanges": [ + { + "LineNumber": 49, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "17a434a2-e27e-4513-af92-0ea693a767df" + }, + "FileName": "PrimitiveGroup.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/PrimitiveGroup.cs", + "FileChanges": [ + { + "LineNumber": 43, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b8a3cdb7-18ed-4524-be2a-65d62749cf8e" + }, + "FileName": "IOsmEntity.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IOsmEntity.cs", + "FileChanges": [ + { + "LineNumber": 29, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "790fc7ee-02b0-4833-871c-f43e3b55dbc5" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "790fc7ee-02b0-4833-871c-f43e3b55dbc5" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "790fc7ee-02b0-4833-871c-f43e3b55dbc5" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 74, + "CharNumber": 9, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "790fc7ee-02b0-4833-871c-f43e3b55dbc5" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 13, + "DiagnosticId": "IDE0016", + "FormatDescription": "warning IDE0016: Null check can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 25, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 239, + "CharNumber": 28, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 38, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 39, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 54, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 43, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 59, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 60, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 129, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 77, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 130, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 131, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 104, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 109, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 140, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 141, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 159, + "CharNumber": 55, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 52, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 161, + "CharNumber": 62, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 170, + "CharNumber": 41, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 182, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 193, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 198, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 210, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 222, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 268, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 226, + "CharNumber": 18, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 278, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 310, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 312, + "CharNumber": 37, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 316, + "CharNumber": 32, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 336, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 355, + "CharNumber": 32, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 392, + "CharNumber": 42, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 394, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 441, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 443, + "CharNumber": 32, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 489, + "CharNumber": 41, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 491, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 544, + "CharNumber": 46, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 546, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 623, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 32, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 29, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 298, + "CharNumber": 44, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 374, + "CharNumber": 44, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 398, + "CharNumber": 29, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 413, + "CharNumber": 42, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 437, + "CharNumber": 35, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 462, + "CharNumber": 52, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027blobHeader\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 86, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027blobHeader\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 24, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027blobHeader\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 83, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 84, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 87, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 52, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 93, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 94, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 133, + "CharNumber": 55, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 135, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 140, + "CharNumber": 25, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 264, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 265, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 266, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 267, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 296, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 351, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 411, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 460, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 516, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 477, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 135, + "CharNumber": 17, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 38, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 111, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 72, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e706747f-7094-40bc-8b57-92e721ada5ab" + }, + "FileName": "EntityInfoBuffer.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 46, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 23, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 53, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 54, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 93, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 110, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 120, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 98, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 125, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 126, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 100, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 145, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 147, + "CharNumber": 55, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 173, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 192, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 175, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 194, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 197, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 218, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 220, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 223, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 278, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 38, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 39, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 40, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 75, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 52, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 53, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 78, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 54, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 81, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 135, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 180, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 137, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 197, + "CharNumber": 47, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 252, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 150, + "CharNumber": 37, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 254, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 200, + "CharNumber": 46, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 271, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 274, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 371, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 385, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 399, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 413, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 427, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 493, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2cc464a-3a13-4fbc-9101-5cf4ff4c873d" + }, + "FileName": "OsmXmlReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReader.cs", + "FileChanges": [ + { + "LineNumber": 441, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 31, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 46, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 48, + "CharNumber": 53, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 104, + "CharNumber": 13, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "d93febf5-07f8-42c1-8d0b-2cf9fefdb713" + }, + "FileName": "EntityCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/EntityCollection.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 33, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "d93febf5-07f8-42c1-8d0b-2cf9fefdb713" + }, + "FileName": "EntityCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/EntityCollection.cs", + "FileChanges": [ + { + "LineNumber": 179, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "d93febf5-07f8-42c1-8d0b-2cf9fefdb713" + }, + "FileName": "EntityCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/EntityCollection.cs", + "FileChanges": [ + { + "LineNumber": 73, + "CharNumber": 20, + "DiagnosticId": "IDE0034", + "FormatDescription": "warning IDE0034: \u0027default\u0027 expression can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 24, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 94, + "CharNumber": 24, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 24, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 62, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 62, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 62, + "CharNumber": 57, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 122, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 87, + "CharNumber": 44, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 124, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 129, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 92, + "CharNumber": 43, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 94, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 97, + "CharNumber": 48, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 150, + "CharNumber": 42, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 41, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 152, + "CharNumber": 46, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 169, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 176, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 177, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 187, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 188, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 204, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 232, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 241, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 246, + "CharNumber": 29, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 251, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 263, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "fd467f97-f041-4336-86a2-fa0c1b865545" + }, + "FileName": "OsmDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmDatabase.cs", + "FileChanges": [ + { + "LineNumber": 102, + "CharNumber": 20, + "DiagnosticId": "IDE0034", + "FormatDescription": "warning IDE0034: \u0027default\u0027 expression can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 71, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 76, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 78, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 79, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 83, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 233, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 214, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 216, + "CharNumber": 23, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 217, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 249, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4df70cec-104e-413c-912d-08ba1e533f53" + }, + "FileName": "OsmEntityInfoDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/OsmEntityInfoDatabase.cs", + "FileChanges": [ + { + "LineNumber": 38, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027entityInfo\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9b283f59-4990-42c7-bc8a-d4762c88444e" + }, + "FileName": "OsmGeometryDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027entityInfo\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 25, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 26, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 43, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 46, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "c967d511-0963-4099-818b-b16d8b6cb586" + }, + "FileName": "WayInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/WayInfo.cs", + "FileChanges": [ + { + "LineNumber": 49, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 25, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 39, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 40, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 43, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "2e5216cc-780b-4887-a941-7a9078c23b6a" + }, + "FileName": "RelationInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationInfo.cs", + "FileChanges": [ + { + "LineNumber": 46, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 25, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 26, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 40, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 43, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "60f88480-5c5a-4c33-ae76-ddeb43a54546" + }, + "FileName": "NodeInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/NodeInfo.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9c145b6e-cdcd-4088-affc-ac76fb269122" + }, + "FileName": "PbfWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9c145b6e-cdcd-4088-affc-ac76fb269122" + }, + "FileName": "PbfWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9c145b6e-cdcd-4088-affc-ac76fb269122" + }, + "FileName": "PbfWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 35, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9c145b6e-cdcd-4088-affc-ac76fb269122" + }, + "FileName": "PbfWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dcf6636b-91f3-4dc2-9526-68018cf31a00" + }, + "FileName": "StringTable.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/StringTable.cs", + "FileChanges": [ + { + "LineNumber": 46, + "CharNumber": 26, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dcf6636b-91f3-4dc2-9526-68018cf31a00" + }, + "FileName": "StringTable.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/StringTable.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 26, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dcf6636b-91f3-4dc2-9526-68018cf31a00" + }, + "FileName": "StringTable.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/StringTable.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dcf6636b-91f3-4dc2-9526-68018cf31a00" + }, + "FileName": "StringTable.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/StringTable.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 44, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "dcf6636b-91f3-4dc2-9526-68018cf31a00" + }, + "FileName": "StringTable.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/Pbf/StringTable.cs", + "FileChanges": [ + { + "LineNumber": 42, + "CharNumber": 68, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ef3c9537-7987-4ad0-bbf0-233ef408344c" + }, + "FileName": "OsmXmlReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6549a1e4-5d6e-49f3-9765-a3a636b695b2" + }, + "FileName": "OsmWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6549a1e4-5d6e-49f3-9765-a3a636b695b2" + }, + "FileName": "OsmWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6549a1e4-5d6e-49f3-9765-a3a636b695b2" + }, + "FileName": "OsmWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 53, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e255aaa0-569d-4345-aff5-11faa2924be1" + }, + "FileName": "OsmReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "e255aaa0-569d-4345-aff5-11faa2924be1" + }, + "FileName": "OsmReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1f21c98c-72d4-4006-819e-fddebed6c524" + }, + "FileName": "WayCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1f21c98c-72d4-4006-819e-fddebed6c524" + }, + "FileName": "WayCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1f21c98c-72d4-4006-819e-fddebed6c524" + }, + "FileName": "WayCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 48, + "CharNumber": 20, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1f21c98c-72d4-4006-819e-fddebed6c524" + }, + "FileName": "WayCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 120, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "1f21c98c-72d4-4006-819e-fddebed6c524" + }, + "FileName": "WayCoordinateList.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs", + "FileChanges": [ + { + "LineNumber": 108, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 79, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 90, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 49, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 137, + "CharNumber": 27, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 146, + "CharNumber": 16, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 13, + "DiagnosticId": "IDE0016", + "FormatDescription": "warning IDE0016: Null check can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "61ba3949-455c-49f9-8b6c-af74267480ca" + }, + "FileName": "Relation.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Relation.cs", + "FileChanges": [ + { + "LineNumber": 40, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "61ba3949-455c-49f9-8b6c-af74267480ca" + }, + "FileName": "Relation.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Relation.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "8c82cb2b-4a9a-452b-8821-b64c8eb4e22e" + }, + "FileName": "Node.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Node.cs", + "FileChanges": [ + { + "LineNumber": 63, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "8c82cb2b-4a9a-452b-8821-b64c8eb4e22e" + }, + "FileName": "Node.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Node.cs", + "FileChanges": [ + { + "LineNumber": 64, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 25, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 5, + "DiagnosticId": "IDE0036", + "FormatDescription": "warning IDE0036: Modifiers are not ordered" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a919bc18-1560-466b-9f62-9d14fd785b93" + }, + "FileName": "CoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a919bc18-1560-466b-9f62-9d14fd785b93" + }, + "FileName": "CoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 13, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 22, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "078f4d47-a4db-4a77-be70-902102fd42f3" + }, + "FileName": "ReadOnlyCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 46, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 93, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "e6c95d9e-be28-4a4f-a6ea-e3bf3a4dbbd3" + }, + "FileName": "WktTokensBufferTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a19d9cbe-63ab-48c8-995b-bf4092d23997" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1455b65b-a7c8-44da-add6-ed8d29df7dab" + }, + "FileName": "WktWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1a79cfbb-a729-4a79-975d-30676deba772" + }, + "FileName": "TopologyTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/TopologyTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a19d9cbe-63ab-48c8-995b-bf4092d23997" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 13, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "87cfbca3-dd42-4f6e-af3c-234776b51604" + }, + "FileName": "GeometryCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 21, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "b4bd77b4-bea3-4a5c-ae52-00b1def3522e" + }, + "FileName": "LineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "078f4d47-a4db-4a77-be70-902102fd42f3" + }, + "FileName": "ReadOnlyCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 17, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "078f4d47-a4db-4a77-be70-902102fd42f3" + }, + "FileName": "ReadOnlyCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "078f4d47-a4db-4a77-be70-902102fd42f3" + }, + "FileName": "ReadOnlyCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 91, + "CharNumber": 46, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a919bc18-1560-466b-9f62-9d14fd785b93" + }, + "FileName": "CoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a919bc18-1560-466b-9f62-9d14fd785b93" + }, + "FileName": "CoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 3, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "a919bc18-1560-466b-9f62-9d14fd785b93" + }, + "FileName": "CoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 6, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "42eefee4-2f7c-49f0-87c0-de309a9bf817" + }, + "FileName": "PolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 25, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "98fd3393-6719-4fc5-976d-c9d63cec625a" + }, + "FileName": "EnvelopeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs", + "FileChanges": [ + { + "LineNumber": 8, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 12, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 12, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "03fbc7da-7f36-4a98-ad12-4c234f703254" + }, + "FileName": "CoordinateTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/API/CoordinateTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 33, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 33, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 26, + "CharNumber": 33, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 33, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 34, + "CharNumber": 33, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 10, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 122, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 166, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 185, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 204, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 215, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 234, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 257, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 280, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 299, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 314, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "27931d1c-9392-4a55-875e-91fc6703f1c1" + }, + "FileName": "WktWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 326, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "c79135f5-8b6b-4e94-9998-4c10d635d5da" + }, + "FileName": "PointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/PointTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "e6c95d9e-be28-4a4f-a6ea-e3bf3a4dbbd3" + }, + "FileName": "WktTokensBufferTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "e6c95d9e-be28-4a4f-a6ea-e3bf3a4dbbd3" + }, + "FileName": "WktTokensBufferTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs", + "FileChanges": [ + { + "LineNumber": 3, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "e6c95d9e-be28-4a4f-a6ea-e3bf3a4dbbd3" + }, + "FileName": "WktTokensBufferTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 35, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 162, + "CharNumber": 46, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 60, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 172, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 282, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 294, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 306, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 318, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 329, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 359, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 370, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 381, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 392, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 423, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 435, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 447, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 459, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 471, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 473, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 474, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 505, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 506, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 518, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 519, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 531, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 532, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 544, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 545, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 576, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 577, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 589, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 602, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 590, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 603, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 615, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 616, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 647, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 660, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 661, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 648, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 673, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 674, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 686, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 687, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 718, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 730, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 742, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 754, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 766, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 767, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 768, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "4b22d397-df07-407a-b859-18125cab97d1" + }, + "FileName": "WktReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 781, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "812f3ecb-7dfb-4792-bd59-4b2ec6b17c78" + }, + "FileName": "Sphere2DCalculatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Sphere2DCalculatorTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "6a150094-33df-4fa8-bb5c-8f9541dfd546" + }, + "FileName": "Euclidean2DCalculatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs", + "FileChanges": [ + { + "LineNumber": 6, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "6a150094-33df-4fa8-bb5c-8f9541dfd546" + }, + "FileName": "Euclidean2DCalculatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "6c755e2e-df55-4c6e-bd23-c2c2a9eb462b" + }, + "FileName": "TestDataReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Data/TestDataReader.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "6c755e2e-df55-4c6e-bd23-c2c2a9eb462b" + }, + "FileName": "TestDataReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Data/TestDataReader.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "6c755e2e-df55-4c6e-bd23-c2c2a9eb462b" + }, + "FileName": "TestDataReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Data/TestDataReader.cs", + "FileChanges": [ + { + "LineNumber": 6, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "2f66a141-11fb-4594-9a50-754aab7acd30" + }, + "FileName": "Euclidean2DLocatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "2f66a141-11fb-4594-9a50-754aab7acd30" + }, + "FileName": "Euclidean2DLocatorTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs", + "FileChanges": [ + { + "LineNumber": 10, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "57796c5e-de2b-4214-a41f-80399e87067e" + }, + "FileName": "MultiLineStringTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/MultiLineStringTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "19e8807d-4c98-4e82-aefb-f6bb0069fc9e" + }, + "FileName": "MultiPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/MultiPointTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "d6211e08-cdba-4914-a096-4fe70fc0e594" + }, + "FileName": "MultiPolygonTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Geometries/MultiPolygonTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "33a3b8da-40ae-4b0b-8aa2-9307f6605a09" + }, + "FileName": "WkbWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 3, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 6, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "161a23d8-4b92-47b0-9a2a-4cfd61e5c59c" + }, + "FileName": "WktTokenizerTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs", + "FileChanges": [ + { + "LineNumber": 8, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 131, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 138, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 146, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 153, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 161, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 168, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 176, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 183, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 191, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 198, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 206, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 213, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 221, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 228, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 236, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 243, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 251, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 258, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 266, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 272, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 280, + "CharNumber": 36, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 287, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 295, + "CharNumber": 36, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 302, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 310, + "CharNumber": 36, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 317, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 325, + "CharNumber": 36, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 332, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 340, + "CharNumber": 36, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 347, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 355, + "CharNumber": 36, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 362, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 370, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 377, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 385, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 392, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 400, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 407, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 415, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 422, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 430, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 445, + "CharNumber": 60, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 437, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 452, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 460, + "CharNumber": 60, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 475, + "CharNumber": 60, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 467, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 482, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 490, + "CharNumber": 60, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 505, + "CharNumber": 60, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 512, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 497, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 520, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 527, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 550, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 535, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 557, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 542, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 565, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 572, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 580, + "CharNumber": 51, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 587, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 595, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 602, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 610, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 617, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 625, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 632, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 640, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 647, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 655, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 662, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 670, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 677, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 685, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 692, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 700, + "CharNumber": 81, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 707, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 730, + "CharNumber": 30, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1ac0e051-9bfd-47f8-8416-6190a40d68c3" + }, + "FileName": "WkbWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 733, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1455b65b-a7c8-44da-add6-ed8d29df7dab" + }, + "FileName": "WktWriterSettingsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "99659a40-c898-4491-9b69-992f5153c0de" + }, + "FileName": "AssemblyInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/Properties/AssemblyInfo.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 109, + "CharNumber": 47, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 154, + "CharNumber": 47, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 162, + "CharNumber": 43, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 492, + "CharNumber": 38, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027expected\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 67, + "CharNumber": 33, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 72, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 78, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 79, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 84, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 87, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 33, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 191, + "CharNumber": 33, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 194, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 225, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 234, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 243, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 252, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 261, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 270, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 279, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 287, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 296, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 305, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 314, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 323, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 332, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 341, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 350, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 359, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 368, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 386, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 377, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 395, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 404, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 413, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 422, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 431, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 449, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 440, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 458, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 467, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 476, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 485, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 492, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 502, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 506, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 513, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 517, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 524, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 528, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 535, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 539, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 546, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 550, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 551, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 552, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 559, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 563, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 564, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 565, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 582, + "CharNumber": 33, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 585, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 572, + "CharNumber": 79, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 590, + "CharNumber": 43, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 593, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 577, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 598, + "CharNumber": 37, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 601, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 606, + "CharNumber": 43, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 609, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 614, + "CharNumber": 53, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 617, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 622, + "CharNumber": 47, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 625, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 644, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 649, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 654, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 664, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 674, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "951e0b6e-4f21-4fd2-84dc-78b3ec4934dc" + }, + "FileName": "WkbReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 684, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1a79cfbb-a729-4a79-975d-30676deba772" + }, + "FileName": "TopologyTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/TopologyTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "1a79cfbb-a729-4a79-975d-30676deba772" + }, + "FileName": "TopologyTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/TopologyTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fe4ad577-3e43-4491-a930-34ae6e986314" + }, + "Id": "d241403d-67a8-468f-8d15-94a931784386" + }, + "FileName": "MeasurementsTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Core/MeasurementsTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "fe6e73f1-3cc8-4c9a-923e-e9a61ab1d637" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "6e82c77f-c724-4056-85b5-8c81f0f54980" + }, + "FileName": "RelationMemberTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 37, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 18, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 37, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "08b15a22-fb75-4e43-8cd7-c960954c519c" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 13, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 13, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 37, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 468, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 15, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 19, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "e0ae6017-3f0b-422f-abb4-dd007ee045df" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 11, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "1bd755f7-d2da-4e31-a6c4-9eb7feabfc1f" + }, + "FileName": "TagTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagTests.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 1, + "DiagnosticId": "IDE2002", + "FormatDescription": "warning IDE2002: Consecutive braces must not have blank line between them" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "fe6e73f1-3cc8-4c9a-923e-e9a61ab1d637" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "fe6e73f1-3cc8-4c9a-923e-e9a61ab1d637" + }, + "FileName": "EntityCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 28, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027entityM\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 15, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 19, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 10, + "CharNumber": 11, + "DiagnosticId": "IDE0130", + "FormatDescription": "warning IDE0130: Namespace \u0022Tests.SpatialLite.Osm.Geometries\u0022 does not match folder structure, expected \u0022Tests.SpatialLite.Osm\u0022" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 126, + "CharNumber": 84, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 13, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 13, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 29, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5ae78cf4-0257-4e39-b1b4-7aca27f7651a" + }, + "FileName": "WayTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "08b15a22-fb75-4e43-8cd7-c960954c519c" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "08b15a22-fb75-4e43-8cd7-c960954c519c" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "08b15a22-fb75-4e43-8cd7-c960954c519c" + }, + "FileName": "WayCoordinateListTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs", + "FileChanges": [ + { + "LineNumber": 90, + "CharNumber": 46, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "27cedf72-3810-4942-9209-555f598d316d" + }, + "FileName": "RelationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "6e82c77f-c724-4056-85b5-8c81f0f54980" + }, + "FileName": "RelationMemberTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 6, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 167, + "CharNumber": 86, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 144, + "CharNumber": 29, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027target\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 155, + "CharNumber": 29, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027target\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 99, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 26, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 548, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 161, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 175, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 203, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 217, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 231, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 245, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 259, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 287, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 301, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 315, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 329, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 343, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 357, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 371, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 385, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 399, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 414, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 429, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 445, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 498, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 499, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 510, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 500, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 511, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 523, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 536, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 524, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "041be709-b2d9-4ea2-bc0e-d4041b6e1d88" + }, + "FileName": "PbfWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 537, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 95, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 26, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 378, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 117, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027read\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 313, + "CharNumber": 13, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027aaa\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 317, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 187, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 196, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 214, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 223, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 232, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 250, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 259, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 268, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 277, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 286, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 295, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 340, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 341, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 353, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 354, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 366, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "339d5df9-691d-43a8-9708-4735761019e0" + }, + "FileName": "PbfReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 367, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 99, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 26, + "DiagnosticId": "IDE1006", + "FormatDescription": "warning IDE1006: Naming rule violation: Prefix \u0027_\u0027 is not expected" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 460, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 100, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 138, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 164, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 199, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 212, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 225, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 260, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 273, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 286, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 299, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 312, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 349, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 364, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 379, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 410, + "CharNumber": 35, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 422, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 423, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 411, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 412, + "CharNumber": 39, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 435, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 436, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 448, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "999bbaa6-633c-4944-9b2c-1db0a5dd5fc8" + }, + "FileName": "OsmXmlWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 449, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 28, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 40, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 37, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 53, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 41, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 55, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 74, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 89, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 110, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 95, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 104, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 111, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 126, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 134, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 197, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 250, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 258, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 266, + "CharNumber": 37, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 389, + "CharNumber": 34, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 340, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 160, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 172, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 181, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 206, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 215, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 224, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 233, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 242, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 275, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 284, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 293, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 302, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 311, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 320, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 329, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 351, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 352, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 364, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 365, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 377, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "16834470-315c-4f1c-a472-a1464972b1cf" + }, + "FileName": "OsmXmlReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 378, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "e0ae6017-3f0b-422f-abb4-dd007ee045df" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "e0ae6017-3f0b-422f-abb4-dd007ee045df" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "e0ae6017-3f0b-422f-abb4-dd007ee045df" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 16, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "11ea7404-3f91-408c-be1c-b3aa8cd5eaeb" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 445, + "CharNumber": 35, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027result\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 11, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 212, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "06d6a29c-87d5-47c0-8c59-1f8036366368" + }, + "FileName": "TagsCollectionTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs", + "FileChanges": [ + { + "LineNumber": 221, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "ce33ccbc-5f31-4f98-9621-96fedc016dd9" + }, + "FileName": "NodeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs", + "FileChanges": [ + { + "LineNumber": 7, + "CharNumber": 11, + "DiagnosticId": "IDE0130", + "FormatDescription": "warning IDE0130: Namespace \u0022Tests.SpatialLite.Osm.Geometry\u0022 does not match folder structure, expected \u0022Tests.SpatialLite.Osm.Geometries\u0022" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "ce33ccbc-5f31-4f98-9621-96fedc016dd9" + }, + "FileName": "NodeTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs", + "FileChanges": [ + { + "LineNumber": 1, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9b25f26f-0a00-4d89-8884-080e787f94c5" + }, + "FileName": "OsmDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 4, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "b208a0be-f3d4-4af0-a1f5-f2cba8370aca" + }, + "FileName": "AssemblyInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Properties/AssemblyInfo.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 83, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 106, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 67, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 77, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "9ca07e01-4f6f-4a72-b6d8-9ccd5cce359e" + }, + "FileName": "PbfReaderPbfWriterComplianceTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 170, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 41, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 55, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 65, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 69, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 80, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 88, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 101, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 109, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 122, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 130, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 143, + "CharNumber": 40, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 151, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "0ad744fe-e747-45de-949e-d968b64ed7f3" + }, + "FileName": "GpxReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "6f69cd72-972c-4fa2-bd7a-90e442ee3f3a" + }, + "FileName": "GpxWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 10, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "6f69cd72-972c-4fa2-bd7a-90e442ee3f3a" + }, + "FileName": "GpxWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "782b100c-f1fd-4d23-bd15-3f461a09f58c" + }, + "FileName": "GpsTrackBase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 29, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "782b100c-f1fd-4d23-bd15-3f461a09f58c" + }, + "FileName": "GpsTrackBase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "782b100c-f1fd-4d23-bd15-3f461a09f58c" + }, + "FileName": "GpsTrackBase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs", + "FileChanges": [ + { + "LineNumber": 29, + "CharNumber": 61, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 46, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 23, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 17, + "CharNumber": 26, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 27, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 47, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 68, + "CharNumber": 52, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 97, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 125, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 99, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 164, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 166, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 190, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 224, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "864ee4fe-49f0-4e3a-8d81-7340671e570f" + }, + "FileName": "GpxWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriter.cs", + "FileChanges": [ + { + "LineNumber": 293, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 46, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 18, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 307, + "CharNumber": 52, + "DiagnosticId": "IDE0049", + "FormatDescription": "warning IDE0049: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 38, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 39, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 52, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 53, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 174, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 144, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 191, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 250, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 265, + "CharNumber": 21, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 267, + "CharNumber": 54, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 435, + "CharNumber": 14, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 96, + "CharNumber": 22, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027geometry\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 59, + "CharNumber": 13, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 74, + "CharNumber": 34, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 79, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 84, + "CharNumber": 31, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 101, + "CharNumber": 48, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 102, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "9935c514-43d8-4a3f-adda-a8a8088e3d43" + }, + "FileName": "GpxDocument.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/GpxDocument.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 45, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "0ad744fe-e747-45de-949e-d968b64ed7f3" + }, + "FileName": "GpxReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 9, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "0ad744fe-e747-45de-949e-d968b64ed7f3" + }, + "FileName": "GpxReaderSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReaderSettings.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "6f69cd72-972c-4fa2-bd7a-90e442ee3f3a" + }, + "FileName": "GpxWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 32, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "6f69cd72-972c-4fa2-bd7a-90e442ee3f3a" + }, + "FileName": "GpxWriterSettings.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxWriterSettings.cs", + "FileChanges": [ + { + "LineNumber": 52, + "CharNumber": 17, + "DiagnosticId": "IDE0003", + "FormatDescription": "warning IDE0003: Name can be simplified" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "a1ad78cb-15de-4246-b26f-7466e49810c0" + }, + "FileName": "GpsTrackBaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 20, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 12, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 16, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 22, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 22, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 21, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 35, + "CharNumber": 22, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "7f51c270-6f00-4c96-9232-2730079ff2b7" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 5, + "CharNumber": 14, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "7f51c270-6f00-4c96-9232-2730079ff2b7" + }, + "FileName": "PathHelper.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/PathHelper.cs", + "FileChanges": [ + { + "LineNumber": 9, + "CharNumber": 27, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 16, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 18, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 28, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 30, + "CharNumber": 21, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 35, + "CharNumber": 22, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 37, + "CharNumber": 14, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "435b570c-74cd-497e-a562-1b46b47dbe35" + }, + "FileName": "GpxWriterTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs", + "FileChanges": [ + { + "LineNumber": 356, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "f883b86e-0aed-4448-95dc-4a68f9989268" + }, + "FileName": "GpsPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "a1ad78cb-15de-4246-b26f-7466e49810c0" + }, + "FileName": "GpsTrackBaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs", + "FileChanges": [ + { + "LineNumber": 11, + "CharNumber": 20, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "a1ad78cb-15de-4246-b26f-7466e49810c0" + }, + "FileName": "GpsTrackBaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs", + "FileChanges": [ + { + "LineNumber": 59, + "CharNumber": 29, + "DiagnosticId": "IDE0004", + "FormatDescription": "warning IDE0004: Cast is redundant." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 12, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fccae18d-9538-4bcb-b2af-6d7a48366fed" + }, + "FileName": "GpxPointTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 12, + "DiagnosticId": "IDE0044", + "FormatDescription": "warning IDE0044: Make field readonly" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "3d76243d-5c8d-4297-909e-bd07ffb0d942" + }, + "FileName": "AssemblyInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/Properties/AssemblyInfo.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 63, + "CharNumber": 45, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 71, + "CharNumber": 45, + "DiagnosticId": "IDE0200", + "FormatDescription": "warning IDE0200: Lambda expression can be removed" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 78, + "CharNumber": 13, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027expectedCoordinate\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 90, + "CharNumber": 13, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027expectedCoordinate\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 135, + "CharNumber": 17, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027result\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 18, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027result\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 232, + "CharNumber": 25, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027segment\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 416, + "CharNumber": 20, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027testStream\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 132, + "CharNumber": 9, + "DiagnosticId": "IDE0019", + "FormatDescription": "warning IDE0019: Use pattern matching" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 13, + "CharNumber": 30, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 51, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 74, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 88, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 102, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 116, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 127, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 138, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 152, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 166, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 180, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 194, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 205, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 216, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 227, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 238, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 246, + "CharNumber": 17, + "DiagnosticId": "IDE0040", + "FormatDescription": "warning IDE0040: Accessibility modifiers required" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "e3c7e223-c84c-4bf5-ae92-c89ac0a37c0d" + }, + "FileName": "AssemblyInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Properties/AssemblyInfo.cs", + "FileChanges": [ + { + "LineNumber": 2, + "CharNumber": 1, + "DiagnosticId": "IDE0005", + "FormatDescription": "warning IDE0005: Using directive is unnecessary." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 92, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 106, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 142, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 156, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 170, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 184, + "CharNumber": 21, + "DiagnosticId": "IDE0059", + "FormatDescription": "warning IDE0059: Unnecessary assignment of a value to \u0027info\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 15, + "CharNumber": 31, + "DiagnosticId": "IDE0060", + "FormatDescription": "warning IDE0060: Remove unused parameter \u0027args\u0027" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "56fae660-ecaf-42fd-adfb-9f32141ad54f" + }, + "FileName": "Coordinate.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Coordinate.cs", + "FileChanges": [ + { + "LineNumber": 20, + "CharNumber": 30, + "DiagnosticId": "CA2211", + "FormatDescription": "warning CA2211: Non-constant fields should not be visible" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "a9cf4449-ac98-405b-8df4-5b595c9e0d90" + }, + "FileName": "Envelope.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/API/Envelope.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 28, + "DiagnosticId": "CA2211", + "FormatDescription": "warning CA2211: Non-constant fields should not be visible" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 177, + "CharNumber": 37, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027WktReader.ParseGeometryTaggedText(WktTokensBuffer)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 703, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027WktReader.Expect(TokenType, WktTokensBuffer)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "6150d930-52a3-4e28-bb18-c27eb4a7d9b1" + }, + "Id": "4f3cc011-fac2-4ba6-8ce0-6580df0d7072" + }, + "FileName": "WktReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Core/IO/WktReader.cs", + "FileChanges": [ + { + "LineNumber": 722, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027WktReader.Expect(string, WktTokensBuffer)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 24, + "CharNumber": 17, + "DiagnosticId": "CA1051", + "FormatDescription": "warning CA1051: Do not declare visible instance fields" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 14, + "CharNumber": 23, + "DiagnosticId": "CA1051", + "FormatDescription": "warning CA1051: Do not declare visible instance fields" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "f066e82f-5fb1-43aa-9c14-0758097b22ef" + }, + "FileName": "RelationMemberInfo.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/RelationMemberInfo.cs", + "FileChanges": [ + { + "LineNumber": 19, + "CharNumber": 19, + "DiagnosticId": "CA1051", + "FormatDescription": "warning CA1051: Do not declare visible instance fields" + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "790fc7ee-02b0-4833-871c-f43e3b55dbc5" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 23, + "CharNumber": 19, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method .ctor passes \u0027Parameter \u0027key\u0027 can\u0027t be null.\u0027 as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method\u0027s parameter names. Note that the provided parameter name should have the exact casing as declared on the method." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "790fc7ee-02b0-4833-871c-f43e3b55dbc5" + }, + "FileName": "Tag.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Tag.cs", + "FileChanges": [ + { + "LineNumber": 33, + "CharNumber": 19, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method .ctor passes \u0027Parameter \u0027value\u0027 can\u0027t be null.\u0027 as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method\u0027s parameter names. Note that the provided parameter name should have the exact casing as declared on the method." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 105, + "CharNumber": 19, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method FromRelationMemberInfo passes parameter name \u0027info.MemberType cannot be EntityType.Unknown\u0027 as the message argument to a ArgumentException constructor. Replace this argument with a descriptive message and pass the parameter name in the correct position." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "777b09fb-7a53-42ae-8f72-7837741ff413" + }, + "FileName": "RelationMember.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/RelationMember.cs", + "FileChanges": [ + { + "LineNumber": 112, + "CharNumber": 45, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027RelationMember.FromRelationMemberInfo(RelationMemberInfo, IEntityCollection\u003CIOsmGeometry\u003E, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "6a147dd0-da76-46d1-9c1e-38f3ec75d284" + }, + "FileName": "PbfWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfWriter.cs", + "FileChanges": [ + { + "LineNumber": 86, + "CharNumber": 23, + "DiagnosticId": "CA2208", + "FormatDescription": "warning CA2208: Method Write passes \u0027Entity.Metadata.User cannot be null.\u0027 as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method\u0027s parameter names. Note that the provided parameter name should have the exact casing as declared on the method." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 230, + "CharNumber": 50, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmXmlWriter.WriteRelation(RelationInfo)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 268, + "CharNumber": 49, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmXmlWriter.WriteMetadata(EntityMetadata)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "ace06af5-1f63-41eb-a6d2-5f0706445ac9" + }, + "FileName": "OsmXmlWriter.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/OsmXmlWriter.cs", + "FileChanges": [ + { + "LineNumber": 269, + "CharNumber": 51, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027DateTime.ToString(string)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmXmlWriter.WriteMetadata(EntityMetadata)\u0027 with a call to \u0027DateTime.ToString(string, IFormatProvider)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "b916617b-0b40-4427-bc94-b7c906448b2a" + }, + "FileName": "Way.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/Way.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 49, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Way.FromWayInfo(WayInfo, IEntityCollection\u003CIOsmGeometry\u003E, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9b283f59-4990-42c7-bc8a-d4762c88444e" + }, + "FileName": "OsmGeometryDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs", + "FileChanges": [ + { + "LineNumber": 54, + "CharNumber": 57, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmGeometryDatabase.Load(IOsmReader, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "9b283f59-4990-42c7-bc8a-d4762c88444e" + }, + "FileName": "OsmGeometryDatabase.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs", + "FileChanges": [ + { + "LineNumber": 82, + "CharNumber": 53, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmGeometryDatabase.Load(IOsmReader, bool)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 101, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027TagsCollection.Add(Tag)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 178, + "CharNumber": 41, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027TagsCollection.GetTag(string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "4ee9a941-371e-4664-a937-7a69fe2ff122" + }, + "FileName": "TagsCollection.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/TagsCollection.cs", + "FileChanges": [ + { + "LineNumber": 189, + "CharNumber": 37, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027TagsCollection.GetTag(string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "45cfb199-ad09-4e89-ab78-843d68cf949a" + }, + "Id": "a2ef9fea-d4e5-4199-80ed-52f639fdde76" + }, + "FileName": "PbfReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Osm/IO/PbfReader.cs", + "FileChanges": [ + { + "LineNumber": 252, + "CharNumber": 49, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027PbfReader.ProcessOsmHeader(OsmHeader)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.XmlOsmReaderReadsFilesCreatedByOsmosis()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "5c68d624-0d8d-4d0c-ae65-bb4945c7ce1d" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 44, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.XmlOsmWriterWritesFilesCompatibleWithOsmosis()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 22, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_NoDenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 36, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_DenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 50, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_NoDenseDeflateCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 64, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfReaderReadsFilesCreatedByOsmosis_DenseDeflate()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 87, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 108, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseDeflate()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 129, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_DenseNoCompression()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "559fa06e-289e-4a3e-a933-18bf95a1ab2e" + }, + "FileName": "OsmosisIntegrationTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs", + "FileChanges": [ + { + "LineNumber": 150, + "CharNumber": 35, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027OsmosisIntegrationTests.PbfWriterWritesFilesCompatibleWithOsmosis_DenseDeflate()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 116, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 148, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Empty instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "f9dac0c2-638b-4e93-8ae2-f52ccfcd8536" + }, + "FileName": "OsmGeometryDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 158, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 103, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 113, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "9eee0014-67ab-4e4c-b8ca-2032046c589a" + }, + "Id": "07b2aff0-b3af-44f4-a0a0-4a0d7322d05e" + }, + "FileName": "OsmEntityInfoDatabaseTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs", + "FileChanges": [ + { + "LineNumber": 116, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "5f478633-eb8a-43ab-a663-12d84e8e34ca" + }, + "Id": "ce5abc5d-26c9-4cbd-a08f-2e40bddb633c" + }, + "FileName": "GpxReader.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/SpatialLite.Gps/IO/GpxReader.cs", + "FileChanges": [ + { + "LineNumber": 307, + "CharNumber": 52, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027GpxReader.InitializeReader()\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fac7b045-dc0d-49d2-a0b7-0b30c34597be" + }, + "FileName": "XDocumentExtensions.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 21, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027XDocumentExtensions.XMLCompare(XElement, XElement)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "fac7b045-dc0d-49d2-a0b7-0b30c34597be" + }, + "FileName": "XDocumentExtensions.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs", + "FileChanges": [ + { + "LineNumber": 31, + "CharNumber": 45, + "DiagnosticId": "CA1304", + "FormatDescription": "warning CA1304: The behavior of \u0027string.ToLower()\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027XDocumentExtensions.XMLCompare(XElement, XElement)\u0027 with a call to \u0027string.ToLower(CultureInfo)\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 166, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 196, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "fd8ab0d1-cef1-4bf7-8102-8de2b78edec8" + }, + "Id": "37c3a629-8a65-481f-8aba-1be88c985830" + }, + "FileName": "GpxReaderTests.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs", + "FileChanges": [ + { + "LineNumber": 390, + "CharNumber": 9, + "DiagnosticId": "xUnit2013", + "FormatDescription": "warning xUnit2013: Do not use Assert.Equal() to check for collection size. Use Assert.Single instead." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 45, + "CharNumber": 34, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.Main(string[])\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 53, + "CharNumber": 27, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.DoTest(Action, string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 58, + "CharNumber": 27, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.DoTest(Action, string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "3eb4de73-2a83-43bc-9cb9-63f383738370" + }, + "Id": "c3b2b23f-4ebc-4e90-9d0c-3f09535ee5cf" + }, + "FileName": "Program.cs", + "FilePath": "/home/runner/work/SpatialLITE/SpatialLITE/src/Benchmark.SpatialLite.Osm/Program.cs", + "FileChanges": [ + { + "LineNumber": 66, + "CharNumber": 31, + "DiagnosticId": "CA1305", + "FormatDescription": "warning CA1305: The behavior of \u0027string.Format(string, object)\u0027 could vary based on the current user\u0027s locale settings. Replace this call in \u0027Program.DoTest(Action, string)\u0027 with a call to \u0027string.Format(IFormatProvider, string, params object[])\u0027." + } + ] + } +] \ No newline at end of file diff --git a/src/Benchmark.SpatialLite.Osm/Program.cs b/src/Benchmark.SpatialLite.Osm/Program.cs index 0852d5d..26f9e9e 100644 --- a/src/Benchmark.SpatialLite.Osm/Program.cs +++ b/src/Benchmark.SpatialLite.Osm/Program.cs @@ -4,200 +4,251 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; - -namespace Benchmark.SpatialLite.Osm { - public class Program { - static List _entities; - - static void Main(string[] args) { - List> benchmarks = new List>(); - benchmarks.Add(new Tuple("XmlReader with metadata", TestXmlReaderSpeed)); - benchmarks.Add(new Tuple("XmlReader without metadata", TestXmlReaderSpeedWithoutMetadata)); - //benchmarks.Add(new Tuple("PbfReader (no compression) with metadata", TestPbfReaderSpeedNoDenseNoCompression)); - //benchmarks.Add(new Tuple("PbfReader (no compression) without metadata", TestPbfReaderSpeedNoDenseNoCompressionWithoutMetadata)); - //benchmarks.Add(new Tuple("PbfReader (dense, deflate) with metadata", TestPbfReaderSpeedDenseDeflate)); - //benchmarks.Add(new Tuple("PbfReader (dense, deflate) without metadata", TestPbfReaderSpeedDenseDeflateWithoutMetadata)); - - //LoadSourceData(); - //benchmarks.Add(new Tuple("XmlWriter with metadata", TestXmlWriterSpeed)); - //benchmarks.Add(new Tuple("XmlWriter without metadata", TestXmlWriterSpeedWithoutMetadata)); - //benchmarks.Add(new Tuple("PbfWriter (no compression) with metadata", TestPbfWriterSpeed)); - //benchmarks.Add(new Tuple("PbfWriter (no compression) without metadata", TestPbfWriterSpeedWithoutMetadata)); - //benchmarks.Add(new Tuple("PbfWritre (dense, deflate) with metadata", TestPbfWriterSpeedDenseDeflate)); - //benchmarks.Add(new Tuple("PbfWriter (dense, deflate) without metadata", TestPbfWriterSpeedDenseDeflateWithoutMetadata)); - - //benchmarks.Add(new Tuple("OsmGeometryDatabase.Load(PbfReader)", TestOsmGeometryDatabaseLoadFromPbfReader)); - //benchmarks.Add(new Tuple("OsmEntityInfoDatabase.Load(PbfReader)", TestOsmEntityInfoDatabaseLoadFromPbfReader)); - - Console.WriteLine("Benchmark.SpatialLite.Osm.IO requires 'test-file.osm', 'test-file.pbf' and 'test-file-dc.pbf' in 'TestFiles'folder"); - - using (var stream = new FileStream("Benchmark.SpatialLite.Osm.IO.log", FileMode.Create, FileAccess.Write)) { - using (TextWriter tw = new StreamWriter(stream)) { - foreach (var benchmark in benchmarks) { - long avgTime = avgTime = DoTest(benchmark.Item2, benchmark.Item1); - tw.WriteLine(string.Format("{0} ms \t\t{1}", avgTime, benchmark.Item1)); - } - } - } - } - - static long DoTest(Action testAction, string testName) { - Console.WriteLine(string.Format("Starting benchmark '{0}'", testName)); - - long totalTime = 0; - for (int i = 0; i < 10; i++) { - Console.Write(string.Format("Run ({0}/{1}) ...", i + 1, 10)); - Stopwatch watch = new Stopwatch(); - watch.Start(); - - testAction(); - - watch.Stop(); - totalTime += watch.ElapsedMilliseconds; - Console.WriteLine(string.Format("\t\t({0} ms)", watch.ElapsedMilliseconds)); - } - - Console.WriteLine(); - Console.WriteLine("Average runnig time: {0} ms\n", totalTime / 10); - return totalTime / 10; - } - - static void LoadSourceData() { - _entities = new List(); - - IEntityInfo info = null; - using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) { - while ((info = reader.Read()) != null) { - _entities.Add(info); - } - } - } - - static void TestXmlReaderSpeed() { - int entitiesRead = 0; - - IEntityInfo info = null; - using (OsmXmlReader reader = new OsmXmlReader("TestFiles\\test-file.osm", new OsmXmlReaderSettings() { ReadMetadata = true })) { - while ((info = reader.Read()) != null) { - entitiesRead++; - } - } - } - - static void TestXmlReaderSpeedWithoutMetadata() { - int entitiesRead = 0; - - IEntityInfo info = null; - using (OsmXmlReader reader = new OsmXmlReader("TestFiles\\test-file.osm", new OsmXmlReaderSettings() { ReadMetadata = false })) { - while ((info = reader.Read()) != null) { - entitiesRead++; - } - } - } - - static void TestXmlWriterSpeed() { - using (OsmXmlWriter writer = new OsmXmlWriter("TestFiles\\temp.osm", new OsmWriterSettings() { WriteMetadata = true })) { - foreach (var entity in _entities) { - writer.Write(entity); - } - } - } - - static void TestXmlWriterSpeedWithoutMetadata() { - using (OsmXmlWriter writer = new OsmXmlWriter("TestFiles\\temp.osm", new OsmWriterSettings() { WriteMetadata = false })) { - foreach (var entity in _entities) { - writer.Write(entity); - } - } - } - - static void TestPbfReaderSpeedNoDenseNoCompression() { - int entitiesRead = 0; - - IEntityInfo info = null; - using (PbfReader reader = new PbfReader("TestFiles\\test-file.pbf", new OsmReaderSettings() { ReadMetadata = true })) { - while ((info = reader.Read()) != null) { - entitiesRead++; - } - } - } - - static void TestPbfReaderSpeedNoDenseNoCompressionWithoutMetadata() { - int entitiesRead = 0; - - IEntityInfo info = null; - using (PbfReader reader = new PbfReader("TestFiles\\test-file.pbf", new OsmReaderSettings() { ReadMetadata = false })) { - while ((info = reader.Read()) != null) { - entitiesRead++; - } - } - } - - static void TestPbfReaderSpeedDenseDeflate() { - int entitiesRead = 0; - - IEntityInfo info = null; - using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) { - while ((info = reader.Read()) != null) { - entitiesRead++; - } - } - } - - static void TestPbfReaderSpeedDenseDeflateWithoutMetadata() { - int entitiesRead = 0; - - IEntityInfo info = null; - using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = false })) { - while ((info = reader.Read()) != null) { - entitiesRead++; - } - } - } - - static void TestPbfWriterSpeed() { - using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.None, UseDenseFormat = false })) { - foreach (var entity in _entities) { - writer.Write(entity); - } - } - } - - static void TestPbfWriterSpeedWithoutMetadata() { - using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = false, Compression = CompressionMode.None, UseDenseFormat = false })) { - foreach (var entity in _entities) { - writer.Write(entity); - } - } - } - - static void TestPbfWriterSpeedDenseDeflate() { - using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = true })) { - foreach (var entity in _entities) { - writer.Write(entity); - } - } - } - - static void TestPbfWriterSpeedDenseDeflateWithoutMetadata() { - using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = false, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = true })) { - foreach (var entity in _entities) { - writer.Write(entity); - } - } - } - - static void TestOsmGeometryDatabaseLoadFromPbfReader() { - using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) { - OsmGeometryDatabase db = OsmGeometryDatabase.Load(reader, true); - } - } - - static void TestOsmEntityInfoDatabaseLoadFromPbfReader() { - using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) { - OsmEntityInfoDatabase db = OsmEntityInfoDatabase.Load(reader); - } - } - } -} +using System.Globalization; +using System.IO; + +namespace Benchmark.SpatialLite.Osm; + +public class Program +{ + private static List _entities; + + private static void Main(string[] args) + { + List> benchmarks = new List>(); + benchmarks.Add(new Tuple("XmlReader with metadata", TestXmlReaderSpeed)); + benchmarks.Add(new Tuple("XmlReader without metadata", TestXmlReaderSpeedWithoutMetadata)); + //benchmarks.Add(new Tuple("PbfReader (no compression) with metadata", TestPbfReaderSpeedNoDenseNoCompression)); + //benchmarks.Add(new Tuple("PbfReader (no compression) without metadata", TestPbfReaderSpeedNoDenseNoCompressionWithoutMetadata)); + //benchmarks.Add(new Tuple("PbfReader (dense, deflate) with metadata", TestPbfReaderSpeedDenseDeflate)); + //benchmarks.Add(new Tuple("PbfReader (dense, deflate) without metadata", TestPbfReaderSpeedDenseDeflateWithoutMetadata)); + + //LoadSourceData(); + //benchmarks.Add(new Tuple("XmlWriter with metadata", TestXmlWriterSpeed)); + //benchmarks.Add(new Tuple("XmlWriter without metadata", TestXmlWriterSpeedWithoutMetadata)); + //benchmarks.Add(new Tuple("PbfWriter (no compression) with metadata", TestPbfWriterSpeed)); + //benchmarks.Add(new Tuple("PbfWriter (no compression) without metadata", TestPbfWriterSpeedWithoutMetadata)); + //benchmarks.Add(new Tuple("PbfWritre (dense, deflate) with metadata", TestPbfWriterSpeedDenseDeflate)); + //benchmarks.Add(new Tuple("PbfWriter (dense, deflate) without metadata", TestPbfWriterSpeedDenseDeflateWithoutMetadata)); + + //benchmarks.Add(new Tuple("OsmGeometryDatabase.Load(PbfReader)", TestOsmGeometryDatabaseLoadFromPbfReader)); + //benchmarks.Add(new Tuple("OsmEntityInfoDatabase.Load(PbfReader)", TestOsmEntityInfoDatabaseLoadFromPbfReader)); + + Console.WriteLine("Benchmark.SpatialLite.Osm.IO requires 'test-file.osm', 'test-file.pbf' and 'test-file-dc.pbf' in 'TestFiles'folder"); + + using (var stream = new FileStream("Benchmark.SpatialLite.Osm.IO.log", FileMode.Create, FileAccess.Write)) + { + using (TextWriter tw = new StreamWriter(stream)) + { + foreach (var benchmark in benchmarks) + { + long avgTime = avgTime = DoTest(benchmark.Item2, benchmark.Item1); + tw.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} ms \t\t{1}", avgTime, benchmark.Item1)); + } + } + } + } + + private static long DoTest(Action testAction, string testName) + { + Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "Starting benchmark '{0}'", testName)); + + long totalTime = 0; + for (int i = 0; i < 10; i++) + { + Console.Write(string.Format(CultureInfo.InvariantCulture, "Run ({0}/{1}) ...", i + 1, 10)); + Stopwatch watch = new Stopwatch(); + watch.Start(); + + testAction(); + + watch.Stop(); + totalTime += watch.ElapsedMilliseconds; + Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "\t\t({0} ms)", watch.ElapsedMilliseconds)); + } + + Console.WriteLine(); + Console.WriteLine("Average runnig time: {0} ms\n", totalTime / 10); + return totalTime / 10; + } + + private static void LoadSourceData() + { + _entities = new List(); + + IEntityInfo info = null; + using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) + { + while ((info = reader.Read()) != null) + { + _entities.Add(info); + } + } + } + + private static void TestXmlReaderSpeed() + { + int entitiesRead = 0; + using (OsmXmlReader reader = new OsmXmlReader("TestFiles\\test-file.osm", new OsmXmlReaderSettings() { ReadMetadata = true })) + { + + IEntityInfo info; + while ((info = reader.Read()) != null) + { + entitiesRead++; + } + } + } + + private static void TestXmlReaderSpeedWithoutMetadata() + { + int entitiesRead = 0; + using (OsmXmlReader reader = new OsmXmlReader("TestFiles\\test-file.osm", new OsmXmlReaderSettings() { ReadMetadata = false })) + { + + IEntityInfo info; + while ((info = reader.Read()) != null) + { + entitiesRead++; + } + } + } + + private static void TestXmlWriterSpeed() + { + using (OsmXmlWriter writer = new OsmXmlWriter("TestFiles\\temp.osm", new OsmWriterSettings() { WriteMetadata = true })) + { + foreach (var entity in _entities) + { + writer.Write(entity); + } + } + } + + private static void TestXmlWriterSpeedWithoutMetadata() + { + using (OsmXmlWriter writer = new OsmXmlWriter("TestFiles\\temp.osm", new OsmWriterSettings() { WriteMetadata = false })) + { + foreach (var entity in _entities) + { + writer.Write(entity); + } + } + } + + private static void TestPbfReaderSpeedNoDenseNoCompression() + { + int entitiesRead = 0; + using (PbfReader reader = new PbfReader("TestFiles\\test-file.pbf", new OsmReaderSettings() { ReadMetadata = true })) + { + + IEntityInfo info; + while ((info = reader.Read()) != null) + { + entitiesRead++; + } + } + } + + private static void TestPbfReaderSpeedNoDenseNoCompressionWithoutMetadata() + { + int entitiesRead = 0; + using (PbfReader reader = new PbfReader("TestFiles\\test-file.pbf", new OsmReaderSettings() { ReadMetadata = false })) + { + + IEntityInfo info; + while ((info = reader.Read()) != null) + { + entitiesRead++; + } + } + } + + private static void TestPbfReaderSpeedDenseDeflate() + { + int entitiesRead = 0; + using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) + { + + IEntityInfo info; + while ((info = reader.Read()) != null) + { + entitiesRead++; + } + } + } + + private static void TestPbfReaderSpeedDenseDeflateWithoutMetadata() + { + int entitiesRead = 0; + using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = false })) + { + + IEntityInfo info; + while ((info = reader.Read()) != null) + { + entitiesRead++; + } + } + } + + private static void TestPbfWriterSpeed() + { + using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.None, UseDenseFormat = false })) + { + foreach (var entity in _entities) + { + writer.Write(entity); + } + } + } + + private static void TestPbfWriterSpeedWithoutMetadata() + { + using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = false, Compression = CompressionMode.None, UseDenseFormat = false })) + { + foreach (var entity in _entities) + { + writer.Write(entity); + } + } + } + + private static void TestPbfWriterSpeedDenseDeflate() + { + using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = true })) + { + foreach (var entity in _entities) + { + writer.Write(entity); + } + } + } + + private static void TestPbfWriterSpeedDenseDeflateWithoutMetadata() + { + using (PbfWriter writer = new PbfWriter("TestFiles\\temp.pbf", new PbfWriterSettings() { WriteMetadata = false, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = true })) + { + foreach (var entity in _entities) + { + writer.Write(entity); + } + } + } + + private static void TestOsmGeometryDatabaseLoadFromPbfReader() + { + using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) + { + OsmGeometryDatabase db = OsmGeometryDatabase.Load(reader, true); + } + } + + private static void TestOsmEntityInfoDatabaseLoadFromPbfReader() + { + using (PbfReader reader = new PbfReader("TestFiles\\test-file-dc.pbf", new OsmReaderSettings() { ReadMetadata = true })) + { + OsmEntityInfoDatabase db = OsmEntityInfoDatabase.Load(reader); + } + } +} diff --git a/src/Benchmark.SpatialLite.Osm/Properties/AssemblyInfo.cs b/src/Benchmark.SpatialLite.Osm/Properties/AssemblyInfo.cs index 87088b7..81495aa 100644 --- a/src/Benchmark.SpatialLite.Osm/Properties/AssemblyInfo.cs +++ b/src/Benchmark.SpatialLite.Osm/Properties/AssemblyInfo.cs @@ -1,19 +1,18 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Benchmark.SpatialLite.Osm")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ebe5e8af-6eda-4967-ab80-df979d3dd720")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Benchmark.SpatialLite.Osm")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ebe5e8af-6eda-4967-ab80-df979d3dd720")] diff --git a/src/SpatialLite.Core/API/Coordinate.cs b/src/SpatialLite.Core/API/Coordinate.cs index 73780ab..7c290b8 100644 --- a/src/SpatialLite.Core/API/Coordinate.cs +++ b/src/SpatialLite.Core/API/Coordinate.cs @@ -1,169 +1,185 @@ using System; -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Represents a location in the coordinate space. +/// +/// +/// A Coordinate may include a M value. The M value allows an application to associate some measure with the Coordinate. +/// +public struct Coordinate : IEquatable +{ + /// - /// Represents a location in the coordinate space. + /// Represents an empty coordinate. /// /// - /// A Coordinate may include a M value. The M value allows an application to associate some measure with the Coordinate. + /// The empty coordinate has all coordinates equal to NaN. /// - public struct Coordinate : IEquatable { - - /// - /// Represents an empty coordinate. - /// - /// - /// The empty coordinate has all coordinates equal to NaN. - /// - public static Coordinate Empty = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - - /// - /// Initializes a new instance of the Coordinate struct with X, Y ordinates. - /// - /// X-coordinate value. - /// Y-coordinate value. - public Coordinate(double x, double y) { - X = x; - Y = y; - Z = double.NaN; - M = double.NaN; - } - - /// - /// Initializes a new instance of the Coordinate struct with X, Y, Z ordinates. - /// - /// X-coordinate value. - /// Y-coordinate value. - /// Z-coordinate value. - public Coordinate(double x, double y, double z) { - X = x; - Y = y; - Z = z; - M = double.NaN; - } - - /// - /// Initializes a new instance of the Coordinate struct with X, Y, Z ordinates and M value. - /// - /// X-coordinate value. - /// Y-coordinate value. - /// Z-coordinate value. - /// Measured value associated with the Coordinate. - public Coordinate(double x, double y, double z, double m) { - X = x; - Y = y; - Z = z; - M = m; - } - - /// - /// Gets the X-coordinate - /// - public double X { get; set; } - - /// - /// Gets the Y-coordinate - /// - public double Y { get; set; } - - /// - /// Gets the Z-coordinate - /// - public double Z { get; set; } - - /// - /// Gets the M value - /// - public double M { get; set; } - - /// - /// Gets a value indicating whether this coordinate has assigned coordinate. - /// - public bool Is3D { - get { - return !double.IsNaN(this.Z); - } - } - - /// - /// Gets a value indicating whether this coordinate has assigned value. - /// - public bool IsMeasured { - get { - return !double.IsNaN(this.M); - } - } - - /// - /// Determiens whether specific Coordinates values are equal - /// - /// Coordinate to compare - /// Coordinate to compare - /// true if the specified Coordinate values are equal; otherwise, false. - public static bool operator ==(Coordinate lhs, Coordinate rhs) { - return lhs.Equals(rhs); - } - - /// - /// Determiens whether specific Coordinate values are not equal - /// - /// Coordinate to compare - /// Coordinate to compare - /// true if the specified Coordinate values are not equal; otherwise, false. - public static bool operator !=(Coordinate lhs, Coordinate rhs) { - return !(lhs == rhs); - } - - /// - /// Returns a string that represents the current Coordinate. - /// - /// A string that represents the current Coordinate - public override string ToString() { - return string.Format(System.Globalization.CultureInfo.InvariantCulture, "[{0}; {1}; {2}, {3}]", this.X, this.Y, this.Z, this.M); - } - - /// - /// Determines whether specific object instance is equal to the current Coordinate. - /// - /// The object to compare with the current Coordinate - /// true if the specified object is equal to the current Coordinate; otherwise, false. - public override bool Equals(object obj) { - Coordinate? other = obj as Coordinate?; - if (other == null) { - return false; - } - - return this.Equals(other.Value); - } - - /// - /// Determines whether two Coordinate values are equal. - /// - /// The Coordinate to compare with the current Coordinate - /// true if the specified Coordinate is equal to the current Coordinate; otherwise, false. - public bool Equals(Coordinate other) { - return ((this.X == other.X) || (double.IsNaN(this.X) && double.IsNaN(other.X))) && - ((this.Y == other.Y) || (double.IsNaN(this.Y) && double.IsNaN(other.Y))) && - ((this.Z == other.Z) || (double.IsNaN(this.Z) && double.IsNaN(other.Z))) && - ((this.M == other.M) || (double.IsNaN(this.M) && double.IsNaN(other.M))); - } - - /// - /// Serves as a hash function for the Coordinate structure. - /// - /// Hash code for current Coordinate value. - public override int GetHashCode() { - return X.GetHashCode() + 7 * Y.GetHashCode() + 13 * Z.GetHashCode() + 17 * M.GetHashCode(); - } - - /// - /// Determines whether two Coordinate are equal in 2D space. - /// - /// The Coordinate to compare with the current Coordinate - /// true if the specified Coordinate is equal to the current Coordinate in 2D space otherwise, false. - public bool Equals2D(Coordinate other) { - return ((this.X == other.X) || (double.IsNaN(this.X) && double.IsNaN(other.X))) && - ((this.Y == other.Y) || (double.IsNaN(this.Y) && double.IsNaN(other.Y))); - } - } + public static readonly Coordinate Empty = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + + /// + /// Initializes a new instance of the Coordinate struct with X, Y ordinates. + /// + /// X-coordinate value. + /// Y-coordinate value. + public Coordinate(double x, double y) + { + X = x; + Y = y; + Z = double.NaN; + M = double.NaN; + } + + /// + /// Initializes a new instance of the Coordinate struct with X, Y, Z ordinates. + /// + /// X-coordinate value. + /// Y-coordinate value. + /// Z-coordinate value. + public Coordinate(double x, double y, double z) + { + X = x; + Y = y; + Z = z; + M = double.NaN; + } + + /// + /// Initializes a new instance of the Coordinate struct with X, Y, Z ordinates and M value. + /// + /// X-coordinate value. + /// Y-coordinate value. + /// Z-coordinate value. + /// Measured value associated with the Coordinate. + public Coordinate(double x, double y, double z, double m) + { + X = x; + Y = y; + Z = z; + M = m; + } + + /// + /// Gets the X-coordinate + /// + public double X { get; set; } + + /// + /// Gets the Y-coordinate + /// + public double Y { get; set; } + + /// + /// Gets the Z-coordinate + /// + public double Z { get; set; } + + /// + /// Gets the M value + /// + public double M { get; set; } + + /// + /// Gets a value indicating whether this coordinate has assigned coordinate. + /// + public readonly bool Is3D + { + get + { + return !double.IsNaN(Z); + } + } + + /// + /// Gets a value indicating whether this coordinate has assigned value. + /// + public readonly bool IsMeasured + { + get + { + return !double.IsNaN(M); + } + } + + /// + /// Determiens whether specific Coordinates values are equal + /// + /// Coordinate to compare + /// Coordinate to compare + /// true if the specified Coordinate values are equal; otherwise, false. + public static bool operator ==(Coordinate lhs, Coordinate rhs) + { + return lhs.Equals(rhs); + } + + /// + /// Determiens whether specific Coordinate values are not equal + /// + /// Coordinate to compare + /// Coordinate to compare + /// true if the specified Coordinate values are not equal; otherwise, false. + public static bool operator !=(Coordinate lhs, Coordinate rhs) + { + return !(lhs == rhs); + } + + /// + /// Returns a string that represents the current Coordinate. + /// + /// A string that represents the current Coordinate + public override readonly string ToString() + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, "[{0}; {1}; {2}, {3}]", X, Y, Z, M); + } + + /// + /// Determines whether specific object instance is equal to the current Coordinate. + /// + /// The object to compare with the current Coordinate + /// true if the specified object is equal to the current Coordinate; otherwise, false. + public override readonly bool Equals(object obj) + { + Coordinate? other = obj as Coordinate?; + if (other == null) + { + return false; + } + + return Equals(other.Value); + } + + /// + /// Determines whether two Coordinate values are equal. + /// + /// The Coordinate to compare with the current Coordinate + /// true if the specified Coordinate is equal to the current Coordinate; otherwise, false. + public readonly bool Equals(Coordinate other) + { + return ((X == other.X) || (double.IsNaN(X) && double.IsNaN(other.X))) && + ((Y == other.Y) || (double.IsNaN(Y) && double.IsNaN(other.Y))) && + ((Z == other.Z) || (double.IsNaN(Z) && double.IsNaN(other.Z))) && + ((M == other.M) || (double.IsNaN(M) && double.IsNaN(other.M))); + } + + /// + /// Serves as a hash function for the Coordinate structure. + /// + /// Hash code for current Coordinate value. + public override readonly int GetHashCode() + { + return X.GetHashCode() + 7 * Y.GetHashCode() + 13 * Z.GetHashCode() + 17 * M.GetHashCode(); + } + + /// + /// Determines whether two Coordinate are equal in 2D space. + /// + /// The Coordinate to compare with the current Coordinate + /// true if the specified Coordinate is equal to the current Coordinate in 2D space otherwise, false. + public readonly bool Equals2D(Coordinate other) + { + return ((X == other.X) || (double.IsNaN(X) && double.IsNaN(other.X))) && + ((Y == other.Y) || (double.IsNaN(Y) && double.IsNaN(other.Y))); + } } diff --git a/src/SpatialLite.Core/API/Envelope.cs b/src/SpatialLite.Core/API/Envelope.cs index dfa5815..7329568 100644 --- a/src/SpatialLite.Core/API/Envelope.cs +++ b/src/SpatialLite.Core/API/Envelope.cs @@ -1,405 +1,455 @@ using System.Collections.Generic; -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Represents minimal bounding box of a object. +/// +public class Envelope +{ + /// - /// Represents minimal bounding box of a object. + /// Empty Envelope, that has all it's bounds set to double.NaN /// - public class Envelope { - - /// - /// Empty Envelope, that has all it's bounds set to double.NaN - /// - public static Envelope Empty = new Envelope(); - - private const int XIndex = 0; - private const int YIndex = 1; - private const int ZIndex = 2; - private const int MIndex = 3; - - private double[][] _bounds = new double[][] { - new double[] { double.NaN, double.NaN }, - new double[] { double.NaN, double.NaN }, - new double[] { double.NaN, double.NaN }, - new double[] { double.NaN, double.NaN } }; - - /// - /// Initializes a new instance of the Envelope class that is empty and has all it's values initialized to double.NaN. - /// - public Envelope() { - } + public static readonly Envelope Empty = new(); - /// - /// Initializes a new instance of the Envelope class with the single coordinate. - /// - /// The coordinate used initialize Envelope - public Envelope(Coordinate coord) { - this.Initialize(coord.X, coord.X, coord.Y, coord.Y, coord.Z, coord.Z, coord.M, coord.M); - } + private const int XIndex = 0; + private const int YIndex = 1; + private const int ZIndex = 2; + private const int MIndex = 3; - /// - /// Initializes a new instance of the Envelope class that covers specified coordinates. - /// - /// The coordinates to be covered. - public Envelope(IEnumerable coords) { - this.Extend(coords); - } + private readonly double[][] _bounds = new double[][] { + new double[] { double.NaN, double.NaN }, + new double[] { double.NaN, double.NaN }, + new double[] { double.NaN, double.NaN }, + new double[] { double.NaN, double.NaN } }; - /// - /// Initializes a new instance of the Envelope class as copy of specified Envelope. - /// - /// The Envelope object whose values are to be copied. - public Envelope(Envelope source) { - this.Initialize(source.MinX, source.MaxX, source.MinY, source.MaxY, source.MinZ, source.MaxZ, source.MinM, source.MaxM); - } + /// + /// Initializes a new instance of the Envelope class that is empty and has all it's values initialized to double.NaN. + /// + public Envelope() + { + } - /// - /// Gets Envelope's minimal x-coordinate. - /// - public double MinX { - get { return _bounds[XIndex][0]; } - } + /// + /// Initializes a new instance of the Envelope class with the single coordinate. + /// + /// The coordinate used initialize Envelope + public Envelope(Coordinate coord) + { + Initialize(coord.X, coord.X, coord.Y, coord.Y, coord.Z, coord.Z, coord.M, coord.M); + } - /// - /// Gets Envelope's maximal x-coordinate. - /// - public double MaxX { - get { return _bounds[XIndex][1]; } - } + /// + /// Initializes a new instance of the Envelope class that covers specified coordinates. + /// + /// The coordinates to be covered. + public Envelope(IEnumerable coords) + { + Extend(coords); + } - /// - /// Gets Envelope's minimal y-coordinate. - /// - public double MinY { - get { return _bounds[YIndex][0]; } - } + /// + /// Initializes a new instance of the Envelope class as copy of specified Envelope. + /// + /// The Envelope object whose values are to be copied. + public Envelope(Envelope source) + { + Initialize(source.MinX, source.MaxX, source.MinY, source.MaxY, source.MinZ, source.MaxZ, source.MinM, source.MaxM); + } - /// - /// Gets Envelope's maximal y-coordinate. - /// - public double MaxY { - get { return _bounds[YIndex][1]; } - } + /// + /// Gets Envelope's minimal x-coordinate. + /// + public double MinX + { + get { return _bounds[XIndex][0]; } + } - /// - /// Gets Envelope's minimal z-coordinate. - /// - public double MinZ { - get { return _bounds[ZIndex][0]; } - } + /// + /// Gets Envelope's maximal x-coordinate. + /// + public double MaxX + { + get { return _bounds[XIndex][1]; } + } - /// - /// Gets Envelope's maximal z-coordinate. - /// - public double MaxZ { - get { return _bounds[ZIndex][1]; } - } + /// + /// Gets Envelope's minimal y-coordinate. + /// + public double MinY + { + get { return _bounds[YIndex][0]; } + } - /// - /// Gets Envelope's minimal m-coordinate. - /// - public double MinM { - get { return _bounds[MIndex][0]; } - } + /// + /// Gets Envelope's maximal y-coordinate. + /// + public double MaxY + { + get { return _bounds[YIndex][1]; } + } - /// - /// Gets Envelope's maximal m-coordinate. - /// - public double MaxM { - get { return _bounds[MIndex][1]; } - } + /// + /// Gets Envelope's minimal z-coordinate. + /// + public double MinZ + { + get { return _bounds[ZIndex][0]; } + } - /// - /// Returns the difference between the maximum and minimum x values. - /// - /// max x - min x, or 0 if this is a null Envelope. - public double Width { - get { - if (this.IsEmpty) { - return 0; - } - - return _bounds[XIndex][1] - _bounds[XIndex][0]; - } - } + /// + /// Gets Envelope's maximal z-coordinate. + /// + public double MaxZ + { + get { return _bounds[ZIndex][1]; } + } - /// - /// Returns the difference between the maximum and minimum y values. - /// - /// max y - min y, or 0 if this is a null Envelope. - public double Height { - get { - if (this.IsEmpty) { - return 0; - } - - return _bounds[YIndex][1] - _bounds[YIndex][0]; - } - } + /// + /// Gets Envelope's minimal m-coordinate. + /// + public double MinM + { + get { return _bounds[MIndex][0]; } + } - /// - /// Checks if this Envelope equals the empty Envelope. - /// - public bool IsEmpty { - get { - return this.Equals(Envelope.Empty); - } - } + /// + /// Gets Envelope's maximal m-coordinate. + /// + public double MaxM + { + get { return _bounds[MIndex][1]; } + } - /// - /// Extends this Envelope to cover specified Coordinate. - /// - /// The Coordinate to be covered by extended Envelope. - public void Extend(Coordinate coord) { - if (double.IsNaN(_bounds[XIndex][0]) || double.IsNaN(_bounds[YIndex][0])) { - _bounds[XIndex][0] = _bounds[XIndex][1] = coord.X; - _bounds[YIndex][0] = _bounds[YIndex][1] = coord.Y; - _bounds[ZIndex][0] = _bounds[ZIndex][1] = coord.Z; - _bounds[MIndex][0] = _bounds[MIndex][1] = coord.M; - } else { - if (coord.X < _bounds[XIndex][0]) { _bounds[XIndex][0] = coord.X; } - if (coord.X > _bounds[XIndex][1]) { _bounds[XIndex][1] = coord.X; } - - if (coord.Y < _bounds[YIndex][0]) { _bounds[YIndex][0] = coord.Y; } - if (coord.Y > _bounds[YIndex][1]) { _bounds[YIndex][1] = coord.Y; } - - if (coord.Z < _bounds[ZIndex][0]) { _bounds[ZIndex][0] = coord.Z; } - if (coord.Z > _bounds[ZIndex][1]) { _bounds[ZIndex][1] = coord.Z; } - - if (coord.M < _bounds[MIndex][0]) { _bounds[MIndex][0] = coord.M; } - if (coord.M > _bounds[MIndex][1]) { _bounds[MIndex][1] = coord.M; } + /// + /// Returns the difference between the maximum and minimum x values. + /// + /// max x - min x, or 0 if this is a null Envelope. + public double Width + { + get + { + if (IsEmpty) + { + return 0; } + + return _bounds[XIndex][1] - _bounds[XIndex][0]; } + } - /// - /// Extends this Envelope to cover specified Coordinates. - /// - /// The collection of Coordinates to be covered by extended Envelope. - public void Extend(IEnumerable coords) { - foreach (var coord in coords) { - this.Extend(coord); + /// + /// Returns the difference between the maximum and minimum y values. + /// + /// max y - min y, or 0 if this is a null Envelope. + public double Height + { + get + { + if (IsEmpty) + { + return 0; } + + return _bounds[YIndex][1] - _bounds[YIndex][0]; } + } - /// - /// Extends this Envelope to cover specified Envelope. - /// - /// The Envelope to be covered by extended Envelope. - public void Extend(Envelope envelope) { - if (double.IsNaN(_bounds[XIndex][0]) || double.IsNaN(_bounds[YIndex][0])) { - _bounds[XIndex][0] = envelope.MinX; - _bounds[XIndex][1] = envelope.MaxX; + /// + /// Checks if this Envelope equals the empty Envelope. + /// + public bool IsEmpty + { + get + { + return Equals(Empty); + } + } - _bounds[YIndex][0] = envelope.MinY; - _bounds[YIndex][1] = envelope.MaxY; + /// + /// Extends this Envelope to cover specified Coordinate. + /// + /// The Coordinate to be covered by extended Envelope. + public void Extend(Coordinate coord) + { + if (double.IsNaN(_bounds[XIndex][0]) || double.IsNaN(_bounds[YIndex][0])) + { + _bounds[XIndex][0] = _bounds[XIndex][1] = coord.X; + _bounds[YIndex][0] = _bounds[YIndex][1] = coord.Y; + _bounds[ZIndex][0] = _bounds[ZIndex][1] = coord.Z; + _bounds[MIndex][0] = _bounds[MIndex][1] = coord.M; + } + else + { + if (coord.X < _bounds[XIndex][0]) { _bounds[XIndex][0] = coord.X; } + if (coord.X > _bounds[XIndex][1]) { _bounds[XIndex][1] = coord.X; } - _bounds[ZIndex][0] = envelope.MinZ; - _bounds[ZIndex][1] = envelope.MaxZ; + if (coord.Y < _bounds[YIndex][0]) { _bounds[YIndex][0] = coord.Y; } + if (coord.Y > _bounds[YIndex][1]) { _bounds[YIndex][1] = coord.Y; } - _bounds[MIndex][0] = envelope.MinM; - _bounds[MIndex][1] = envelope.MaxM; - } else { - if (envelope.MinX < _bounds[XIndex][0]) { _bounds[XIndex][0] = envelope.MinX; } - if (envelope.MaxX > _bounds[XIndex][1]) { _bounds[XIndex][1] = envelope.MaxX; } + if (coord.Z < _bounds[ZIndex][0]) { _bounds[ZIndex][0] = coord.Z; } + if (coord.Z > _bounds[ZIndex][1]) { _bounds[ZIndex][1] = coord.Z; } - if (envelope.MinY < _bounds[YIndex][0]) { _bounds[YIndex][0] = envelope.MinY; } - if (envelope.MaxY > _bounds[YIndex][1]) { _bounds[YIndex][1] = envelope.MaxY; } + if (coord.M < _bounds[MIndex][0]) { _bounds[MIndex][0] = coord.M; } + if (coord.M > _bounds[MIndex][1]) { _bounds[MIndex][1] = coord.M; } + } + } - if (envelope.MinZ < _bounds[ZIndex][0]) { _bounds[ZIndex][0] = envelope.MinZ; } - if (envelope.MaxZ > _bounds[ZIndex][1]) { _bounds[ZIndex][1] = envelope.MaxZ; } + /// + /// Extends this Envelope to cover specified Coordinates. + /// + /// The collection of Coordinates to be covered by extended Envelope. + public void Extend(IEnumerable coords) + { + foreach (var coord in coords) + { + Extend(coord); + } + } - if (envelope.MinM < _bounds[MIndex][0]) { _bounds[MIndex][0] = envelope.MinM; } - if (envelope.MaxM > _bounds[MIndex][1]) { _bounds[MIndex][1] = envelope.MaxM; } - } + /// + /// Extends this Envelope to cover specified Envelope. + /// + /// The Envelope to be covered by extended Envelope. + public void Extend(Envelope envelope) + { + if (double.IsNaN(_bounds[XIndex][0]) || double.IsNaN(_bounds[YIndex][0])) + { + _bounds[XIndex][0] = envelope.MinX; + _bounds[XIndex][1] = envelope.MaxX; + + _bounds[YIndex][0] = envelope.MinY; + _bounds[YIndex][1] = envelope.MaxY; + + _bounds[ZIndex][0] = envelope.MinZ; + _bounds[ZIndex][1] = envelope.MaxZ; + + _bounds[MIndex][0] = envelope.MinM; + _bounds[MIndex][1] = envelope.MaxM; } + else + { + if (envelope.MinX < _bounds[XIndex][0]) { _bounds[XIndex][0] = envelope.MinX; } + if (envelope.MaxX > _bounds[XIndex][1]) { _bounds[XIndex][1] = envelope.MaxX; } - /// - /// Determines whether specific object instance is equal to the current Envelope. - /// - /// The object to compare with the current Envelope - /// true if the specified object is equal to the current Envelope; otherwise, false. - public override bool Equals(object obj) { - Envelope other = obj as Envelope; - if (other == null) { - return false; - } + if (envelope.MinY < _bounds[YIndex][0]) { _bounds[YIndex][0] = envelope.MinY; } + if (envelope.MaxY > _bounds[YIndex][1]) { _bounds[YIndex][1] = envelope.MaxY; } - return this.Equals(other); + if (envelope.MinZ < _bounds[ZIndex][0]) { _bounds[ZIndex][0] = envelope.MinZ; } + if (envelope.MaxZ > _bounds[ZIndex][1]) { _bounds[ZIndex][1] = envelope.MaxZ; } + + if (envelope.MinM < _bounds[MIndex][0]) { _bounds[MIndex][0] = envelope.MinM; } + if (envelope.MaxM > _bounds[MIndex][1]) { _bounds[MIndex][1] = envelope.MaxM; } } + } - /// - /// Determines whether two Envelope instances are equal. - /// - /// The Envelope to compare with the current Envelope - /// true if the specified Envelope is equal to the current Envelope; otherwise, false. - public bool Equals(Envelope other) { - return ((this.MinX == other.MinX) || (double.IsNaN(this.MinX) && double.IsNaN(other.MinX))) && - ((this.MinY == other.MinY) || (double.IsNaN(this.MinY) && double.IsNaN(other.MinY))) && - ((this.MinZ == other.MinZ) || (double.IsNaN(this.MinZ) && double.IsNaN(other.MinZ))) && - ((this.MinM == other.MinM) || (double.IsNaN(this.MinM) && double.IsNaN(other.MinM))) && - ((this.MaxX == other.MaxX) || (double.IsNaN(this.MaxX) && double.IsNaN(other.MaxX))) && - ((this.MaxY == other.MaxY) || (double.IsNaN(this.MaxY) && double.IsNaN(other.MaxY))) && - ((this.MaxZ == other.MaxZ) || (double.IsNaN(this.MaxZ) && double.IsNaN(other.MaxZ))) && - ((this.MaxM == other.MaxM) || (double.IsNaN(this.MaxM) && double.IsNaN(other.MaxM))); + /// + /// Determines whether specific object instance is equal to the current Envelope. + /// + /// The object to compare with the current Envelope + /// true if the specified object is equal to the current Envelope; otherwise, false. + public override bool Equals(object obj) + { + if (obj is not Envelope other) + { + return false; } - /// - /// Check if the region defined by other - /// overlaps (intersects) the region of this Envelope. - /// - /// the Envelope which this Envelope is - /// being checked for overlapping. - /// - /// - /// true if the Envelopes overlap. - /// - public bool Intersects(Envelope other) { - if (this.IsEmpty || other.IsEmpty) { - return false; - } + return Equals(other); + } - return !(other.MinX > this.MaxX || other.MaxX < this.MinX || other.MinY > this.MaxY || other.MaxY < other.MinY); + /// + /// Determines whether two Envelope instances are equal. + /// + /// The Envelope to compare with the current Envelope + /// true if the specified Envelope is equal to the current Envelope; otherwise, false. + public bool Equals(Envelope other) + { + return ((MinX == other.MinX) || (double.IsNaN(MinX) && double.IsNaN(other.MinX))) && + ((MinY == other.MinY) || (double.IsNaN(MinY) && double.IsNaN(other.MinY))) && + ((MinZ == other.MinZ) || (double.IsNaN(MinZ) && double.IsNaN(other.MinZ))) && + ((MinM == other.MinM) || (double.IsNaN(MinM) && double.IsNaN(other.MinM))) && + ((MaxX == other.MaxX) || (double.IsNaN(MaxX) && double.IsNaN(other.MaxX))) && + ((MaxY == other.MaxY) || (double.IsNaN(MaxY) && double.IsNaN(other.MaxY))) && + ((MaxZ == other.MaxZ) || (double.IsNaN(MaxZ) && double.IsNaN(other.MaxZ))) && + ((MaxM == other.MaxM) || (double.IsNaN(MaxM) && double.IsNaN(other.MaxM))); + } + + /// + /// Check if the region defined by other + /// overlaps (intersects) the region of this Envelope. + /// + /// the Envelope which this Envelope is + /// being checked for overlapping. + /// + /// + /// true if the Envelopes overlap. + /// + public bool Intersects(Envelope other) + { + if (IsEmpty || other.IsEmpty) + { + return false; } - /// - /// Tests if the given point lies in or on the envelope. - /// - /// the x-coordinate of the point which this Envelope is being checked for containing - /// the y-coordinate of the point which this Envelope is being checked for containing - /// true if (x, y) lies in the interior or on the boundary of this Envelope. - public bool Covers(double x, double y) { - if (this.IsEmpty) { - return false; - } + return !(other.MinX > MaxX || other.MaxX < MinX || other.MinY > MaxY || other.MaxY < other.MinY); + } - return x >= this.MinX && - x <= this.MaxX && - y >= this.MinY && - y <= this.MaxY; + /// + /// Tests if the given point lies in or on the envelope. + /// + /// the x-coordinate of the point which this Envelope is being checked for containing + /// the y-coordinate of the point which this Envelope is being checked for containing + /// true if (x, y) lies in the interior or on the boundary of this Envelope. + public bool Covers(double x, double y) + { + if (IsEmpty) + { + return false; } - /// - /// Tests if the given point lies in or on the envelope. - /// - /// the point which this Envelope is being checked for containing - /// true if the point lies in the interior or on the boundary of this Envelope. - public bool Covers(Coordinate p) { - return Covers(p.X, p.Y); - } + return x >= MinX && + x <= MaxX && + y >= MinY && + y <= MaxY; + } - /// - /// Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary). - /// - /// the Envelope to check - /// true if this Envelope covers the other - public bool Covers(Envelope other) { - if (this.IsEmpty || other.IsEmpty) { - return false; - } + /// + /// Tests if the given point lies in or on the envelope. + /// + /// the point which this Envelope is being checked for containing + /// true if the point lies in the interior or on the boundary of this Envelope. + public bool Covers(Coordinate p) + { + return Covers(p.X, p.Y); + } - return other.MinX >= this.MinX && - other.MaxX <= this.MaxX && - other.MinY >= this.MinY && - other.MaxY <= this.MaxY; + /// + /// Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary). + /// + /// the Envelope to check + /// true if this Envelope covers the other + public bool Covers(Envelope other) + { + if (IsEmpty || other.IsEmpty) + { + return false; } - /// - /// Serves as a hash function for the Envelope class. - /// - /// Hash code for current Envelope object. - public override int GetHashCode() { - return _bounds.GetHashCode(); - } + return other.MinX >= MinX && + other.MaxX <= MaxX && + other.MinY >= MinY && + other.MaxY <= MaxY; + } - /// - /// Initializes MinX, MaxX, MinY, MaxY, MinZ and MaxZ properties from the given coordinates. - /// - /// First x-coordinate. - /// Second x-coordinate. - /// First y-coordinate. - /// Second y-coordinate. - public void Initialize(double x1, double x2, double y1, double y2) { - var sortedX = this.SortCoordinates(x1, x2); - _bounds[XIndex][0] = sortedX[0]; - _bounds[XIndex][1] = sortedX[1]; - - var sortedY = this.SortCoordinates(y1, y2); - _bounds[YIndex][0] = sortedY[0]; - _bounds[YIndex][1] = sortedY[1]; - } + /// + /// Serves as a hash function for the Envelope class. + /// + /// Hash code for current Envelope object. + public override int GetHashCode() + { + return _bounds.GetHashCode(); + } - /// - /// Initializes MinX, MaxX, MinY, MaxY, MinZ and MaxZ properties from the given coordinates. - /// - /// First x-coordinate. - /// Second x-coordinate. - /// First y-coordinate. - /// Second y-coordinate. - /// First z-coordinate. - /// Second z-coordinate. - public void Initialize(double x1, double x2, double y1, double y2, double z1, double z2) { - var sortedX = this.SortCoordinates(x1, x2); - _bounds[XIndex][0] = sortedX[0]; - _bounds[XIndex][1] = sortedX[1]; - - var sortedY = this.SortCoordinates(y1, y2); - _bounds[YIndex][0] = sortedY[0]; - _bounds[YIndex][1] = sortedY[1]; - - var sortedZ = this.SortCoordinates(z1, z2); - _bounds[ZIndex][0] = sortedZ[0]; - _bounds[ZIndex][1] = sortedZ[1]; - } + /// + /// Initializes MinX, MaxX, MinY, MaxY, MinZ and MaxZ properties from the given coordinates. + /// + /// First x-coordinate. + /// Second x-coordinate. + /// First y-coordinate. + /// Second y-coordinate. + public void Initialize(double x1, double x2, double y1, double y2) + { + var sortedX = SortCoordinates(x1, x2); + _bounds[XIndex][0] = sortedX[0]; + _bounds[XIndex][1] = sortedX[1]; + + var sortedY = SortCoordinates(y1, y2); + _bounds[YIndex][0] = sortedY[0]; + _bounds[YIndex][1] = sortedY[1]; + } - /// - /// Initializes MinX, MaxX, MinY, MaxY, MinZ and MaxZ properties from the given coordinates. - /// - /// First x-coordinate. - /// Second x-coordinate. - /// First y-coordinate. - /// Second y-coordinate. - /// First z-coordinate. - /// Second z-coordinate. - /// First measure value. - /// Second measure value. - public void Initialize(double x1, double x2, double y1, double y2, double z1, double z2, double m1, double m2) { - var sortedX = this.SortCoordinates(x1, x2); - _bounds[XIndex][0] = sortedX[0]; - _bounds[XIndex][1] = sortedX[1]; - - var sortedY = this.SortCoordinates(y1, y2); - _bounds[YIndex][0] = sortedY[0]; - _bounds[YIndex][1] = sortedY[1]; - - var sortedZ = this.SortCoordinates(z1, z2); - _bounds[ZIndex][0] = sortedZ[0]; - _bounds[ZIndex][1] = sortedZ[1]; - - var sortedM = this.SortCoordinates(m1, m2); - _bounds[MIndex][0] = sortedM[0]; - _bounds[MIndex][1] = sortedM[1]; - } + /// + /// Initializes MinX, MaxX, MinY, MaxY, MinZ and MaxZ properties from the given coordinates. + /// + /// First x-coordinate. + /// Second x-coordinate. + /// First y-coordinate. + /// Second y-coordinate. + /// First z-coordinate. + /// Second z-coordinate. + public void Initialize(double x1, double x2, double y1, double y2, double z1, double z2) + { + var sortedX = SortCoordinates(x1, x2); + _bounds[XIndex][0] = sortedX[0]; + _bounds[XIndex][1] = sortedX[1]; + + var sortedY = SortCoordinates(y1, y2); + _bounds[YIndex][0] = sortedY[0]; + _bounds[YIndex][1] = sortedY[1]; + + var sortedZ = SortCoordinates(z1, z2); + _bounds[ZIndex][0] = sortedZ[0]; + _bounds[ZIndex][1] = sortedZ[1]; + } - /// - /// Sorts two coordinates - /// - /// First coordinate. - /// Second coordinate. - /// Array with sorted coordinates - [min, max] - /// If any value is double.NaN the other is used for min and max. - private double[] SortCoordinates(double c1, double c2) { - if (double.IsNaN(c1)) { - c1 = c2; - } + /// + /// Initializes MinX, MaxX, MinY, MaxY, MinZ and MaxZ properties from the given coordinates. + /// + /// First x-coordinate. + /// Second x-coordinate. + /// First y-coordinate. + /// Second y-coordinate. + /// First z-coordinate. + /// Second z-coordinate. + /// First measure value. + /// Second measure value. + public void Initialize(double x1, double x2, double y1, double y2, double z1, double z2, double m1, double m2) + { + var sortedX = SortCoordinates(x1, x2); + _bounds[XIndex][0] = sortedX[0]; + _bounds[XIndex][1] = sortedX[1]; + + var sortedY = SortCoordinates(y1, y2); + _bounds[YIndex][0] = sortedY[0]; + _bounds[YIndex][1] = sortedY[1]; + + var sortedZ = SortCoordinates(z1, z2); + _bounds[ZIndex][0] = sortedZ[0]; + _bounds[ZIndex][1] = sortedZ[1]; + + var sortedM = SortCoordinates(m1, m2); + _bounds[MIndex][0] = sortedM[0]; + _bounds[MIndex][1] = sortedM[1]; + } - if (double.IsNaN(c2)) { - c2 = c1; - } + /// + /// Sorts two coordinates + /// + /// First coordinate. + /// Second coordinate. + /// Array with sorted coordinates - [min, max] + /// If any value is double.NaN the other is used for min and max. + private double[] SortCoordinates(double c1, double c2) + { + if (double.IsNaN(c1)) + { + c1 = c2; + } - if (c1 > c2) { - return new double[] { c2, c1 }; - } else { - return new double[] { c1, c2 }; - } + if (double.IsNaN(c2)) + { + c2 = c1; + } + + if (c1 > c2) + { + return new double[] { c2, c1 }; + } + else + { + return new double[] { c1, c2 }; } } -} \ No newline at end of file +} diff --git a/src/SpatialLite.Core/API/ICoordinateList.cs b/src/SpatialLite.Core/API/ICoordinateList.cs index f414bca..f35b6ed 100644 --- a/src/SpatialLite.Core/API/ICoordinateList.cs +++ b/src/SpatialLite.Core/API/ICoordinateList.cs @@ -1,51 +1,52 @@ using System.Collections.Generic; -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methods for collection of coordinates. +/// +public interface ICoordinateList : IEnumerable +{ + /// + /// Gets number of Coordinates in the list + /// + int Count { get; } + + /// + /// Gets or sets Coordinate at the given index. + /// + /// The zero-based index of the Coordinate to get or set. + /// The element at the specified index. + Coordinate this[int index] { get; set; } + + /// + /// Adds Coordinate to the end of the list. + /// + /// The Coordinate to add to the list + void Add(Coordinate coord); + + /// + /// Adds collection of coordinates to the end of the list. + /// + /// The collection of coordinates to add to the list + void Add(IEnumerable coords); + + /// + /// Inserts Coordinate to the list at the specified index. + /// + /// The zero-based index at which coord should be inserted. + /// The Coordinate to insert into list. + /// If index equals the number of items in the list, then item is appended to the list. + void Insert(int index, Coordinate coord); + + /// + /// Removes Coordinate at the specified index from the list. + /// + /// The zero-based index of the Coordinate to remove. + void RemoveAt(int index); + /// - /// Defines properties and methods for collection of coordinates. + /// Removes all Coordinates from the collection. /// - public interface ICoordinateList : IEnumerable { - /// - /// Gets number of Coordinates in the list - /// - int Count { get; } - - /// - /// Gets or sets Coordinate at the given index. - /// - /// The zero-based index of the Coordinate to get or set. - /// The element at the specified index. - Coordinate this[int index] { get; set; } - - /// - /// Adds Coordinate to the end of the list. - /// - /// The Coordinate to add to the list - void Add(Coordinate coord); - - /// - /// Adds collection of coordinates to the end of the list. - /// - /// The collection of coordinates to add to the list - void Add(IEnumerable coords); - - /// - /// Inserts Coordinate to the list at the specified index. - /// - /// The zero-based index at which coord should be inserted. - /// The Coordinate to insert into list. - /// If index equals the number of items in the list, then item is appended to the list. - void Insert(int index, Coordinate coord); - - /// - /// Removes Coordinate at the specified index from the list. - /// - /// The zero-based index of the Coordinate to remove. - void RemoveAt(int index); - - /// - /// Removes all Coordinates from the collection. - /// - void Clear(); - } + void Clear(); } diff --git a/src/SpatialLite.Core/API/IGeometry.cs b/src/SpatialLite.Core/API/IGeometry.cs index 460e8d8..b4a4ce8 100644 --- a/src/SpatialLite.Core/API/IGeometry.cs +++ b/src/SpatialLite.Core/API/IGeometry.cs @@ -1,32 +1,33 @@ using System.Collections.Generic; -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Defines common properties and methods for all geometry objects. +/// +public interface IGeometry +{ /// - /// Defines common properties and methods for all geometry objects. + /// Gets a value indicating whether the IGeometry object has Z coordinates. /// - public interface IGeometry { - /// - /// Gets a value indicating whether the IGeometry object has Z coordinates. - /// - bool Is3D { get; } + bool Is3D { get; } - /// - /// Gets a value indicating whether the IGeometry object has M values. - /// - bool IsMeasured { get; } + /// + /// Gets a value indicating whether the IGeometry object has M values. + /// + bool IsMeasured { get; } - /// - /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. - /// - /// - /// Returns an object that specifies the minimal bounding box of the IGeometry object. - /// - Envelope GetEnvelope(); + /// + /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. + /// + /// + /// Returns an object that specifies the minimal bounding box of the IGeometry object. + /// + Envelope GetEnvelope(); - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - IEnumerable GetCoordinates(); - } + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + IEnumerable GetCoordinates(); } diff --git a/src/SpatialLite.Core/API/IGeometryCollection.cs b/src/SpatialLite.Core/API/IGeometryCollection.cs index d74f777..99d6e09 100644 --- a/src/SpatialLite.Core/API/IGeometryCollection.cs +++ b/src/SpatialLite.Core/API/IGeometryCollection.cs @@ -1,14 +1,15 @@ using System.Collections.Generic; -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methods for Geometry collection. +/// +/// The type of the objects included in the collection. +public interface IGeometryCollection : IGeometry where T : IGeometry +{ /// - /// Defines properties and methods for Geometry collection. + /// Gets the collection of geometry objects from the IGeometryCollection. /// - /// The type of the objects included in the collection. - public interface IGeometryCollection : IGeometry where T : IGeometry { - /// - /// Gets the collection of geometry objects from the IGeometryCollection. - /// - IEnumerable Geometries { get; } - } + IEnumerable Geometries { get; } } diff --git a/src/SpatialLite.Core/API/ILineString.cs b/src/SpatialLite.Core/API/ILineString.cs index b0e16cd..d644fde 100644 --- a/src/SpatialLite.Core/API/ILineString.cs +++ b/src/SpatialLite.Core/API/ILineString.cs @@ -1,29 +1,30 @@ -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Defiens properties and methods for line strings. A line string is a curve with linear connection between concesutive points. +/// +public interface ILineString : IGeometry +{ /// - /// Defiens properties and methods for line strings. A line string is a curve with linear connection between concesutive points. + /// Gets a value indicating whether the ILineString is closed. /// - public interface ILineString : IGeometry { - /// - /// Gets a value indicating whether the ILineString is closed. - /// - /// - /// The ILineString is closed if and are identical. - /// - bool IsClosed { get; } + /// + /// The ILineString is closed if and are identical. + /// + bool IsClosed { get; } - /// - /// Gets the first coordinate of the ILineString object. - /// - Coordinate Start { get; } + /// + /// Gets the first coordinate of the ILineString object. + /// + Coordinate Start { get; } - /// - /// Gets the last coordinate of the ILineString object. - /// - Coordinate End { get; } + /// + /// Gets the last coordinate of the ILineString object. + /// + Coordinate End { get; } - /// - /// Gets the list of çoordinates that define this LisneString - /// - ICoordinateList Coordinates { get; } - } + /// + /// Gets the list of çoordinates that define this LisneString + /// + ICoordinateList Coordinates { get; } } diff --git a/src/SpatialLite.Core/API/IMultiLineString.cs b/src/SpatialLite.Core/API/IMultiLineString.cs index eb8fc1c..74e2da8 100644 --- a/src/SpatialLite.Core/API/IMultiLineString.cs +++ b/src/SpatialLite.Core/API/IMultiLineString.cs @@ -1,7 +1,8 @@ -namespace SpatialLite.Core.API { - /// - /// Defines properties and methodss for Collection of LineStrings. - /// - public interface IMultiLineString : IGeometryCollection { - } +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methodss for Collection of LineStrings. +/// +public interface IMultiLineString : IGeometryCollection +{ } diff --git a/src/SpatialLite.Core/API/IMultiPoint.cs b/src/SpatialLite.Core/API/IMultiPoint.cs index 0526afa..76794b0 100644 --- a/src/SpatialLite.Core/API/IMultiPoint.cs +++ b/src/SpatialLite.Core/API/IMultiPoint.cs @@ -1,7 +1,8 @@ -namespace SpatialLite.Core.API { - /// - /// Defines properties and methods collections of points. - /// - public interface IMultiPoint : IGeometryCollection { - } +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methods collections of points. +/// +public interface IMultiPoint : IGeometryCollection +{ } diff --git a/src/SpatialLite.Core/API/IMultiPolygon.cs b/src/SpatialLite.Core/API/IMultiPolygon.cs index 8ef19fe..a5873fe 100644 --- a/src/SpatialLite.Core/API/IMultiPolygon.cs +++ b/src/SpatialLite.Core/API/IMultiPolygon.cs @@ -1,7 +1,8 @@ -namespace SpatialLite.Core.API { - /// - /// Defines properties and methods for collections of polygons. - /// - public interface IMultiPolygon : IGeometryCollection { - } +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methods for collections of polygons. +/// +public interface IMultiPolygon : IGeometryCollection +{ } diff --git a/src/SpatialLite.Core/API/IPoint.cs b/src/SpatialLite.Core/API/IPoint.cs index 40f9e3d..adfd25b 100644 --- a/src/SpatialLite.Core/API/IPoint.cs +++ b/src/SpatialLite.Core/API/IPoint.cs @@ -1,11 +1,12 @@ -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methods for points. +/// +public interface IPoint : IGeometry +{ /// - /// Defines properties and methods for points. + /// Gets position of the point. /// - public interface IPoint : IGeometry { - /// - /// Gets position of the point. - /// - Coordinate Position { get; } - } + Coordinate Position { get; } } diff --git a/src/SpatialLite.Core/API/IPolygon.cs b/src/SpatialLite.Core/API/IPolygon.cs index d9138b1..c4ab23a 100644 --- a/src/SpatialLite.Core/API/IPolygon.cs +++ b/src/SpatialLite.Core/API/IPolygon.cs @@ -1,18 +1,19 @@ using System.Collections.Generic; -namespace SpatialLite.Core.API { +namespace SpatialLite.Core.API; + +/// +/// Defines properties and methods for polygons. +/// +public interface IPolygon : IGeometry +{ /// - /// Defines properties and methods for polygons. + /// Gets the exterior boundary of the polygon /// - public interface IPolygon : IGeometry { - /// - /// Gets the exterior boundary of the polygon - /// - ICoordinateList ExteriorRing { get; } + ICoordinateList ExteriorRing { get; } - /// - /// Gets a collection of interior boundaries that define holes in the polygon - /// - IEnumerable InteriorRings { get; } - } + /// + /// Gets a collection of interior boundaries that define holes in the polygon + /// + IEnumerable InteriorRings { get; } } diff --git a/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs b/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs index f725292..363f5a7 100644 --- a/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs +++ b/src/SpatialLite.Core/Algorithms/Euclidean2DCalculator.cs @@ -1,43 +1,49 @@ -using System; -using SpatialLite.Core.API; +using SpatialLite.Core.API; +using System; + +namespace SpatialLite.Core.Algorithms; + +/// +/// Provides methods for calculating distance and area in 2D euclidean space +/// +public class Euclidean2DCalculator : IDimensionsCalculator +{ -namespace SpatialLite.Core.Algorithms { /// - /// Provides methods for calculating distance and area in 2D euclidean space + /// Calculates distance between two points /// - public class Euclidean2DCalculator : IDimensionsCalculator { - - /// - /// Calculates distance between two points - /// - /// The first point - /// The second point - /// distance between two point in coordinate's units. - public double CalculateDistance(Coordinate c1, Coordinate c2) { - double deltaX = c1.X - c2.X; - double deltaY = c1.Y - c2.Y; - - return Math.Sqrt(deltaX * deltaX + deltaY * deltaY); - } - - /// - /// Calculates distance between a point and a line AB - /// - /// The coordinate to compute the distance for. - /// One point of the line. - /// Another point of the line. - /// LineMode value that specifies whether AB should be treated as infinite line or as line segment. - /// The distance from C to line AB in coordinate's units. - public double CalculateDistance(Coordinate c, Coordinate a, Coordinate b, LineMode mode) { - if (a.Equals2D(b)) { - return this.CalculateDistance(c, a); - } - - double deltaX = b.X - a.X; - double deltaY = b.Y - a.Y; - - if (mode == LineMode.LineSegment) { - /* + /// The first point + /// The second point + /// distance between two point in coordinate's units. + public double CalculateDistance(Coordinate c1, Coordinate c2) + { + double deltaX = c1.X - c2.X; + double deltaY = c1.Y - c2.Y; + + return Math.Sqrt(deltaX * deltaX + deltaY * deltaY); + } + + /// + /// Calculates distance between a point and a line AB + /// + /// The coordinate to compute the distance for. + /// One point of the line. + /// Another point of the line. + /// LineMode value that specifies whether AB should be treated as infinite line or as line segment. + /// The distance from C to line AB in coordinate's units. + public double CalculateDistance(Coordinate c, Coordinate a, Coordinate b, LineMode mode) + { + if (a.Equals2D(b)) + { + return CalculateDistance(c, a); + } + + double deltaX = b.X - a.X; + double deltaY = b.Y - a.Y; + + if (mode == LineMode.LineSegment) + { + /* Let P be the point of perpendicular projection of C on AB. The parameter r, which indicates P's position along AB, is computed by the dot product of AC and AB divided by the square of the length of AB: @@ -55,18 +61,20 @@ AC dot AB 0= 1.0) { - return this.CalculateDistance(c, b); - } - } + if (r >= 1.0) + { + return CalculateDistance(c, b); + } + } - /* + /* Use another parameter s to indicate the location along PC, with the following meaning: s<0 C is left of AB s>0 C is right of AB @@ -81,38 +89,40 @@ AC dot AB L^2 */ - double s = ((a.Y - c.Y) * deltaX - (a.X - c.X) * deltaY) / (deltaX * deltaX + deltaY * deltaY); + double s = ((a.Y - c.Y) * deltaX - (a.X - c.X) * deltaY) / (deltaX * deltaX + deltaY * deltaY); - /* + /* Then the distance from C to P = |s|*L. */ - return Math.Abs(s) * Math.Sqrt(deltaX * deltaX + deltaY * deltaY); - } - - /// - /// Calculates area of the polygon specified by given vertices - /// - /// The vertices of the polygon - /// The area of the polygon in squareed coordinate's units - /// Polygon is expected to be simple. ComputeArea method handles correctly CoordinateList from Polygon class, where first and last vertices are the same. - public double CalculateArea(ICoordinateList vertices) { - if (vertices.Count < 3) { - throw new ArgumentException("List must contain at least 3 vertices.", "vertices"); - } - - double area = 0; - int maxIndex = vertices.Count - 1; - if (vertices[0] != vertices[maxIndex]) { - maxIndex++; - } - - for (int i = 0; i < maxIndex; i++) { - area += (vertices[(i + 1) % vertices.Count].X + vertices[i % vertices.Count].X) * (vertices[(i + 1) % vertices.Count].Y - vertices[i % vertices.Count].Y); - } - - return area / 2.0; - } - - } + return Math.Abs(s) * Math.Sqrt(deltaX * deltaX + deltaY * deltaY); + } + + /// + /// Calculates area of the polygon specified by given vertices + /// + /// The vertices of the polygon + /// The area of the polygon in squareed coordinate's units + /// Polygon is expected to be simple. ComputeArea method handles correctly CoordinateList from Polygon class, where first and last vertices are the same. + public double CalculateArea(ICoordinateList vertices) + { + if (vertices.Count < 3) + { + throw new ArgumentException("List must contain at least 3 vertices.", nameof(vertices)); + } + + double area = 0; + int maxIndex = vertices.Count - 1; + if (vertices[0] != vertices[maxIndex]) + { + maxIndex++; + } + + for (int i = 0; i < maxIndex; i++) + { + area += (vertices[(i + 1) % vertices.Count].X + vertices[i % vertices.Count].X) * (vertices[(i + 1) % vertices.Count].Y - vertices[i % vertices.Count].Y); + } + + return area / 2.0; + } } diff --git a/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs b/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs index d228fab..b83b52d 100644 --- a/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs +++ b/src/SpatialLite.Core/Algorithms/Euclidean2DLocator.cs @@ -1,194 +1,222 @@ -using System; +using SpatialLite.Core.API; +using System; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Algorithms; + +/// +/// Provides methods for determining relative position of geometries in Euclidean 2D space. +/// +public class Euclidean2DLocator : IGeometryLocator +{ -namespace SpatialLite.Core.Algorithms { /// - /// Provides methods for determining relative position of geometries in Euclidean 2D space. + /// Determines whether specific coordinate is on the line defined by two points. /// - public class Euclidean2DLocator : IGeometryLocator { - - /// - /// Determines whether specific coordinate is on the line defined by two points. - /// - /// The coordinate to be tested - /// The first point of the line. - /// The second point of the line. - /// LineMode value that specifies whether AB should be treated as infinite line or as line segment - /// true if coordinate C is on line AB, otherwise false - public bool IsOnLine(Coordinate c, Coordinate a, Coordinate b, LineMode mode) { - /* + /// The coordinate to be tested + /// The first point of the line. + /// The second point of the line. + /// LineMode value that specifies whether AB should be treated as infinite line or as line segment + /// true if coordinate C is on line AB, otherwise false + public bool IsOnLine(Coordinate c, Coordinate a, Coordinate b, LineMode mode) + { + /* Express line in analytic form paramA * x + paramB * y + paramC = 0 */ - double paramA = b.Y - a.Y; - double paramB = a.X - b.X; - double paramC = b.X * a.Y - a.X * b.Y; + double paramA = b.Y - a.Y; + double paramB = a.X - b.X; + double paramC = b.X * a.Y - a.X * b.Y; - /* + /* induct coordinate C into equation of the line - if equation paramA * c.X + paramB * c.Y + paramC = 0 is valid, point lies on the line */ - double cLineResult = paramA * c.X + paramB * c.Y + paramC; - - if (cLineResult != 0.0) { - return false; - } - - if (mode == LineMode.Line) { - return true; - } - - // compute distance of the C along vector AB - double r; - double dx = Math.Abs(b.X - a.X); - double dy = Math.Abs(b.Y - a.Y); - - if (dx > dy) { - r = (c.X - a.X) / (b.X - a.X); - } - else { - r = (c.Y - a.Y) / (b.Y - a.Y); - } - - if (r < 0.0 || r > 1.0) { - return false; - } - else { - return true; - } - } - - /// - /// Determines whether specific coordinate is on the given polyline - /// - /// The coordinate to be tested - /// The polyline - /// true if coordinate C is on the line, otherwise false - public bool IsOnLine(Coordinate c, ICoordinateList line) { - for (int i = 1; i < line.Count; i++) { - if (this.IsOnLine(c, line[i - 1], line[i], LineMode.LineSegment)) { - return true; - } - } - - return false; - } - - /// - /// Determines if specific point is in ring - /// - /// The coordinate to be tested - /// The ring to locate point in - /// True if point lies inside ring, otherwise false - public bool IsInRing(Coordinate c, ICoordinateList ring) { - if (ring.Count < 3) { - throw new ArgumentException("Ring must contain at least 3 points", "ring"); - } - - if (ring[0].Equals2D(ring[ring.Count - 1]) == false) { - throw new ArgumentException("Ring does not have the same endpoints", "ring"); - } - - // determine if point is in ring using ray-tracing algorithm - // ray is casted from c in the direction of positive x-axis - int crossings = 0; - - for (int i = 0; i < ring.Count; i++) { - Coordinate p1 = ring[i]; - Coordinate p2 = ring[(i + 1) % ring.Count]; - - double y1 = p1.Y - c.Y; - double y2 = p2.Y - c.Y; - - // check there can be crossing - c lies between P1 and P2 on y-axis - if (((y1 > 0) && (y2 <= 0)) || ((y2 > 0) && (y1 <= 0))) { - double x1 = p1.X - c.X; - double x2 = p2.X - c.X; - - // compute intersection - double intersection = (x1 * y2 - x2 * y1) / (y2 - y1); - - if (intersection > 0) { - crossings++; - } - } - } - - // p is inside if an odd number of crossings - if ((crossings % 2) == 1) { - return true; - } - else { - return false; - } - } - - /// - /// Determines whether two lines or line segments intersects - /// - /// The first point of the first line - /// The second point of the first line - /// LineMode value that specifies whether A1B1 should be treated as infinite line or as line segment - /// The first point of the second line - /// The second point of the second line - /// LineMode value that specifies whether A2B2 should be treated as infinite line or as line segment - /// true if A1B1 intersects A2B2, otherwise returns false - public bool Intersects(Coordinate a1, Coordinate b1, LineMode line1Mode, Coordinate a2, Coordinate b2, LineMode line2Mode) { - double paramA1 = b1.Y - a1.Y; - double paramB1 = a1.X - b1.X; - double paramC1 = paramA1 * a1.X + paramB1 * a1.Y; - - double paramA2 = b2.Y - a2.Y; - double paramB2 = a2.X - b2.X; - double paramC2 = paramA2 * a2.X + paramB2 * a2.Y; - - double det = paramA1 * paramB2 - paramA2 * paramB1; - if (det == 0) { - return false; - } - else { - double x = (paramB2 * paramC1 - paramB1 * paramC2) / det; - double y = (paramA1 * paramC2 - paramA2 * paramC1) / det; - - if (line1Mode == LineMode.LineSegment) { - if (x < Math.Min(a1.X, b1.X) || x > Math.Max(a1.X, b1.X) || y < Math.Min(a1.Y, b1.Y) || y > Math.Max(a1.Y, b1.Y)) { - return false; - } - } - - if (line2Mode == LineMode.LineSegment) { - if (x < Math.Min(a2.X, b2.X) || x > Math.Max(a2.X, b2.X) || y < Math.Min(a2.Y, b2.Y) || y > Math.Max(a2.Y, b2.Y)) { - return false; - } - } - - return true; - } - } - - /// - /// Determines whether two polylines defined by series of coordinates intersects - /// - /// The first polyline to test - /// The second polyline to test - /// true if polylines intersets, otherwise false - public bool Intersects(ICoordinateList line1, ICoordinateList line2) { - //TODO implement more efficient algorithm - - for (int i = 1; i < line1.Count; i++) { - for (int ii = 1; ii < line2.Count; ii++) { - if (this.Intersects(line1[i - 1], line1[i], LineMode.LineSegment, line2[ii - 1], line2[ii], LineMode.LineSegment)) { - return true; - } - } - } - - return false; - } - - } + double cLineResult = paramA * c.X + paramB * c.Y + paramC; + + if (cLineResult != 0.0) + { + return false; + } + + if (mode == LineMode.Line) + { + return true; + } + + // compute distance of the C along vector AB + double r; + double dx = Math.Abs(b.X - a.X); + double dy = Math.Abs(b.Y - a.Y); + + if (dx > dy) + { + r = (c.X - a.X) / (b.X - a.X); + } + else + { + r = (c.Y - a.Y) / (b.Y - a.Y); + } + + if (r < 0.0 || r > 1.0) + { + return false; + } + else + { + return true; + } + } + + /// + /// Determines whether specific coordinate is on the given polyline + /// + /// The coordinate to be tested + /// The polyline + /// true if coordinate C is on the line, otherwise false + public bool IsOnLine(Coordinate c, ICoordinateList line) + { + for (int i = 1; i < line.Count; i++) + { + if (IsOnLine(c, line[i - 1], line[i], LineMode.LineSegment)) + { + return true; + } + } + + return false; + } + + /// + /// Determines if specific point is in ring + /// + /// The coordinate to be tested + /// The ring to locate point in + /// True if point lies inside ring, otherwise false + public bool IsInRing(Coordinate c, ICoordinateList ring) + { + if (ring.Count < 3) + { + throw new ArgumentException("Ring must contain at least 3 points", nameof(ring)); + } + + if (ring[0].Equals2D(ring[ring.Count - 1]) == false) + { + throw new ArgumentException("Ring does not have the same endpoints", nameof(ring)); + } + + // determine if point is in ring using ray-tracing algorithm + // ray is casted from c in the direction of positive x-axis + int crossings = 0; + + for (int i = 0; i < ring.Count; i++) + { + Coordinate p1 = ring[i]; + Coordinate p2 = ring[(i + 1) % ring.Count]; + + double y1 = p1.Y - c.Y; + double y2 = p2.Y - c.Y; + + // check there can be crossing - c lies between P1 and P2 on y-axis + if (((y1 > 0) && (y2 <= 0)) || ((y2 > 0) && (y1 <= 0))) + { + double x1 = p1.X - c.X; + double x2 = p2.X - c.X; + + // compute intersection + double intersection = (x1 * y2 - x2 * y1) / (y2 - y1); + + if (intersection > 0) + { + crossings++; + } + } + } + + // p is inside if an odd number of crossings + if ((crossings % 2) == 1) + { + return true; + } + else + { + return false; + } + } + + /// + /// Determines whether two lines or line segments intersects + /// + /// The first point of the first line + /// The second point of the first line + /// LineMode value that specifies whether A1B1 should be treated as infinite line or as line segment + /// The first point of the second line + /// The second point of the second line + /// LineMode value that specifies whether A2B2 should be treated as infinite line or as line segment + /// true if A1B1 intersects A2B2, otherwise returns false + public bool Intersects(Coordinate a1, Coordinate b1, LineMode line1Mode, Coordinate a2, Coordinate b2, LineMode line2Mode) + { + double paramA1 = b1.Y - a1.Y; + double paramB1 = a1.X - b1.X; + double paramC1 = paramA1 * a1.X + paramB1 * a1.Y; + + double paramA2 = b2.Y - a2.Y; + double paramB2 = a2.X - b2.X; + double paramC2 = paramA2 * a2.X + paramB2 * a2.Y; + + double det = paramA1 * paramB2 - paramA2 * paramB1; + if (det == 0) + { + return false; + } + else + { + double x = (paramB2 * paramC1 - paramB1 * paramC2) / det; + double y = (paramA1 * paramC2 - paramA2 * paramC1) / det; + + if (line1Mode == LineMode.LineSegment) + { + if (x < Math.Min(a1.X, b1.X) || x > Math.Max(a1.X, b1.X) || y < Math.Min(a1.Y, b1.Y) || y > Math.Max(a1.Y, b1.Y)) + { + return false; + } + } + + if (line2Mode == LineMode.LineSegment) + { + if (x < Math.Min(a2.X, b2.X) || x > Math.Max(a2.X, b2.X) || y < Math.Min(a2.Y, b2.Y) || y > Math.Max(a2.Y, b2.Y)) + { + return false; + } + } + + return true; + } + } + + /// + /// Determines whether two polylines defined by series of coordinates intersects + /// + /// The first polyline to test + /// The second polyline to test + /// true if polylines intersets, otherwise false + public bool Intersects(ICoordinateList line1, ICoordinateList line2) + { + //TODO implement more efficient algorithm + + for (int i = 1; i < line1.Count; i++) + { + for (int ii = 1; ii < line2.Count; ii++) + { + if (Intersects(line1[i - 1], line1[i], LineMode.LineSegment, line2[ii - 1], line2[ii], LineMode.LineSegment)) + { + return true; + } + } + } + + return false; + } } diff --git a/src/SpatialLite.Core/Algorithms/IDimensionsCalculator.cs b/src/SpatialLite.Core/Algorithms/IDimensionsCalculator.cs index 79f9be1..14b3d84 100644 --- a/src/SpatialLite.Core/Algorithms/IDimensionsCalculator.cs +++ b/src/SpatialLite.Core/Algorithms/IDimensionsCalculator.cs @@ -1,33 +1,34 @@ using SpatialLite.Core.API; -namespace SpatialLite.Core.Algorithms { +namespace SpatialLite.Core.Algorithms; + +/// +/// Defines methods that a class providing distance and area calculations capabilities must implement +/// +public interface IDimensionsCalculator +{ /// - /// Defines methods that a class providing distance and area calculations capabilities must implement + /// Calculates distance between two points /// - public interface IDimensionsCalculator { - /// - /// Calculates distance between two points - /// - /// The first point - /// The second point - /// distance between two point - double CalculateDistance(Coordinate c1, Coordinate c2); + /// The first point + /// The second point + /// distance between two point + double CalculateDistance(Coordinate c1, Coordinate c2); - /// - /// Calculates distance between a point and a line AB - /// - /// The coordinate to compute the distance for. - /// One point of the line. - /// Another point of the line. - /// LineDistanceMode value that specifies whether AB should be treated as infinite line or as line segment - /// The distance from c to line AB. - double CalculateDistance(Coordinate c, Coordinate a, Coordinate b, LineMode mode); + /// + /// Calculates distance between a point and a line AB + /// + /// The coordinate to compute the distance for. + /// One point of the line. + /// Another point of the line. + /// LineDistanceMode value that specifies whether AB should be treated as infinite line or as line segment + /// The distance from c to line AB. + double CalculateDistance(Coordinate c, Coordinate a, Coordinate b, LineMode mode); - /// - /// Calculates area of the polygon specified by given vertices - /// - /// The vertices of the polygon - /// The area of the polygon - double CalculateArea(ICoordinateList vertices); - } + /// + /// Calculates area of the polygon specified by given vertices + /// + /// The vertices of the polygon + /// The area of the polygon + double CalculateArea(ICoordinateList vertices); } diff --git a/src/SpatialLite.Core/Algorithms/IGeometryLocator.cs b/src/SpatialLite.Core/Algorithms/IGeometryLocator.cs index 2e4dbe0..b687947 100644 --- a/src/SpatialLite.Core/Algorithms/IGeometryLocator.cs +++ b/src/SpatialLite.Core/Algorithms/IGeometryLocator.cs @@ -1,54 +1,55 @@ using SpatialLite.Core.API; -namespace SpatialLite.Core.Algorithms { +namespace SpatialLite.Core.Algorithms; + +/// +/// Defines methods that a class providing relative geometry position computation capabilities must implement. +/// +public interface IGeometryLocator +{ /// - /// Defines methods that a class providing relative geometry position computation capabilities must implement. + /// Determines whether specific coordinate is on line defined by two points. /// - public interface IGeometryLocator { - /// - /// Determines whether specific coordinate is on line defined by two points. - /// - /// The coordinate to be tested. - /// The first point of the line. - /// The second point of the line. - /// LineMode value that specifies whether AB should be treated as infinite line or as line segment. - /// true if coordinate C is on line AB, otherwise false. - bool IsOnLine(Coordinate c, Coordinate a, Coordinate b, LineMode mode); + /// The coordinate to be tested. + /// The first point of the line. + /// The second point of the line. + /// LineMode value that specifies whether AB should be treated as infinite line or as line segment. + /// true if coordinate C is on line AB, otherwise false. + bool IsOnLine(Coordinate c, Coordinate a, Coordinate b, LineMode mode); - /// - /// Determines whether specific coordinate is on the given polyline. - /// - /// The coordinate to be tested. - /// The polyline. - /// true if coordinate C is on the line, otherwise false. - bool IsOnLine(Coordinate c, ICoordinateList line); + /// + /// Determines whether specific coordinate is on the given polyline. + /// + /// The coordinate to be tested. + /// The polyline. + /// true if coordinate C is on the line, otherwise false. + bool IsOnLine(Coordinate c, ICoordinateList line); - /// - /// Determines whether specific point is in ring. - /// - /// The coordinate to be tested. - /// The ring to locate point in. - /// True if point lies inside ring, otherwise false. - bool IsInRing(Coordinate c, ICoordinateList ring); + /// + /// Determines whether specific point is in ring. + /// + /// The coordinate to be tested. + /// The ring to locate point in. + /// True if point lies inside ring, otherwise false. + bool IsInRing(Coordinate c, ICoordinateList ring); - /// - /// Determines whether two lines or line segments defined by two points each intersects. - /// - /// The first point of the first line. - /// The second point of the first line. - /// LineMode value that specifies whether A1B1 should be treated as infinite line or as line segment. - /// The first point of the second line. - /// The second point of the second line. - /// LineMode value that specifies whether A2B2 should be treated as infinite line or as line segment. - /// true if A1B1 intersects A2B2, otherwise returns false. - bool Intersects(Coordinate a1, Coordinate b1, LineMode line1Mode, Coordinate a2, Coordinate b2, LineMode line2Mode); + /// + /// Determines whether two lines or line segments defined by two points each intersects. + /// + /// The first point of the first line. + /// The second point of the first line. + /// LineMode value that specifies whether A1B1 should be treated as infinite line or as line segment. + /// The first point of the second line. + /// The second point of the second line. + /// LineMode value that specifies whether A2B2 should be treated as infinite line or as line segment. + /// true if A1B1 intersects A2B2, otherwise returns false. + bool Intersects(Coordinate a1, Coordinate b1, LineMode line1Mode, Coordinate a2, Coordinate b2, LineMode line2Mode); - /// - /// Determines whether two polylines defined by series of coordinates intersects. - /// - /// The first polyline to test. - /// The second polyline to test. - /// true if polylines intersets, otherwise false. - bool Intersects(ICoordinateList line1, ICoordinateList line2); - } + /// + /// Determines whether two polylines defined by series of coordinates intersects. + /// + /// The first polyline to test. + /// The second polyline to test. + /// true if polylines intersets, otherwise false. + bool Intersects(ICoordinateList line1, ICoordinateList line2); } diff --git a/src/SpatialLite.Core/Algorithms/LineMode.cs b/src/SpatialLite.Core/Algorithms/LineMode.cs index a8b3fb8..01d0e09 100644 --- a/src/SpatialLite.Core/Algorithms/LineMode.cs +++ b/src/SpatialLite.Core/Algorithms/LineMode.cs @@ -1,16 +1,17 @@ -namespace SpatialLite.Core.Algorithms { +namespace SpatialLite.Core.Algorithms; + +/// +/// Specifies how algorithms treats line defined by two points. +/// +public enum LineMode +{ /// - /// Specifies how algorithms treats line defined by two points. + /// Line is treated as line segment. /// - public enum LineMode { - /// - /// Line is treated as line segment. - /// - LineSegment, + LineSegment, - /// - /// Line is treated as infinite line. - /// - Line - } + /// + /// Line is treated as infinite line. + /// + Line } diff --git a/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs b/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs index cd1baa3..4165ee6 100644 --- a/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs +++ b/src/SpatialLite.Core/Algorithms/Sphere2DCalculator.cs @@ -1,145 +1,159 @@ -using System; +using SpatialLite.Core.API; +using System; + +namespace SpatialLite.Core.Algorithms; + +/// +/// Provides methods for calculating distance and area on the surface of a sphere. +/// +/// +/// +/// All calulations ignore coordinate. +/// +/// All coordinate are expected to be a long/lat pairs in degrees. +/// +public class Sphere2DCalculator : IDimensionsCalculator +{ -using SpatialLite.Core.API; + /// + /// The radius of spheric approximation of the Earth. + /// + public const double EarthRadius = 6371010; + + + + /// + /// Initializes a new instance of the Sphere2DCalculator that uses sphere approximation of the Earth. + /// + public Sphere2DCalculator() + { + Radius = EarthRadius; + } + + /// + /// Gets radius of the sphere that Sphere2DCalculator uses for calculations. + /// + public double Radius { get; private set; } + + /// + /// Calculates distance between 2 objects using great circle path. + /// + /// The first coordinate. + /// The second coordinate. + /// The distance of the points in units of the property. + public double CalculateDistance(Coordinate c1, Coordinate c2) + { + double dLon = (c2.X - c1.X) * Math.PI / 180; + double dLat = (c2.Y - c1.Y) * Math.PI / 180; + + double sinLat = Math.Sin(dLat / 2); + double sinLon = Math.Sin(dLon / 2); + + double a = sinLat * sinLat + Math.Cos(c1.Y * Math.PI / 180) * Math.Cos(c2.Y * Math.PI / 180) * sinLon * sinLon; + + //length or arc in radians + double c = 2 * Math.Asin(Math.Min(1, Math.Sqrt(a))); + + return c * Radius; + } + + /// + /// Calculates distance between a point and a great circle path connecting points A and B. + /// + /// The coordinate to compute the distance for. + /// The first point of the great circle. + /// The second point of the great circle. + /// LineMode value that specifies whether great circle should be treated as whole circle or as arc segment between points A and B. + /// The distance from c to great circle connecting points AB in units of the property. + public double CalculateDistance(Coordinate c, Coordinate a, Coordinate b, LineMode mode) + { + double bearingAB = CalculateBearing(a, b); + double bearingAC = CalculateBearing(a, c); + + double distAC = CalculateDistance(a, c); + + //Sign can be used to determine if point is left/right of the great circle + double distCircleC = Math.Abs(Math.Asin(Math.Sin(distAC / EarthRadius) * Math.Sin(bearingAC - bearingAB)) * EarthRadius); + + if (mode == LineMode.Line) + { + return distCircleC; + } + else + { + double bearingBA = CalculateBearing(b, a); + double bearingBC = CalculateBearing(b, c); + + if (Math.Abs(bearingAC - bearingAB) > Math.PI / 2) + { + return distAC; + } + else if (Math.Abs(bearingBC - bearingBA) > Math.PI / 2) + { + return CalculateDistance(b, c); + } + else + { + return distCircleC; + } + } + } + + /// + /// Calculates area of the polygon on the surface of a sphere specified by given vertices. + /// + /// The vertices of the polygon. + /// The area of the polygon in squared units of the property. + /// Polygon is expected to be simple. + public double CalculateArea(ICoordinateList vertices) + { + if (vertices.Count < 3) + { + throw new ArgumentException("List must contain at least 3 vertices.", nameof(vertices)); + } + + double area = 0; + int maxIndex = vertices.Count - 1; + if (vertices[0] != vertices[maxIndex]) + { + maxIndex++; + } + + for (int i = 0; i <= maxIndex; i++) + { + area += (ToRadians(vertices[(i + 1) % maxIndex].X) - ToRadians(vertices[(i - 1) % maxIndex].X)) * Math.Sin(ToRadians(vertices[i % maxIndex].Y)); + } + + return Math.Abs(area * EarthRadius * EarthRadius); + } + + /// + /// Calculates initial course when moving from point C1 to point C2 on great circle path. + /// + /// The first point. + /// The second point + /// The bearing in radians. + /// The bearing changes as traveling along great circle. + private double CalculateBearing(Coordinate c1, Coordinate c2) + { + double dLon = (c2.X - c1.X) * Math.PI / 180; + + double y = Math.Sin(dLon) * Math.Cos(c2.Y * Math.PI / 180); + double x = Math.Cos(c1.Y * Math.PI / 180) * Math.Sin(c2.Y * Math.PI / 180) - + Math.Sin(c1.Y * Math.PI / 180) * Math.Cos(c2.Y * Math.PI / 180) * Math.Cos(c2.X * Math.PI / 180); + + double bearing = Math.Atan2(y, x); + + return bearing; + } -namespace SpatialLite.Core.Algorithms { /// - /// Provides methods for calculating distance and area on the surface of a sphere. + /// Converts angle in degrees to radians /// - /// - /// - /// All calulations ignore coordinate. - /// - /// All coordinate are expected to be a long/lat pairs in degrees. - /// - public class Sphere2DCalculator : IDimensionsCalculator { - - /// - /// The radius of spheric approximation of the Earth. - /// - public const double EarthRadius = 6371010; - - - - /// - /// Initializes a new instance of the Sphere2DCalculator that uses sphere approximation of the Earth. - /// - public Sphere2DCalculator() { - this.Radius = Sphere2DCalculator.EarthRadius; - } - - /// - /// Gets radius of the sphere that Sphere2DCalculator uses for calculations. - /// - public double Radius { get; private set; } - - /// - /// Calculates distance between 2 objects using great circle path. - /// - /// The first coordinate. - /// The second coordinate. - /// The distance of the points in units of the property. - public double CalculateDistance(Coordinate c1, Coordinate c2) { - double dLon = (c2.X - c1.X) * Math.PI / 180; - double dLat = (c2.Y - c1.Y) * Math.PI / 180; - - double sinLat = Math.Sin(dLat / 2); - double sinLon = Math.Sin(dLon / 2); - - double a = sinLat * sinLat + Math.Cos(c1.Y * Math.PI / 180) * Math.Cos(c2.Y * Math.PI / 180) * sinLon * sinLon; - - //length or arc in radians - double c = 2 * Math.Asin(Math.Min(1, Math.Sqrt(a))); - - return c * this.Radius; - } - - /// - /// Calculates distance between a point and a great circle path connecting points A and B. - /// - /// The coordinate to compute the distance for. - /// The first point of the great circle. - /// The second point of the great circle. - /// LineMode value that specifies whether great circle should be treated as whole circle or as arc segment between points A and B. - /// The distance from c to great circle connecting points AB in units of the property. - public double CalculateDistance(Coordinate c, Coordinate a, Coordinate b, LineMode mode) { - double bearingAB = this.CalculateBearing(a, b); - double bearingAC = this.CalculateBearing(a, c); - - double distAC = this.CalculateDistance(a, c); - - //Sign can be used to determine if point is left/right of the great circle - double distCircleC = Math.Abs(Math.Asin(Math.Sin(distAC / Sphere2DCalculator.EarthRadius) * Math.Sin(bearingAC - bearingAB)) * Sphere2DCalculator.EarthRadius); - - if (mode == LineMode.Line) { - return distCircleC; - } - else { - double bearingBA = this.CalculateBearing(b, a); - double bearingBC = this.CalculateBearing(b, c); - - if (Math.Abs(bearingAC - bearingAB) > Math.PI / 2) { - return distAC; - } - else if (Math.Abs(bearingBC - bearingBA) > Math.PI / 2) { - return this.CalculateDistance(b, c); - } - else { - return distCircleC; - } - } - } - - /// - /// Calculates area of the polygon on the surface of a sphere specified by given vertices. - /// - /// The vertices of the polygon. - /// The area of the polygon in squared units of the property. - /// Polygon is expected to be simple. - public double CalculateArea(ICoordinateList vertices) { - if (vertices.Count < 3) { - throw new ArgumentException("List must contain at least 3 vertices.", "vertices"); - } - - double area = 0; - int maxIndex = vertices.Count - 1; - if (vertices[0] != vertices[maxIndex]) { - maxIndex++; - } - - for (int i = 0; i <= maxIndex; i++) { - area += (this.ToRadians(vertices[(i + 1) % maxIndex].X) - this.ToRadians(vertices[(i - 1) % maxIndex].X)) * Math.Sin(this.ToRadians(vertices[i % maxIndex].Y)); - } - - return Math.Abs(area * Sphere2DCalculator.EarthRadius * Sphere2DCalculator.EarthRadius); - } - - /// - /// Calculates initial course when moving from point C1 to point C2 on great circle path. - /// - /// The first point. - /// The second point - /// The bearing in radians. - /// The bearing changes as traveling along great circle. - private double CalculateBearing(Coordinate c1, Coordinate c2) { - double dLon = (c2.X - c1.X) * Math.PI / 180; - - double y = Math.Sin(dLon) * Math.Cos(c2.Y * Math.PI / 180); - double x = Math.Cos(c1.Y * Math.PI / 180) * Math.Sin(c2.Y * Math.PI / 180) - - Math.Sin(c1.Y * Math.PI / 180) * Math.Cos(c2.Y * Math.PI / 180) * Math.Cos(c2.X * Math.PI / 180); - - double bearing = Math.Atan2(y, x); - - return bearing; - } - - /// - /// Converts angle in degrees to radians - /// - /// Angle in degrees - /// angle in radians - private double ToRadians(double degrees) { - return degrees * Math.PI / 180; - } - } + /// Angle in degrees + /// angle in radians + private double ToRadians(double degrees) + { + return degrees * Math.PI / 180; + } } diff --git a/src/SpatialLite.Core/Geometries/CoordinateList.cs b/src/SpatialLite.Core/Geometries/CoordinateList.cs index d377f30..17fdae1 100644 --- a/src/SpatialLite.Core/Geometries/CoordinateList.cs +++ b/src/SpatialLite.Core/Geometries/CoordinateList.cs @@ -1,109 +1,123 @@ -using System.Collections; +using SpatialLite.Core.API; +using System.Collections; using System.Collections.Generic; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; -namespace SpatialLite.Core.Geometries { - /// - /// Represents read-write list of Coordinates. - /// - public class CoordinateList : ICoordinateList { +/// +/// Represents read-write list of Coordinates. +/// +public class CoordinateList : ICoordinateList +{ - private List _storage; + private readonly List _storage; - /// - /// Initializes a new instance of the CoordinateList class, that is empty. - /// - public CoordinateList() { - _storage = new List(); - } + /// + /// Initializes a new instance of the CoordinateList class, that is empty. + /// + public CoordinateList() + { + _storage = new List(); + } - /// - /// Initializes a new instance of the CoordinateList class that contains coordinates from the given collection. - /// - /// The collection whose elements are used to fill CoordinateList. - public CoordinateList(IEnumerable coords) { - _storage = new List(coords); - } + /// + /// Initializes a new instance of the CoordinateList class that contains coordinates from the given collection. + /// + /// The collection whose elements are used to fill CoordinateList. + public CoordinateList(IEnumerable coords) + { + _storage = new List(coords); + } - /// - /// Gets number of Coordinates in the list. - /// - public int Count { - get { - return _storage.Count; - } - } + /// + /// Gets number of Coordinates in the list. + /// + public int Count + { + get + { + return _storage.Count; + } + } - /// - /// Gets or sets Coordinate at the given index. - /// - /// The zero-based index of the Coordinate to get or set. - /// The element at the specified index. - public Coordinate this[int index] { - get { - return _storage[index]; - } - set { - _storage[index] = value; - } - } + /// + /// Gets or sets Coordinate at the given index. + /// + /// The zero-based index of the Coordinate to get or set. + /// The element at the specified index. + public Coordinate this[int index] + { + get + { + return _storage[index]; + } + set + { + _storage[index] = value; + } + } - /// - /// Adds Coordinate to the end of the list. - /// - /// The Coordinate to add to the list. - public void Add(Coordinate coord) { - _storage.Add(coord); - } + /// + /// Adds Coordinate to the end of the list. + /// + /// The Coordinate to add to the list. + public void Add(Coordinate coord) + { + _storage.Add(coord); + } - /// - /// Adds collection of coordinates to the end of the list. - /// - /// The collection of coordinates to add to the list. - public void Add(IEnumerable coords) { - _storage.AddRange(coords); - } + /// + /// Adds collection of coordinates to the end of the list. + /// + /// The collection of coordinates to add to the list. + public void Add(IEnumerable coords) + { + _storage.AddRange(coords); + } - /// - /// Insertes Coordinate to the list at the specified index. - /// - /// The zero-based index at which coord should be inserted. - /// The Coordinate to insert into list. - /// If index equals the number of items in the list, then item is appended to the list. - public void Insert(int index, Coordinate coord) { - _storage.Insert(index, coord); - } + /// + /// Insertes Coordinate to the list at the specified index. + /// + /// The zero-based index at which coord should be inserted. + /// The Coordinate to insert into list. + /// If index equals the number of items in the list, then item is appended to the list. + public void Insert(int index, Coordinate coord) + { + _storage.Insert(index, coord); + } - /// - /// Removes Coordinate at the specified index from the list. - /// - /// The zero-based index of the Coordinate to remove. - public void RemoveAt(int index) { - _storage.RemoveAt(index); - } + /// + /// Removes Coordinate at the specified index from the list. + /// + /// The zero-based index of the Coordinate to remove. + public void RemoveAt(int index) + { + _storage.RemoveAt(index); + } - /// - /// Removes all Coordinates from the collection. - /// - public void Clear() { - _storage.Clear(); - } + /// + /// Removes all Coordinates from the collection. + /// + public void Clear() + { + _storage.Clear(); + } - /// - /// Returns an enumerator that iterates through the CoordinateList - /// - /// The Enumerator for the CoordinateList - public IEnumerator GetEnumerator() { - return _storage.GetEnumerator(); - } + /// + /// Returns an enumerator that iterates through the CoordinateList + /// + /// The Enumerator for the CoordinateList + public IEnumerator GetEnumerator() + { + return _storage.GetEnumerator(); + } - /// - /// Returns an enumerator that iterates through the CoordinateList - /// - /// The Enumerator for the CoordinateList - IEnumerator IEnumerable.GetEnumerator() { - return ((IEnumerable)_storage).GetEnumerator(); - } - } + /// + /// Returns an enumerator that iterates through the CoordinateList + /// + /// The Enumerator for the CoordinateList + IEnumerator IEnumerable.GetEnumerator() + { + return ((IEnumerable)_storage).GetEnumerator(); + } } diff --git a/src/SpatialLite.Core/Geometries/Geometry.cs b/src/SpatialLite.Core/Geometries/Geometry.cs index 4a4cee2..21eb6df 100644 --- a/src/SpatialLite.Core/Geometries/Geometry.cs +++ b/src/SpatialLite.Core/Geometries/Geometry.cs @@ -1,35 +1,35 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; + +/// +/// Represetns the base class for all geometry object. +/// +public abstract class Geometry : IGeometry +{ -namespace SpatialLite.Core.Geometries { /// - /// Represetns the base class for all geometry object. + /// Gets a value indicating whether this has Z-coordinates. /// - public abstract class Geometry : IGeometry { - - /// - /// Gets a value indicating whether this has Z-coordinates. - /// - public abstract bool Is3D { get; } + public abstract bool Is3D { get; } - /// - /// Gets a value indicating whether this has M values. - /// - public abstract bool IsMeasured { get; } + /// + /// Gets a value indicating whether this has M values. + /// + public abstract bool IsMeasured { get; } - /// - /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. - /// - /// - /// Returns an object that specifies the minimal bounding box of the Geometry object. - /// - public abstract Envelope GetEnvelope(); + /// + /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. + /// + /// + /// Returns an object that specifies the minimal bounding box of the Geometry object. + /// + public abstract Envelope GetEnvelope(); - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - public abstract IEnumerable GetCoordinates(); - } + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + public abstract IEnumerable GetCoordinates(); } diff --git a/src/SpatialLite.Core/Geometries/GeometryCollection.cs b/src/SpatialLite.Core/Geometries/GeometryCollection.cs index d2457de..1c37ff9 100644 --- a/src/SpatialLite.Core/Geometries/GeometryCollection.cs +++ b/src/SpatialLite.Core/Geometries/GeometryCollection.cs @@ -1,93 +1,104 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; using System.Linq; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; + +/// +/// Represents generic collection of geometry objects. +/// +/// All objects should be in the same spatial reference system, but it isn't enforced by this class. +/// The type of objects in the collection +public class GeometryCollection : Geometry, IGeometryCollection where T : IGeometry +{ + private readonly List _geometries; -namespace SpatialLite.Core.Geometries { /// - /// Represents generic collection of geometry objects. + /// Initializes a new instance of the GeometryCollection class that is empty and has assigned WSG84 coordinate reference system. /// - /// All objects should be in the same spatial reference system, but it isn't enforced by this class. - /// The type of objects in the collection - public class GeometryCollection : Geometry, IGeometryCollection where T : IGeometry { - private readonly List _geometries; - - /// - /// Initializes a new instance of the GeometryCollection class that is empty and has assigned WSG84 coordinate reference system. - /// - public GeometryCollection() - : base() { - _geometries = new List(); - } + public GeometryCollection() + : base() + { + _geometries = new List(); + } - /// - /// Initializes a new instance of the GeometryCollection class in WSG84 coordinate reference system and fills it with specified geometries. - /// - /// Geometry objects to be added to the collection - public GeometryCollection(IEnumerable geometries) - : base() { - _geometries = new List(geometries); - } + /// + /// Initializes a new instance of the GeometryCollection class in WSG84 coordinate reference system and fills it with specified geometries. + /// + /// Geometry objects to be added to the collection + public GeometryCollection(IEnumerable geometries) + : base() + { + _geometries = new List(geometries); + } - /// - /// Gets a value indicating whether the this "/> has Z ordinates set. - /// - /// - /// Is3D returns true if any of the geometries contained in this GeometryCollection has Z ordinate set. - /// - public override bool Is3D { - get { - return _geometries.Any(geometry => geometry.Is3D); - } - } + /// + /// Gets a value indicating whether the this "/> has Z ordinates set. + /// + /// + /// Is3D returns true if any of the geometries contained in this GeometryCollection has Z ordinate set. + /// + public override bool Is3D + { + get + { + return _geometries.Any(geometry => geometry.Is3D); + } + } - /// - /// Gets a value indicating whether this has M values. - /// - /// - /// IsMeasured returns true if any of the geometries in this GeometryCollection has M value set. - /// - public override bool IsMeasured { - get { return _geometries.Any(c => c.IsMeasured); } - } + /// + /// Gets a value indicating whether this has M values. + /// + /// + /// IsMeasured returns true if any of the geometries in this GeometryCollection has M value set. + /// + public override bool IsMeasured + { + get { return _geometries.Any(c => c.IsMeasured); } + } - /// - /// Gets the list of IGeometry objects in this collection - /// - public List Geometries { - get { - return _geometries; - } - } + /// + /// Gets the list of IGeometry objects in this collection + /// + public List Geometries + { + get + { + return _geometries; + } + } - /// - /// Gets collection of geometry obejcts from this GeometryCollection as the collection of IGeometry objects. - /// - IEnumerable IGeometryCollection.Geometries { - get { return _geometries; } - } + /// + /// Gets collection of geometry obejcts from this GeometryCollection as the collection of IGeometry objects. + /// + IEnumerable IGeometryCollection.Geometries + { + get { return _geometries; } + } - /// - /// Computes envelope of the GeometryCollection object. The envelope is defined as a minimal bounding box for a geometry. - /// - /// - /// Returns an object that specifies the minimal bounding box of the GeometryCollection object. - /// - public override Envelope GetEnvelope() { - Envelope result = new Envelope(); - foreach (var item in _geometries) { - result.Extend(item.GetEnvelope()); - } + /// + /// Computes envelope of the GeometryCollection object. The envelope is defined as a minimal bounding box for a geometry. + /// + /// + /// Returns an object that specifies the minimal bounding box of the GeometryCollection object. + /// + public override Envelope GetEnvelope() + { + Envelope result = new(); + foreach (var item in _geometries) + { + result.Extend(item.GetEnvelope()); + } - return result; - } + return result; + } - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - public override IEnumerable GetCoordinates() { - return this.Geometries.SelectMany(o => o.GetCoordinates()); - } + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + public override IEnumerable GetCoordinates() + { + return Geometries.SelectMany(o => o.GetCoordinates()); } } diff --git a/src/SpatialLite.Core/Geometries/LineString.cs b/src/SpatialLite.Core/Geometries/LineString.cs index 7a9f164..92478c4 100644 --- a/src/SpatialLite.Core/Geometries/LineString.cs +++ b/src/SpatialLite.Core/Geometries/LineString.cs @@ -1,125 +1,144 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; using System.Linq; -using SpatialLite.Core.API; -namespace SpatialLite.Core.Geometries { +namespace SpatialLite.Core.Geometries; + +/// +/// Represents a curve with linear interpolation between consecutive vertices. +/// +public class LineString : Geometry, ILineString +{ + + private readonly CoordinateList _coordinates; + + /// + /// Initializes a new instance of the LineString class that is empty and has assigned WSG84 coordinate reference system. + /// + public LineString() + : base() + { + _coordinates = new CoordinateList(); + } + /// - /// Represents a curve with linear interpolation between consecutive vertices. + /// Initializes a new instance of the LineString class with specified coordinates and WSG84 coordinate reference system. /// - public class LineString : Geometry, ILineString { - - private CoordinateList _coordinates; - - /// - /// Initializes a new instance of the LineString class that is empty and has assigned WSG84 coordinate reference system. - /// - public LineString() - : base() { - _coordinates = new CoordinateList(); - } - - /// - /// Initializes a new instance of the LineString class with specified coordinates and WSG84 coordinate reference system. - /// - /// The collection of coordinates to be copied to the new LineString. - public LineString(IEnumerable coords) - : base() { - _coordinates = new CoordinateList(coords); - } - - /// - /// Gets a value indicating whether the this has Z-coordinates set. - /// - /// - /// Is3D returns true if any of the coordinates in this LineString has Z-coordinate set. - /// - public override bool Is3D { - get { return _coordinates.Any(c => c.Is3D); } - } - - /// - /// Gets a value indicating whether this has M values. - /// - /// - /// IsMeasured returns true if any of the coordinates in this LineString has M value set. - /// - public override bool IsMeasured { - get { return _coordinates.Any(c => c.IsMeasured); } - } - - /// - /// Gets the list of çoordinates that define this LisneString - /// - public virtual ICoordinateList Coordinates { - get { return _coordinates; } - } - - /// - /// Gets the list of çoordinates that define this LisneString - /// - ICoordinateList ILineString.Coordinates { - get { return this.Coordinates; } - } - - /// - /// Gets the first coordinate of the ILineString object. - /// - public Coordinate Start { - get { - if (_coordinates.Count == 0) { - return Coordinate.Empty; - } - - return _coordinates[0]; - } - } - - /// - /// Gets the last coordinate of the ILineString object. - /// - public Coordinate End { - get { - if (_coordinates.Count == 0) { - return Coordinate.Empty; - } - - return _coordinates[_coordinates.Count - 1]; - } - } - - /// - /// Gets a value indicating whether this LineString is closed. - /// - /// - /// The LineStringBase is closed if and are identical. - /// - public virtual bool IsClosed { - get { - if (_coordinates.Count == 0) { - return false; - } - else { - return this.Start.Equals(this.End); - } - } - } - - /// - /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. - /// - /// - /// Returns an object that specifies the minimal bounding box of the IGeometry object. - /// - public override Envelope GetEnvelope() { - return new Envelope(_coordinates); - } - - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - public override IEnumerable GetCoordinates() { - return this.Coordinates; + /// The collection of coordinates to be copied to the new LineString. + public LineString(IEnumerable coords) + : base() + { + _coordinates = new CoordinateList(coords); + } + + /// + /// Gets a value indicating whether the this has Z-coordinates set. + /// + /// + /// Is3D returns true if any of the coordinates in this LineString has Z-coordinate set. + /// + public override bool Is3D + { + get { return _coordinates.Any(c => c.Is3D); } + } + + /// + /// Gets a value indicating whether this has M values. + /// + /// + /// IsMeasured returns true if any of the coordinates in this LineString has M value set. + /// + public override bool IsMeasured + { + get { return _coordinates.Any(c => c.IsMeasured); } + } + + /// + /// Gets the list of çoordinates that define this LisneString + /// + public virtual ICoordinateList Coordinates + { + get { return _coordinates; } + } + + /// + /// Gets the list of çoordinates that define this LisneString + /// + ICoordinateList ILineString.Coordinates + { + get { return Coordinates; } + } + + /// + /// Gets the first coordinate of the ILineString object. + /// + public Coordinate Start + { + get + { + if (_coordinates.Count == 0) + { + return Coordinate.Empty; + } + + return _coordinates[0]; + } + } + + /// + /// Gets the last coordinate of the ILineString object. + /// + public Coordinate End + { + get + { + if (_coordinates.Count == 0) + { + return Coordinate.Empty; + } + + return _coordinates[_coordinates.Count - 1]; + } + } + + /// + /// Gets a value indicating whether this LineString is closed. + /// + /// + /// The LineStringBase is closed if and are identical. + /// + public virtual bool IsClosed + { + get + { + if (_coordinates.Count == 0) + { + return false; + } + else + { + return Start.Equals(End); + } } - } + } + + /// + /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. + /// + /// + /// Returns an object that specifies the minimal bounding box of the IGeometry object. + /// + public override Envelope GetEnvelope() + { + return new Envelope(_coordinates); + } + + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + public override IEnumerable GetCoordinates() + { + return Coordinates; + } } diff --git a/src/SpatialLite.Core/Geometries/MultiLineString.cs b/src/SpatialLite.Core/Geometries/MultiLineString.cs index dcf4f49..40f2796 100644 --- a/src/SpatialLite.Core/Geometries/MultiLineString.cs +++ b/src/SpatialLite.Core/Geometries/MultiLineString.cs @@ -1,33 +1,36 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; + +/// +/// Represents a collection of LineStrings +/// +public class MultiLineString : GeometryCollection, IMultiLineString +{ -namespace SpatialLite.Core.Geometries { /// - /// Represents a collection of LineStrings + /// Initializes a new instance of the MultiLineString class that is empty and has assigned WSG84 coordinate reference system. /// - public class MultiLineString : GeometryCollection, IMultiLineString { - - /// - /// Initializes a new instance of the MultiLineString class that is empty and has assigned WSG84 coordinate reference system. - /// - public MultiLineString() - : base() { - } + public MultiLineString() + : base() + { + } - /// - /// Initializes a new instance of the MultiLineString class with specified LineStrings - /// - /// The collection of LineString to be copied to the new MultiLineString. - public MultiLineString(IEnumerable linestrings) - : base(linestrings) { - } + /// + /// Initializes a new instance of the MultiLineString class with specified LineStrings + /// + /// The collection of LineString to be copied to the new MultiLineString. + public MultiLineString(IEnumerable linestrings) + : base(linestrings) + { + } - /// - /// Gets collection of geometry obejcts from this MultiLineString as the collection of IMultiLineString objects. - /// - IEnumerable IGeometryCollection.Geometries { - get { return base.Geometries; } - } - } + /// + /// Gets collection of geometry obejcts from this MultiLineString as the collection of IMultiLineString objects. + /// + IEnumerable IGeometryCollection.Geometries + { + get { return Geometries; } + } } diff --git a/src/SpatialLite.Core/Geometries/MultiPoint.cs b/src/SpatialLite.Core/Geometries/MultiPoint.cs index 32776e6..eb2ba5f 100644 --- a/src/SpatialLite.Core/Geometries/MultiPoint.cs +++ b/src/SpatialLite.Core/Geometries/MultiPoint.cs @@ -1,33 +1,36 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; + +/// +/// Represents a collection of Points +/// +public class MultiPoint : GeometryCollection, IMultiPoint +{ -namespace SpatialLite.Core.Geometries { /// - /// Represents a collection of Points + /// Initializes a new instance of the MultiPoint class that is empty and has assigned WSG84 coordinate reference system. /// - public class MultiPoint : GeometryCollection, IMultiPoint { - - /// - /// Initializes a new instance of the MultiPoint class that is empty and has assigned WSG84 coordinate reference system. - /// - public MultiPoint() - : base() { - } + public MultiPoint() + : base() + { + } - /// - /// Initializes a new instance of the MultiPoint class with specified points. - /// - /// The collection of points to be copied to the new MultiPoint. - public MultiPoint(IEnumerable points) - : base(points) { - } + /// + /// Initializes a new instance of the MultiPoint class with specified points. + /// + /// The collection of points to be copied to the new MultiPoint. + public MultiPoint(IEnumerable points) + : base(points) + { + } - /// - /// Gets collection of points from this Multipoint as the collection of IPoint objects. - /// - IEnumerable IGeometryCollection.Geometries { - get { return base.Geometries; } - } - } -} \ No newline at end of file + /// + /// Gets collection of points from this Multipoint as the collection of IPoint objects. + /// + IEnumerable IGeometryCollection.Geometries + { + get { return Geometries; } + } +} diff --git a/src/SpatialLite.Core/Geometries/MultiPolygon.cs b/src/SpatialLite.Core/Geometries/MultiPolygon.cs index b72ca76..9e576d8 100644 --- a/src/SpatialLite.Core/Geometries/MultiPolygon.cs +++ b/src/SpatialLite.Core/Geometries/MultiPolygon.cs @@ -1,33 +1,36 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; + +/// +/// Represents a collection of Polygons +/// +public class MultiPolygon : GeometryCollection, IMultiPolygon +{ -namespace SpatialLite.Core.Geometries { /// - /// Represents a collection of Polygons + /// Initializes a new instance of the MultiPolygon class that is empty and has assigned WSG84 coordinate reference system. /// - public class MultiPolygon : GeometryCollection, IMultiPolygon { - - /// - /// Initializes a new instance of the MultiPolygon class that is empty and has assigned WSG84 coordinate reference system. - /// - public MultiPolygon() - : base() { - } + public MultiPolygon() + : base() + { + } - /// - /// Initializes a new instance of the MultiPolygon class with specified Polygons - /// - /// The collection of Polygons to be copied to the new MultiPolygon. - public MultiPolygon(IEnumerable polygons) - : base(polygons) { - } + /// + /// Initializes a new instance of the MultiPolygon class with specified Polygons + /// + /// The collection of Polygons to be copied to the new MultiPolygon. + public MultiPolygon(IEnumerable polygons) + : base(polygons) + { + } - /// - /// Gets collection of polygons from this MultiPolygon as the collection of IPolygon objects. - /// - IEnumerable IGeometryCollection.Geometries { - get { return base.Geometries; } - } - } + /// + /// Gets collection of polygons from this MultiPolygon as the collection of IPolygon objects. + /// + IEnumerable IGeometryCollection.Geometries + { + get { return Geometries; } + } } diff --git a/src/SpatialLite.Core/Geometries/Point.cs b/src/SpatialLite.Core/Geometries/Point.cs index 6656f88..88d4e47 100644 --- a/src/SpatialLite.Core/Geometries/Point.cs +++ b/src/SpatialLite.Core/Geometries/Point.cs @@ -1,105 +1,117 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; -namespace SpatialLite.Core.Geometries { - /// - /// Represents a location in the coordinate space. - /// - public class Point : Geometry, IPoint { +/// +/// Represents a location in the coordinate space. +/// +public class Point : Geometry, IPoint +{ - private Coordinate _position = Coordinate.Empty; + private Coordinate _position = Coordinate.Empty; - /// - /// Initializes a new instance of the Point class that is empty and has assigned the WSG84 coordinate reference system. - /// - public Point() - : base() { - } + /// + /// Initializes a new instance of the Point class that is empty and has assigned the WSG84 coordinate reference system. + /// + public Point() + : base() + { + } - /// - /// Initializes a new instance of the Point class with specified X and Y coordinates in WSG84 coordinate reference system. - /// - /// The X-coordinate of the Point - /// The Y-coordinate of the Point - public Point(double x, double y) - : base() { - _position = new Coordinate(x, y); - } + /// + /// Initializes a new instance of the Point class with specified X and Y coordinates in WSG84 coordinate reference system. + /// + /// The X-coordinate of the Point + /// The Y-coordinate of the Point + public Point(double x, double y) + : base() + { + _position = new Coordinate(x, y); + } - /// - /// Initializes a new instance of the Point class with specified X, Y and Z coordinates in WSG84 coordinate reference system. - /// - /// The X-coordinate of the Point - /// The Y-coordinate of the Point - /// The Z-coordinate of the Point - public Point(double x, double y, double z) - : base() { - _position = new Coordinate(x, y, z); - } + /// + /// Initializes a new instance of the Point class with specified X, Y and Z coordinates in WSG84 coordinate reference system. + /// + /// The X-coordinate of the Point + /// The Y-coordinate of the Point + /// The Z-coordinate of the Point + public Point(double x, double y, double z) + : base() + { + _position = new Coordinate(x, y, z); + } - /// - /// Initializes a new instance of the Point class with specified X, Y, Z coordinates and M value in WSG84 coordinate reference system. - /// - /// The X-coordinate of the Point - /// The Y-coordinate of the Point - /// The Z-coordinate of the Point - /// The measured value of the Point - public Point(double x, double y, double z, double m) - : base() { - _position = new Coordinate(x, y, z, m); - } + /// + /// Initializes a new instance of the Point class with specified X, Y, Z coordinates and M value in WSG84 coordinate reference system. + /// + /// The X-coordinate of the Point + /// The Y-coordinate of the Point + /// The Z-coordinate of the Point + /// The measured value of the Point + public Point(double x, double y, double z, double m) + : base() + { + _position = new Coordinate(x, y, z, m); + } - /// - /// Initializes a new instance of the Point class with specific Position in WSG84 coordinate reference system. - /// - /// The position of this Point - public Point(Coordinate position) - : base() { - _position = position; - } + /// + /// Initializes a new instance of the Point class with specific Position in WSG84 coordinate reference system. + /// + /// The position of this Point + public Point(Coordinate position) + : base() + { + _position = position; + } - /// - /// Gets or sets position of this Point - /// - public Coordinate Position { - get { - return _position; - } + /// + /// Gets or sets position of this Point + /// + public Coordinate Position + { + get + { + return _position; + } - set { - _position = value; - } - } + set + { + _position = value; + } + } - /// - /// Gets a value indicating whether the this Point has Z-coordinate set. - /// - public override bool Is3D { - get { return _position.Is3D; } - } + /// + /// Gets a value indicating whether the this Point has Z-coordinate set. + /// + public override bool Is3D + { + get { return _position.Is3D; } + } - /// - /// Gets a value indicating whether the this Point has M value set. - /// - public override bool IsMeasured { - get { return _position.IsMeasured; } - } + /// + /// Gets a value indicating whether the this Point has M value set. + /// + public override bool IsMeasured + { + get { return _position.IsMeasured; } + } - /// - /// Returns Envelope, that covers this Point. - /// - /// Envelope, that covers this Point. - public override Envelope GetEnvelope() { - return new Envelope(this.Position); - } + /// + /// Returns Envelope, that covers this Point. + /// + /// Envelope, that covers this Point. + public override Envelope GetEnvelope() + { + return new Envelope(Position); + } - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - public override IEnumerable GetCoordinates() { - yield return this.Position; - } + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + public override IEnumerable GetCoordinates() + { + yield return Position; } } diff --git a/src/SpatialLite.Core/Geometries/Polygon.cs b/src/SpatialLite.Core/Geometries/Polygon.cs index 507bf50..045a879 100644 --- a/src/SpatialLite.Core/Geometries/Polygon.cs +++ b/src/SpatialLite.Core/Geometries/Polygon.cs @@ -1,87 +1,95 @@ -using System.Collections.Generic; +using SpatialLite.Core.API; +using System.Collections.Generic; using System.Linq; -using SpatialLite.Core.API; +namespace SpatialLite.Core.Geometries; -namespace SpatialLite.Core.Geometries { +/// +/// Represents a polygon, which may include holes. +/// +public class Polygon : Geometry, IPolygon +{ /// - /// Represents a polygon, which may include holes. + /// Initializes a new instance of the Polygon class in WSG84 coordinate reference system that without ExteriorRing and no InteriorRings. /// - public class Polygon : Geometry, IPolygon { - /// - /// Initializes a new instance of the Polygon class in WSG84 coordinate reference system that without ExteriorRing and no InteriorRings. - /// - public Polygon() - : base() { - this.ExteriorRing = new CoordinateList(); - this.InteriorRings = new List(0); - } + public Polygon() + : base() + { + ExteriorRing = new CoordinateList(); + InteriorRings = new List(0); + } - /// - /// Initializes a new instance of the Polygon class with the given exterior boundary in WSG84 coordinate reference system. - /// - /// The exterior boundary of the polygon. - public Polygon(ICoordinateList exteriorRing) { - this.ExteriorRing = exteriorRing; - this.InteriorRings = new List(0); - } + /// + /// Initializes a new instance of the Polygon class with the given exterior boundary in WSG84 coordinate reference system. + /// + /// The exterior boundary of the polygon. + public Polygon(ICoordinateList exteriorRing) + { + ExteriorRing = exteriorRing; + InteriorRings = new List(0); + } - /// - /// Gets or sets the exterior boundary of the polygon. - /// - public ICoordinateList ExteriorRing { get; set; } + /// + /// Gets or sets the exterior boundary of the polygon. + /// + public ICoordinateList ExteriorRing { get; set; } - /// - /// Gets the exterior boundary of the polygon. - /// - ICoordinateList IPolygon.ExteriorRing { - get { return this.ExteriorRing; } - } + /// + /// Gets the exterior boundary of the polygon. + /// + ICoordinateList IPolygon.ExteriorRing + { + get { return ExteriorRing; } + } - /// - /// Gets the list of holes in the polygon. - /// - public List InteriorRings { get; private set; } + /// + /// Gets the list of holes in the polygon. + /// + public List InteriorRings { get; private set; } - /// - /// Gets the list of holes in the polygon. - /// - IEnumerable IPolygon.InteriorRings { - get { return this.InteriorRings; } - } + /// + /// Gets the list of holes in the polygon. + /// + IEnumerable IPolygon.InteriorRings + { + get { return InteriorRings; } + } - /// - /// Gets a value indicating whether the this has Z-coordinate set. - /// - public override bool Is3D { - //TODO consider using InteriorRings as well - get { return this.ExteriorRing != null && this.ExteriorRing.Any(c => c.Is3D); } - } + /// + /// Gets a value indicating whether the this has Z-coordinate set. + /// + public override bool Is3D + { + //TODO consider using InteriorRings as well + get { return ExteriorRing != null && ExteriorRing.Any(c => c.Is3D); } + } - /// - /// Gets a value indicating whether this has M values. - /// - public override bool IsMeasured { - //TODO consider using InteriorRings as well - get { return this.ExteriorRing != null && this.ExteriorRing.Any(c => c.IsMeasured); } - } + /// + /// Gets a value indicating whether this has M values. + /// + public override bool IsMeasured + { + //TODO consider using InteriorRings as well + get { return ExteriorRing != null && ExteriorRing.Any(c => c.IsMeasured); } + } - /// - /// Computes envelope of the Polygon object. The envelope is defined as a minimal bounding box for a geometry. - /// - /// - /// Returns an object that specifies the minimal bounding box of the Polygon object. - /// - public override Envelope GetEnvelope() { - return this.ExteriorRing.Count == 0 ? new Envelope() : new Envelope(this.ExteriorRing); - } + /// + /// Computes envelope of the Polygon object. The envelope is defined as a minimal bounding box for a geometry. + /// + /// + /// Returns an object that specifies the minimal bounding box of the Polygon object. + /// + public override Envelope GetEnvelope() + { + return ExteriorRing.Count == 0 ? new Envelope() : new Envelope(ExteriorRing); + } - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - public override IEnumerable GetCoordinates() { - return this.ExteriorRing.Concat(this.InteriorRings.SelectMany(o => o)); - } + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + public override IEnumerable GetCoordinates() + { + return ExteriorRing.Concat(InteriorRings.SelectMany(o => o)); } } diff --git a/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs b/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs index ec4ee5e..52b7d7e 100644 --- a/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs +++ b/src/SpatialLite.Core/Geometries/ReadOnlyCoordinateList.cs @@ -1,106 +1,121 @@ -using System; +using SpatialLite.Core.API; +using System; using System.Collections; using System.Collections.Generic; -using SpatialLite.Core.API; -namespace SpatialLite.Core.Geometries { +namespace SpatialLite.Core.Geometries; + +/// +/// Provides read-only ICoordinateList wrapper around collection of points +/// +public class ReadOnlyCoordinateList : ICoordinateList where T : IPoint +{ /// - /// Provides read-only ICoordinateList wrapper around collection of points + /// Initializes a new instance of the ReadOnlyCoordinateList class with specified source list fo nodes /// - public class ReadOnlyCoordinateList : ICoordinateList where T : IPoint { - /// - /// Initializes a new instance of the ReadOnlyCoordinateList class with specified source list fo nodes - /// - /// The list of Points to be used as source for this ReadOnlyCoordinateList - public ReadOnlyCoordinateList(IReadOnlyList source) { - this.Source = source; - } + /// The list of Points to be used as source for this ReadOnlyCoordinateList + public ReadOnlyCoordinateList(IReadOnlyList source) + { + Source = source; + } - /// - /// Gets number of Coordinates in the list. - /// - public int Count { - get { - return this.Source.Count; - } + /// + /// Gets number of Coordinates in the list. + /// + public int Count + { + get + { + return Source.Count; } + } - /// - /// Gets the List of Points used as source for this ReadOnlyCoordinateList. - /// - public IReadOnlyList Source { get; private set; } + /// + /// Gets the List of Points used as source for this ReadOnlyCoordinateList. + /// + public IReadOnlyList Source { get; private set; } - /// - /// Gets or sets Coordinate at the given index. - /// - /// The zero-based index of the Coordinate to get or set. - /// The element at the specified index. - public Coordinate this[int index] { - get { - return this.Source[index].Position; - } - set { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } + /// + /// Gets or sets Coordinate at the given index. + /// + /// The zero-based index of the Coordinate to get or set. + /// The element at the specified index. + public Coordinate this[int index] + { + get + { + return Source[index].Position; } - - /// - /// Adds Coordinate to the end of the list. - /// - /// The Coordinate to add to the list. - public void Add(Coordinate coord) { + set + { throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); } + } - /// - /// Adds collection of coordinates to the end of the list. - /// - /// The collection of coordinates to add to the list. - public void Add(IEnumerable coords) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } + /// + /// Adds Coordinate to the end of the list. + /// + /// The Coordinate to add to the list. + public void Add(Coordinate coord) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } - /// - /// Insertes Coordinate to the list at the specified index. - /// - /// The zero-based index at which coord should be inserted. - /// The Coordinate to insert into list. - /// If index equals the number of items in the list, then item is appended to the list. - public void Insert(int index, Coordinate coord) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } + /// + /// Adds collection of coordinates to the end of the list. + /// + /// The collection of coordinates to add to the list. + public void Add(IEnumerable coords) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } - /// - /// Removes Coordinate at the specified index from the list. - /// - /// The zero-based index of the Coordinate to remove. - public void RemoveAt(int index) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } + /// + /// Insertes Coordinate to the list at the specified index. + /// + /// The zero-based index at which coord should be inserted. + /// The Coordinate to insert into list. + /// If index equals the number of items in the list, then item is appended to the list. + public void Insert(int index, Coordinate coord) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } - /// - /// Removes all Coordinates from the collection. - /// - public void Clear() { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } + /// + /// Removes Coordinate at the specified index from the list. + /// + /// The zero-based index of the Coordinate to remove. + public void RemoveAt(int index) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } - /// - /// Returns an enumerator that iterates through the CoordinateList - /// - /// The Enumerator for the CoordinateList - public IEnumerator GetEnumerator() { - foreach (var node in this.Source) { - yield return node.Position; - } - } + /// + /// Removes all Coordinates from the collection. + /// + public void Clear() + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } - /// - /// Returns an enumerator that iterates through the CoordinateList - /// - /// The Enumerator for the CoordinateList - IEnumerator IEnumerable.GetEnumerator() { - return this.GetEnumerator(); + /// + /// Returns an enumerator that iterates through the CoordinateList + /// + /// The Enumerator for the CoordinateList + public IEnumerator GetEnumerator() + { + foreach (var node in Source) + { + yield return node.Position; } } + + /// + /// Returns an enumerator that iterates through the CoordinateList + /// + /// The Enumerator for the CoordinateList + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } diff --git a/src/SpatialLite.Core/IO/BinaryEncoding.cs b/src/SpatialLite.Core/IO/BinaryEncoding.cs index 03ece00..97fd1fe 100644 --- a/src/SpatialLite.Core/IO/BinaryEncoding.cs +++ b/src/SpatialLite.Core/IO/BinaryEncoding.cs @@ -1,15 +1,16 @@ -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Specifies byte ordering in multibyte values. +/// +public enum BinaryEncoding : byte +{ /// - /// Specifies byte ordering in multibyte values. + /// Most significant byte first. /// - public enum BinaryEncoding : byte { - /// - /// Most significant byte first. - /// - BigEndian = 0, - /// - /// Least significant byte first. - /// - LittleEndian = 1 - } + BigEndian = 0, + /// + /// Least significant byte first. + /// + LittleEndian = 1 } diff --git a/src/SpatialLite.Core/IO/TokenType.cs b/src/SpatialLite.Core/IO/TokenType.cs index 1910def..8411133 100644 --- a/src/SpatialLite.Core/IO/TokenType.cs +++ b/src/SpatialLite.Core/IO/TokenType.cs @@ -1,41 +1,42 @@ -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Represents type of the WKT token. +/// +internal enum TokenType +{ /// - /// Represents type of the WKT token. + /// String token - it consists of a-zA-Z characters /// - internal enum TokenType { - /// - /// String token - it consists of a-zA-Z characters - /// - STRING, + STRING, - /// - /// WHITESPACE token (' ', '\t', '\r', '\n'). - /// - WHITESPACE, + /// + /// WHITESPACE token (' ', '\t', '\r', '\n'). + /// + WHITESPACE, - /// - /// '(' token - /// - LEFT_PARENTHESIS, + /// + /// '(' token + /// + LEFT_PARENTHESIS, - /// - /// ')' token - /// - RIGHT_PARENTHESIS, + /// + /// ')' token + /// + RIGHT_PARENTHESIS, - /// - /// ',' token - /// - COMMA, + /// + /// ',' token + /// + COMMA, - /// - /// Number token - it consists of '-','0'-'9' and '.' characters - /// - NUMBER, + /// + /// Number token - it consists of '-','0'-'9' and '.' characters + /// + NUMBER, - /// - /// Token that represents end of available data - /// - END_OF_DATA - } + /// + /// Token that represents end of available data + /// + END_OF_DATA } diff --git a/src/SpatialLite.Core/IO/WkbFormatException.cs b/src/SpatialLite.Core/IO/WkbFormatException.cs index f7d6f23..b672e0b 100644 --- a/src/SpatialLite.Core/IO/WkbFormatException.cs +++ b/src/SpatialLite.Core/IO/WkbFormatException.cs @@ -1,16 +1,18 @@ using System; -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Represents exception that occurs if WkbReader encouters invalid data. +/// +public class WkbFormatException : Exception +{ /// - /// Represents exception that occurs if WkbReader encouters invalid data. + /// Initializes a new instance of the WktParseException class. /// - public class WkbFormatException : Exception { - /// - /// Initializes a new instance of the WktParseException class. - /// - /// The message that describes the error. - public WkbFormatException(string message) - : base(message) { - } - } + /// The message that describes the error. + public WkbFormatException(string message) + : base(message) + { + } } diff --git a/src/SpatialLite.Core/IO/WkbGeometryType.cs b/src/SpatialLite.Core/IO/WkbGeometryType.cs index 4ab5689..7c97cb6 100644 --- a/src/SpatialLite.Core/IO/WkbGeometryType.cs +++ b/src/SpatialLite.Core/IO/WkbGeometryType.cs @@ -1,50 +1,51 @@ -namespace SpatialLite.Core.IO { - /// - /// Defines WkbGeometryType. - /// - internal enum WkbGeometryType : uint { - Point = 1, - LineString = 2, - Polygon = 3, - Triangle = 17, - MultiPoint = 4, - MultiLineString = 5, - MultiPolygon = 6, - GeometryCollection = 7, - PolyhedralSurface = 15, - TIN = 16, +namespace SpatialLite.Core.IO; - PointZ = 1001, - LineStringZ = 1002, - PolygonZ = 1003, - Trianglez = 1017, - MultiPointZ = 1004, - MultiLineStringZ = 1005, - MultiPolygonZ = 1006, - GeometryCollectionZ = 1007, - PolyhedralSurfaceZ = 1015, - TINZ = 1016, +/// +/// Defines WkbGeometryType. +/// +internal enum WkbGeometryType : uint +{ + Point = 1, + LineString = 2, + Polygon = 3, + Triangle = 17, + MultiPoint = 4, + MultiLineString = 5, + MultiPolygon = 6, + GeometryCollection = 7, + PolyhedralSurface = 15, + TIN = 16, - PointM = 2001, - LineStringM = 2002, - PolygonM = 2003, - TriangleM = 2017, - MultiPointM = 2004, - MultiLineStringM = 2005, - MultiPolygonM = 2006, - GeometryCollectionM = 2007, - PolyhedralSurfaceM = 2015, - TINM = 2016, + PointZ = 1001, + LineStringZ = 1002, + PolygonZ = 1003, + Trianglez = 1017, + MultiPointZ = 1004, + MultiLineStringZ = 1005, + MultiPolygonZ = 1006, + GeometryCollectionZ = 1007, + PolyhedralSurfaceZ = 1015, + TINZ = 1016, - PointZM = 3001, - LineStringZM = 3002, - PolygonZM = 3003, - TriangleZM = 3017, - MultiPointZM = 3004, - MultiLineStringZM = 3005, - MultiPolygonZM = 3006, - GeometryCollectionZM = 3007, - PolyhedralSurfaceZM = 3015, - TinZM = 3016 - } + PointM = 2001, + LineStringM = 2002, + PolygonM = 2003, + TriangleM = 2017, + MultiPointM = 2004, + MultiLineStringM = 2005, + MultiPolygonM = 2006, + GeometryCollectionM = 2007, + PolyhedralSurfaceM = 2015, + TINM = 2016, + + PointZM = 3001, + LineStringZM = 3002, + PolygonZM = 3003, + TriangleZM = 3017, + MultiPointZM = 3004, + MultiLineStringZM = 3005, + MultiPolygonZM = 3006, + GeometryCollectionZM = 3007, + PolyhedralSurfaceZM = 3015, + TinZM = 3016 } diff --git a/src/SpatialLite.Core/IO/WkbReader.cs b/src/SpatialLite.Core/IO/WkbReader.cs index 0179683..3a21b99 100644 --- a/src/SpatialLite.Core/IO/WkbReader.cs +++ b/src/SpatialLite.Core/IO/WkbReader.cs @@ -1,359 +1,404 @@ -using System; +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; using System.Collections.Generic; using System.IO; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; +namespace SpatialLite.Core.IO; + +/// +/// Provides functions for reading and parsing geometries from WKB format. +/// +public class WkbReader : IDisposable +{ + + private readonly BinaryReader _inputReader; + private readonly FileStream _inputFileStream; + private bool _disposed = false; + + /// + /// Initializes a new instance of the WkbReader class that reads data from specific stream. + /// + /// The stream to read data from. + public WkbReader(Stream input) + { + if (input == null) + { + throw new ArgumentNullException(nameof(input), "Input stream cannot be null"); + } + + _inputReader = new BinaryReader(input); + } + + /// + /// Initializes a new instance of the WkbReader class that reads data from specific file. + /// + /// Path to the file to read data from. + public WkbReader(string path) + { + _inputFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); + _inputReader = new BinaryReader(_inputFileStream); + } + + /// + /// Parses data from the binnary array. + /// + /// The binary array with WKB serialized geometry. + /// Parsed geometry. + /// Throws exception if wkb array does not contrains valid WKB geometry. + public static Geometry Parse(byte[] wkb) + { + if (wkb == null) + { + throw new ArgumentNullException(nameof(wkb)); + } + + using (MemoryStream ms = new(wkb)) + { + using (BinaryReader reader = new(ms)) + { + if (reader.PeekChar() == -1) + { + return null; + } + + try + { + BinaryEncoding encoding = (BinaryEncoding)reader.ReadByte(); + if (encoding == BinaryEncoding.BigEndian) + { + throw new NotSupportedException("Big endian encoding is not supprted in the current version of WkbReader."); + } + + Geometry parsed = ReadGeometry(reader); + + return parsed; + } + catch (EndOfStreamException) + { + throw new WkbFormatException("End of stream reached before end of valid WKB geometry end."); + } + } + } + } + + /// + /// Parses data from the binary array as given geometry type. + /// + /// The Geometry type to be parsed. + /// The binary array with WKB serialized geometry. + /// Parsed geometry. + /// Throws exception if wkb array does not contrains valid WKB geometry of specific type. + public static T Parse(byte[] wkb) where T : Geometry + { + Geometry parsed = Parse(wkb); + + if (parsed != null) + { + if (parsed is not T result) + { + throw new WkbFormatException("Input doesn't contain valid WKB representation of the specified geometry type."); + } + + return result; + } + else + { + return null; + } + } + + /// + /// Releases all resources used by the ComponentLibrary. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Read geometry in WKB format from the input. + /// + /// Parsed geometry or null if no other geometry is available. + public Geometry Read() + { + if (_inputReader.PeekChar() == -1) + { + return null; + } + + try + { + BinaryEncoding encoding = (BinaryEncoding)_inputReader.ReadByte(); + if (encoding == BinaryEncoding.BigEndian) + { + throw new NotSupportedException("Big endian encoding is not supprted in the current version of WkbReader."); + } + + return ReadGeometry(_inputReader); + } + catch (EndOfStreamException) + { + throw new WkbFormatException("End of stream reached before end of valid WKB geometry end."); + } + } + + /// + /// Read geometry in WKB format from the input. + /// + /// The Geometry type to be parsed. + /// Geometry obejct of specific type read from the input, or null if no other geometry is available. + /// Throws exception if wkb array does not contrains valid WKB geometry of specific type. + public T Read() where T : Geometry + { + Geometry parsed = Read(); + + if (parsed != null) + { + if (parsed is not T result) + { + throw new WkbFormatException("Input doesn't contain valid WKB representation of the specified geometry type."); + } + + return result; + } + else + { + return null; + } + } + + /// + /// Reads Coordinate from the BinaryReader. + /// + /// The reader to read from. + /// Bool value indicating whether Coordinate has Z value. + /// Bool value indicating whether Coordinate has M value. + /// Parsed Coordinate. + private static Coordinate ReadCoordinate(BinaryReader reader, bool is3D, bool isMeasured) + { + double x = reader.ReadDouble(); + double y = reader.ReadDouble(); + double z = is3D ? reader.ReadDouble() : double.NaN; + double m = isMeasured ? reader.ReadDouble() : double.NaN; + + return new Coordinate(x, y, z, m); + } + + /// + /// Reads a list of coordinates from the BinaryReader. + /// + /// The reader to read from. + /// Bool value indicating whether coordinates has Z value. + /// Bool value indicating whether coordinates has M value. + /// Parsed Coordinate. + private static IEnumerable ReadCoordinates(BinaryReader reader, bool is3D, bool isMeasured) + { + int pointCount = (int)reader.ReadUInt32(); + + List result = new(pointCount); + for (int i = 0; i < pointCount; i++) + { + result.Add(ReadCoordinate(reader, is3D, isMeasured)); + } + + return result; + } + + /// + /// Reads Geometry from the reader. + /// + /// The reader used to read data from input stream. + /// Geometry read from the input. + private static Geometry ReadGeometry(BinaryReader reader) + { + WkbGeometryType geometryType = (WkbGeometryType)reader.ReadUInt32(); + + bool is3D, isMeasured; + WkbGeometryType basicType; + GetGeometryTypeDetails(geometryType, out basicType, out is3D, out isMeasured); + + switch (basicType) + { + case WkbGeometryType.Point: return ReadPoint(reader, is3D, isMeasured); + case WkbGeometryType.LineString: return ReadLineString(reader, is3D, isMeasured); + case WkbGeometryType.Polygon: return ReadPolygon(reader, is3D, isMeasured); + case WkbGeometryType.MultiPoint: return ReadMultiPoint(reader, is3D, isMeasured); + case WkbGeometryType.MultiLineString: return ReadMultiLineString(reader, is3D, isMeasured); + case WkbGeometryType.MultiPolygon: return ReadMultiPolygon(reader, is3D, isMeasured); + case WkbGeometryType.GeometryCollection: return ReadGeometryCollection(reader, is3D, isMeasured); + default: throw new WkbFormatException("Unknown geometry type."); + } + } + + /// + /// Reads Point from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether point beeing read has Z-dimension. + /// bool value indicating whether point beeing read has M-value. + /// Point read from the input + private static Point ReadPoint(BinaryReader reader, bool is3D, bool isMeasured) + { + Coordinate position = ReadCoordinate(reader, is3D, isMeasured); + return new Point(position); + } + + /// + /// Reads LineString from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether linestring beeing read has Z-dimension. + /// bool value indicating whether linestring beeing read has M-value. + /// Linestring read from the input. + private static LineString ReadLineString(BinaryReader reader, bool is3D, bool isMeasured) + { + IEnumerable coordinates = ReadCoordinates(reader, is3D, isMeasured); + return new LineString(coordinates); + } + + /// + /// Reads Polygon from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether polygon beeing read has Z-dimension. + /// bool value indicating whether polygon beeing read has M-value. + /// Polygon read from the input. + private static Polygon ReadPolygon(BinaryReader reader, bool is3D, bool isMeasured) + { + int ringsCount = (int)reader.ReadUInt32(); + + if (ringsCount == 0) + { + return new Polygon(); + } + + IEnumerable exterior = ReadCoordinates(reader, is3D, isMeasured); + Polygon result = new(new CoordinateList(exterior)); + + for (int i = 1; i < ringsCount; i++) + { + IEnumerable interior = ReadCoordinates(reader, is3D, isMeasured); + result.InteriorRings.Add(new CoordinateList(interior)); + } + + return result; + } + + /// + /// Reads MultiLineString from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether multilinestring beeing read has Z-dimension. + /// bool value indicating whether multilinestring beeing read has M-value. + /// MultiLineString read from the input. + private static MultiPoint ReadMultiPoint(BinaryReader reader, bool is3D, bool isMeasured) + { + int pointsCount = (int)reader.ReadUInt32(); + + MultiPoint result = new(); + for (int i = 0; i < pointsCount; i++) + { + result.Geometries.Add(ReadPoint(reader, is3D, isMeasured)); + } + + return result; + } + + /// + /// Reads MultiLineString from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether multilinestring beeing read has Z-dimension. + /// bool value indicating whether multilinestring beeing read has M-value. + /// MultiLineString read from the input + private static MultiLineString ReadMultiLineString(BinaryReader reader, bool is3D, bool isMeasured) + { + int pointsCount = (int)reader.ReadUInt32(); + + MultiLineString result = new(); + for (int i = 0; i < pointsCount; i++) + { + result.Geometries.Add(ReadLineString(reader, is3D, isMeasured)); + } + + return result; + } + + /// + /// Reads MultiPolygon from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether MultiPolygon beeing read has Z-dimension. + /// bool value indicating whether MultiPolygon beeing read has M-value. + /// MultiPolygon read from the input. + private static MultiPolygon ReadMultiPolygon(BinaryReader reader, bool is3D, bool isMeasured) + { + int pointsCount = (int)reader.ReadUInt32(); + + MultiPolygon result = new(); + for (int i = 0; i < pointsCount; i++) + { + result.Geometries.Add(ReadPolygon(reader, is3D, isMeasured)); + } + + return result; + } + + /// + /// Reads GeometryCollection from the reader. + /// + /// The reader used to read data from input stream. + /// bool value indicating whether GeometryCollection beeing read has Z-dimension. + /// bool value indicating whether GeometryCollection beeing read has M-value. + /// GeometryCollection read from the input. + private static GeometryCollection ReadGeometryCollection(BinaryReader reader, bool is3D, bool isMeasured) + { + int pointsCount = (int)reader.ReadUInt32(); + + GeometryCollection result = new(); + for (int i = 0; i < pointsCount; i++) + { + result.Geometries.Add(ReadGeometry(reader)); + } + + return result; + } + + /// + /// Gets details form the WkbGeometryType value. + /// + /// The value to be examined. + /// Outputs type striped of dimension information. + /// Outputs bool value indicating whether type represents 3D geometry. + /// Outputs bool value indicating whether type represents measured geometry. + private static void GetGeometryTypeDetails(WkbGeometryType type, out WkbGeometryType basicType, out bool is3D, out bool isMeasured) + { + is3D = ((int)type > 1000 && (int)type < 2000) || (int)type > 3000; + isMeasured = (int)type > 2000; + basicType = (WkbGeometryType)((int)type % 1000); + } -namespace SpatialLite.Core.IO { /// - /// Provides functions for reading and parsing geometries from WKB format. + /// Releases the unmanaged resources used by the ComponentLibrary and optionally releases the managed resources. /// - public class WkbReader : IDisposable { - - private BinaryReader _inputReader; - private FileStream _inputFileStream; - private bool _disposed = false; - - /// - /// Initializes a new instance of the WkbReader class that reads data from specific stream. - /// - /// The stream to read data from. - public WkbReader(Stream input) { - if (input == null) { - throw new ArgumentNullException("input", "Input stream cannot be null"); - } - - _inputReader = new BinaryReader(input); - } - - /// - /// Initializes a new instance of the WkbReader class that reads data from specific file. - /// - /// Path to the file to read data from. - public WkbReader(string path) { - _inputFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); - _inputReader = new BinaryReader(_inputFileStream); - } - - /// - /// Parses data from the binnary array. - /// - /// The binary array with WKB serialized geometry. - /// Parsed geometry. - /// Throws exception if wkb array does not contrains valid WKB geometry. - public static Geometry Parse(byte[] wkb) { - if (wkb == null) { - throw new ArgumentNullException("wkb"); - } - - using (MemoryStream ms = new MemoryStream(wkb)) { - using (BinaryReader reader = new BinaryReader(ms)) { - if (reader.PeekChar() == -1) { - return null; - } - - try { - BinaryEncoding encoding = (BinaryEncoding)reader.ReadByte(); - if (encoding == BinaryEncoding.BigEndian) { - throw new NotSupportedException("Big endian encoding is not supprted in the current version of WkbReader."); - } - - Geometry parsed = WkbReader.ReadGeometry(reader); - - return parsed; - } - catch (EndOfStreamException) { - throw new WkbFormatException("End of stream reached before end of valid WKB geometry end."); - } - } - } - } - - /// - /// Parses data from the binary array as given geometry type. - /// - /// The Geometry type to be parsed. - /// The binary array with WKB serialized geometry. - /// Parsed geometry. - /// Throws exception if wkb array does not contrains valid WKB geometry of specific type. - public static T Parse(byte[] wkb) where T : Geometry { - Geometry parsed = WkbReader.Parse(wkb); - - if (parsed != null) { - T result = parsed as T; - if (result == null) { - throw new WkbFormatException("Input doesn't contain valid WKB representation of the specified geometry type."); - } - - return result; - } - else { - return null; - } - } - - /// - /// Releases all resources used by the ComponentLibrary. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Read geometry in WKB format from the input. - /// - /// Parsed geometry or null if no other geometry is available. - public Geometry Read() { - if (_inputReader.PeekChar() == -1) { - return null; - } - - try { - BinaryEncoding encoding = (BinaryEncoding)_inputReader.ReadByte(); - if (encoding == BinaryEncoding.BigEndian) { - throw new NotSupportedException("Big endian encoding is not supprted in the current version of WkbReader."); - } - - return WkbReader.ReadGeometry(_inputReader); - } - catch (EndOfStreamException) { - throw new WkbFormatException("End of stream reached before end of valid WKB geometry end."); - } - } - - /// - /// Read geometry in WKB format from the input. - /// - /// The Geometry type to be parsed. - /// Geometry obejct of specific type read from the input, or null if no other geometry is available. - /// Throws exception if wkb array does not contrains valid WKB geometry of specific type. - public T Read() where T : Geometry { - Geometry parsed = this.Read(); - - if (parsed != null) { - T result = parsed as T; - if (result == null) { - throw new WkbFormatException("Input doesn't contain valid WKB representation of the specified geometry type."); - } - - return result; - } - else { - return null; - } - } - - /// - /// Reads Coordinate from the BinaryReader. - /// - /// The reader to read from. - /// Bool value indicating whether Coordinate has Z value. - /// Bool value indicating whether Coordinate has M value. - /// Parsed Coordinate. - private static Coordinate ReadCoordinate(BinaryReader reader, bool is3D, bool isMeasured) { - double x = reader.ReadDouble(); - double y = reader.ReadDouble(); - double z = is3D ? reader.ReadDouble() : double.NaN; - double m = isMeasured ? reader.ReadDouble() : double.NaN; - - return new Coordinate(x, y, z, m); - } - - /// - /// Reads a list of coordinates from the BinaryReader. - /// - /// The reader to read from. - /// Bool value indicating whether coordinates has Z value. - /// Bool value indicating whether coordinates has M value. - /// Parsed Coordinate. - private static IEnumerable ReadCoordinates(BinaryReader reader, bool is3D, bool isMeasured) { - int pointCount = (int)reader.ReadUInt32(); - - List result = new List(pointCount); - for (int i = 0; i < pointCount; i++) { - result.Add(WkbReader.ReadCoordinate(reader, is3D, isMeasured)); - } - - return result; - } - - /// - /// Reads Geometry from the reader. - /// - /// The reader used to read data from input stream. - /// Geometry read from the input. - private static Geometry ReadGeometry(BinaryReader reader) { - WkbGeometryType geometryType = (WkbGeometryType)reader.ReadUInt32(); - - bool is3D, isMeasured; - WkbGeometryType basicType; - WkbReader.GetGeometryTypeDetails(geometryType, out basicType, out is3D, out isMeasured); - - switch (basicType) { - case WkbGeometryType.Point: return WkbReader.ReadPoint(reader, is3D, isMeasured); - case WkbGeometryType.LineString: return WkbReader.ReadLineString(reader, is3D, isMeasured); - case WkbGeometryType.Polygon: return WkbReader.ReadPolygon(reader, is3D, isMeasured); - case WkbGeometryType.MultiPoint: return WkbReader.ReadMultiPoint(reader, is3D, isMeasured); - case WkbGeometryType.MultiLineString: return WkbReader.ReadMultiLineString(reader, is3D, isMeasured); - case WkbGeometryType.MultiPolygon: return WkbReader.ReadMultiPolygon(reader, is3D, isMeasured); - case WkbGeometryType.GeometryCollection: return WkbReader.ReadGeometryCollection(reader, is3D, isMeasured); - default: throw new WkbFormatException("Unknown geometry type."); - } - } - - /// - /// Reads Point from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether point beeing read has Z-dimension. - /// bool value indicating whether point beeing read has M-value. - /// Point read from the input - private static Point ReadPoint(BinaryReader reader, bool is3D, bool isMeasured) { - Coordinate position = WkbReader.ReadCoordinate(reader, is3D, isMeasured); - return new Point(position); - } - - /// - /// Reads LineString from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether linestring beeing read has Z-dimension. - /// bool value indicating whether linestring beeing read has M-value. - /// Linestring read from the input. - private static LineString ReadLineString(BinaryReader reader, bool is3D, bool isMeasured) { - IEnumerable coordinates = WkbReader.ReadCoordinates(reader, is3D, isMeasured); - return new LineString(coordinates); - } - - /// - /// Reads Polygon from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether polygon beeing read has Z-dimension. - /// bool value indicating whether polygon beeing read has M-value. - /// Polygon read from the input. - private static Polygon ReadPolygon(BinaryReader reader, bool is3D, bool isMeasured) { - int ringsCount = (int)reader.ReadUInt32(); - - if (ringsCount == 0) { - return new Polygon(); - } - - IEnumerable exterior = WkbReader.ReadCoordinates(reader, is3D, isMeasured); - Polygon result = new Polygon(new CoordinateList(exterior)); - - for (int i = 1; i < ringsCount; i++) { - IEnumerable interior = WkbReader.ReadCoordinates(reader, is3D, isMeasured); - result.InteriorRings.Add(new CoordinateList(interior)); - } - - return result; - } - - /// - /// Reads MultiLineString from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether multilinestring beeing read has Z-dimension. - /// bool value indicating whether multilinestring beeing read has M-value. - /// MultiLineString read from the input. - private static MultiPoint ReadMultiPoint(BinaryReader reader, bool is3D, bool isMeasured) { - int pointsCount = (int)reader.ReadUInt32(); - - MultiPoint result = new MultiPoint(); - for (int i = 0; i < pointsCount; i++) { - result.Geometries.Add(WkbReader.ReadPoint(reader, is3D, isMeasured)); - } - - return result; - } - - /// - /// Reads MultiLineString from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether multilinestring beeing read has Z-dimension. - /// bool value indicating whether multilinestring beeing read has M-value. - /// MultiLineString read from the input - private static MultiLineString ReadMultiLineString(BinaryReader reader, bool is3D, bool isMeasured) { - int pointsCount = (int)reader.ReadUInt32(); - - MultiLineString result = new MultiLineString(); - for (int i = 0; i < pointsCount; i++) { - result.Geometries.Add(WkbReader.ReadLineString(reader, is3D, isMeasured)); - } - - return result; - } - - /// - /// Reads MultiPolygon from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether MultiPolygon beeing read has Z-dimension. - /// bool value indicating whether MultiPolygon beeing read has M-value. - /// MultiPolygon read from the input. - private static MultiPolygon ReadMultiPolygon(BinaryReader reader, bool is3D, bool isMeasured) { - int pointsCount = (int)reader.ReadUInt32(); - - MultiPolygon result = new MultiPolygon(); - for (int i = 0; i < pointsCount; i++) { - result.Geometries.Add(WkbReader.ReadPolygon(reader, is3D, isMeasured)); - } - - return result; - } - - /// - /// Reads GeometryCollection from the reader. - /// - /// The reader used to read data from input stream. - /// bool value indicating whether GeometryCollection beeing read has Z-dimension. - /// bool value indicating whether GeometryCollection beeing read has M-value. - /// GeometryCollection read from the input. - private static GeometryCollection ReadGeometryCollection(BinaryReader reader, bool is3D, bool isMeasured) { - int pointsCount = (int)reader.ReadUInt32(); - - GeometryCollection result = new GeometryCollection(); - for (int i = 0; i < pointsCount; i++) { - result.Geometries.Add(WkbReader.ReadGeometry(reader)); - } - - return result; - } - - /// - /// Gets details form the WkbGeometryType value. - /// - /// The value to be examined. - /// Outputs type striped of dimension information. - /// Outputs bool value indicating whether type represents 3D geometry. - /// Outputs bool value indicating whether type represents measured geometry. - private static void GetGeometryTypeDetails(WkbGeometryType type, out WkbGeometryType basicType, out bool is3D, out bool isMeasured) { - is3D = ((int)type > 1000 && (int)type < 2000) || (int)type > 3000; - isMeasured = (int)type > 2000; - basicType = (WkbGeometryType)((int)type % 1000); - } - - /// - /// Releases the unmanaged resources used by the ComponentLibrary and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (disposing) { - _inputReader.Dispose(); - - if (_inputFileStream != null) { - _inputFileStream.Dispose(); - } - } - - _disposed = true; - } - } - - } + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + _inputReader.Dispose(); + + if (_inputFileStream != null) + { + _inputFileStream.Dispose(); + } + } + + _disposed = true; + } + } } diff --git a/src/SpatialLite.Core/IO/WkbWriter.cs b/src/SpatialLite.Core/IO/WkbWriter.cs index 703c8b3..5af4a04 100644 --- a/src/SpatialLite.Core/IO/WkbWriter.cs +++ b/src/SpatialLite.Core/IO/WkbWriter.cs @@ -1,317 +1,367 @@ -using System; +using SpatialLite.Core.API; +using System; using System.IO; using System.Linq; -using SpatialLite.Core.API; +namespace SpatialLite.Core.IO; + +/// +/// Provides function for writing geometry objects into WKB format. +/// +public class WkbWriter : IDisposable +{ + + private bool _disposed = false; + private readonly BinaryWriter _writer = null; + private readonly Stream _output = null; + + /// + /// Initializes a new instance of the WkbWriter class with specific settings. + /// + /// The settings defining behaviour of the writer. + protected WkbWriter(WkbWriterSettings settings) + { + if (settings == null) + { + throw new ArgumentNullException(nameof(settings)); + } + + if (settings.Encoding == BinaryEncoding.BigEndian) + { + throw new NotSupportedException("BigEndian encoding is not supported in current version of the WkbWriter."); + } + + Settings = settings; + Settings.IsReadOnly = true; + } + + /// + /// Initializes a new instance of the WkbWriter class that writes geometries to a stream with specific settings. + /// + /// The stream to write geometries to. + /// The settings defining behaviour of the writer. + public WkbWriter(Stream stream, WkbWriterSettings settings) + : this(settings) + { + if (stream == null) + { + throw new ArgumentNullException(nameof(stream)); + } + + _writer = new BinaryWriter(stream); + } + + /// + /// Initializes a new instance of the WkbWriter class that writes geometreis to a file with specific settings. + /// + /// The path to the file to write geometrie to. + /// The settings defining behaviour of the writer. + public WkbWriter(string path, WkbWriterSettings settings) + : this(settings) + { + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + _output = new FileStream(path, FileMode.Create, FileAccess.Write); + _writer = new BinaryWriter(_output); + } + + /// + /// Gets the settings that detedmine behaviour of this instance of the WkbWriter. + /// + public WkbWriterSettings Settings { get; private set; } + + /// + /// Writes specified Geometry in the WKB format to a binary arrray using default WkbWriterSettings. + /// + /// The geometry to write. + /// The binary array with WKB representation of the Geometry. + public static byte[] WriteToArray(IGeometry geometry) + { + using (MemoryStream dataStream = new()) + { + using (BinaryWriter writer = new(dataStream)) + { + WkbWriterSettings defaultSettings = new(); + + WriteEncoding(writer, defaultSettings.Encoding); + Write(geometry, writer); + + return dataStream.ToArray(); + } + } + } + + /// + /// Releases all resources used by the WkbWriter. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Writes specified Geometry in the WKB format to the output. + /// + /// The geometry to write. + public void Write(IGeometry geometry) + { + WriteEncoding(_writer, Settings.Encoding); + Write(geometry, _writer); + } + + /// + /// Writes the Encoding byte defined by property to the output stream. + /// + /// The BinaryWriter to be used. + /// The encoding of binary data. + private static void WriteEncoding(BinaryWriter writer, BinaryEncoding encoding) + { + writer.Write((byte)encoding); + } + + /// + /// Writes geometry to the output using specified writer. + /// + /// The geometry to write. + /// The BinaryWriter used to write geometry to the output. + private static void Write(IGeometry geometry, BinaryWriter writer) + { + if (geometry is IPoint) + { + WritePoint((IPoint)geometry, writer); + } + else if (geometry is ILineString) + { + WriteLineString((ILineString)geometry, writer); + } + else if (geometry is IPolygon) + { + WritePolygon((IPolygon)geometry, writer); + } + else if (geometry is IMultiPoint) + { + WriteMultiPoint((IMultiPoint)geometry, writer); + } + else if (geometry is IMultiLineString) + { + WriteMultiLineString((IMultiLineString)geometry, writer); + } + else if (geometry is IMultiPolygon) + { + WriteMultiPolygon((IMultiPolygon)geometry, writer); + } + else if (geometry is IGeometryCollection) + { + WriteGeometryCollection((IGeometryCollection)geometry, writer); + } + } + + /// + /// Writes Coordinate to the output using specified writer. + /// + /// The Coordinate to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteCoordinate(Coordinate coordinate, BinaryWriter writer) + { + writer.Write(coordinate.X); + writer.Write(coordinate.Y); + + if (coordinate.Is3D) + { + writer.Write(coordinate.Z); + } + + if (coordinate.IsMeasured) + { + writer.Write(coordinate.M); + } + } + + /// + /// Writes list of Coordinates to the output using specified writer. + /// + /// The list od Coordinates to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteCoordinates(ICoordinateList coordinates, BinaryWriter writer) + { + writer.Write((uint)coordinates.Count); + + for (int i = 0; i < coordinates.Count; i++) + { + WriteCoordinate(coordinates[i], writer); + } + } + + /// + /// Writes Point to the output using specified writer. + /// + /// The Point to write. + /// The BinaryWriter used to write geometry to the output. + private static void WritePoint(IPoint point, BinaryWriter writer) + { + if (point.Position.Equals(Coordinate.Empty)) + { + writer.Write((uint)WkbGeometryType.GeometryCollection); + writer.Write(0u); + } + else + { + writer.Write((uint)AdjustGeometryType(point, WkbGeometryType.Point)); + WriteCoordinate(point.Position, writer); + } + } + + /// + /// Writes LineString to the output using specified writer. + /// + /// The LineString to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteLineString(ILineString linestring, BinaryWriter writer) + { + writer.Write((uint)AdjustGeometryType(linestring, WkbGeometryType.LineString)); + WriteCoordinates(linestring.Coordinates, writer); + } + + /// + /// Writes Polygon to the output using specified writer. + /// + /// The Polygon to write. + /// The BinaryWriter used to write geometry to the output. + private static void WritePolygon(IPolygon polygon, BinaryWriter writer) + { + writer.Write((uint)AdjustGeometryType(polygon, WkbGeometryType.Polygon)); + WritePolygonContent(polygon, writer); + } + + /// + /// Writes content of the Polygon to the output using specified writer. + /// + /// The Polygon to write. + /// The BinaryWriter used to write geometry to the output. + private static void WritePolygonContent(IPolygon polygon, BinaryWriter writer) + { + if (polygon.ExteriorRing.Count == 0) + { + writer.Write(0u); + } + else + { + writer.Write((uint)(1 + polygon.InteriorRings.Count())); + WriteCoordinates(polygon.ExteriorRing, writer); + + foreach (var ring in polygon.InteriorRings) + { + WriteCoordinates(ring, writer); + } + } + } + + /// + /// Writes MultiPoint to the output using specified writer. + /// + /// The MultiPoint to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteMultiPoint(IMultiPoint multipoint, BinaryWriter writer) + { + writer.Write((uint)AdjustGeometryType(multipoint, WkbGeometryType.MultiPoint)); + writer.Write((uint)multipoint.Geometries.Count()); + foreach (var point in multipoint.Geometries) + { + WriteCoordinate(point.Position, writer); + } + } + + /// + /// Writes MultiLineString to the output using specified writer. + /// + /// The MultiLineString to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteMultiLineString(IMultiLineString multiLineString, BinaryWriter writer) + { + writer.Write((uint)AdjustGeometryType(multiLineString, WkbGeometryType.MultiLineString)); + writer.Write((uint)multiLineString.Geometries.Count()); + foreach (var linestring in multiLineString.Geometries) + { + WriteCoordinates(linestring.Coordinates, writer); + } + } + + /// + /// Writes MultiPolygon to the output using specified writer. + /// + /// The MultiPolygon to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteMultiPolygon(IMultiPolygon multiPolygon, BinaryWriter writer) + { + writer.Write((uint)AdjustGeometryType(multiPolygon, WkbGeometryType.MultiPolygon)); + writer.Write((uint)multiPolygon.Geometries.Count()); + foreach (var polygon in multiPolygon.Geometries) + { + WritePolygonContent(polygon, writer); + } + } + + /// + /// Writes GeometryCollection to the output using specified writer. + /// + /// The GeometryCollection to write. + /// The BinaryWriter used to write geometry to the output. + private static void WriteGeometryCollection(IGeometryCollection collection, BinaryWriter writer) + { + writer.Write((uint)AdjustGeometryType(collection, WkbGeometryType.GeometryCollection)); + writer.Write((uint)collection.Geometries.Count()); + foreach (var geometry in collection.Geometries) + { + Write(geometry, writer); + } + } + + /// + /// Adjust WkbGeometryType according to the Geometry object dimensions. + /// + /// The geometry object. + /// WkbGeometryType for the 2D, non-measured version of the geometry object. + /// The WkbGeometryType of the geometry object. + private static WkbGeometryType AdjustGeometryType(IGeometry geometry, WkbGeometryType baseType) + { + WkbGeometryType result = baseType; + + if (geometry.Is3D) + { + result += 1000; + } + + if (geometry.IsMeasured) + { + result += 2000; + } + + return result; + } -namespace SpatialLite.Core.IO { /// - /// Provides function for writing geometry objects into WKB format. + /// Releases the unmanaged resources used by the WkbWriter and optionally releases the managed resources. /// - public class WkbWriter : IDisposable { - - private bool _disposed = false; - private BinaryWriter _writer = null; - private Stream _output = null; - - /// - /// Initializes a new instance of the WkbWriter class with specific settings. - /// - /// The settings defining behaviour of the writer. - protected WkbWriter(WkbWriterSettings settings) { - if (settings == null) { - throw new ArgumentNullException("settings"); - } - - if (settings.Encoding == BinaryEncoding.BigEndian) { - throw new NotSupportedException("BigEndian encoding is not supported in current version of the WkbWriter."); - } - - this.Settings = settings; - this.Settings.IsReadOnly = true; - } - - /// - /// Initializes a new instance of the WkbWriter class that writes geometries to a stream with specific settings. - /// - /// The stream to write geometries to. - /// The settings defining behaviour of the writer. - public WkbWriter(Stream stream, WkbWriterSettings settings) - : this(settings) { - if (stream == null) { - throw new ArgumentNullException("stream"); - } - - _writer = new BinaryWriter(stream); - } - - /// - /// Initializes a new instance of the WkbWriter class that writes geometreis to a file with specific settings. - /// - /// The path to the file to write geometrie to. - /// The settings defining behaviour of the writer. - public WkbWriter(string path, WkbWriterSettings settings) - : this(settings) { - if (path == null) { - throw new ArgumentNullException("path"); - } - - _output = new FileStream(path, FileMode.Create, FileAccess.Write); - _writer = new BinaryWriter(_output); - } - - /// - /// Gets the settings that detedmine behaviour of this instance of the WkbWriter. - /// - public WkbWriterSettings Settings { get; private set; } - - /// - /// Writes specified Geometry in the WKB format to a binary arrray using default WkbWriterSettings. - /// - /// The geometry to write. - /// The binary array with WKB representation of the Geometry. - public static byte[] WriteToArray(IGeometry geometry) { - using (MemoryStream dataStream = new MemoryStream()) { - using (BinaryWriter writer = new BinaryWriter(dataStream)) { - WkbWriterSettings defaultSettings = new WkbWriterSettings(); - - WkbWriter.WriteEncoding(writer, defaultSettings.Encoding); - WkbWriter.Write(geometry, writer); - - return dataStream.ToArray(); - } - } - } - - /// - /// Releases all resources used by the WkbWriter. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Writes specified Geometry in the WKB format to the output. - /// - /// The geometry to write. - public void Write(IGeometry geometry) { - WkbWriter.WriteEncoding(_writer, this.Settings.Encoding); - WkbWriter.Write(geometry, _writer); - } - - /// - /// Writes the Encoding byte defined by property to the output stream. - /// - /// The BinaryWriter to be used. - /// The encoding of binary data. - private static void WriteEncoding(BinaryWriter writer, BinaryEncoding encoding) { - writer.Write((byte)encoding); - } - - /// - /// Writes geometry to the output using specified writer. - /// - /// The geometry to write. - /// The BinaryWriter used to write geometry to the output. - private static void Write(IGeometry geometry, BinaryWriter writer) { - if (geometry is IPoint) { - WkbWriter.WritePoint((IPoint)geometry, writer); - } - else if (geometry is ILineString) { - WkbWriter.WriteLineString((ILineString)geometry, writer); - } - else if (geometry is IPolygon) { - WkbWriter.WritePolygon((IPolygon)geometry, writer); - } - else if (geometry is IMultiPoint) { - WkbWriter.WriteMultiPoint((IMultiPoint)geometry, writer); - } - else if (geometry is IMultiLineString) { - WkbWriter.WriteMultiLineString((IMultiLineString)geometry, writer); - } - else if (geometry is IMultiPolygon) { - WkbWriter.WriteMultiPolygon((IMultiPolygon)geometry, writer); - } - else if (geometry is IGeometryCollection) { - WkbWriter.WriteGeometryCollection((IGeometryCollection)geometry, writer); - } - } - - /// - /// Writes Coordinate to the output using specified writer. - /// - /// The Coordinate to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteCoordinate(Coordinate coordinate, BinaryWriter writer) { - writer.Write(coordinate.X); - writer.Write(coordinate.Y); - - if (coordinate.Is3D) { - writer.Write(coordinate.Z); - } - - if (coordinate.IsMeasured) { - writer.Write(coordinate.M); - } - } - - /// - /// Writes list of Coordinates to the output using specified writer. - /// - /// The list od Coordinates to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteCoordinates(ICoordinateList coordinates, BinaryWriter writer) { - writer.Write((uint)coordinates.Count); - - for (int i = 0; i < coordinates.Count; i++) { - WkbWriter.WriteCoordinate(coordinates[i], writer); - } - } - - /// - /// Writes Point to the output using specified writer. - /// - /// The Point to write. - /// The BinaryWriter used to write geometry to the output. - private static void WritePoint(IPoint point, BinaryWriter writer) { - if (point.Position.Equals(Coordinate.Empty)) { - writer.Write((uint)WkbGeometryType.GeometryCollection); - writer.Write(0u); - } - else { - writer.Write((uint)WkbWriter.AdjustGeometryType(point, WkbGeometryType.Point)); - WkbWriter.WriteCoordinate(point.Position, writer); - } - } - - /// - /// Writes LineString to the output using specified writer. - /// - /// The LineString to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteLineString(ILineString linestring, BinaryWriter writer) { - writer.Write((uint)WkbWriter.AdjustGeometryType(linestring, WkbGeometryType.LineString)); - WkbWriter.WriteCoordinates(linestring.Coordinates, writer); - } - - /// - /// Writes Polygon to the output using specified writer. - /// - /// The Polygon to write. - /// The BinaryWriter used to write geometry to the output. - private static void WritePolygon(IPolygon polygon, BinaryWriter writer) { - writer.Write((uint)WkbWriter.AdjustGeometryType(polygon, WkbGeometryType.Polygon)); - WkbWriter.WritePolygonContent(polygon, writer); - } - - /// - /// Writes content of the Polygon to the output using specified writer. - /// - /// The Polygon to write. - /// The BinaryWriter used to write geometry to the output. - private static void WritePolygonContent(IPolygon polygon, BinaryWriter writer) { - if (polygon.ExteriorRing.Count == 0) { - writer.Write(0u); - } - else { - writer.Write((uint)(1 + polygon.InteriorRings.Count())); - WkbWriter.WriteCoordinates(polygon.ExteriorRing, writer); - - foreach (var ring in polygon.InteriorRings) { - WkbWriter.WriteCoordinates(ring, writer); - } - } - } - - /// - /// Writes MultiPoint to the output using specified writer. - /// - /// The MultiPoint to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteMultiPoint(IMultiPoint multipoint, BinaryWriter writer) { - writer.Write((uint)WkbWriter.AdjustGeometryType(multipoint, WkbGeometryType.MultiPoint)); - writer.Write((uint)multipoint.Geometries.Count()); - foreach (var point in multipoint.Geometries) { - WkbWriter.WriteCoordinate(point.Position, writer); - } - } - - /// - /// Writes MultiLineString to the output using specified writer. - /// - /// The MultiLineString to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteMultiLineString(IMultiLineString multiLineString, BinaryWriter writer) { - writer.Write((uint)WkbWriter.AdjustGeometryType(multiLineString, WkbGeometryType.MultiLineString)); - writer.Write((uint)multiLineString.Geometries.Count()); - foreach (var linestring in multiLineString.Geometries) { - WkbWriter.WriteCoordinates(linestring.Coordinates, writer); - } - } - - /// - /// Writes MultiPolygon to the output using specified writer. - /// - /// The MultiPolygon to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteMultiPolygon(IMultiPolygon multiPolygon, BinaryWriter writer) { - writer.Write((uint)WkbWriter.AdjustGeometryType(multiPolygon, WkbGeometryType.MultiPolygon)); - writer.Write((uint)multiPolygon.Geometries.Count()); - foreach (var polygon in multiPolygon.Geometries) { - WkbWriter.WritePolygonContent(polygon, writer); - } - } - - /// - /// Writes GeometryCollection to the output using specified writer. - /// - /// The GeometryCollection to write. - /// The BinaryWriter used to write geometry to the output. - private static void WriteGeometryCollection(IGeometryCollection collection, BinaryWriter writer) { - writer.Write((uint)WkbWriter.AdjustGeometryType(collection, WkbGeometryType.GeometryCollection)); - writer.Write((uint)collection.Geometries.Count()); - foreach (var geometry in collection.Geometries) { - WkbWriter.Write(geometry, writer); - } - } - - /// - /// Adjust WkbGeometryType according to the Geometry object dimensions. - /// - /// The geometry object. - /// WkbGeometryType for the 2D, non-measured version of the geometry object. - /// The WkbGeometryType of the geometry object. - private static WkbGeometryType AdjustGeometryType(IGeometry geometry, WkbGeometryType baseType) { - WkbGeometryType result = baseType; - - if (geometry.Is3D) { - result += 1000; - } - - if (geometry.IsMeasured) { - result += 2000; - } - - return result; - } - - /// - /// Releases the unmanaged resources used by the WkbWriter and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!_disposed) { - if (disposing) { - _writer.Dispose(); - - if (_output != null) { - _output.Dispose(); - } - } - - _disposed = true; - } - } - } + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + _writer.Dispose(); + + if (_output != null) + { + _output.Dispose(); + } + } + + _disposed = true; + } + } } diff --git a/src/SpatialLite.Core/IO/WkbWriterSettings.cs b/src/SpatialLite.Core/IO/WkbWriterSettings.cs index f09aa4a..8b7a1b8 100644 --- a/src/SpatialLite.Core/IO/WkbWriterSettings.cs +++ b/src/SpatialLite.Core/IO/WkbWriterSettings.cs @@ -1,45 +1,50 @@ using System; -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Contains settings that determine behaviour of the WkbWriter +/// +public class WkbWriterSettings +{ + + private BinaryEncoding _encoding; + + /// + /// Initializes a new instance of the WkbWriterSettings class with default values. + /// + public WkbWriterSettings() + : base() + { + Encoding = BinaryEncoding.LittleEndian; + } + + /// + /// Gets or sets a encoding that WkbWriter will use for writing geometries. + /// + /// + /// BigEnndian encoding is not supported in current version of the class. + /// + public BinaryEncoding Encoding + { + get + { + return _encoding; + } + + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'Encoding' property. The WkbWriterSettings instance is read-only"); + } + + _encoding = value; + } + } + /// - /// Contains settings that determine behaviour of the WkbWriter + /// Gets a value indicating whether properties of this OsmWriterSettings instance can be changed. /// - public class WkbWriterSettings { - - private BinaryEncoding _encoding; - - /// - /// Initializes a new instance of the WkbWriterSettings class with default values. - /// - public WkbWriterSettings() - : base() { - this.Encoding = BinaryEncoding.LittleEndian; - } - - /// - /// Gets or sets a encoding that WkbWriter will use for writing geometries. - /// - /// - /// BigEnndian encoding is not supported in current version of the class. - /// - public BinaryEncoding Encoding { - get { - return _encoding; - } - - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'Encoding' property. The WkbWriterSettings instance is read-only"); - } - - _encoding = value; - } - } - - /// - /// Gets a value indicating whether properties of this OsmWriterSettings instance can be changed. - /// - protected internal bool IsReadOnly { get; internal set; } - - } + protected internal bool IsReadOnly { get; internal set; } } diff --git a/src/SpatialLite.Core/IO/WktParseException.cs b/src/SpatialLite.Core/IO/WktParseException.cs index 8765b85..c35afed 100644 --- a/src/SpatialLite.Core/IO/WktParseException.cs +++ b/src/SpatialLite.Core/IO/WktParseException.cs @@ -1,16 +1,18 @@ using System; -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Represents exception that can occur during WKT parsing. +/// +public class WktParseException : Exception +{ /// - /// Represents exception that can occur during WKT parsing. + /// Initializes a new instance of the WktParseException class. /// - public class WktParseException : Exception { - /// - /// Initializes a new instance of the WktParseException class. - /// - /// The message that describes the error. - public WktParseException(string message) - : base(message) { - } - } + /// The message that describes the error. + public WktParseException(string message) + : base(message) + { + } } diff --git a/src/SpatialLite.Core/IO/WktReader.cs b/src/SpatialLite.Core/IO/WktReader.cs index d9d96a2..fa4579b 100644 --- a/src/SpatialLite.Core/IO/WktReader.cs +++ b/src/SpatialLite.Core/IO/WktReader.cs @@ -1,705 +1,780 @@ -using System; +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.IO; +using System.Linq; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; +namespace SpatialLite.Core.IO; + +/// +/// Provides functions for reading and parsing geometries from WKT format. +/// +public class WktReader : IDisposable +{ + private readonly TextReader _inputReader; + private readonly FileStream _inputFileStream; + private readonly WktTokensBuffer _tokens; + + private bool _disposed = false; + + /// + /// Initializes a new instance of the WktReader class that reads data from specific stream. + /// + /// The stream to read data from. + public WktReader(Stream input) + { + if (input == null) + { + throw new ArgumentNullException(nameof(input), "Input stream cannot be null"); + } + + _inputReader = new StreamReader(input); + _tokens = new WktTokensBuffer(WktTokenizer.Tokenize(_inputReader)); + } + + /// + /// Initializes a new instance of the WktReader class that reads data from specific file. + /// + /// Path to the file to read data from. + public WktReader(string path) + { + _inputFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); + _inputReader = new StreamReader(_inputFileStream); + _tokens = new WktTokensBuffer(WktTokenizer.Tokenize(_inputReader)); + } + + /// + /// Parses a Geometry from WKT string. + /// + /// The string with WKT representation of a Geometry. + /// The parsed Geometry. + public static Geometry Parse(string wkt) + { + WktTokensBuffer tokens = new(WktTokenizer.Tokenize(wkt)); + return ParseGeometryTaggedText(tokens); + } + + /// + /// Parses a Geometry of specific type from the WKT string. + /// + /// The type of the Geometry to be parsed. + /// The string with WKT representation of a Geometry. + /// The parsed Geometry of given type. + public static T Parse(string wkt) where T : Geometry + { + Geometry parsed = Parse(wkt); + + if (parsed != null) + { + if (parsed is not T result) + { + throw new WktParseException("Input doesn't contain valid WKB representation of the specified geometry type."); + } + + return result; + } + else + { + return null; + } + } + + /// + /// Reads next geometry from the input. + /// + /// The geometry object read from the reader or null if no more geometries are available. + public Geometry Read() + { + return ParseGeometryTaggedText(_tokens); + } + + /// + /// Reads next geometry from the input. + /// + /// The type of Geometry to be parsed. + /// The geometry object of specific type read from the reader or null if no more geometries are available. + public T Read() where T : Geometry + { + Geometry parsed = ParseGeometryTaggedText(_tokens); + + if (parsed != null) + { + if (parsed is not T result) + { + throw new WktParseException("Input doesn't contain valid WKB representation of the specified geometry type."); + } + + return result; + } + else + { + return null; + } + } + + /// + /// Releases all resources used by the ComponentLibrary. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Parses a geometry tagged text. + /// + /// The list of tokens. + /// A geometry specified by tokens. + private static Geometry ParseGeometryTaggedText(WktTokensBuffer tokens) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING) + { + if (t.Value.ToUpperInvariant() == "POINT") + { + return ParsePointTaggedText(tokens); + } + else if (t.Value.ToUpperInvariant() == "LINESTRING") + { + return ParseLineStringTaggedText(tokens); + } + else if (t.Value.ToUpperInvariant() == "POLYGON") + { + return ParsePolygonTaggedText(tokens); + } + else if (t.Value.ToUpperInvariant() == "MULTIPOINT") + { + return ParseMultiPointTaggedText(tokens); + } + else if (t.Value.ToUpperInvariant() == "MULTILINESTRING") + { + return ParseMultiLineStringTaggedText(tokens); + } + else if (t.Value.ToUpperInvariant() == "MULTIPOLYGON") + { + return ParseMultiPolygonTaggedText(tokens); + } + else if (t.Value.ToUpperInvariant() == "GEOMETRYCOLLECTION") + { + return ParseGeometryCollectionTaggedText(tokens); + } + } + + if (t.Type == TokenType.END_OF_DATA) + { + return null; + } + + throw new WktParseException(string.Format(CultureInfo.InvariantCulture, "Invalid geometry type '{0}'", t.Value)); + } + + /// + /// Parses a point tagged text. + /// + /// The list of tokens. + /// A point specified by tokens. + /// ::= point {z}{m} ]]> + private static Point ParsePointTaggedText(WktTokensBuffer tokens) + { + Expect("point", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParsePointText(tokens, is3D, isMeasured); + } + + /// + /// Parses a point tagged text. + /// + /// The list of tokens. + /// bool value indicating whether point being parsed has z-coordinate. + /// bool value indicating whether point beeing parsed has m-value. + /// A point specified by tokens + /// | ]]> + private static Point ParsePointText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new Point(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + Point result = new(ParseCoordinate(tokens, is3D, isMeasured)); + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return result; + } + + /// + /// Parses multiple Points separated by comma. + /// + /// The list of tokens. + /// bool value indicating whether point being parsed had z-coordinate. + /// bool value indicating whether point being parsed has m-value. + /// A list of point specified by tokens. + private static List ParsePoints(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + List points = new(); + + points.Add(ParsePointText(tokens, is3D, isMeasured)); + + WktToken t = tokens.Peek(true); + while (t.Type == TokenType.COMMA) + { + tokens.GetToken(true); + points.Add(ParsePointText(tokens, is3D, isMeasured)); + t = tokens.Peek(true); + } + + return points; + } + + /// + /// Parses a coordinate. + /// + /// The list of tokens. + /// bool value indicating whether coordinate being parsed had z-coordinate. + /// bool value indicating whether coordinate beeing parsed has m-value. + /// A coordinate specified by tokens. + /// {} {}]]> + private static Coordinate ParseCoordinate(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = Expect(TokenType.NUMBER, tokens); + double x = double.Parse(t.Value, CultureInfo.InvariantCulture); + + Expect(TokenType.WHITESPACE, tokens); + + t = Expect(TokenType.NUMBER, tokens); + double y = double.Parse(t.Value, CultureInfo.InvariantCulture); + + double z = double.NaN; + double m = double.NaN; + + if (is3D) + { + Expect(TokenType.WHITESPACE, tokens); + + t = Expect(TokenType.NUMBER, tokens); + z = double.Parse(t.Value, CultureInfo.InvariantCulture); + } + + if (isMeasured) + { + Expect(TokenType.WHITESPACE, tokens); + + t = Expect(TokenType.NUMBER, tokens); + m = double.Parse(t.Value, CultureInfo.InvariantCulture); + } + + return new Coordinate(x, y, z, m); + } + + /// + /// Parses a series of coordinate. + /// + /// The list of tokens. + /// bool value indicating whether coordinate being parsed had z-coordinate. + /// bool value indicating whether coordinate beeing parsed has m-value. + /// A list of coordinates specified by tokens. + private static IEnumerable ParseCoordinates(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + List coordinates = new(); + + coordinates.Add(ParseCoordinate(tokens, is3D, isMeasured)); + + WktToken t = tokens.Peek(true); + while (t.Type == TokenType.COMMA) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + coordinates.Add(ParseCoordinate(tokens, is3D, isMeasured)); + t = tokens.Peek(true); + } + + return coordinates; + } + + /// + /// Parses a linestring tagged text. + /// + /// The list of tokens. + /// A linestring specified by tokens. + /// ::= linestring {z}{m} ]]> + private static LineString ParseLineStringTaggedText(WktTokensBuffer tokens) + { + Expect("linestring", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParseLineStringText(tokens, is3D, isMeasured); + } + + /// + /// Parses a linestring text. + /// + /// The list of tokens. + /// bool value indicating whether linestring being parsed has z-coordinate. + /// bool value indicating whether linestring being parsed has m-value. + /// A linestring specified by tokens. + /// | { }* ]]> + private static LineString ParseLineStringText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new LineString(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + IEnumerable coords = ParseCoordinates(tokens, is3D, isMeasured); + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return new LineString(coords); + } + + /// + /// Parses multiple LineStrings separated by comma. + /// + /// The list of tokens. + /// bool value indicating whether linestring being parsed had z-coordinate. + /// bool value indicating whether linestring being parsed has m-value. + /// A list of linestrings specified by tokens. + private static List ParseLineStrings(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + List linestrigns = new(); + + linestrigns.Add(ParseLineStringText(tokens, is3D, isMeasured)); + + WktToken t = tokens.Peek(true); + while (t.Type == TokenType.COMMA) + { + tokens.GetToken(true); + linestrigns.Add(ParseLineStringText(tokens, is3D, isMeasured)); + t = tokens.Peek(true); + } + + return linestrigns; + } + + /// + /// Parses a polygon tagged text. + /// + /// The list of tokens. + /// A polygon specified by tokens. + /// ::= polygon {z}{m} ]]> + private static Polygon ParsePolygonTaggedText(WktTokensBuffer tokens) + { + Expect("polygon", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParsePolygonText(tokens, is3D, isMeasured); + } + + /// + /// Parses a polygon text. + /// + /// The list of tokens. + /// bool value indicating whether polygon being parsed has z-coordinate. + /// bool value indicating whether polygon being parsed has m-value. + /// A polygon specified by tokens. + /// | { }* ]]> + private static Polygon ParsePolygonText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new Polygon(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + + IEnumerable linestrings = ParseLineStrings(tokens, is3D, isMeasured); + Polygon result = new(linestrings.First().Coordinates); + + foreach (var inner in linestrings.Skip(1)) + { + result.InteriorRings.Add(inner.Coordinates); + } + + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return result; + } + + /// + /// Parses series of polygons. + /// + /// The list of tokens. + /// bool value indicating whether polygon being parsed has z-coordinate. + /// bool value indicating whether polygon being parsed has m-value. + /// A list of polygons specified by tokens. + private static IEnumerable ParsePolygons(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + List polygons = new(); + + polygons.Add(ParsePolygonText(tokens, is3D, isMeasured)); + + WktToken t = tokens.Peek(true); + while (t.Type == TokenType.COMMA) + { + tokens.GetToken(true); + polygons.Add(ParsePolygonText(tokens, is3D, isMeasured)); + t = tokens.Peek(true); + } + + return polygons; + } + + /// + /// Parses a multilinestring tagged text. + /// + /// The list of tokens. + /// A multilinestring specified by tokens. + /// ::= multilinestring {z}{m} ]]> + private static MultiLineString ParseMultiLineStringTaggedText(WktTokensBuffer tokens) + { + Expect("multilinestring", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParseMultiLineStringText(tokens, is3D, isMeasured); + } + + /// + /// Parses a multilinestring text. + /// + /// The list of tokens. + /// bool value indicating whether multilinestring being parsed has z-coordinate. + /// bool value indicating whether multilinestring being parsed has m-value. + /// A multilinestring specified by tokens. + /// ::= | { }* ]]> + private static MultiLineString ParseMultiLineStringText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new MultiLineString(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + MultiLineString result = new(ParseLineStrings(tokens, is3D, isMeasured)); + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return result; + } + + /// + /// Parses a multipoint tagged text. + /// + /// The list of tokens. + /// A multipoint specified by tokens. + /// ::= multipoint {z}{m} ]]> + private static MultiPoint ParseMultiPointTaggedText(WktTokensBuffer tokens) + { + Expect("multipoint", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParseMultiPointText(tokens, is3D, isMeasured); + } + + /// + /// Parses a multipoint text. + /// + /// The list of tokens. + /// bool value indicating whether multipoint being parsed has z-coordinate. + /// bool value indicating whether multipoint being parsed has m-value. + /// A multipoint specified by tokens. + /// ::= | { }* ]]> + private static MultiPoint ParseMultiPointText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new MultiPoint(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + MultiPoint result = new(ParsePoints(tokens, is3D, isMeasured)); + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return result; + } + + /// + /// Parses a multipolyugon tagged text. + /// + /// The list of tokens. + /// A multipolygon specified by tokens. + /// ::= multipolygon {z}{m} ]]> + private static MultiPolygon ParseMultiPolygonTaggedText(WktTokensBuffer tokens) + { + Expect("multipolygon", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParseMultiPolygonText(tokens, is3D, isMeasured); + } + + /// + /// Parses a multipolygon text. + /// + /// The list of tokens. + /// bool value indicating whether multipolygon being parsed has z-coordinate. + /// bool value indicating whether multipolygon being parsed has m-value. + /// A multipolygon specified by tokens. + /// ::= | { }* ]]> + private static MultiPolygon ParseMultiPolygonText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new MultiPolygon(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + MultiPolygon result = new(ParsePolygons(tokens, is3D, isMeasured)); + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return result; + } + + /// + /// Parses a multipolyugon tagged text. + /// + /// The list of tokens. + /// A GeometryCollection specified by tokens. + /// ::= GeometryCollection {z}{m} ]]> + private static GeometryCollection ParseGeometryCollectionTaggedText(WktTokensBuffer tokens) + { + Expect("geometrycollection", tokens); + Expect(TokenType.WHITESPACE, tokens); + + bool is3D = false; + bool isMeasured = false; + + WktToken t = tokens.Peek(true); + if (TryParseDimensions(t, out is3D, out isMeasured)) + { + tokens.GetToken(true); + Expect(TokenType.WHITESPACE, tokens); + } + + return ParseGeometryCollectionText(tokens, is3D, isMeasured); + } + + /// + /// Parses a GeometryCollection text. + /// + /// The list of tokens. + /// bool value indicating whether GeometryCollection being parsed has z-coordinate. + /// bool value indicating whether GeometryCollection being parsed has m-value. + /// A GeometryCollection specified by tokens. + /// ::= | { }* ]]> + private static GeometryCollection ParseGeometryCollectionText(WktTokensBuffer tokens, bool is3D, bool isMeasured) + { + WktToken t = tokens.Peek(true); + + if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") + { + tokens.GetToken(true); + return new GeometryCollection(); + } + + Expect(TokenType.LEFT_PARENTHESIS, tokens); + + GeometryCollection result = new(); + result.Geometries.Add(ParseGeometryTaggedText(tokens)); + + t = tokens.Peek(true); + while (t.Type == TokenType.COMMA) + { + tokens.GetToken(true); + result.Geometries.Add(ParseGeometryTaggedText(tokens)); + t = tokens.Peek(true); + } + + Expect(TokenType.RIGHT_PARENTHESIS, tokens); + + return result; + } + + /// + /// Retrieves the next token from the tokens and checks if it has expected type. + /// + /// Expected type of token. + /// The list of tokens. + /// The head of the tokens queue. + private static WktToken Expect(TokenType type, WktTokensBuffer tokens) + { + bool ignoreWhitespace = type != TokenType.WHITESPACE; + + WktToken t = tokens.GetToken(ignoreWhitespace); + + if (t.Type != type) + { + string expected = string.Empty; + switch (type) + { + case TokenType.WHITESPACE: expected = " "; break; + case TokenType.LEFT_PARENTHESIS: expected = "("; break; + case TokenType.RIGHT_PARENTHESIS: expected = ")"; break; + case TokenType.STRING: expected = "STRING"; break; + case TokenType.NUMBER: expected = "NUMBER"; break; + } + + throw new WktParseException(string.Format(CultureInfo.InvariantCulture, "Expected '{0}' but encountered '{1}'", expected, t.Value)); + } + + return t; + } + + /// + /// Retrieves the next token from tokens and checks if it is TokenType.STRING and if it has correct value. + /// + /// Expected string value of the token. + /// The list of tokens. + /// The head of the tokens queue. + /// String comparsion is not case-sensitive. + private static WktToken Expect(string value, WktTokensBuffer tokens) + { + WktToken t = tokens.GetToken(true); + + if (t.Type != TokenType.STRING || string.Equals(value, t.Value, StringComparison.OrdinalIgnoreCase) == false) + { + throw new WktParseException(string.Format(CultureInfo.InvariantCulture, "Expected '{0}' but encountered '{1}", value, t.Value)); + } + + return t; + } + + /// + /// Examines the given token and tries to parse it as WKT dimensions text. + /// + /// The WKT token to parse. + /// Parameter that specified whether dimension text contains {z}. + /// Parameter that specified whether dimension text contains {m}. + /// true if token was successfuly parsed as WKT dimension text, oterwise returns false. + private static bool TryParseDimensions(WktToken token, out bool is3D, out bool isMeasured) + { + is3D = false; + isMeasured = false; + + if (token.Type == TokenType.STRING) + { + if (token.Value.ToUpperInvariant() == "Z") + { + is3D = true; + } + else if (token.Value.ToUpperInvariant() == "M") + { + isMeasured = true; + } + else if (token.Value.ToUpperInvariant() == "ZM") + { + is3D = true; + isMeasured = true; + } + + return is3D || isMeasured; + } + else + { + return false; + } + } -namespace SpatialLite.Core.IO { /// - /// Provides functions for reading and parsing geometries from WKT format. + /// Releases the unmanaged resources used by the ComponentLibrary and optionally releases the managed resources. /// - public class WktReader : IDisposable { - - private static CultureInfo _invarianCulture = CultureInfo.InvariantCulture; - - private TextReader _inputReader; - private FileStream _inputFileStream; - private WktTokensBuffer _tokens; - - private bool _disposed = false; - - /// - /// Initializes a new instance of the WktReader class that reads data from specific stream. - /// - /// The stream to read data from. - public WktReader(Stream input) { - if (input == null) { - throw new ArgumentNullException("input", "Input stream cannot be null"); - } - - _inputReader = new StreamReader(input); - _tokens = new WktTokensBuffer(WktTokenizer.Tokenize(_inputReader)); - } - - /// - /// Initializes a new instance of the WktReader class that reads data from specific file. - /// - /// Path to the file to read data from. - public WktReader(string path) { - _inputFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); - _inputReader = new StreamReader(_inputFileStream); - _tokens = new WktTokensBuffer(WktTokenizer.Tokenize(_inputReader)); - } - - /// - /// Parses a Geometry from WKT string. - /// - /// The string with WKT representation of a Geometry. - /// The parsed Geometry. - public static Geometry Parse(string wkt) { - WktTokensBuffer tokens = new WktTokensBuffer(WktTokenizer.Tokenize(wkt)); - return WktReader.ParseGeometryTaggedText(tokens); - } - - /// - /// Parses a Geometry of specific type from the WKT string. - /// - /// The type of the Geometry to be parsed. - /// The string with WKT representation of a Geometry. - /// The parsed Geometry of given type. - public static T Parse(string wkt) where T : Geometry { - Geometry parsed = WktReader.Parse(wkt); - - if (parsed != null) { - T result = parsed as T; - if (result == null) { - throw new WktParseException("Input doesn't contain valid WKB representation of the specified geometry type."); - } - - return result; - } - else { - return null; - } - } - - /// - /// Reads next geometry from the input. - /// - /// The geometry object read from the reader or null if no more geometries are available. - public Geometry Read() { - return WktReader.ParseGeometryTaggedText(_tokens); - } - - /// - /// Reads next geometry from the input. - /// - /// The type of Geometry to be parsed. - /// The geometry object of specific type read from the reader or null if no more geometries are available. - public T Read() where T : Geometry { - Geometry parsed = WktReader.ParseGeometryTaggedText(_tokens); - - if (parsed != null) { - T result = parsed as T; - if (result == null) { - throw new WktParseException("Input doesn't contain valid WKB representation of the specified geometry type."); - } - - return result; - } - else { - return null; - } - } - - /// - /// Releases all resources used by the ComponentLibrary. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Parses a geometry tagged text. - /// - /// The list of tokens. - /// A geometry specified by tokens. - private static Geometry ParseGeometryTaggedText(WktTokensBuffer tokens) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING) { - if (t.Value.ToUpperInvariant() == "POINT") { - return WktReader.ParsePointTaggedText(tokens); - } - else if (t.Value.ToUpperInvariant() == "LINESTRING") { - return WktReader.ParseLineStringTaggedText(tokens); - } - else if (t.Value.ToUpperInvariant() == "POLYGON") { - return WktReader.ParsePolygonTaggedText(tokens); - } - else if (t.Value.ToUpperInvariant() == "MULTIPOINT") { - return WktReader.ParseMultiPointTaggedText(tokens); - } - else if (t.Value.ToUpperInvariant() == "MULTILINESTRING") { - return WktReader.ParseMultiLineStringTaggedText(tokens); - } - else if (t.Value.ToUpperInvariant() == "MULTIPOLYGON") { - return WktReader.ParseMultiPolygonTaggedText(tokens); - } - else if (t.Value.ToUpperInvariant() == "GEOMETRYCOLLECTION") { - return WktReader.ParseGeometryCollectionTaggedText(tokens); - } - } - - if (t.Type == TokenType.END_OF_DATA) { - return null; - } - - throw new WktParseException(string.Format("Invalid geometry type '{0}'", t.Value)); - } - - /// - /// Parses a point tagged text. - /// - /// The list of tokens. - /// A point specified by tokens. - /// ::= point {z}{m} ]]> - private static Point ParsePointTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("point", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParsePointText(tokens, is3D, isMeasured); - } - - /// - /// Parses a point tagged text. - /// - /// The list of tokens. - /// bool value indicating whether point being parsed has z-coordinate. - /// bool value indicating whether point beeing parsed has m-value. - /// A point specified by tokens - /// | ]]> - private static Point ParsePointText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new Point(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - Point result = new Point(WktReader.ParseCoordinate(tokens, is3D, isMeasured)); - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return result; - } - - /// - /// Parses multiple Points separated by comma. - /// - /// The list of tokens. - /// bool value indicating whether point being parsed had z-coordinate. - /// bool value indicating whether point being parsed has m-value. - /// A list of point specified by tokens. - private static List ParsePoints(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - List points = new List(); - - points.Add(WktReader.ParsePointText(tokens, is3D, isMeasured)); - - WktToken t = tokens.Peek(true); - while (t.Type == TokenType.COMMA) { - tokens.GetToken(true); - points.Add(WktReader.ParsePointText(tokens, is3D, isMeasured)); - t = tokens.Peek(true); - } - - return points; - } - - /// - /// Parses a coordinate. - /// - /// The list of tokens. - /// bool value indicating whether coordinate being parsed had z-coordinate. - /// bool value indicating whether coordinate beeing parsed has m-value. - /// A coordinate specified by tokens. - /// {} {}]]> - private static Coordinate ParseCoordinate(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = WktReader.Expect(TokenType.NUMBER, tokens); - double x = double.Parse(t.Value, _invarianCulture); - - WktReader.Expect(TokenType.WHITESPACE, tokens); - - t = WktReader.Expect(TokenType.NUMBER, tokens); - double y = double.Parse(t.Value, _invarianCulture); - - double z = double.NaN; - double m = double.NaN; - - if (is3D) { - WktReader.Expect(TokenType.WHITESPACE, tokens); - - t = WktReader.Expect(TokenType.NUMBER, tokens); - z = double.Parse(t.Value, _invarianCulture); - } - - if (isMeasured) { - WktReader.Expect(TokenType.WHITESPACE, tokens); - - t = WktReader.Expect(TokenType.NUMBER, tokens); - m = double.Parse(t.Value, _invarianCulture); - } - - return new Coordinate(x, y, z, m); - } - - /// - /// Parses a series of coordinate. - /// - /// The list of tokens. - /// bool value indicating whether coordinate being parsed had z-coordinate. - /// bool value indicating whether coordinate beeing parsed has m-value. - /// A list of coordinates specified by tokens. - private static IEnumerable ParseCoordinates(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - List coordinates = new List(); - - coordinates.Add(WktReader.ParseCoordinate(tokens, is3D, isMeasured)); - - WktToken t = tokens.Peek(true); - while (t.Type == TokenType.COMMA) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - coordinates.Add(WktReader.ParseCoordinate(tokens, is3D, isMeasured)); - t = tokens.Peek(true); - } - - return coordinates; - } - - /// - /// Parses a linestring tagged text. - /// - /// The list of tokens. - /// A linestring specified by tokens. - /// ::= linestring {z}{m} ]]> - private static LineString ParseLineStringTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("linestring", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParseLineStringText(tokens, is3D, isMeasured); - } - - /// - /// Parses a linestring text. - /// - /// The list of tokens. - /// bool value indicating whether linestring being parsed has z-coordinate. - /// bool value indicating whether linestring being parsed has m-value. - /// A linestring specified by tokens. - /// | { }* ]]> - private static LineString ParseLineStringText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new LineString(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - IEnumerable coords = WktReader.ParseCoordinates(tokens, is3D, isMeasured); - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return new LineString(coords); - } - - /// - /// Parses multiple LineStrings separated by comma. - /// - /// The list of tokens. - /// bool value indicating whether linestring being parsed had z-coordinate. - /// bool value indicating whether linestring being parsed has m-value. - /// A list of linestrings specified by tokens. - private static List ParseLineStrings(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - List linestrigns = new List(); - - linestrigns.Add(WktReader.ParseLineStringText(tokens, is3D, isMeasured)); - - WktToken t = tokens.Peek(true); - while (t.Type == TokenType.COMMA) { - tokens.GetToken(true); - linestrigns.Add(WktReader.ParseLineStringText(tokens, is3D, isMeasured)); - t = tokens.Peek(true); - } - - return linestrigns; - } - - /// - /// Parses a polygon tagged text. - /// - /// The list of tokens. - /// A polygon specified by tokens. - /// ::= polygon {z}{m} ]]> - private static Polygon ParsePolygonTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("polygon", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParsePolygonText(tokens, is3D, isMeasured); - } - - /// - /// Parses a polygon text. - /// - /// The list of tokens. - /// bool value indicating whether polygon being parsed has z-coordinate. - /// bool value indicating whether polygon being parsed has m-value. - /// A polygon specified by tokens. - /// | { }* ]]> - private static Polygon ParsePolygonText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new Polygon(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - - IEnumerable linestrings = WktReader.ParseLineStrings(tokens, is3D, isMeasured); - Polygon result = new Polygon(linestrings.First().Coordinates); - - foreach (var inner in linestrings.Skip(1)) { - result.InteriorRings.Add(inner.Coordinates); - } - - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return result; - } - - /// - /// Parses series of polygons. - /// - /// The list of tokens. - /// bool value indicating whether polygon being parsed has z-coordinate. - /// bool value indicating whether polygon being parsed has m-value. - /// A list of polygons specified by tokens. - private static IEnumerable ParsePolygons(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - List polygons = new List(); - - polygons.Add(WktReader.ParsePolygonText(tokens, is3D, isMeasured)); - - WktToken t = tokens.Peek(true); - while (t.Type == TokenType.COMMA) { - tokens.GetToken(true); - polygons.Add(WktReader.ParsePolygonText(tokens, is3D, isMeasured)); - t = tokens.Peek(true); - } - - return polygons; - } - - /// - /// Parses a multilinestring tagged text. - /// - /// The list of tokens. - /// A multilinestring specified by tokens. - /// ::= multilinestring {z}{m} ]]> - private static MultiLineString ParseMultiLineStringTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("multilinestring", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParseMultiLineStringText(tokens, is3D, isMeasured); - } - - /// - /// Parses a multilinestring text. - /// - /// The list of tokens. - /// bool value indicating whether multilinestring being parsed has z-coordinate. - /// bool value indicating whether multilinestring being parsed has m-value. - /// A multilinestring specified by tokens. - /// ::= | { }* ]]> - private static MultiLineString ParseMultiLineStringText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new MultiLineString(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - MultiLineString result = new MultiLineString(WktReader.ParseLineStrings(tokens, is3D, isMeasured)); - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return result; - } - - /// - /// Parses a multipoint tagged text. - /// - /// The list of tokens. - /// A multipoint specified by tokens. - /// ::= multipoint {z}{m} ]]> - private static MultiPoint ParseMultiPointTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("multipoint", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParseMultiPointText(tokens, is3D, isMeasured); - } - - /// - /// Parses a multipoint text. - /// - /// The list of tokens. - /// bool value indicating whether multipoint being parsed has z-coordinate. - /// bool value indicating whether multipoint being parsed has m-value. - /// A multipoint specified by tokens. - /// ::= | { }* ]]> - private static MultiPoint ParseMultiPointText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new MultiPoint(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - MultiPoint result = new MultiPoint(WktReader.ParsePoints(tokens, is3D, isMeasured)); - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return result; - } - - /// - /// Parses a multipolyugon tagged text. - /// - /// The list of tokens. - /// A multipolygon specified by tokens. - /// ::= multipolygon {z}{m} ]]> - private static MultiPolygon ParseMultiPolygonTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("multipolygon", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParseMultiPolygonText(tokens, is3D, isMeasured); - } - - /// - /// Parses a multipolygon text. - /// - /// The list of tokens. - /// bool value indicating whether multipolygon being parsed has z-coordinate. - /// bool value indicating whether multipolygon being parsed has m-value. - /// A multipolygon specified by tokens. - /// ::= | { }* ]]> - private static MultiPolygon ParseMultiPolygonText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new MultiPolygon(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - MultiPolygon result = new MultiPolygon(WktReader.ParsePolygons(tokens, is3D, isMeasured)); - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return result; - } - - /// - /// Parses a multipolyugon tagged text. - /// - /// The list of tokens. - /// A GeometryCollection specified by tokens. - /// ::= GeometryCollection {z}{m} ]]> - private static GeometryCollection ParseGeometryCollectionTaggedText(WktTokensBuffer tokens) { - WktReader.Expect("geometrycollection", tokens); - WktReader.Expect(TokenType.WHITESPACE, tokens); - - bool is3D = false; - bool isMeasured = false; - - WktToken t = tokens.Peek(true); - if (WktReader.TryParseDimensions(t, out is3D, out isMeasured)) { - tokens.GetToken(true); - WktReader.Expect(TokenType.WHITESPACE, tokens); - } - - return WktReader.ParseGeometryCollectionText(tokens, is3D, isMeasured); - } - - /// - /// Parses a GeometryCollection text. - /// - /// The list of tokens. - /// bool value indicating whether GeometryCollection being parsed has z-coordinate. - /// bool value indicating whether GeometryCollection being parsed has m-value. - /// A GeometryCollection specified by tokens. - /// ::= | { }* ]]> - private static GeometryCollection ParseGeometryCollectionText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { - WktToken t = tokens.Peek(true); - - if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { - tokens.GetToken(true); - return new GeometryCollection(); - } - - WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); - - GeometryCollection result = new GeometryCollection(); - result.Geometries.Add(WktReader.ParseGeometryTaggedText(tokens)); - - t = tokens.Peek(true); - while (t.Type == TokenType.COMMA) { - tokens.GetToken(true); - result.Geometries.Add(WktReader.ParseGeometryTaggedText(tokens)); - t = tokens.Peek(true); - } - - WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); - - return result; - } - - /// - /// Retrieves the next token from the tokens and checks if it has expected type. - /// - /// Expected type of token. - /// The list of tokens. - /// The head of the tokens queue. - private static WktToken Expect(TokenType type, WktTokensBuffer tokens) { - bool ignoreWhitespace = type != TokenType.WHITESPACE; - - WktToken t = tokens.GetToken(ignoreWhitespace); - - if (t.Type != type) { - string expected = string.Empty; - switch (type) { - case TokenType.WHITESPACE: expected = " "; break; - case TokenType.LEFT_PARENTHESIS: expected = "("; break; - case TokenType.RIGHT_PARENTHESIS: expected = ")"; break; - case TokenType.STRING: expected = "STRING"; break; - case TokenType.NUMBER: expected = "NUMBER"; break; - } - - throw new WktParseException(string.Format("Expected '{0}' but encountered '{1}'", expected, t.Value)); - } - - return t; - } - - /// - /// Retrieves the next token from tokens and checks if it is TokenType.STRING and if it has correct value. - /// - /// Expected string value of the token. - /// The list of tokens. - /// The head of the tokens queue. - /// String comparsion is not case-sensitive. - private static WktToken Expect(string value, WktTokensBuffer tokens) { - WktToken t = tokens.GetToken(true); - - if (t.Type != TokenType.STRING || string.Equals(value, t.Value, StringComparison.OrdinalIgnoreCase) == false) { - throw new WktParseException(string.Format("Expected '{0}' but encountered '{1}", value, t.Value)); - } - - return t; - } - - /// - /// Examines the given token and tries to parse it as WKT dimensions text. - /// - /// The WKT token to parse. - /// Parameter that specified whether dimension text contains {z}. - /// Parameter that specified whether dimension text contains {m}. - /// true if token was successfuly parsed as WKT dimension text, oterwise returns false. - private static bool TryParseDimensions(WktToken token, out bool is3D, out bool isMeasured) { - is3D = false; - isMeasured = false; - - if (token.Type == TokenType.STRING) { - if (token.Value.ToUpperInvariant() == "Z") { - is3D = true; - } - else if (token.Value.ToUpperInvariant() == "M") { - isMeasured = true; - } - else if (token.Value.ToUpperInvariant() == "ZM") { - is3D = true; - isMeasured = true; - } - - return is3D || isMeasured; - } - else { - return false; - } - } - - /// - /// Releases the unmanaged resources used by the ComponentLibrary and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (disposing) { - _inputReader.Dispose(); - - if (_inputFileStream != null) { - _inputFileStream.Dispose(); - } - } - - _disposed = true; - } - } - } + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + _inputReader.Dispose(); + + if (_inputFileStream != null) + { + _inputFileStream.Dispose(); + } + } + + _disposed = true; + } + } } diff --git a/src/SpatialLite.Core/IO/WktToken.cs b/src/SpatialLite.Core/IO/WktToken.cs index b643b98..a04fa6d 100644 --- a/src/SpatialLite.Core/IO/WktToken.cs +++ b/src/SpatialLite.Core/IO/WktToken.cs @@ -1,21 +1,22 @@ -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Represents token of the wkt string. +/// +internal struct WktToken +{ /// - /// Represents token of the wkt string. + /// Special token that represents end of available data. /// - internal struct WktToken { - /// - /// Special token that represents end of available data. - /// - public static WktToken EndOfDataToken = new WktToken() { Type = TokenType.END_OF_DATA, Value = string.Empty }; + public static WktToken EndOfDataToken = new() { Type = TokenType.END_OF_DATA, Value = string.Empty }; - /// - /// The type of the tooken. - /// - public TokenType Type; + /// + /// The type of the tooken. + /// + public TokenType Type; - /// - /// The string value of the token. - /// - public string Value; - } + /// + /// The string value of the token. + /// + public string Value; } diff --git a/src/SpatialLite.Core/IO/WktTokenizer.cs b/src/SpatialLite.Core/IO/WktTokenizer.cs index 7d89ef2..0cbbda0 100644 --- a/src/SpatialLite.Core/IO/WktTokenizer.cs +++ b/src/SpatialLite.Core/IO/WktTokenizer.cs @@ -3,83 +3,96 @@ using System.IO; using System.Text; -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Implemets tokenizer that splits wkt string to list of tokens. +/// +internal static class WktTokenizer +{ + /// - /// Implemets tokenizer that splits wkt string to list of tokens. + /// Splits text to tokens. /// - internal static class WktTokenizer { + /// The text to be splitted. + /// The list of parsed tokens of the input string. + public static IEnumerable Tokenize(string text) + { + StringReader reader = new(text); + return Tokenize(reader); + } - /// - /// Splits text to tokens. - /// - /// The text to be splitted. - /// The list of parsed tokens of the input string. - public static IEnumerable Tokenize(string text) { - StringReader reader = new StringReader(text); - return WktTokenizer.Tokenize(reader); - } - - /// - /// Processes text from TextReader and splits it into tokens. - /// - /// The TextReader to read string from - /// The collection parsed tokens of the input string - public static IEnumerable Tokenize(TextReader reader) { - StringBuilder stringBuffer = new StringBuilder(); + /// + /// Processes text from TextReader and splits it into tokens. + /// + /// The TextReader to read string from + /// The collection parsed tokens of the input string + public static IEnumerable Tokenize(TextReader reader) + { + StringBuilder stringBuffer = new(); - if (reader.Peek() == -1) { - yield break; - } + if (reader.Peek() == -1) + { + yield break; + } - char ch = (char)reader.Read(); - stringBuffer.Append(ch); - TokenType lastToken = WktTokenizer.GetTokenType(ch); + char ch = (char)reader.Read(); + stringBuffer.Append(ch); + TokenType lastToken = GetTokenType(ch); - while (reader.Peek() != -1) { - ch = (char)reader.Read(); - TokenType token = WktTokenizer.GetTokenType(ch); + while (reader.Peek() != -1) + { + ch = (char)reader.Read(); + TokenType token = GetTokenType(ch); - // tokens COMMA, LEFT_PARENTHESIS and RIGHT_PARENTHESIS can not be grupped together - if ((token != lastToken) || token == TokenType.COMMA || token == TokenType.LEFT_PARENTHESIS || token == TokenType.RIGHT_PARENTHESIS) { - yield return new WktToken() { Type = lastToken, Value = stringBuffer.ToString() }; + // tokens COMMA, LEFT_PARENTHESIS and RIGHT_PARENTHESIS can not be grupped together + if ((token != lastToken) || token == TokenType.COMMA || token == TokenType.LEFT_PARENTHESIS || token == TokenType.RIGHT_PARENTHESIS) + { + yield return new WktToken() { Type = lastToken, Value = stringBuffer.ToString() }; - stringBuffer.Clear(); - lastToken = token; - } + stringBuffer.Clear(); + lastToken = token; + } - stringBuffer.Append(ch); - } + stringBuffer.Append(ch); + } - yield return new WktToken() { Type = lastToken, Value = stringBuffer.ToString() }; - } + yield return new WktToken() { Type = lastToken, Value = stringBuffer.ToString() }; + } - /// - /// Gets type of the token. - /// - /// Character to get type. - /// the type of token for ch. - /// In WKT can characters be divided into token types without context - every character is member of thne one token type only. - private static TokenType GetTokenType(char ch) { - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { - return TokenType.STRING; - } - else if (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n') { - return TokenType.WHITESPACE; - } - else if (ch == ',') { - return TokenType.COMMA; - } - else if (ch == '(') { - return TokenType.LEFT_PARENTHESIS; - } - else if (ch == ')') { - return TokenType.RIGHT_PARENTHESIS; - } - else if (ch == '-' || ch == '.' || (ch >= '0' && ch <= '9')) { - return TokenType.NUMBER; - } + /// + /// Gets type of the token. + /// + /// Character to get type. + /// the type of token for ch. + /// In WKT can characters be divided into token types without context - every character is member of thne one token type only. + private static TokenType GetTokenType(char ch) + { + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) + { + return TokenType.STRING; + } + else if (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n') + { + return TokenType.WHITESPACE; + } + else if (ch == ',') + { + return TokenType.COMMA; + } + else if (ch == '(') + { + return TokenType.LEFT_PARENTHESIS; + } + else if (ch == ')') + { + return TokenType.RIGHT_PARENTHESIS; + } + else if (ch == '-' || ch == '.' || (ch >= '0' && ch <= '9')) + { + return TokenType.NUMBER; + } - throw new Exception(); - } - } + throw new Exception(); + } } diff --git a/src/SpatialLite.Core/IO/WktTokensBuffer.cs b/src/SpatialLite.Core/IO/WktTokensBuffer.cs index 5fc6214..0299d3d 100644 --- a/src/SpatialLite.Core/IO/WktTokensBuffer.cs +++ b/src/SpatialLite.Core/IO/WktTokensBuffer.cs @@ -1,123 +1,142 @@ using System.Collections.Generic; -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Represents collection of WktToken obejcts with specialized methods to access it's items. +/// +internal class WktTokensBuffer : IEnumerable +{ + + private readonly List _buffer; + + /// + /// Initializes a new instance of the WktTokenBuffer class that is empty. + /// + public WktTokensBuffer() + { + _buffer = new List(); + } + + /// + /// Initializes a new instance of the WktTokensBuffer class and fills it with specified tokens. + /// + /// Tokens to add to the buffer. + public WktTokensBuffer(IEnumerable tokens) + { + _buffer = new List(tokens); + } + + /// + /// Gets number of items in the collection + /// + public int Count + { + get + { + return _buffer.Count; + } + } + + /// + /// Adds specific token to the end of tokens tokens + /// + /// The WktToken to add to the tokens + public void Add(WktToken item) + { + _buffer.Add(item); + } + + /// + /// Adds tokens from specific collection to the ent of tokens + /// + /// The collection whose items to add to this collection + public void Add(IEnumerable items) + { + _buffer.AddRange(items); + } + + /// + /// Removes all tokens from the collection + /// + public void Clear() + { + _buffer.Clear(); + } + + /// + /// Gets next token from the tokens + /// + /// bool value indicating whether whitespace tokens should be ignored + /// Next token form the tokens + public WktToken Peek(bool ignoreWhitespace) + { + if (Count == 0) + { + return WktToken.EndOfDataToken; + } + + WktToken t = _buffer[0]; + if (t.Type == TokenType.WHITESPACE && ignoreWhitespace) + { + int index = 0; + while (index < _buffer.Count && t.Type == TokenType.WHITESPACE) + { + t = _buffer[index++]; + } + + if (t.Type == TokenType.WHITESPACE) + { + return WktToken.EndOfDataToken; + } + + return t; + } + + return t; + } + + /// + /// Gets next token from the tokens and proceeds to the next token + /// + /// bool value indicating whether whitespace tokens should be ignored + /// Next token form the tokens + public WktToken GetToken(bool ignoreWhitespace) + { + if (ignoreWhitespace) + { + while (_buffer.Count > 0 && _buffer[0].Type == TokenType.WHITESPACE) + { + _buffer.RemoveAt(0); + } + } + + if (_buffer.Count == 0) + { + return WktToken.EndOfDataToken; + } + + WktToken result = _buffer[0]; + _buffer.RemoveAt(0); + + return result; + } + + /// + /// Returns an enumerator that iterates through the items of collection + /// + /// An enumerator that iterates through the collection + public IEnumerator GetEnumerator() + { + return _buffer.GetEnumerator(); + } + /// - /// Represents collection of WktToken obejcts with specialized methods to access it's items. + /// Returns an enumerator that iterates through the items of collection /// - internal class WktTokensBuffer : IEnumerable { - - private List _buffer; - - /// - /// Initializes a new instance of the WktTokenBuffer class that is empty. - /// - public WktTokensBuffer() { - _buffer = new List(); - } - - /// - /// Initializes a new instance of the WktTokensBuffer class and fills it with specified tokens. - /// - /// Tokens to add to the buffer. - public WktTokensBuffer(IEnumerable tokens) { - _buffer = new List(tokens); - } - - /// - /// Gets number of items in the collection - /// - public int Count { - get { - return _buffer.Count; - } - } - - /// - /// Adds specific token to the end of tokens tokens - /// - /// The WktToken to add to the tokens - public void Add(WktToken item) { - _buffer.Add(item); - } - - /// - /// Adds tokens from specific collection to the ent of tokens - /// - /// The collection whose items to add to this collection - public void Add(IEnumerable items) { - _buffer.AddRange(items); - } - - /// - /// Removes all tokens from the collection - /// - public void Clear() { - _buffer.Clear(); - } - - /// - /// Gets next token from the tokens - /// - /// bool value indicating whether whitespace tokens should be ignored - /// Next token form the tokens - public WktToken Peek(bool ignoreWhitespace) { - if (this.Count == 0) { - return WktToken.EndOfDataToken; - } - - WktToken t = _buffer[0]; - if (t.Type == TokenType.WHITESPACE && ignoreWhitespace) { - int index = 0; - while (index < _buffer.Count && t.Type == TokenType.WHITESPACE) { - t = _buffer[index++]; - } - - if (t.Type == TokenType.WHITESPACE) { - return WktToken.EndOfDataToken; - } - - return t; - } - - return t; - } - - /// - /// Gets next token from the tokens and proceeds to the next token - /// - /// bool value indicating whether whitespace tokens should be ignored - /// Next token form the tokens - public WktToken GetToken(bool ignoreWhitespace) { - if (ignoreWhitespace) { - while (_buffer.Count > 0 && _buffer[0].Type == TokenType.WHITESPACE) { - _buffer.RemoveAt(0); - } - } - - if (_buffer.Count == 0) { - return WktToken.EndOfDataToken; - } - - WktToken result = _buffer[0]; - _buffer.RemoveAt(0); - - return result; - } - - /// - /// Returns an enumerator that iterates through the items of collection - /// - /// An enumerator that iterates through the collection - public IEnumerator GetEnumerator() { - return _buffer.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the items of collection - /// - /// An enumerator that iterates through the collection - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { - return this.GetEnumerator(); - } - } + /// An enumerator that iterates through the collection + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } diff --git a/src/SpatialLite.Core/IO/WktWriter.cs b/src/SpatialLite.Core/IO/WktWriter.cs index 3301000..88ef0f5 100644 --- a/src/SpatialLite.Core/IO/WktWriter.cs +++ b/src/SpatialLite.Core/IO/WktWriter.cs @@ -1,476 +1,545 @@ -using System; -using System.IO; -using SpatialLite.Core.API; +using SpatialLite.Core.API; +using System; +using System.Globalization; +using System.IO; using System.Linq; -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Provides methods for writing Geomerty objects into WKT format. +/// +public class WktWriter : IDisposable +{ + + private bool _disposed = false; + private readonly TextWriter _writer; + private readonly Stream _outputStream; + + /// + /// Initializes a new instance of the WkbWriter class with specific settings. + /// + /// The settings defining behaviour of the writer. + protected WktWriter(WktWriterSettings settings) + { + Settings = settings ?? throw new ArgumentNullException(nameof(settings)); + Settings.IsReadOnly = true; + } + + /// + /// Initializes a new instance of the WktWriter class that writes geometries to stream with specific settings. + /// + /// The stream to write geometries to. + /// The settings defining behaviour of the writer. + public WktWriter(Stream stream, WktWriterSettings settings) + : this(settings) + { + if (stream == null) + { + throw new ArgumentNullException(nameof(stream)); + } + + _writer = new StreamWriter(stream); + } + + /// + /// Initializes a new instance of the WktWriter class that writes geometreis to file with specific settings. + /// + /// The path to the file to write geometries to. + /// The settings defining behaviour of the writer. + public WktWriter(string path, WktWriterSettings settings) + : this(settings) + { + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + _outputStream = new FileStream(path, FileMode.Create, FileAccess.Write); + _writer = new StreamWriter(_outputStream); + } + + /// + /// Gets the settings that determines behaviour of this instance of the WktWriter. + /// + public WktWriterSettings Settings { get; private set; } + + /// + /// Writes the Geometry object in the WKT format to the output. + /// + /// The geometry to write. + public void Write(IGeometry geometry) + { + Write(geometry, _writer); + } + + /// + /// Releases all resources used by the WktWriter. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Writes the Geometry object to the string in WKT format. + /// + /// The Geometry to be written. + /// The WKT representation of the Geometry. + public static string WriteToString(IGeometry geometry) + { + StringWriter tw = new(CultureInfo.InvariantCulture); + Write(geometry, tw); + + return tw.ToString(); + } + + /// + /// Writes specified Geometry to the TextWriter in WKT format. + /// + /// The geometry to be written. + /// The output Stream the Geometry will be written to. + protected static void Write(IGeometry geometry, TextWriter writer) + { + if (geometry is IPoint point) + { + AppendPointTaggedText(point, writer); + } + else if (geometry is ILineString lineString) + { + AppendLineStringTaggedText(lineString, writer); + } + else if (geometry is IPolygon polygon) + { + AppendPolygonTaggedText(polygon, writer); + } + else if (geometry is IMultiPoint multiPoint) + { + AppendMultiPointTaggedText(multiPoint, writer); + } + else if (geometry is IMultiLineString multiLineString) + { + AppendMultiLineStringTaggedText(multiLineString, writer); + } + else if (geometry is IMultiPolygon multiPolygon) + { + AppendMultiPolygonTaggetText(multiPolygon, writer); + } + else if (geometry is IGeometryCollection geometryCollection) + { + AppendGeometryCollectionTaggedText(geometryCollection, writer); + } + } + + /// + /// Converts the Coordinate to the format used in WKT and appends it to the output Stream. + /// + /// The Coordinate to be converted. + /// The output Stream to Appent WKT representation to. + private static void AppendCoordinate(Coordinate coordinate, TextWriter writer) + { + writer.Write(coordinate.X.ToString(CultureInfo.InvariantCulture)); + writer.Write(' '); + writer.Write(coordinate.Y.ToString(CultureInfo.InvariantCulture)); + + if (coordinate.Is3D) + { + writer.Write(' '); + writer.Write(coordinate.Z.ToString(CultureInfo.InvariantCulture)); + } + + if (coordinate.IsMeasured) + { + writer.Write(' '); + writer.Write(coordinate.M.ToString(CultureInfo.InvariantCulture)); + } + } + + /// + /// Converts the List of Coordinates to WKT format and appends it to output stream. + /// + /// The list of coordinates to be converted. + /// The output stream. + /// bool value indicating whether the list of coordinates should be enclosed in parathenes. + private static void AppendCoordinates(ICoordinateList coordinates, TextWriter writer, bool wrap) + { + if (coordinates.Count == 0) + { + return; + } + + if (wrap) + { + writer.Write("("); + } + + AppendCoordinate(coordinates[0], writer); + + for (int i = 1; i < coordinates.Count; i++) + { + writer.Write(", "); + AppendCoordinate(coordinates[i], writer); + } + + if (wrap) + { + writer.Write(")"); + } + } + + /// + /// Converts Point to WKT format and appends WKT representation to the output stream. + /// + /// The Point to be converted. + /// The output Stream to append WKT representation to. + private static void AppendPointTaggedText(IPoint point, TextWriter writer) + { + writer.Write("point "); + + string dimension = GetDimensionText(point); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendPointText(point, writer); + } + + /// + /// Converts Point's content to WKT format and appends it to the output stream. + /// + /// The Point to be converted. + /// The output Stream to append WKT representation to. + private static void AppendPointText(IPoint point, TextWriter writer) + { + if (point.Position.Equals(Coordinate.Empty)) + { + writer.Write("empty"); + } + else + { + writer.Write("("); + AppendCoordinate(point.Position, writer); + writer.Write(")"); + } + } + + /// + /// Converts LineString to WKT format and appends WKT representation to the output stream. + /// + /// The LineString to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendLineStringTaggedText(ILineString linestring, TextWriter writer) + { + writer.Write("linestring "); + + string dimension = GetDimensionText(linestring); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendLineStringText(linestring, writer); + } + + /// + /// Converts LineString's content to WKT and appends it to the output stream. + /// + /// The LineString to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendLineStringText(ILineString linestring, TextWriter writer) + { + if (linestring.Coordinates.Count == 0) + { + writer.Write("empty"); + } + else + { + AppendCoordinates(linestring.Coordinates, writer, true); + } + } + + /// + /// Converts Polygon to WKT format and appends WKT representation to the output stream. + /// + /// The Polygon to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendPolygonTaggedText(IPolygon polygon, TextWriter writer) + { + writer.Write("polygon "); + + string dimension = GetDimensionText(polygon); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendPolygonText(polygon, writer); + } + + /// + /// Converts Polygon's content to WKT format and appends WKT representation to the output stream. + /// + /// The Polygon to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendPolygonText(IPolygon polygon, TextWriter writer) + { + if (polygon.ExteriorRing.Count == 0) + { + writer.Write("empty"); + } + else + { + writer.Write("("); + AppendCoordinates(polygon.ExteriorRing, writer, true); + + if (polygon.InteriorRings.Count() > 0) + { + writer.Write(","); + AppendCoordinates(polygon.InteriorRings.First(), writer, true); + + foreach (var ring in polygon.InteriorRings.Skip(1)) + { + writer.Write(","); + AppendCoordinates(ring, writer, true); + } + } + + writer.Write(")"); + } + } + + /// + /// Converts MultiPoint to WKT format and appends WKT representation to the output stream. + /// + /// The MultiPoint to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendMultiPointTaggedText(IMultiPoint multipoint, TextWriter writer) + { + writer.Write("multipoint "); + + string dimension = GetDimensionText(multipoint); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendMultiPointText(multipoint, writer); + } + + /// + /// Converts MultiPoint's content to WKT format and appends WKT representation to the output stream. + /// + /// The MultiPoint to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendMultiPointText(IMultiPoint multipoint, TextWriter writer) + { + if (multipoint.Geometries.Count() == 0) + { + writer.Write("empty"); + } + else + { + writer.Write("("); + + if (multipoint.Geometries.Count() > 0) + { + AppendPointText(multipoint.Geometries.First(), writer); + + foreach (var point in multipoint.Geometries.Skip(1)) + { + writer.Write(","); + AppendPointText(point, writer); + } + } + + writer.Write(")"); + } + } + + /// + /// Converts MultiLineString to WKT format and appends WKT representation to the output stream. + /// + /// The MultiLineString to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendMultiLineStringTaggedText(IMultiLineString mls, TextWriter writer) + { + writer.Write("multilinestring "); + + string dimension = GetDimensionText(mls); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendMultiLineStringText(mls, writer); + } + + /// + /// Converts MultiLineString's content to WKT format and appends WKT representation to the output stream. + /// + /// The MultiLIneString to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendMultiLineStringText(IMultiLineString mls, TextWriter writer) + { + if (mls.Geometries.Count() == 0) + { + writer.Write("empty"); + } + else + { + writer.Write("("); + + AppendLineStringText(mls.Geometries.First(), writer); + + foreach (var linestring in mls.Geometries.Skip(1)) + { + writer.Write(","); + AppendLineStringText(linestring, writer); + } + + writer.Write(")"); + } + } + + /// + /// Converts MultiPolygon to WKT format and appends WKT representation to the output stream. + /// + /// The Multipolygon to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendMultiPolygonTaggetText(IMultiPolygon mp, TextWriter writer) + { + writer.Write("multipolygon "); + + string dimension = GetDimensionText(mp); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendMultiPolygonText(mp, writer); + } + + /// + /// Converts MultiPolygon's content to WKT format and appends WKT representation to the output stream. + /// + /// The MultiPolygon to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendMultiPolygonText(IMultiPolygon multipolygon, TextWriter writer) + { + if (multipolygon.Geometries.Count() == 0) + { + writer.Write("empty"); + } + else + { + writer.Write("("); + + AppendPolygonText(multipolygon.Geometries.First(), writer); + + foreach (var polygon in multipolygon.Geometries.Skip(1)) + { + writer.Write(","); + AppendPolygonText(polygon, writer); + } + + writer.Write(")"); + } + } + + /// + /// Converts GeometryCollection to WKT format and appends WKT representation to the output stream. + /// + /// The GeometryCollection be converted. + /// The output Stream to Append WKT representation to. + private static void AppendGeometryCollectionTaggedText(IGeometryCollection collection, TextWriter writer) + { + writer.Write("geometrycollection "); + + string dimension = GetDimensionText(collection); + if (string.IsNullOrEmpty(dimension) == false) + { + writer.Write(dimension); + writer.Write(" "); + } + + AppendGeometryCollectionText(collection, writer); + } + + /// + /// Converts GeometryCollection's content to WKT format and appends WKT representation to the output stream. + /// + /// The GeometryCollection to be converted. + /// The output Stream to Append WKT representation to. + private static void AppendGeometryCollectionText(IGeometryCollection collection, TextWriter writer) + { + if (collection.Geometries.Count() == 0) + { + writer.Write("empty"); + } + else + { + writer.Write("("); + Write(collection.Geometries.First(), writer); + + foreach (var geometry in collection.Geometries.Skip(1)) + { + writer.Write(","); + Write(geometry, writer); + } + + writer.Write(")"); + } + } + + /// + /// Gets string that represents dimension of the geometry. + /// + /// The geometry to examine. + /// The string representing dimension of the geometry - empty string for 2D geometry, 'm' for measured geometry, 'z' for 3D geometry. + private static string GetDimensionText(IGeometry geometry) + { + string dimension = string.Empty; + + if (geometry.Is3D) + { + dimension += "z"; + } + + if (geometry.IsMeasured) + { + dimension += "m"; + } + + return dimension; + } + /// - /// Provides methods for writing Geomerty objects into WKT format. + /// Releases the unmanaged resources used by the WktWriter and optionally releases the managed resources. /// - public class WktWriter : IDisposable { - - private static System.Globalization.CultureInfo _invariantCulture = System.Globalization.CultureInfo.InvariantCulture; - - private bool _disposed = false; - private TextWriter _writer; - private Stream _outputStream; - - /// - /// Initializes a new instance of the WkbWriter class with specific settings. - /// - /// The settings defining behaviour of the writer. - protected WktWriter(WktWriterSettings settings) { - if (settings == null) { - throw new ArgumentNullException("settings"); - } - - this.Settings = settings; - this.Settings.IsReadOnly = true; - } - - /// - /// Initializes a new instance of the WktWriter class that writes geometries to stream with specific settings. - /// - /// The stream to write geometries to. - /// The settings defining behaviour of the writer. - public WktWriter(Stream stream, WktWriterSettings settings) - : this(settings) { - if (stream == null) { - throw new ArgumentNullException("stream"); - } - - _writer = new StreamWriter(stream); - } - - /// - /// Initializes a new instance of the WktWriter class that writes geometreis to file with specific settings. - /// - /// The path to the file to write geometries to. - /// The settings defining behaviour of the writer. - public WktWriter(string path, WktWriterSettings settings) - : this(settings) { - if (path == null) { - throw new ArgumentNullException("path"); - } - - _outputStream = new FileStream(path, FileMode.Create, FileAccess.Write); - _writer = new StreamWriter(_outputStream); - } - - /// - /// Gets the settings that determines behaviour of this instance of the WktWriter. - /// - public WktWriterSettings Settings { get; private set; } - - /// - /// Writes the Geometry object in the WKT format to the output. - /// - /// The geometry to write. - public void Write(IGeometry geometry) { - WktWriter.Write(geometry, _writer); - } - - /// - /// Releases all resources used by the WktWriter. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Writes the Geometry object to the string in WKT format. - /// - /// The Geometry to be written. - /// The WKT representation of the Geometry. - public static string WriteToString(IGeometry geometry) { - StringWriter tw = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); - WktWriter.Write(geometry, tw); - - return tw.ToString(); - } - - /// - /// Writes specified Geometry to the TextWriter in WKT format. - /// - /// The geometry to be written. - /// The output Stream the Geometry will be written to. - protected static void Write(IGeometry geometry, TextWriter writer) { - if (geometry is IPoint) { - WktWriter.AppendPointTaggedText((IPoint)geometry, writer); - } - else if (geometry is ILineString) { - WktWriter.AppendLineStringTaggedText((ILineString)geometry, writer); - } - else if (geometry is IPolygon) { - WktWriter.AppendPolygonTaggedText((IPolygon)geometry, writer); - } - else if (geometry is IMultiPoint) { - WktWriter.AppendMultiPointTaggedText((IMultiPoint)geometry, writer); - } - else if (geometry is IMultiLineString) { - WktWriter.AppendMultiLineStringTaggedText((IMultiLineString)geometry, writer); - } - else if (geometry is IMultiPolygon) { - WktWriter.AppendMultiPolygonTaggetText((IMultiPolygon)geometry, writer); - } - else if (geometry is IGeometryCollection) { - WktWriter.AppendGeometryCollectionTaggedText((IGeometryCollection)geometry, writer); - } - } - - /// - /// Converts the Coordinate to the format used in WKT and appends it to the output Stream. - /// - /// The Coordinate to be converted. - /// The output Stream to Appent WKT representation to. - private static void AppendCoordinate(Coordinate coordinate, TextWriter writer) { - writer.Write(coordinate.X.ToString(_invariantCulture)); - writer.Write(' '); - writer.Write(coordinate.Y.ToString(_invariantCulture)); - - if (coordinate.Is3D) { - writer.Write(' '); - writer.Write(coordinate.Z.ToString(_invariantCulture)); - } - - if (coordinate.IsMeasured) { - writer.Write(' '); - writer.Write(coordinate.M.ToString(_invariantCulture)); - } - } - - /// - /// Converts the List of Coordinates to WKT format and appends it to output stream. - /// - /// The list of coordinates to be converted. - /// The output stream. - /// bool value indicating whether the list of coordinates should be enclosed in parathenes. - private static void AppendCoordinates(ICoordinateList coordinates, TextWriter writer, bool wrap) { - if (coordinates.Count == 0) { - return; - } - - if (wrap) { - writer.Write("("); - } - - WktWriter.AppendCoordinate(coordinates[0], writer); - - for (int i = 1; i < coordinates.Count; i++) { - writer.Write(", "); - WktWriter.AppendCoordinate(coordinates[i], writer); - } - - if (wrap) { - writer.Write(")"); - } - } - - /// - /// Converts Point to WKT format and appends WKT representation to the output stream. - /// - /// The Point to be converted. - /// The output Stream to append WKT representation to. - private static void AppendPointTaggedText(IPoint point, TextWriter writer) { - writer.Write("point "); - - string dimension = WktWriter.GetDimensionText(point); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendPointText(point, writer); - } - - /// - /// Converts Point's content to WKT format and appends it to the output stream. - /// - /// The Point to be converted. - /// The output Stream to append WKT representation to. - private static void AppendPointText(IPoint point, TextWriter writer) { - if (point.Position.Equals(Coordinate.Empty)) { - writer.Write("empty"); - } - else { - writer.Write("("); - WktWriter.AppendCoordinate(point.Position, writer); - writer.Write(")"); - } - } - - /// - /// Converts LineString to WKT format and appends WKT representation to the output stream. - /// - /// The LineString to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendLineStringTaggedText(ILineString linestring, TextWriter writer) { - writer.Write("linestring "); - - string dimension = WktWriter.GetDimensionText(linestring); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendLineStringText(linestring, writer); - } - - /// - /// Converts LineString's content to WKT and appends it to the output stream. - /// - /// The LineString to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendLineStringText(ILineString linestring, TextWriter writer) { - if (linestring.Coordinates.Count == 0) { - writer.Write("empty"); - } - else { - WktWriter.AppendCoordinates(linestring.Coordinates, writer, true); - } - } - - /// - /// Converts Polygon to WKT format and appends WKT representation to the output stream. - /// - /// The Polygon to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendPolygonTaggedText(IPolygon polygon, TextWriter writer) { - writer.Write("polygon "); - - string dimension = WktWriter.GetDimensionText(polygon); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendPolygonText(polygon, writer); - } - - /// - /// Converts Polygon's content to WKT format and appends WKT representation to the output stream. - /// - /// The Polygon to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendPolygonText(IPolygon polygon, TextWriter writer) { - if (polygon.ExteriorRing.Count == 0) { - writer.Write("empty"); - } - else { - writer.Write("("); - WktWriter.AppendCoordinates(polygon.ExteriorRing, writer, true); - - if (polygon.InteriorRings.Count() > 0) { - writer.Write(","); - WktWriter.AppendCoordinates(polygon.InteriorRings.First(), writer, true); - - foreach (var ring in polygon.InteriorRings.Skip(1)) { - writer.Write(","); - WktWriter.AppendCoordinates(ring, writer, true); - } - } - - writer.Write(")"); - } - } - - /// - /// Converts MultiPoint to WKT format and appends WKT representation to the output stream. - /// - /// The MultiPoint to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendMultiPointTaggedText(IMultiPoint multipoint, TextWriter writer) { - writer.Write("multipoint "); - - string dimension = WktWriter.GetDimensionText(multipoint); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendMultiPointText(multipoint, writer); - } - - /// - /// Converts MultiPoint's content to WKT format and appends WKT representation to the output stream. - /// - /// The MultiPoint to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendMultiPointText(IMultiPoint multipoint, TextWriter writer) { - if (multipoint.Geometries.Count() == 0) { - writer.Write("empty"); - } - else { - writer.Write("("); - - if (multipoint.Geometries.Count() > 0) { - WktWriter.AppendPointText(multipoint.Geometries.First(), writer); - - foreach (var point in multipoint.Geometries.Skip(1)) { - writer.Write(","); - WktWriter.AppendPointText(point, writer); - } - } - - writer.Write(")"); - } - } - - /// - /// Converts MultiLineString to WKT format and appends WKT representation to the output stream. - /// - /// The MultiLineString to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendMultiLineStringTaggedText(IMultiLineString mls, TextWriter writer) { - writer.Write("multilinestring "); - - string dimension = WktWriter.GetDimensionText(mls); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendMultiLineStringText(mls, writer); - } - - /// - /// Converts MultiLineString's content to WKT format and appends WKT representation to the output stream. - /// - /// The MultiLIneString to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendMultiLineStringText(IMultiLineString mls, TextWriter writer) { - if (mls.Geometries.Count() == 0) { - writer.Write("empty"); - } - else { - writer.Write("("); - - WktWriter.AppendLineStringText(mls.Geometries.First(), writer); - - foreach (var linestring in mls.Geometries.Skip(1)) { - writer.Write(","); - WktWriter.AppendLineStringText(linestring, writer); - } - - writer.Write(")"); - } - } - - /// - /// Converts MultiPolygon to WKT format and appends WKT representation to the output stream. - /// - /// The Multipolygon to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendMultiPolygonTaggetText(IMultiPolygon mp, TextWriter writer) { - writer.Write("multipolygon "); - - string dimension = WktWriter.GetDimensionText(mp); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendMultiPolygonText(mp, writer); - } - - /// - /// Converts MultiPolygon's content to WKT format and appends WKT representation to the output stream. - /// - /// The MultiPolygon to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendMultiPolygonText(IMultiPolygon multipolygon, TextWriter writer) { - if (multipolygon.Geometries.Count() == 0) { - writer.Write("empty"); - } - else { - writer.Write("("); - - WktWriter.AppendPolygonText(multipolygon.Geometries.First(), writer); - - foreach (var polygon in multipolygon.Geometries.Skip(1)) { - writer.Write(","); - WktWriter.AppendPolygonText(polygon, writer); - } - - writer.Write(")"); - } - } - - /// - /// Converts GeometryCollection to WKT format and appends WKT representation to the output stream. - /// - /// The GeometryCollection be converted. - /// The output Stream to Append WKT representation to. - private static void AppendGeometryCollectionTaggedText(IGeometryCollection collection, TextWriter writer) { - writer.Write("geometrycollection "); - - string dimension = WktWriter.GetDimensionText(collection); - if (string.IsNullOrEmpty(dimension) == false) { - writer.Write(dimension); - writer.Write(" "); - } - - WktWriter.AppendGeometryCollectionText(collection, writer); - } - - /// - /// Converts GeometryCollection's content to WKT format and appends WKT representation to the output stream. - /// - /// The GeometryCollection to be converted. - /// The output Stream to Append WKT representation to. - private static void AppendGeometryCollectionText(IGeometryCollection collection, TextWriter writer) { - if (collection.Geometries.Count() == 0) { - writer.Write("empty"); - } - else { - writer.Write("("); - WktWriter.Write(collection.Geometries.First(), writer); - - foreach (var geometry in collection.Geometries.Skip(1)) { - writer.Write(","); - WktWriter.Write(geometry, writer); - } - - writer.Write(")"); - } - } - - /// - /// Gets string that represents dimension of the geometry. - /// - /// The geometry to examine. - /// The string representing dimension of the geometry - empty string for 2D geometry, 'm' for measured geometry, 'z' for 3D geometry. - private static string GetDimensionText(IGeometry geometry) { - string dimension = string.Empty; - - if (geometry.Is3D) { - dimension += "z"; - } - - if (geometry.IsMeasured) { - dimension += "m"; - } - - return dimension; - } - - /// - /// Releases the unmanaged resources used by the WktWriter and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!_disposed) { - if (disposing) { - _writer.Dispose(); - - if (_outputStream != null) { - _outputStream.Dispose(); - } - } - - _disposed = true; - } - } - } + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + _writer.Dispose(); + + if (_outputStream != null) + { + _outputStream.Dispose(); + } + } + + _disposed = true; + } + } } diff --git a/src/SpatialLite.Core/IO/WktWriterSettings.cs b/src/SpatialLite.Core/IO/WktWriterSettings.cs index b2e529d..be193d2 100644 --- a/src/SpatialLite.Core/IO/WktWriterSettings.cs +++ b/src/SpatialLite.Core/IO/WktWriterSettings.cs @@ -1,19 +1,21 @@ -namespace SpatialLite.Core.IO { +namespace SpatialLite.Core.IO; + +/// +/// Specifies settings that determine behaviour of the WkbWriter. +/// +public class WktWriterSettings +{ + /// - /// Specifies settings that determine behaviour of the WkbWriter. + /// Initializes a new instance of the WkbWriterSettings class with default values. /// - public class WktWriterSettings { - - /// - /// Initializes a new instance of the WkbWriterSettings class with default values. - /// - public WktWriterSettings() - : base() { - } + public WktWriterSettings() + : base() + { + } - /// - /// Gets a value indicating whether properties of this OsmWriterSettings instance can be changed. - /// - protected internal bool IsReadOnly { get; internal set; } - } + /// + /// Gets a value indicating whether properties of this OsmWriterSettings instance can be changed. + /// + protected internal bool IsReadOnly { get; internal set; } } diff --git a/src/SpatialLite.Core/Measurements.cs b/src/SpatialLite.Core/Measurements.cs index 2bb114c..c2a3193 100644 --- a/src/SpatialLite.Core/Measurements.cs +++ b/src/SpatialLite.Core/Measurements.cs @@ -1,182 +1,207 @@ -using System.Linq; - +using SpatialLite.Core.Algorithms; using SpatialLite.Core.API; -using SpatialLite.Core.Algorithms; +using System.Linq; + +namespace SpatialLite.Core; + +/// +/// Provides methods for measuring geometry objects. +/// +public class Measurements +{ + + private static readonly Measurements euclidean2DInstance; + private static readonly Measurements sphere2DInstance; + + /// + /// Initializes static members of the Measurements class. + /// + static Measurements() + { + euclidean2DInstance = new Measurements(new Euclidean2DCalculator()); + sphere2DInstance = new Measurements(new Sphere2DCalculator()); + } + + /// + /// Initializes a new instance of the Measurements class that uses specific IDistanceCalculator. + /// + /// The IDistance calculator to be used. + public Measurements(IDimensionsCalculator distanceCalculator) + { + DimensionsCalculator = distanceCalculator; + } + + /// + /// Gets Measurments class instance that uses 2D Euclidean space. + /// + public static Measurements Euclidean2D + { + get + { + return euclidean2DInstance; + } + } + + /// + /// Gets Measurements class instance that uses sphere approximation of the Earth and ignores Z coordinates. + /// + public static Measurements Sphere2D + { + get + { + return sphere2DInstance; + } + } + + /// + /// Gets IDistanceCalculator object used by this Measurements to compute dimensions of geometries. + /// + public IDimensionsCalculator DimensionsCalculator { get; private set; } + + /// + /// Computes distance between two points + /// + /// The first point + /// The second point + /// distance between two point + public double ComputeDistance(Coordinate c1, Coordinate c2) + { + return DimensionsCalculator.CalculateDistance(c1, c2); + } + + /// + /// Computes distance of a point from LineString + /// + /// The point + /// The LineString + /// The distance of the point from the LineString + public double ComputeDistance(IPoint point, ILineString linestring) + { + if (point.Position == Coordinate.Empty || linestring.Coordinates.Count == 0) + { + return double.NaN; + } + + double minDistance = double.PositiveInfinity; + + for (int i = 1; i < linestring.Coordinates.Count; i++) + { + double distance = DimensionsCalculator.CalculateDistance(point.Position, linestring.Coordinates[i - 1], linestring.Coordinates[i], LineMode.LineSegment); + if (distance < minDistance) + { + minDistance = distance; + } + } + + return minDistance; + } + + /// + /// Computes distance of a point from MultiLineString + /// + /// The point + /// The MultiLineString + /// The distance of the point from the MultiLineString + public double ComputeDistance(IPoint point, IMultiLineString multilinestring) + { + if (point.Position == Coordinate.Empty || multilinestring.Geometries.Count() == 0) + { + return double.NaN; + } + + double minDistance = double.PositiveInfinity; + foreach (var linestring in multilinestring.Geometries) + { + double distance = ComputeDistance(point, linestring); + if (distance < minDistance) + { + minDistance = distance; + } + } + + return minDistance; + } + + /// + /// Computes distance between two points + /// + /// The first point + /// The second point + /// distance between two point + public double ComputeDistance(IPoint p1, IPoint p2) + { + if (p1.Position == Coordinate.Empty || p2.Position == Coordinate.Empty) + { + return double.NaN; + } + + return DimensionsCalculator.CalculateDistance(p1.Position, p2.Position); + } + + /// + /// Compute length of the linestring + /// + /// The linestring to measure + /// The length of the Linestring + public double ComputeLength(ILineString line) + { + double length = 0; + for (int i = 1; i < line.Coordinates.Count; i++) + { + length += DimensionsCalculator.CalculateDistance(line.Coordinates[i - 1], line.Coordinates[i]); + } + + return length; + } + + /// + /// Compute length of all linestrings in specific multilinestring + /// + /// The MultiLineString to measure + /// The length of the Linestring + public double ComputeLength(IMultiLineString multilinestring) + { + double length = 0; + + foreach (var line in multilinestring.Geometries) + { + length += ComputeLength(line); + } + + return length; + } + + /// + /// Computes area of the Polygon + /// + /// Polygon to be measured + /// The area of the Polygon + public double ComputeArea(IPolygon polygon) + { + double area = DimensionsCalculator.CalculateArea(polygon.ExteriorRing); + + foreach (var interiorRing in polygon.InteriorRings) + { + area -= DimensionsCalculator.CalculateArea(interiorRing); + } + + return area; + } -namespace SpatialLite.Core { /// - /// Provides methods for measuring geometry objects. + /// Computes area of the MultiPolygon /// - public class Measurements { - - private static readonly Measurements _euclidean2D; - private static readonly Measurements _sphere2D; - - /// - /// Initializes static members of the Measurements class. - /// - static Measurements() { - _euclidean2D = new Measurements(new Euclidean2DCalculator()); - _sphere2D = new Measurements(new Sphere2DCalculator()); - } - - /// - /// Initializes a new instance of the Measurements class that uses specific IDistanceCalculator. - /// - /// The IDistance calculator to be used. - public Measurements(IDimensionsCalculator distanceCalculator) { - this.DimensionsCalculator = distanceCalculator; - } - - /// - /// Gets Measurments class instance that uses 2D Euclidean space. - /// - public static Measurements Euclidean2D { - get { - return _euclidean2D; - } - } - - /// - /// Gets Measurements class instance that uses sphere approximation of the Earth and ignores Z coordinates. - /// - public static Measurements Sphere2D { - get { - return _sphere2D; - } - } - - /// - /// Gets IDistanceCalculator object used by this Measurements to compute dimensions of geometries. - /// - public IDimensionsCalculator DimensionsCalculator { get; private set; } - - /// - /// Computes distance between two points - /// - /// The first point - /// The second point - /// distance between two point - public double ComputeDistance(Coordinate c1, Coordinate c2) { - return this.DimensionsCalculator.CalculateDistance(c1, c2); - } - - /// - /// Computes distance of a point from LineString - /// - /// The point - /// The LineString - /// The distance of the point from the LineString - public double ComputeDistance(IPoint point, ILineString linestring) { - if (point.Position == Coordinate.Empty || linestring.Coordinates.Count == 0) { - return double.NaN; - } - - double minDistance = double.PositiveInfinity; - - for (int i = 1; i < linestring.Coordinates.Count; i++) { - double distance = this.DimensionsCalculator.CalculateDistance(point.Position, linestring.Coordinates[i - 1], linestring.Coordinates[i], LineMode.LineSegment); - if (distance < minDistance) { - minDistance = distance; - } - } - - return minDistance; - } - - /// - /// Computes distance of a point from MultiLineString - /// - /// The point - /// The MultiLineString - /// The distance of the point from the MultiLineString - public double ComputeDistance(IPoint point, IMultiLineString multilinestring) { - if (point.Position == Coordinate.Empty || multilinestring.Geometries.Count() == 0) { - return double.NaN; - } - - double minDistance = double.PositiveInfinity; - foreach (var linestring in multilinestring.Geometries) { - double distance = this.ComputeDistance(point, linestring); - if (distance < minDistance) { - minDistance = distance; - } - } - - return minDistance; - } - - /// - /// Computes distance between two points - /// - /// The first point - /// The second point - /// distance between two point - public double ComputeDistance(IPoint p1, IPoint p2) { - if (p1.Position == Coordinate.Empty || p2.Position == Coordinate.Empty) { - return double.NaN; - } - - return this.DimensionsCalculator.CalculateDistance(p1.Position, p2.Position); - } - - /// - /// Compute length of the linestring - /// - /// The linestring to measure - /// The length of the Linestring - public double ComputeLength(ILineString line) { - double length = 0; - for (int i = 1; i < line.Coordinates.Count; i++) { - length += this.DimensionsCalculator.CalculateDistance(line.Coordinates[i - 1], line.Coordinates[i]); - } - - return length; - } - - /// - /// Compute length of all linestrings in specific multilinestring - /// - /// The MultiLineString to measure - /// The length of the Linestring - public double ComputeLength(IMultiLineString multilinestring) { - double length = 0; - - foreach (var line in multilinestring.Geometries) { - length += this.ComputeLength(line); - } - - return length; - } - - /// - /// Computes area of the Polygon - /// - /// Polygon to be measured - /// The area of the Polygon - public double ComputeArea(IPolygon polygon) { - double area = this.DimensionsCalculator.CalculateArea(polygon.ExteriorRing); - - foreach (var interiorRing in polygon.InteriorRings) { - area -= this.DimensionsCalculator.CalculateArea(interiorRing); - } - - return area; - } - - /// - /// Computes area of the MultiPolygon - /// - /// MultiPolygon to be measured - /// The area of the MultiPolygon - public double ComputeArea(IMultiPolygon multiPolygon) { - double area = 0; - - foreach (var polygon in multiPolygon.Geometries) { - area += this.ComputeArea(polygon); - } - - return area; - } - } + /// MultiPolygon to be measured + /// The area of the MultiPolygon + public double ComputeArea(IMultiPolygon multiPolygon) + { + double area = 0; + + foreach (var polygon in multiPolygon.Geometries) + { + area += ComputeArea(polygon); + } + + return area; + } } diff --git a/src/SpatialLite.Core/Properties/AssemblyInfo.cs b/src/SpatialLite.Core/Properties/AssemblyInfo.cs index 6a37585..c63ae8a 100644 --- a/src/SpatialLite.Core/Properties/AssemblyInfo.cs +++ b/src/SpatialLite.Core/Properties/AssemblyInfo.cs @@ -15,4 +15,4 @@ // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -[assembly: InternalsVisibleTo("Tests.SpatialLite.Core")] \ No newline at end of file +[assembly: InternalsVisibleTo("Tests.SpatialLite.Core")] diff --git a/src/SpatialLite.Core/Topology.cs b/src/SpatialLite.Core/Topology.cs index c69e0e1..05b4b7d 100644 --- a/src/SpatialLite.Core/Topology.cs +++ b/src/SpatialLite.Core/Topology.cs @@ -1,132 +1,148 @@ -using System; - -using SpatialLite.Core.Algorithms; +using SpatialLite.Core.Algorithms; using SpatialLite.Core.API; +using System; + +namespace SpatialLite.Core; + +/// +/// Provides methods for basic topology analysis of geometry objects and relationships among them. +/// +public class Topology +{ + + private static readonly Topology euclidean2DInstance; + + /// + /// Initializes static members of the Topology class. + /// + static Topology() + { + euclidean2DInstance = new Topology(new Euclidean2DLocator()); + } + + /// + /// Gets Topology class instance that uses Euclidean2DLocator to determine relationships among geometries. + /// + public static Topology Euclidean2D + { + get + { + return euclidean2DInstance; + } + } + + /// + /// Initializes a new instance of the Topology class with specific geometry locator. + /// + /// The IGeometryLocator object to use. + public Topology(IGeometryLocator geometryLocator) + { + GeometryLocator = geometryLocator ?? throw new ArgumentNullException(nameof(geometryLocator), "GeometryLocator can't be null"); + } + + /// + /// Gets IGeometryLocator that this Topology class instance uses to determine relationships among geometries. + /// + public IGeometryLocator GeometryLocator { get; private set; } + + /// + /// Determines whether specific Coordinate is in the given polygon. + /// + /// The coordinate to chec.k + /// The polygon to check coordinate against. + /// bool values that specifies whether points on boundaries of the polygon should be considered as inside. + /// true if coordinate lies inside outer polygon boundary and outside polygon's inner boundaries (holes), otherwise returns false. + public bool IsInside(Coordinate c, IPolygon polygon, bool includeBoundaries) + { + bool insideExterior = GeometryLocator.IsInRing(c, polygon.ExteriorRing); + + if (insideExterior == false) + { + if (includeBoundaries) + { + return GeometryLocator.IsOnLine(c, polygon.ExteriorRing); + } + else + { + return false; + } + } + else + { + foreach (var ring in polygon.InteriorRings) + { + if (GeometryLocator.IsInRing(c, ring)) + { + return false; + } + else if (includeBoundaries && GeometryLocator.IsOnLine(c, ring)) + { + return true; + } + } + } + + return true; + } + + /// + /// Determines whether specific Coordinate is in the given multipolygon. + /// + /// The coordinate to check. + /// The multipolygon to check coordinate against. + /// bool values that specifies whether points on boundaries of the polygon should be considered as inside. + /// true if coordinate lies inside any polygon of the given multipolygon, otherwise false. + public bool IsInside(Coordinate c, IMultiPolygon multipolygon, bool includeBoundaries) + { + foreach (var polygon in multipolygon.Geometries) + { + if (IsInside(c, polygon, includeBoundaries)) + { + return true; + } + } + + return false; + } + + /// + /// Determines whether specific Coordinate is on the given polyline. + /// + /// The coordinate to check. + /// The line to check coordinate against. + /// true if coordinate lies on the polyline, otherwise false. + public bool IsOnLine(Coordinate c, ILineString line) + { + return GeometryLocator.IsOnLine(c, line.Coordinates); + } + + /// + /// Determines whether specific Coordinate in on the given multiline. + /// + /// The coordinate to check. + /// The multiline to check coordinate against. + /// true if coordinate lies on any line of the given multiline, otherwise false. + public bool IsOnLine(Coordinate c, IMultiLineString multiline) + { + foreach (var line in multiline.Geometries) + { + if (IsOnLine(c, line)) + { + return true; + } + } + + return false; + } -namespace SpatialLite.Core { /// - /// Provides methods for basic topology analysis of geometry objects and relationships among them. + /// Determines whether two polylines defined by series of coordinates intersects. /// - public class Topology { - - private static Topology _euclidean2D; - - /// - /// Initializes static members of the Topology class. - /// - static Topology() { - _euclidean2D = new Topology(new Euclidean2DLocator()); - } - - /// - /// Gets Topology class instance that uses Euclidean2DLocator to determine relationships among geometries. - /// - public static Topology Euclidean2D { - get { - return _euclidean2D; - } - } - - /// - /// Initializes a new instance of the Topology class with specific geometry locator. - /// - /// The IGeometryLocator object to use. - public Topology(IGeometryLocator geometryLocator) { - if (geometryLocator == null) { - throw new ArgumentNullException("geometryLocator", "GeometryLocator can't be null"); - } - - this.GeometryLocator = geometryLocator; - } - - /// - /// Gets IGeometryLocator that this Topology class instance uses to determine relationships among geometries. - /// - public IGeometryLocator GeometryLocator { get; private set; } - - /// - /// Determines whether specific Coordinate is in the given polygon. - /// - /// The coordinate to chec.k - /// The polygon to check coordinate against. - /// bool values that specifies whether points on boundaries of the polygon should be considered as inside. - /// true if coordinate lies inside outer polygon boundary and outside polygon's inner boundaries (holes), otherwise returns false. - public bool IsInside(Coordinate c, IPolygon polygon, bool includeBoundaries) { - bool insideExterior = this.GeometryLocator.IsInRing(c, polygon.ExteriorRing); - - if (insideExterior == false) { - if (includeBoundaries) { - return this.GeometryLocator.IsOnLine(c, polygon.ExteriorRing); - } - else { - return false; - } - } - else { - foreach (var ring in polygon.InteriorRings) { - if (this.GeometryLocator.IsInRing(c, ring)) { - return false; - } - else if (includeBoundaries && this.GeometryLocator.IsOnLine(c, ring)) { - return true; - } - } - } - - return true; - } - - /// - /// Determines whether specific Coordinate is in the given multipolygon. - /// - /// The coordinate to check. - /// The multipolygon to check coordinate against. - /// bool values that specifies whether points on boundaries of the polygon should be considered as inside. - /// true if coordinate lies inside any polygon of the given multipolygon, otherwise false. - public bool IsInside(Coordinate c, IMultiPolygon multipolygon, bool includeBoundaries) { - foreach (var polygon in multipolygon.Geometries) { - if (this.IsInside(c, polygon, includeBoundaries)) { - return true; - } - } - - return false; - } - - /// - /// Determines whether specific Coordinate is on the given polyline. - /// - /// The coordinate to check. - /// The line to check coordinate against. - /// true if coordinate lies on the polyline, otherwise false. - public bool IsOnLine(Coordinate c, ILineString line) { - return this.GeometryLocator.IsOnLine(c, line.Coordinates); - } - - /// - /// Determines whether specific Coordinate in on the given multiline. - /// - /// The coordinate to check. - /// The multiline to check coordinate against. - /// true if coordinate lies on any line of the given multiline, otherwise false. - public bool IsOnLine(Coordinate c, IMultiLineString multiline) { - foreach (var line in multiline.Geometries) { - if (this.IsOnLine(c, line)) { - return true; - } - } - - return false; - } - - /// - /// Determines whether two polylines defined by series of coordinates intersects. - /// - /// The first polyline to test. - /// The second polyline to test. - /// true if polylines intersets, otherwise false. - public bool Intersects(ILineString line1, ILineString line2) { - return this.GeometryLocator.Intersects(line1.Coordinates, line2.Coordinates); - } - } + /// The first polyline to test. + /// The second polyline to test. + /// true if polylines intersets, otherwise false. + public bool Intersects(ILineString line1, ILineString line2) + { + return GeometryLocator.Intersects(line1.Coordinates, line2.Coordinates); + } } diff --git a/src/SpatialLite.Gps/Geometries/GpsFix.cs b/src/SpatialLite.Gps/Geometries/GpsFix.cs index 7487bc9..82e65d0 100644 --- a/src/SpatialLite.Gps/Geometries/GpsFix.cs +++ b/src/SpatialLite.Gps/Geometries/GpsFix.cs @@ -1,31 +1,32 @@ -namespace SpatialLite.Gps.Geometries { - /// - /// Defines type of the GPS fix - /// - public enum GpsFix { - /// - /// No fix - /// - None, - - /// - /// Position only - /// - Fix2D, - - /// - /// Position and elevation - /// - Fix3D, - - /// - /// Differential GPS - /// - Dgps, - - /// - /// Military signal used - /// - Pps - } -} +namespace SpatialLite.Gps.Geometries; + +/// +/// Defines type of the GPS fix +/// +public enum GpsFix +{ + /// + /// No fix + /// + None, + + /// + /// Position only + /// + Fix2D, + + /// + /// Position and elevation + /// + Fix3D, + + /// + /// Differential GPS + /// + Dgps, + + /// + /// Military signal used + /// + Pps +} diff --git a/src/SpatialLite.Gps/Geometries/GpsPoint.cs b/src/SpatialLite.Gps/Geometries/GpsPoint.cs index c5335fe..21b2b30 100644 --- a/src/SpatialLite.Gps/Geometries/GpsPoint.cs +++ b/src/SpatialLite.Gps/Geometries/GpsPoint.cs @@ -1,52 +1,57 @@ -using System; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace SpatialLite.Gps.Geometries { - /// - /// Represents location on the earth surface with timestamp that defines time when the point was recorded - /// - public class GpsPoint : Point, IGpsPoint { - - /// - /// Creates a new, empty instance of the GpsPoint - /// - public GpsPoint() { - } - - /// - /// Creates a new instance of the GpsPoint with given position - /// - /// The position of the point - public GpsPoint(Coordinate position) - : base(position) { - } - - /// - /// Creates a new instance of the GpsPoint with given coordinates and timestamp - /// - /// The longitude of the point - /// The latitude of the point - /// The elevation of the point - /// The time when the point was recorded - public GpsPoint(double longitude, double latitude, double elevation, DateTime time) - : base(longitude, latitude, elevation) { - Timestamp = time; - } - - /// - /// Creates a new instance of the GpsPoint with given position and time - /// - /// The position of the point - /// The time when the point was recorded - public GpsPoint(Coordinate position, DateTime time) - : base(position) { - Timestamp = time; - } - - /// - /// Gets or sets time when the point was recorded. - /// - public DateTime? Timestamp { get; set; } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Represents location on the earth surface with timestamp that defines time when the point was recorded +/// +public class GpsPoint : Point, IGpsPoint +{ + + /// + /// Creates a new, empty instance of the GpsPoint + /// + public GpsPoint() + { + } + + /// + /// Creates a new instance of the GpsPoint with given position + /// + /// The position of the point + public GpsPoint(Coordinate position) + : base(position) + { + } + + /// + /// Creates a new instance of the GpsPoint with given coordinates and timestamp + /// + /// The longitude of the point + /// The latitude of the point + /// The elevation of the point + /// The time when the point was recorded + public GpsPoint(double longitude, double latitude, double elevation, DateTime time) + : base(longitude, latitude, elevation) + { + Timestamp = time; + } + + /// + /// Creates a new instance of the GpsPoint with given position and time + /// + /// The position of the point + /// The time when the point was recorded + public GpsPoint(Coordinate position, DateTime time) + : base(position) + { + Timestamp = time; + } + + /// + /// Gets or sets time when the point was recorded. + /// + public DateTime? Timestamp { get; set; } +} diff --git a/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs b/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs index c70f045..7d3461c 100644 --- a/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs +++ b/src/SpatialLite.Gps/Geometries/GpsTrackBase.cs @@ -1,42 +1,47 @@ -using System.Collections.Generic; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace SpatialLite.Gps.Geometries { - /// - /// Represents base class for Gps tracks - /// - /// The type of the Gps points - public class GpsTrackBase : LineString where T : IGpsPoint { - private ICoordinateList _coordinatesAdapter; - - /// - /// Creates a new instance of the GpsTrackBase class - /// - public GpsTrackBase() : this(new T[] {}) { - } - - /// - /// Creates a new instance of GpsTrackBase with given points - /// - /// The points of the track - public GpsTrackBase(IEnumerable points) { - this.Points = new List(points); - _coordinatesAdapter = new ReadOnlyCoordinateList(this.Points); - } - - /// - /// Gets the collection of track points of this track - /// - public List Points { get; private set; } - - /// - /// Gets the list of çoordinates of this track. - /// - public override ICoordinateList Coordinates { - get { - return _coordinatesAdapter; - } - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System.Collections.Generic; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Represents base class for Gps tracks +/// +/// The type of the Gps points +public class GpsTrackBase : LineString where T : IGpsPoint +{ + private readonly ICoordinateList _coordinatesAdapter; + + /// + /// Creates a new instance of the GpsTrackBase class + /// + public GpsTrackBase() : this(new T[] { }) + { + } + + /// + /// Creates a new instance of GpsTrackBase with given points + /// + /// The points of the track + public GpsTrackBase(IEnumerable points) + { + Points = new List(points); + _coordinatesAdapter = new ReadOnlyCoordinateList(Points); + } + + /// + /// Gets the collection of track points of this track + /// + public List Points { get; private set; } + + /// + /// Gets the list of çoordinates of this track. + /// + public override ICoordinateList Coordinates + { + get + { + return _coordinatesAdapter; + } + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxFixHelper.cs b/src/SpatialLite.Gps/Geometries/GpxFixHelper.cs index 34b2ce8..82141f8 100644 --- a/src/SpatialLite.Gps/Geometries/GpxFixHelper.cs +++ b/src/SpatialLite.Gps/Geometries/GpxFixHelper.cs @@ -1,40 +1,45 @@ -namespace SpatialLite.Gps.Geometries { - /// - /// Contains helper function for parsing / formating GpxFix enum - /// - public static class GpxFixHelper { - /// - /// Converts string representation of the GpsFix to it's GpxFix enum equivalent. - /// - /// A string containing a value to convert - /// A GpxFix enum equivalent of the s parameter or null if s can not be converted to GpsFix enum - /// ParseGpsFix should be used instead Enum.Parse function becouse string representation of the GpsFix values do not equal to their names. - public static GpsFix? ParseGpsFix(string s) { - switch (s) { - case "none": return GpsFix.None; - case "2d": return GpsFix.Fix2D; - case "3d": return GpsFix.Fix3D; - case "dgps": return GpsFix.Dgps; - case "pps": return GpsFix.Pps; - default: return null; - } - } - - /// - /// Converts GpsFix enum value to it's string equivalent - /// - /// A GpxFix value to convert - /// A string equivalent of the fix parameter - /// ConvertGpsFixToString shoul be used instead ToString() function becouse string representation of the GpsFix values if GPX schema do not equal to their names. - public static string GpsFixToString(GpsFix fix) { - switch (fix) { - case GpsFix.None: return "none"; - case GpsFix.Fix2D: return "2d"; - case GpsFix.Fix3D: return "3d"; - case GpsFix.Dgps: return "dgps"; - case GpsFix.Pps: return "pps"; - default: return null; - } - } - } -} +namespace SpatialLite.Gps.Geometries; + +/// +/// Contains helper function for parsing / formating GpxFix enum +/// +public static class GpxFixHelper +{ + /// + /// Converts string representation of the GpsFix to it's GpxFix enum equivalent. + /// + /// A string containing a value to convert + /// A GpxFix enum equivalent of the s parameter or null if s can not be converted to GpsFix enum + /// ParseGpsFix should be used instead Enum.Parse function becouse string representation of the GpsFix values do not equal to their names. + public static GpsFix? ParseGpsFix(string s) + { + switch (s) + { + case "none": return GpsFix.None; + case "2d": return GpsFix.Fix2D; + case "3d": return GpsFix.Fix3D; + case "dgps": return GpsFix.Dgps; + case "pps": return GpsFix.Pps; + default: return null; + } + } + + /// + /// Converts GpsFix enum value to it's string equivalent + /// + /// A GpxFix value to convert + /// A string equivalent of the fix parameter + /// ConvertGpsFixToString shoul be used instead ToString() function becouse string representation of the GpsFix values if GPX schema do not equal to their names. + public static string GpsFixToString(GpsFix fix) + { + switch (fix) + { + case GpsFix.None: return "none"; + case GpsFix.Fix2D: return "2d"; + case GpsFix.Fix3D: return "3d"; + case GpsFix.Dgps: return "dgps"; + case GpsFix.Pps: return "pps"; + default: return null; + } + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxLink.cs b/src/SpatialLite.Gps/Geometries/GpxLink.cs index a4531f3..14dfd59 100644 --- a/src/SpatialLite.Gps/Geometries/GpxLink.cs +++ b/src/SpatialLite.Gps/Geometries/GpxLink.cs @@ -1,32 +1,34 @@ -using System; - -namespace SpatialLite.Gps.Geometries { - /// - /// Represents a link to an external resource (Web page, digital photo, video clip, etc) with additional information. - /// - public class GpxLink { - - /// - /// Gets the URL of the link - /// - public Uri Url { get; set; } - - /// - /// Gets the text of the hyperlink - /// - public string Text { get; set; } - - /// - /// Gets the mime type of the linked content - /// - public string Type { get; set; } - - /// - /// Creates a new instance of the GpxLink with given url - /// - /// The url of the link - public GpxLink(Uri url) { - Url = url; - } - } -} +using System; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Represents a link to an external resource (Web page, digital photo, video clip, etc) with additional information. +/// +public class GpxLink +{ + + /// + /// Gets the URL of the link + /// + public Uri Url { get; set; } + + /// + /// Gets the text of the hyperlink + /// + public string Text { get; set; } + + /// + /// Gets the mime type of the linked content + /// + public string Type { get; set; } + + /// + /// Creates a new instance of the GpxLink with given url + /// + /// The url of the link + public GpxLink(Uri url) + { + Url = url; + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxMetadata.cs b/src/SpatialLite.Gps/Geometries/GpxMetadata.cs index 092f2e5..04706a9 100644 --- a/src/SpatialLite.Gps/Geometries/GpxMetadata.cs +++ b/src/SpatialLite.Gps/Geometries/GpxMetadata.cs @@ -1,40 +1,42 @@ -using System.Collections.Generic; - -namespace SpatialLite.Gps.Geometries { - /// - /// Contains additional information about Gpx entity - /// - public abstract class GpxMetadata { - /// - /// Gets or sets the name of the entity - /// - public string Name { get; set; } - - /// - /// Gets or sets the comment for the entity - /// - public string Comment { get; set; } - - /// - /// Gets or sets the description of the entity. Holds additional information about the element intended for the user, not the GPS. - /// - public string Description { get; set; } - - /// - /// Gets or sets the source of the data. Included to give user some idea of reliability and accuracy of data. - /// - public string Source { get; set; } - - /// - /// Get or sets the list of link associated with the entity - /// - public ICollection Links { get; set; } - - /// - /// Creates a new instance of the GpxMetadata class and initializes it's properties to default values. - /// - protected GpxMetadata() { - Links = new List(); - } - } -} +using System.Collections.Generic; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Contains additional information about Gpx entity +/// +public abstract class GpxMetadata +{ + /// + /// Gets or sets the name of the entity + /// + public string Name { get; set; } + + /// + /// Gets or sets the comment for the entity + /// + public string Comment { get; set; } + + /// + /// Gets or sets the description of the entity. Holds additional information about the element intended for the user, not the GPS. + /// + public string Description { get; set; } + + /// + /// Gets or sets the source of the data. Included to give user some idea of reliability and accuracy of data. + /// + public string Source { get; set; } + + /// + /// Get or sets the list of link associated with the entity + /// + public ICollection Links { get; set; } + + /// + /// Creates a new instance of the GpxMetadata class and initializes it's properties to default values. + /// + protected GpxMetadata() + { + Links = new List(); + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxPoint.cs b/src/SpatialLite.Gps/Geometries/GpxPoint.cs index b64fa3d..c505084 100644 --- a/src/SpatialLite.Gps/Geometries/GpxPoint.cs +++ b/src/SpatialLite.Gps/Geometries/GpxPoint.cs @@ -1,57 +1,63 @@ -using System; -using SpatialLite.Core.API; - -namespace SpatialLite.Gps.Geometries { - /// - /// Represents a Gpx point - /// - public class GpxPoint : GpsPoint, IGpxGeometry { - - /// - /// Creates a new, empty instance of the GpxPoint - /// - public GpxPoint() { - } - - /// - /// Creates a new instance of the GpxPoint with given position - /// - /// The position of the point - public GpxPoint(Coordinate position) - : base(position) { - } - - /// - /// Creates a new instance of the GpxPoint with given coordinates and timestamp - /// - /// The longitude of the point - /// The latitude of the point - /// The elevation of the point - /// The time when the point was recorded - public GpxPoint(double longitude, double latitude, double elevation, DateTime time) - : base(longitude, latitude, elevation, time) { - } - - /// - /// Creates a new instance of the GpxPoint with given position and time - /// - /// The position of the point - /// The time when the point was recorded - public GpxPoint(Coordinate position, DateTime time) - : base(position) { - Timestamp = time; - } - - /// - /// Gets or sets additional information about point - /// - public GpxPointMetadata Metadata { get; set; } - - /// - /// Get the type of geometry - /// - public GpxGeometryType GeometryType { - get { return GpxGeometryType.Waypoint; } - } - } -} +using SpatialLite.Core.API; +using System; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Represents a Gpx point +/// +public class GpxPoint : GpsPoint, IGpxGeometry +{ + + /// + /// Creates a new, empty instance of the GpxPoint + /// + public GpxPoint() + { + } + + /// + /// Creates a new instance of the GpxPoint with given position + /// + /// The position of the point + public GpxPoint(Coordinate position) + : base(position) + { + } + + /// + /// Creates a new instance of the GpxPoint with given coordinates and timestamp + /// + /// The longitude of the point + /// The latitude of the point + /// The elevation of the point + /// The time when the point was recorded + public GpxPoint(double longitude, double latitude, double elevation, DateTime time) + : base(longitude, latitude, elevation, time) + { + } + + /// + /// Creates a new instance of the GpxPoint with given position and time + /// + /// The position of the point + /// The time when the point was recorded + public GpxPoint(Coordinate position, DateTime time) + : base(position) + { + Timestamp = time; + } + + /// + /// Gets or sets additional information about point + /// + public GpxPointMetadata Metadata { get; set; } + + /// + /// Get the type of geometry + /// + public GpxGeometryType GeometryType + { + get { return GpxGeometryType.Waypoint; } + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxPointMetadata.cs b/src/SpatialLite.Gps/Geometries/GpxPointMetadata.cs index 16d5e89..c9c4b4f 100644 --- a/src/SpatialLite.Gps/Geometries/GpxPointMetadata.cs +++ b/src/SpatialLite.Gps/Geometries/GpxPointMetadata.cs @@ -1,56 +1,57 @@ -namespace SpatialLite.Gps.Geometries { - /// - /// Contains additional information about Gpx point - /// - public class GpxPointMetadata : GpxMetadata { - /// - /// Gets or sets magnetic variation (in degrees) at the point - /// - public double? MagVar { get; set; } - - /// - /// Gets or sets height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid. As defined in NMEA GGA message. - /// - public double? GeoidHeight { get; set; } - - /// - /// Gets or sets text of GPS symbol name. - /// - public string Symbol { get; set; } - - /// - /// Gets or sets type of the Gps fix. To signify "the fix info is unknown", set value to null. - /// - public GpsFix? Fix { get; set; } - - /// - /// Gets or sets number of satellites used to calculate the GPX fix. - /// - public int? SatellitesCount { get; set; } - - /// - /// Gets or sets horizontal dilution of precision. - /// - public double? Hdop { get; set; } - - /// - /// Gets or sets vertical dilution of precision. - /// - public double? Vdop { get; set; } - - /// - /// Gets or sets position dilution of precision. - /// - public double? Pdop { get; set; } - - /// - /// Gets or sets age of DGPS data - a number of seconds since last DGPS update. - /// - public double? AgeOfDgpsData { get; set; } - - /// - /// Gets or sets ID of DGPS station used in differential correction. - /// - public int? DgpsId { get; set; } - } -} +namespace SpatialLite.Gps.Geometries; + +/// +/// Contains additional information about Gpx point +/// +public class GpxPointMetadata : GpxMetadata +{ + /// + /// Gets or sets magnetic variation (in degrees) at the point + /// + public double? MagVar { get; set; } + + /// + /// Gets or sets height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid. As defined in NMEA GGA message. + /// + public double? GeoidHeight { get; set; } + + /// + /// Gets or sets text of GPS symbol name. + /// + public string Symbol { get; set; } + + /// + /// Gets or sets type of the Gps fix. To signify "the fix info is unknown", set value to null. + /// + public GpsFix? Fix { get; set; } + + /// + /// Gets or sets number of satellites used to calculate the GPX fix. + /// + public int? SatellitesCount { get; set; } + + /// + /// Gets or sets horizontal dilution of precision. + /// + public double? Hdop { get; set; } + + /// + /// Gets or sets vertical dilution of precision. + /// + public double? Vdop { get; set; } + + /// + /// Gets or sets position dilution of precision. + /// + public double? Pdop { get; set; } + + /// + /// Gets or sets age of DGPS data - a number of seconds since last DGPS update. + /// + public double? AgeOfDgpsData { get; set; } + + /// + /// Gets or sets ID of DGPS station used in differential correction. + /// + public int? DgpsId { get; set; } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxRoute.cs b/src/SpatialLite.Gps/Geometries/GpxRoute.cs index 97efa18..8ac4dbd 100644 --- a/src/SpatialLite.Gps/Geometries/GpxRoute.cs +++ b/src/SpatialLite.Gps/Geometries/GpxRoute.cs @@ -1,35 +1,39 @@ -using System.Collections.Generic; - -namespace SpatialLite.Gps.Geometries { - /// - /// Represents route - an ordered list of waypoints representing a series of turn points leading to a destination. - /// - public class GpxRoute : GpxTrackSegment, IGpxGeometry { - /// - /// Get or sets additional info about the route - /// - public GpxTrackMetadata Metadata { get; set; } - - /// - /// Get the type of geometry - /// - public GpxGeometryType GeometryType { - get { return GpxGeometryType.Route; } - } - - /// - /// Creates a new, empty instance of the GpxRoute class - /// - public GpxRoute() - : base() { - } - - /// - /// Creates a new instance of the GpxRoute class with given points - /// - /// The points to be added to the route - public GpxRoute(IEnumerable points) - : base(points) { - } - } -} +using System.Collections.Generic; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Represents route - an ordered list of waypoints representing a series of turn points leading to a destination. +/// +public class GpxRoute : GpxTrackSegment, IGpxGeometry +{ + /// + /// Get or sets additional info about the route + /// + public GpxTrackMetadata Metadata { get; set; } + + /// + /// Get the type of geometry + /// + public GpxGeometryType GeometryType + { + get { return GpxGeometryType.Route; } + } + + /// + /// Creates a new, empty instance of the GpxRoute class + /// + public GpxRoute() + : base() + { + } + + /// + /// Creates a new instance of the GpxRoute class with given points + /// + /// The points to be added to the route + public GpxRoute(IEnumerable points) + : base(points) + { + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxTrack.cs b/src/SpatialLite.Gps/Geometries/GpxTrack.cs index 651f363..e8d4beb 100644 --- a/src/SpatialLite.Gps/Geometries/GpxTrack.cs +++ b/src/SpatialLite.Gps/Geometries/GpxTrack.cs @@ -1,37 +1,41 @@ -using System.Collections.Generic; -using SpatialLite.Core.Geometries; - -namespace SpatialLite.Gps.Geometries { - /// - /// Represents a track - an ordered list of points describing a path. Points can be gouped in more GpxTrackSegments. - /// - public class GpxTrack : GeometryCollection, IGpxGeometry { - - /// - /// Creates a new, empty instance of the GpxTrack class instance. - /// - public GpxTrack() - : base() { - } - - /// - /// Creates a new instance of the GpxTrack with given segments - /// - /// The segments to add into track - public GpxTrack(IEnumerable segments) - : base(segments) { - } - - /// - /// Get or sets additional info about GPX entity - /// - public GpxTrackMetadata Metadata { get; set; } - - /// - /// Get the type of geometry - /// - public GpxGeometryType GeometryType { - get { return GpxGeometryType.Track; } - } - } -} +using SpatialLite.Core.Geometries; +using System.Collections.Generic; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Represents a track - an ordered list of points describing a path. Points can be gouped in more GpxTrackSegments. +/// +public class GpxTrack : GeometryCollection, IGpxGeometry +{ + + /// + /// Creates a new, empty instance of the GpxTrack class instance. + /// + public GpxTrack() + : base() + { + } + + /// + /// Creates a new instance of the GpxTrack with given segments + /// + /// The segments to add into track + public GpxTrack(IEnumerable segments) + : base(segments) + { + } + + /// + /// Get or sets additional info about GPX entity + /// + public GpxTrackMetadata Metadata { get; set; } + + /// + /// Get the type of geometry + /// + public GpxGeometryType GeometryType + { + get { return GpxGeometryType.Track; } + } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxTrackMetadata.cs b/src/SpatialLite.Gps/Geometries/GpxTrackMetadata.cs index e87cc29..8886cfb 100644 --- a/src/SpatialLite.Gps/Geometries/GpxTrackMetadata.cs +++ b/src/SpatialLite.Gps/Geometries/GpxTrackMetadata.cs @@ -1,11 +1,12 @@ -namespace SpatialLite.Gps.Geometries { - /// - /// Contains additional information about Gpx tracks and routes - /// - public class GpxTrackMetadata : GpxMetadata { - /// - /// Gets or sets yype (classification) of route. - /// - public string Type { get; set; } - } -} +namespace SpatialLite.Gps.Geometries; + +/// +/// Contains additional information about Gpx tracks and routes +/// +public class GpxTrackMetadata : GpxMetadata +{ + /// + /// Gets or sets yype (classification) of route. + /// + public string Type { get; set; } +} diff --git a/src/SpatialLite.Gps/Geometries/GpxTrackSegment.cs b/src/SpatialLite.Gps/Geometries/GpxTrackSegment.cs index ab0554b..a6caef1 100644 --- a/src/SpatialLite.Gps/Geometries/GpxTrackSegment.cs +++ b/src/SpatialLite.Gps/Geometries/GpxTrackSegment.cs @@ -1,26 +1,28 @@ -using System.Collections.Generic; - -namespace SpatialLite.Gps.Geometries { - /// - /// Holds a list of track points which are logically connected in order. - /// - /// - /// To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data. - /// - public class GpxTrackSegment : GpsTrackBase { - /// - /// Creates a new instance of the empty GpxTrackSegment - /// - public GpxTrackSegment() { - } - - /// - /// Creates a new instance of GpxTrackSegment with given points - /// - /// The points of the track segment - public GpxTrackSegment(IEnumerable points) - : base(points) { - } - } - -} +using System.Collections.Generic; + +namespace SpatialLite.Gps.Geometries; + +/// +/// Holds a list of track points which are logically connected in order. +/// +/// +/// To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data. +/// +public class GpxTrackSegment : GpsTrackBase +{ + /// + /// Creates a new instance of the empty GpxTrackSegment + /// + public GpxTrackSegment() + { + } + + /// + /// Creates a new instance of GpxTrackSegment with given points + /// + /// The points of the track segment + public GpxTrackSegment(IEnumerable points) + : base(points) + { + } +} diff --git a/src/SpatialLite.Gps/GpxDocument.cs b/src/SpatialLite.Gps/GpxDocument.cs index 9e2962a..f6b5d7f 100644 --- a/src/SpatialLite.Gps/GpxDocument.cs +++ b/src/SpatialLite.Gps/GpxDocument.cs @@ -1,124 +1,141 @@ -using System; -using System.Collections.Generic; -using SpatialLite.Gps.Geometries; -using SpatialLite.Gps.IO; - -namespace SpatialLite.Gps { - /// - /// Represents an in-memory GPX document with it's waypoints, routes and tracks - /// - public class GpxDocument { - /// - /// Initializes a new instance of the GpxDocument class that is empty - /// - public GpxDocument() { - this.Waypoints = new List(); - this.Routes = new List(); - this.Tracks = new List(); - } - - /// - /// Initializes a new instance of the GpxDocument class with given GPX entities - /// - /// A collection of waypoints to add to the document. - /// A collection of routes to add to the document. - /// A collection of tracks to add to the document. - public GpxDocument(IEnumerable waypoints, IEnumerable routes, IEnumerable tracks) { - this.Waypoints = new List(waypoints); - this.Routes = new List(routes); - this.Tracks = new List(tracks); - } - - /// - /// Gets collection of waypoints from the document. - /// - public List Waypoints { get; private set; } - - /// - /// Gets collection of routes from the document. - /// - public List Routes { get;private set; } - - /// - /// Gets collection of tracks from the document. - /// - public List Tracks { get; private set; } - - /// - /// Saves content of the GpxDocument to file. - /// - /// Path to the file. - public void Save(string path) { - using (GpxWriter writer = new GpxWriter(path, new GpxWriterSettings() {WriteMetadata = true})) { - this.Save(writer); - } - } - - /// - /// Saves content of the GpxDocument using suplied writer. - /// - /// GpxWriter to be used - public void Save(IGpxWriter writer) { - if (writer == null) { - throw new ArgumentNullException("writer"); - } - - foreach (var waypoint in this.Waypoints) { - writer.Write(waypoint); - } - - foreach (var route in this.Routes) { - writer.Write(route); - } - - foreach (var track in this.Tracks) { - writer.Write(track); - } - } - - /// - /// Loads Gpx data from reader to this instance of the GpxDocument class - /// - /// The reader to read data from - private void LoadFromReader(IGpxReader reader) { - IGpxGeometry geometry = null; - while ((geometry = reader.Read()) != null) { - switch (geometry.GeometryType) { - case GpxGeometryType.Waypoint: this.Waypoints.Add((GpxPoint)geometry); break; - case GpxGeometryType.Route: this.Routes.Add((GpxRoute)geometry); break; - case GpxGeometryType.Track: this.Tracks.Add((GpxTrack)geometry); break; - } - } - } - - /// - /// Loads Gpx data from a file. - /// - /// Path to the GPX file. - /// GpxDocument instance with data from GPX file - public static GpxDocument Load(string path) { - GpxDocument result = new GpxDocument(); - - using (GpxReader reader = new GpxReader(path, new GpxReaderSettings() { ReadMetadata = true })) { - result.LoadFromReader(reader); - } - - return result; - } - - /// - /// Loads Gpx data from IGpxReader - /// - /// The reader to read data from - /// GpxDocument instance with data from GpxReader - public static GpxDocument Load(IGpxReader reader) { - if (reader == null) { - throw new ArgumentNullException("reader"); - } - - GpxDocument result = new GpxDocument(); - result.LoadFromReader(reader); - return result; - } - } -} +using SpatialLite.Gps.Geometries; +using SpatialLite.Gps.IO; +using System; +using System.Collections.Generic; + +namespace SpatialLite.Gps; + +/// +/// Represents an in-memory GPX document with it's waypoints, routes and tracks +/// +public class GpxDocument +{ + /// + /// Initializes a new instance of the GpxDocument class that is empty + /// + public GpxDocument() + { + Waypoints = new List(); + Routes = new List(); + Tracks = new List(); + } + + /// + /// Initializes a new instance of the GpxDocument class with given GPX entities + /// + /// A collection of waypoints to add to the document. + /// A collection of routes to add to the document. + /// A collection of tracks to add to the document. + public GpxDocument(IEnumerable waypoints, IEnumerable routes, IEnumerable tracks) + { + Waypoints = new List(waypoints); + Routes = new List(routes); + Tracks = new List(tracks); + } + + /// + /// Gets collection of waypoints from the document. + /// + public List Waypoints { get; private set; } + + /// + /// Gets collection of routes from the document. + /// + public List Routes { get; private set; } + + /// + /// Gets collection of tracks from the document. + /// + public List Tracks { get; private set; } + + /// + /// Saves content of the GpxDocument to file. + /// + /// Path to the file. + public void Save(string path) + { + using (GpxWriter writer = new GpxWriter(path, new GpxWriterSettings() { WriteMetadata = true })) + { + Save(writer); + } + } + + /// + /// Saves content of the GpxDocument using suplied writer. + /// + /// GpxWriter to be used + public void Save(IGpxWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + foreach (var waypoint in Waypoints) + { + writer.Write(waypoint); + } + + foreach (var route in Routes) + { + writer.Write(route); + } + + foreach (var track in Tracks) + { + writer.Write(track); + } + } + + /// + /// Loads Gpx data from reader to this instance of the GpxDocument class + /// + /// The reader to read data from + private void LoadFromReader(IGpxReader reader) + { + IGpxGeometry geometry; + while ((geometry = reader.Read()) != null) + { + switch (geometry.GeometryType) + { + case GpxGeometryType.Waypoint: Waypoints.Add((GpxPoint)geometry); break; + case GpxGeometryType.Route: Routes.Add((GpxRoute)geometry); break; + case GpxGeometryType.Track: Tracks.Add((GpxTrack)geometry); break; + } + } + } + + /// + /// Loads Gpx data from a file. + /// + /// Path to the GPX file. + /// GpxDocument instance with data from GPX file + public static GpxDocument Load(string path) + { + GpxDocument result = new GpxDocument(); + + using (GpxReader reader = new GpxReader(path, new GpxReaderSettings() { ReadMetadata = true })) + { + result.LoadFromReader(reader); + } + + return result; + } + + /// + /// Loads Gpx data from IGpxReader + /// + /// The reader to read data from + /// GpxDocument instance with data from GpxReader + public static GpxDocument Load(IGpxReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + GpxDocument result = new GpxDocument(); + result.LoadFromReader(reader); + return result; + } +} diff --git a/src/SpatialLite.Gps/GpxGeometryType.cs b/src/SpatialLite.Gps/GpxGeometryType.cs index 0378088..04e25f9 100644 --- a/src/SpatialLite.Gps/GpxGeometryType.cs +++ b/src/SpatialLite.Gps/GpxGeometryType.cs @@ -1,21 +1,22 @@ -namespace SpatialLite.Gps { - /// - /// Defines possible types of GpxGeometry - /// - public enum GpxGeometryType { - /// - /// Waypoint - /// - Waypoint, - - /// - /// Route - /// - Route, - - /// - /// Recorder track - /// - Track - } -} +namespace SpatialLite.Gps; + +/// +/// Defines possible types of GpxGeometry +/// +public enum GpxGeometryType +{ + /// + /// Waypoint + /// + Waypoint, + + /// + /// Route + /// + Route, + + /// + /// Recorder track + /// + Track +} diff --git a/src/SpatialLite.Gps/IGpsPoint.cs b/src/SpatialLite.Gps/IGpsPoint.cs index f02bc99..b460847 100644 --- a/src/SpatialLite.Gps/IGpsPoint.cs +++ b/src/SpatialLite.Gps/IGpsPoint.cs @@ -1,14 +1,15 @@ -using System; -using SpatialLite.Core.API; - -namespace SpatialLite.Gps { - /// - /// Represents location on the earth surface with timestamp that defines time when the point was recorded - /// - public interface IGpsPoint : IPoint { - /// - /// Gets or sets time when the point was recorded. - /// - DateTime? Timestamp { get; set; } - } -} +using SpatialLite.Core.API; +using System; + +namespace SpatialLite.Gps; + +/// +/// Represents location on the earth surface with timestamp that defines time when the point was recorded +/// +public interface IGpsPoint : IPoint +{ + /// + /// Gets or sets time when the point was recorded. + /// + DateTime? Timestamp { get; set; } +} diff --git a/src/SpatialLite.Gps/IGpxGeometry.cs b/src/SpatialLite.Gps/IGpxGeometry.cs index a5c8e92..91b7fd1 100644 --- a/src/SpatialLite.Gps/IGpxGeometry.cs +++ b/src/SpatialLite.Gps/IGpxGeometry.cs @@ -1,13 +1,14 @@ -using SpatialLite.Core.API; - -namespace SpatialLite.Gps { - /// - /// Defines common properties for all GpxGeometry types - /// - public interface IGpxGeometry : IGeometry { - /// - /// Get the type of geometry - /// - GpxGeometryType GeometryType { get; } - } -} \ No newline at end of file +using SpatialLite.Core.API; + +namespace SpatialLite.Gps; + +/// +/// Defines common properties for all GpxGeometry types +/// +public interface IGpxGeometry : IGeometry +{ + /// + /// Get the type of geometry + /// + GpxGeometryType GeometryType { get; } +} diff --git a/src/SpatialLite.Gps/IO/GpxReader.cs b/src/SpatialLite.Gps/IO/GpxReader.cs index 0837072..23a638e 100644 --- a/src/SpatialLite.Gps/IO/GpxReader.cs +++ b/src/SpatialLite.Gps/IO/GpxReader.cs @@ -1,397 +1,450 @@ -using System; -using System.IO; -using System.Xml; -using SpatialLite.Gps.Geometries; - -namespace SpatialLite.Gps.IO { - /// - /// Implements data reader that can read GPX data from streams and files. - /// - public class GpxReader : IGpxReader, IDisposable { - - private System.Globalization.CultureInfo _invariantCulture = System.Globalization.CultureInfo.InvariantCulture; - - private bool _disposed = false; - private XmlReader _xmlReader; - - /// - /// Underlaying stream to read data from - /// - private Stream _input; - private bool _ownsInputStream = false; - - private bool _insideGpx = false; - - /// - /// Initializes a new instance of the GpxReader class that reads data from the specified file. - /// - /// Path to the .gpx file. - /// The GpxReaderSettings object that determines behaviour of the reader. - public GpxReader(string path, GpxReaderSettings settings) { - _input = new FileStream(path, FileMode.Open, FileAccess.Read); - _ownsInputStream = true; - - this.Settings = settings; - this.Settings.IsReadOnly = true; - this.InitializeReader(); - } - - /// - /// Initializes a new instance of the GpxReader class that reads data from the specified stream. - /// - /// The stream with osm xml data. - /// The GpxReaderSettings object that determines behaviour of the reader. - public GpxReader(Stream stream, GpxReaderSettings settings) { - _input = stream; - - this.Settings = settings; - this.Settings.IsReadOnly = true; - this.InitializeReader(); - } - - /// - /// Gets GpxReaderSettings object that determines behaviour of the reader. - /// - public GpxReaderSettings Settings { get; private set; } - - /// - /// Releases all resources used by the GpxReader. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Parses next element of the GPX file - /// - public IGpxGeometry Read() { - while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "gpx") == false) { - switch (_xmlReader.Name) { - case "wpt": - return ReadPoint("wpt"); - case "trk": - return ReadTrack(); - case "rte": - return ReadRoute(); - default: - _xmlReader.Read(); - break; - } - } - - return null; - } - - /// - /// Reads a GPX point from the internal XmlReader - /// - /// The name of the surrounding xml element - /// the point parsed from the XmlReader - private GpxPoint ReadPoint(string pointElementName) { - string latValue = _xmlReader.GetAttribute("lat"); - if (string.IsNullOrEmpty(latValue)) - throw new InvalidDataException("Requested attribute 'lat' not found."); - double lat = double.Parse(latValue, _invariantCulture); - - string lonValue = _xmlReader.GetAttribute("lon"); - if (string.IsNullOrEmpty(lonValue)) - throw new InvalidDataException("Requested attribute 'lon' not found."); - double lon = double.Parse(lonValue, _invariantCulture); - - double ele = double.NaN; - DateTime timestamp = new DateTime(); - - GpxPointMetadata metadata = null; - if (this.Settings.ReadMetadata) { - metadata = new GpxPointMetadata(); - } - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == pointElementName) == false) { - bool elementParsed = false; - - if (_xmlReader.Name == "ele") { - string eleValue = _xmlReader.ReadElementContentAsString(); - ele = double.Parse(eleValue, _invariantCulture); - elementParsed = true; - } - - if (_xmlReader.Name == "time") { - string timeValue = _xmlReader.ReadElementContentAsString(); - timestamp = DateTime.ParseExact(timeValue, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", _invariantCulture); - elementParsed = true; - } - - if (this.Settings.ReadMetadata) { - elementParsed = elementParsed || this.TryReadPointMetadata(metadata); - } - - if (!elementParsed) { - _xmlReader.Skip(); - } - } - } - _xmlReader.Skip(); - - GpxPoint result = new GpxPoint(lon, lat, ele, timestamp); - result.Metadata = metadata; - - return result; - } - - /// - /// Reades a GPX track from the internal XmlReader - /// - /// the track parsed form the XmlReader - private GpxTrack ReadTrack() { - GpxTrack result = new GpxTrack(); - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - GpxTrackMetadata metadata = null; - if (this.Settings.ReadMetadata) { - metadata = new GpxTrackMetadata(); - } - - while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "trk") == false) { - bool elementParsed = false; - if (_xmlReader.Name == "trkseg") { - GpxTrackSegment segment = ReadTrackSegment(); - result.Geometries.Add(segment); - elementParsed = true; - } - - if (this.Settings.ReadMetadata) { - elementParsed = elementParsed || this.TryReadTrackMetadata(metadata); - } - - if (!elementParsed) { - _xmlReader.Skip(); - } - } - - result.Metadata = metadata; - } - _xmlReader.Skip(); - - return result; - } - - /// - /// Reads a GPX traxk segment from the intrnal XmlReader. - /// - /// the track parsed from the XmlReader - private GpxTrackSegment ReadTrackSegment() { - GpxTrackSegment result = new GpxTrackSegment(); - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "trkseg") == false) { - if (_xmlReader.Name == "trkpt") { - GpxPoint point = ReadPoint("trkpt"); - result.Points.Add(point); - } else { - _xmlReader.Skip(); - } - } - } - _xmlReader.Skip(); - - return result; - } - - /// - /// Reads a GPX route from the internal XmlReader - /// - /// the route parsed from the XmlReader - private GpxRoute ReadRoute() { - GpxRoute result = new GpxRoute(); - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - GpxTrackMetadata metadata = null; - if (this.Settings.ReadMetadata) { - metadata = new GpxTrackMetadata(); - } - - while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "rte") == false) { - bool elementParsed = false; - - if (_xmlReader.Name == "rtept") { - result.Points.Add(ReadPoint("rtept")); - elementParsed = true; - } - - if (this.Settings.ReadMetadata) { - elementParsed = elementParsed || this.TryReadTrackMetadata(metadata); - } - - if (!elementParsed) { - _xmlReader.Skip(); - } - } - - result.Metadata = metadata; - } - _xmlReader.Skip(); - - return result; - } - - /// - /// Initializes internal properties - /// - private void InitializeReader() { - XmlReaderSettings xmlReaderSettings = new XmlReaderSettings(); - xmlReaderSettings.IgnoreComments = true; - xmlReaderSettings.IgnoreProcessingInstructions = true; - xmlReaderSettings.IgnoreWhitespace = true; - - _xmlReader = XmlReader.Create(_input, xmlReaderSettings); - - _xmlReader.Read(); - while (_xmlReader.EOF == false && _insideGpx == false) { - if (_xmlReader.NodeType == XmlNodeType.Element) { - if (_xmlReader.Name != "gpx") { - throw new InvalidDataException("Invalid gpx root element. Expected ."); - } - - string version = _xmlReader.GetAttribute("version"); - if (version == null || (version != "1.0" && version != "1.1")) - throw new InvalidDataException(String.Format("Invalid version of GPX document. Expected '1.0' or '1.1' found {0}.", version)); - - _insideGpx = true; - - } else { - _xmlReader.Read(); - } - } - } - - /// - /// Reads a GPX Link from the internal XmlReader - /// - /// the link parsed from the XmlReader - private GpxLink ReadLink() { - string href = _xmlReader.GetAttribute("href"); - string linkText = null; - string linkType = null; - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "link") == false) { - switch (_xmlReader.Name) { - case "text": - linkText = _xmlReader.ReadElementContentAsString(); break; - case "type": - linkType = _xmlReader.ReadElementContentAsString(); break; - default: - _xmlReader.Read(); - break; - } - } - } - _xmlReader.Skip(); - - return new GpxLink(new Uri(href)) { Text = linkText, Type = linkType }; - } - - /// - /// Reads track/route metadata from the internal XmlReader. - /// - /// Objecto to store read metadata - /// true if piece of metadata was read, otherwise returns false - private bool TryReadTrackMetadata(GpxTrackMetadata metadata) { - switch (_xmlReader.Name) { - case "name": - metadata.Name = _xmlReader.ReadElementContentAsString(); return true; - case "cmt": - metadata.Comment = _xmlReader.ReadElementContentAsString(); return true; - case "desc": - metadata.Description = _xmlReader.ReadElementContentAsString(); return true; - case "src": - metadata.Source = _xmlReader.ReadElementContentAsString(); return true; - case "type": - metadata.Type = _xmlReader.ReadElementContentAsString(); return true; - case "link": - metadata.Links.Add(ReadLink()); return true; - } - - return false; - } - - /// - /// Reads waypoint metadata from the internal XmlReader. - /// - /// Objecto to store read metadata - /// true if piece of metadata was read, otherwise returns false - private bool TryReadPointMetadata(GpxPointMetadata metadata) { - switch (_xmlReader.Name) { - case "name": - metadata.Name = _xmlReader.ReadElementContentAsString(); return true; - case "cmt": - metadata.Comment = _xmlReader.ReadElementContentAsString(); return true; - case "desc": - metadata.Description = _xmlReader.ReadElementContentAsString(); return true; - case "src": - metadata.Source = _xmlReader.ReadElementContentAsString(); return true; - case "link": - metadata.Links.Add(ReadLink()); return true; - case "magvar": - string magvarValue = _xmlReader.ReadElementContentAsString(); - metadata.MagVar = double.Parse(magvarValue, _invariantCulture); return true; - case "geoidheight": - string geoidHeightValue = _xmlReader.ReadElementContentAsString(); - metadata.GeoidHeight = double.Parse(geoidHeightValue, _invariantCulture); return true; - case "hdop": - string HdopValue = _xmlReader.ReadElementContentAsString(); - metadata.Hdop = double.Parse(HdopValue, _invariantCulture); return true; - case "vdop": - string vdopValue = _xmlReader.ReadElementContentAsString(); - metadata.Vdop = double.Parse(vdopValue, _invariantCulture); return true; - case "pdop": - string pdopValue = _xmlReader.ReadElementContentAsString(); - metadata.Pdop = double.Parse(pdopValue, _invariantCulture); return true; - case "ageofdgpsdata": - string ageValue = _xmlReader.ReadElementContentAsString(); - metadata.AgeOfDgpsData = double.Parse(ageValue, _invariantCulture); return true; - case "sat": - string satValue = _xmlReader.ReadElementContentAsString(); - metadata.SatellitesCount = int.Parse(satValue, _invariantCulture); return true; - case "dgpsid": - string dgpsidValue = _xmlReader.ReadElementContentAsString(); - metadata.DgpsId = int.Parse(dgpsidValue, _invariantCulture); return true; - case "fix": - string fixValue = _xmlReader.ReadElementContentAsString(); - metadata.Fix = GpxFixHelper.ParseGpsFix(fixValue); return true; - } - - return false; - } - - /// - /// Releases the unmanaged resources used by the GpxReader and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (disposing) { - _xmlReader.Dispose(); - - if (_ownsInputStream) { - _input.Dispose(); - } - } - - _disposed = true; - } - } - } -} +using SpatialLite.Gps.Geometries; +using System; +using System.IO; +using System.Xml; + +namespace SpatialLite.Gps.IO; + +/// +/// Implements data reader that can read GPX data from streams and files. +/// +public class GpxReader : IGpxReader, IDisposable +{ + + private readonly System.Globalization.CultureInfo _invariantCulture = System.Globalization.CultureInfo.InvariantCulture; + + private bool _disposed = false; + private XmlReader _xmlReader; + + /// + /// Underlaying stream to read data from + /// + private readonly Stream _input; + private readonly bool _ownsInputStream = false; + + private bool _insideGpx = false; + + /// + /// Initializes a new instance of the GpxReader class that reads data from the specified file. + /// + /// Path to the .gpx file. + /// The GpxReaderSettings object that determines behaviour of the reader. + public GpxReader(string path, GpxReaderSettings settings) + { + _input = new FileStream(path, FileMode.Open, FileAccess.Read); + _ownsInputStream = true; + + Settings = settings; + Settings.IsReadOnly = true; + InitializeReader(); + } + + /// + /// Initializes a new instance of the GpxReader class that reads data from the specified stream. + /// + /// The stream with osm xml data. + /// The GpxReaderSettings object that determines behaviour of the reader. + public GpxReader(Stream stream, GpxReaderSettings settings) + { + _input = stream; + + Settings = settings; + Settings.IsReadOnly = true; + InitializeReader(); + } + + /// + /// Gets GpxReaderSettings object that determines behaviour of the reader. + /// + public GpxReaderSettings Settings { get; private set; } + + /// + /// Releases all resources used by the GpxReader. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Parses next element of the GPX file + /// + public IGpxGeometry Read() + { + while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "gpx") == false) + { + switch (_xmlReader.Name) + { + case "wpt": + return ReadPoint("wpt"); + case "trk": + return ReadTrack(); + case "rte": + return ReadRoute(); + default: + _xmlReader.Read(); + break; + } + } + + return null; + } + + /// + /// Reads a GPX point from the internal XmlReader + /// + /// The name of the surrounding xml element + /// the point parsed from the XmlReader + private GpxPoint ReadPoint(string pointElementName) + { + string latValue = _xmlReader.GetAttribute("lat"); + if (string.IsNullOrEmpty(latValue)) + throw new InvalidDataException("Requested attribute 'lat' not found."); + double lat = double.Parse(latValue, _invariantCulture); + + string lonValue = _xmlReader.GetAttribute("lon"); + if (string.IsNullOrEmpty(lonValue)) + throw new InvalidDataException("Requested attribute 'lon' not found."); + double lon = double.Parse(lonValue, _invariantCulture); + + double ele = double.NaN; + DateTime timestamp = new DateTime(); + + GpxPointMetadata metadata = null; + if (Settings.ReadMetadata) + { + metadata = new GpxPointMetadata(); + } + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == pointElementName) == false) + { + bool elementParsed = false; + + if (_xmlReader.Name == "ele") + { + string eleValue = _xmlReader.ReadElementContentAsString(); + ele = double.Parse(eleValue, _invariantCulture); + elementParsed = true; + } + + if (_xmlReader.Name == "time") + { + string timeValue = _xmlReader.ReadElementContentAsString(); + timestamp = DateTime.ParseExact(timeValue, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", _invariantCulture); + elementParsed = true; + } + + if (Settings.ReadMetadata) + { + elementParsed = elementParsed || TryReadPointMetadata(metadata); + } + + if (!elementParsed) + { + _xmlReader.Skip(); + } + } + } + _xmlReader.Skip(); + + GpxPoint result = new GpxPoint(lon, lat, ele, timestamp); + result.Metadata = metadata; + + return result; + } + + /// + /// Reades a GPX track from the internal XmlReader + /// + /// the track parsed form the XmlReader + private GpxTrack ReadTrack() + { + GpxTrack result = new GpxTrack(); + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + GpxTrackMetadata metadata = null; + if (Settings.ReadMetadata) + { + metadata = new GpxTrackMetadata(); + } + + while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "trk") == false) + { + bool elementParsed = false; + if (_xmlReader.Name == "trkseg") + { + GpxTrackSegment segment = ReadTrackSegment(); + result.Geometries.Add(segment); + elementParsed = true; + } + + if (Settings.ReadMetadata) + { + elementParsed = elementParsed || TryReadTrackMetadata(metadata); + } + + if (!elementParsed) + { + _xmlReader.Skip(); + } + } + + result.Metadata = metadata; + } + _xmlReader.Skip(); + + return result; + } + + /// + /// Reads a GPX traxk segment from the intrnal XmlReader. + /// + /// the track parsed from the XmlReader + private GpxTrackSegment ReadTrackSegment() + { + GpxTrackSegment result = new GpxTrackSegment(); + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "trkseg") == false) + { + if (_xmlReader.Name == "trkpt") + { + GpxPoint point = ReadPoint("trkpt"); + result.Points.Add(point); + } + else + { + _xmlReader.Skip(); + } + } + } + _xmlReader.Skip(); + + return result; + } + + /// + /// Reads a GPX route from the internal XmlReader + /// + /// the route parsed from the XmlReader + private GpxRoute ReadRoute() + { + GpxRoute result = new GpxRoute(); + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + GpxTrackMetadata metadata = null; + if (Settings.ReadMetadata) + { + metadata = new GpxTrackMetadata(); + } + + while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "rte") == false) + { + bool elementParsed = false; + + if (_xmlReader.Name == "rtept") + { + result.Points.Add(ReadPoint("rtept")); + elementParsed = true; + } + + if (Settings.ReadMetadata) + { + elementParsed = elementParsed || TryReadTrackMetadata(metadata); + } + + if (!elementParsed) + { + _xmlReader.Skip(); + } + } + + result.Metadata = metadata; + } + _xmlReader.Skip(); + + return result; + } + + /// + /// Initializes internal properties + /// + private void InitializeReader() + { + XmlReaderSettings xmlReaderSettings = new XmlReaderSettings(); + xmlReaderSettings.IgnoreComments = true; + xmlReaderSettings.IgnoreProcessingInstructions = true; + xmlReaderSettings.IgnoreWhitespace = true; + + _xmlReader = XmlReader.Create(_input, xmlReaderSettings); + + _xmlReader.Read(); + while (_xmlReader.EOF == false && _insideGpx == false) + { + if (_xmlReader.NodeType == XmlNodeType.Element) + { + if (_xmlReader.Name != "gpx") + { + throw new InvalidDataException("Invalid gpx root element. Expected ."); + } + + string version = _xmlReader.GetAttribute("version"); + if (version == null || (version != "1.0" && version != "1.1")) + throw new InvalidDataException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Invalid version of GPX document. Expected '1.0' or '1.1' found {0}.", version)); + + _insideGpx = true; + + } + else + { + _xmlReader.Read(); + } + } + } + + /// + /// Reads a GPX Link from the internal XmlReader + /// + /// the link parsed from the XmlReader + private GpxLink ReadLink() + { + string href = _xmlReader.GetAttribute("href"); + string linkText = null; + string linkType = null; + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + while ((_xmlReader.NodeType == XmlNodeType.EndElement && _xmlReader.Name == "link") == false) + { + switch (_xmlReader.Name) + { + case "text": + linkText = _xmlReader.ReadElementContentAsString(); break; + case "type": + linkType = _xmlReader.ReadElementContentAsString(); break; + default: + _xmlReader.Read(); + break; + } + } + } + _xmlReader.Skip(); + + return new GpxLink(new Uri(href)) { Text = linkText, Type = linkType }; + } + + /// + /// Reads track/route metadata from the internal XmlReader. + /// + /// Objecto to store read metadata + /// true if piece of metadata was read, otherwise returns false + private bool TryReadTrackMetadata(GpxTrackMetadata metadata) + { + switch (_xmlReader.Name) + { + case "name": + metadata.Name = _xmlReader.ReadElementContentAsString(); return true; + case "cmt": + metadata.Comment = _xmlReader.ReadElementContentAsString(); return true; + case "desc": + metadata.Description = _xmlReader.ReadElementContentAsString(); return true; + case "src": + metadata.Source = _xmlReader.ReadElementContentAsString(); return true; + case "type": + metadata.Type = _xmlReader.ReadElementContentAsString(); return true; + case "link": + metadata.Links.Add(ReadLink()); return true; + } + + return false; + } + + /// + /// Reads waypoint metadata from the internal XmlReader. + /// + /// Objecto to store read metadata + /// true if piece of metadata was read, otherwise returns false + private bool TryReadPointMetadata(GpxPointMetadata metadata) + { + switch (_xmlReader.Name) + { + case "name": + metadata.Name = _xmlReader.ReadElementContentAsString(); return true; + case "cmt": + metadata.Comment = _xmlReader.ReadElementContentAsString(); return true; + case "desc": + metadata.Description = _xmlReader.ReadElementContentAsString(); return true; + case "src": + metadata.Source = _xmlReader.ReadElementContentAsString(); return true; + case "link": + metadata.Links.Add(ReadLink()); return true; + case "magvar": + string magvarValue = _xmlReader.ReadElementContentAsString(); + metadata.MagVar = double.Parse(magvarValue, _invariantCulture); return true; + case "geoidheight": + string geoidHeightValue = _xmlReader.ReadElementContentAsString(); + metadata.GeoidHeight = double.Parse(geoidHeightValue, _invariantCulture); return true; + case "hdop": + string HdopValue = _xmlReader.ReadElementContentAsString(); + metadata.Hdop = double.Parse(HdopValue, _invariantCulture); return true; + case "vdop": + string vdopValue = _xmlReader.ReadElementContentAsString(); + metadata.Vdop = double.Parse(vdopValue, _invariantCulture); return true; + case "pdop": + string pdopValue = _xmlReader.ReadElementContentAsString(); + metadata.Pdop = double.Parse(pdopValue, _invariantCulture); return true; + case "ageofdgpsdata": + string ageValue = _xmlReader.ReadElementContentAsString(); + metadata.AgeOfDgpsData = double.Parse(ageValue, _invariantCulture); return true; + case "sat": + string satValue = _xmlReader.ReadElementContentAsString(); + metadata.SatellitesCount = int.Parse(satValue, _invariantCulture); return true; + case "dgpsid": + string dgpsidValue = _xmlReader.ReadElementContentAsString(); + metadata.DgpsId = int.Parse(dgpsidValue, _invariantCulture); return true; + case "fix": + string fixValue = _xmlReader.ReadElementContentAsString(); + metadata.Fix = GpxFixHelper.ParseGpsFix(fixValue); return true; + } + + return false; + } + + /// + /// Releases the unmanaged resources used by the GpxReader and optionally releases the managed resources. + /// + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + _xmlReader.Dispose(); + + if (_ownsInputStream) + { + _input.Dispose(); + } + } + + _disposed = true; + } + } +} diff --git a/src/SpatialLite.Gps/IO/GpxReaderSettings.cs b/src/SpatialLite.Gps/IO/GpxReaderSettings.cs index 4508bc8..088b4c4 100644 --- a/src/SpatialLite.Gps/IO/GpxReaderSettings.cs +++ b/src/SpatialLite.Gps/IO/GpxReaderSettings.cs @@ -1,39 +1,44 @@ -using System; - -namespace SpatialLite.Gps.IO { - /// - /// Contains settings that determine behaviour of GpxReader. - /// - public class GpxReaderSettings { - - bool _readMetadata = true; - - /// - /// Initializes a new instance of the GpxReaderSettings class with default values. - /// - public GpxReaderSettings() { - this.ReadMetadata = true; - } - - /// - /// Gets a value indicating whether GpxReader should read and parse metadata. - /// - public bool ReadMetadata { - get { - return _readMetadata; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'ReadMetadata' property GpxReaderSettings is read-only."); - } - - _readMetadata = value; - } - } - - /// - /// Gets or sets value indicating whether properties of the current GpxReaderSettings instance can be changed. - /// - protected internal bool IsReadOnly { get; internal set; } - } -} +using System; + +namespace SpatialLite.Gps.IO; + +/// +/// Contains settings that determine behaviour of GpxReader. +/// +public class GpxReaderSettings +{ + private bool _readMetadata = true; + + /// + /// Initializes a new instance of the GpxReaderSettings class with default values. + /// + public GpxReaderSettings() + { + ReadMetadata = true; + } + + /// + /// Gets a value indicating whether GpxReader should read and parse metadata. + /// + public bool ReadMetadata + { + get + { + return _readMetadata; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'ReadMetadata' property GpxReaderSettings is read-only."); + } + + _readMetadata = value; + } + } + + /// + /// Gets or sets value indicating whether properties of the current GpxReaderSettings instance can be changed. + /// + protected internal bool IsReadOnly { get; internal set; } +} diff --git a/src/SpatialLite.Gps/IO/GpxWriter.cs b/src/SpatialLite.Gps/IO/GpxWriter.cs index e9ff4ba..ccd0825 100644 --- a/src/SpatialLite.Gps/IO/GpxWriter.cs +++ b/src/SpatialLite.Gps/IO/GpxWriter.cs @@ -1,265 +1,306 @@ -using System; -using System.IO; -using System.Text; -using System.Xml; -using SpatialLite.Gps.Geometries; - -namespace SpatialLite.Gps.IO { - /// - /// Implements data writer that can write GPX data to streams and files. - /// - public class GpxWriter : IDisposable, IGpxWriter { - private System.Globalization.CultureInfo _invariantCulture = System.Globalization.CultureInfo.InvariantCulture; - - private XmlWriter _xmlWriter; - private StreamWriter _streamWriter; - private bool _disposed = false; - - /// - /// Initializes a new instance of the GpxWriter class that writes GPX entities to the specified stream. - /// - /// The Stream to write GPX entities to. - /// The settings defining behaviour of the writer. - public GpxWriter(Stream stream, GpxWriterSettings settings) { - this.Settings = settings; - settings.IsReadOnly = true; - - XmlWriterSettings writerSetting = new XmlWriterSettings(); - writerSetting.Indent = true; - - _streamWriter = new StreamWriter(stream, new UTF8Encoding(false)); - _xmlWriter = XmlWriter.Create(_streamWriter, writerSetting); - - StartDocument(); - } - - /// - /// Initializes a new instance of the GpxWriter class that writes GPX entities to the specified file. - /// - /// Path to the GPX file. - /// The settings defining behaviour of the writer. - /// If the file exists, it is overwritten, otherwise, a new file is created. - public GpxWriter(string path, GpxWriterSettings settings) { - this.Settings = settings; - settings.IsReadOnly = true; - - XmlWriterSettings writerSetting = new XmlWriterSettings(); - writerSetting.Indent = true; - - var fileStream = new FileStream(path, FileMode.Create); - _streamWriter = new StreamWriter(fileStream, new UTF8Encoding(false)); - _xmlWriter = XmlWriter.Create(_streamWriter, writerSetting); - - StartDocument(); - } - - /// - /// Creates root element in the output stream - /// - private void StartDocument() { - _xmlWriter.WriteStartDocument(); - _xmlWriter.WriteStartElement("gpx", "http://www.topografix.com/GPX/1/1"); - _xmlWriter.WriteAttributeString("version", "1.1"); - _xmlWriter.WriteAttributeString("creator", this.Settings.GeneratorName ?? "SpatialLite"); - } - - /// - /// Gets settings of the writer - /// - public GpxWriterSettings Settings { get; private set; } - - /// - /// Writes the given waypoint to the output stream - /// - /// The waypoint to write - public void Write(GpxPoint waypoint) { - WritePoint(waypoint, "wpt"); - } - - /// - /// Writes the given route to the output stream - /// - /// The route to write - public void Write(GpxRoute route) { - _xmlWriter.WriteStartElement("rte"); - - for (int i = 0; i < route.Points.Count; i++) { - WritePoint(route.Points[i], "rtept"); - } - if (this.Settings.WriteMetadata) { - this.WriteTrackMetadata(route.Metadata); - } - - _xmlWriter.WriteEndElement(); - } - - /// - /// Writes the given track to the output stream - /// - /// The track to write - public void Write(GpxTrack track) { - _xmlWriter.WriteStartElement("trk"); - - for (int i = 0; i < track.Geometries.Count; i++) { - _xmlWriter.WriteStartElement("trkseg"); - - for (int ii = 0; ii < track.Geometries[i].Points.Count; ii++) { - WritePoint(track.Geometries[i].Points[ii], "trkpt"); - } - - _xmlWriter.WriteEndElement(); - } - - if (this.Settings.WriteMetadata) { - this.WriteTrackMetadata(track.Metadata); - } - - _xmlWriter.WriteEndElement(); - } - - /// - /// Releases all resources used by the GpxWriter. - /// - public void Dispose() { - Dispose(true); - - GC.SuppressFinalize(this); - } - - /// - /// Writes the given point to the output stream - /// - /// The point to be written - /// The name of the XML element the point is to be written to - private void WritePoint(GpxPoint point, string pointElementName) { - _xmlWriter.WriteStartElement(pointElementName); - _xmlWriter.WriteAttributeString("lat", point.Position.Y.ToString(_invariantCulture)); - _xmlWriter.WriteAttributeString("lon", point.Position.X.ToString(_invariantCulture)); - - if (!double.IsNaN(point.Position.Z)) { - _xmlWriter.WriteElementString("ele", point.Position.Z.ToString(_invariantCulture)); - } - - if (point.Timestamp != null) { - _xmlWriter.WriteElementString("time", point.Timestamp.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", _invariantCulture)); - } - - if (this.Settings.WriteMetadata) { - this.WritePointMetadata(point.Metadata); - } - - _xmlWriter.WriteEndElement(); - } - - /// - /// Writes content of the GpxEntityDetails class to the current position of output stream - /// - /// A GpxEntityDetails object to be written - private void WriteTrackMetadata(GpxTrackMetadata metadata) { - if (metadata != null) { - if (metadata.Name != null) - _xmlWriter.WriteElementString("name", metadata.Name); - if (metadata.Comment != null) - _xmlWriter.WriteElementString("cmt", metadata.Comment); - if (metadata.Description != null) - _xmlWriter.WriteElementString("desc", metadata.Description); - if (metadata.Source != null) - _xmlWriter.WriteElementString("src", metadata.Source); - foreach (var link in metadata.Links) { - this.WriteLink(link); - } - if (metadata.Comment != null) - _xmlWriter.WriteElementString("type", metadata.Type); - } - } - - /// - /// Writes content of the GpxPointDetails class to the current position of output stream - /// - /// A GpxEntityDetails object to be written - private void WritePointMetadata(GpxPointMetadata metadata) { - if (metadata != null) { - if (metadata.Name != null) { - _xmlWriter.WriteElementString("name", metadata.Name); - } - if (metadata.Comment != null) { - _xmlWriter.WriteElementString("cmt", metadata.Comment); - } - if (metadata.Description != null) { - _xmlWriter.WriteElementString("desc", metadata.Description); - } - if (metadata.Source != null) { - _xmlWriter.WriteElementString("src", metadata.Source); - } - - foreach (var link in metadata.Links) { - this.WriteLink(link); - } - - if (metadata.MagVar.HasValue) { - _xmlWriter.WriteElementString("magvar", metadata.MagVar.Value.ToString(_invariantCulture)); - } - if (metadata.GeoidHeight.HasValue) { - _xmlWriter.WriteElementString("geoidheight", (metadata.GeoidHeight ?? 0).ToString(_invariantCulture)); - } - if (metadata.Symbol != null) { - _xmlWriter.WriteElementString("sym", metadata.Symbol); - } - if (metadata.Fix.HasValue) { - _xmlWriter.WriteElementString("fix", GpxFixHelper.GpsFixToString(metadata.Fix.Value)); - } - if (metadata.SatellitesCount.HasValue) { - _xmlWriter.WriteElementString("sat", metadata.SatellitesCount.Value.ToString(_invariantCulture)); - } - if (metadata.Hdop.HasValue) { - _xmlWriter.WriteElementString("hdop", metadata.Hdop.Value.ToString(_invariantCulture)); - } - if (metadata.Vdop.HasValue) { - _xmlWriter.WriteElementString("vdop", metadata.Vdop.Value.ToString(_invariantCulture)); - } - if (metadata.Pdop.HasValue) { - _xmlWriter.WriteElementString("pdop", metadata.Pdop.Value.ToString(_invariantCulture)); - } - if (metadata.AgeOfDgpsData.HasValue) { - _xmlWriter.WriteElementString("ageofdgpsdata", metadata.AgeOfDgpsData.Value.ToString(_invariantCulture)); - } - if (metadata.DgpsId.HasValue) { - _xmlWriter.WriteElementString("dgpsid", metadata.DgpsId.Value.ToString(_invariantCulture)); - } - } - } - - /// - /// Writes the given link to the output stream - /// - /// The link to be written - private void WriteLink(GpxLink link) { - _xmlWriter.WriteStartElement("link"); - _xmlWriter.WriteAttributeString("href", link.Url.OriginalString); - - if (link.Text != null) - _xmlWriter.WriteElementString("text", link.Text); - if (link.Type != null) - _xmlWriter.WriteElementString("type", link.Type); - - _xmlWriter.WriteEndElement(); - } - - /// - /// Releases the unmanaged resources used by the GpxWriter and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (disposing) { - _xmlWriter.Dispose(); - - if (_streamWriter != null) - _streamWriter.Dispose(); - } - - _disposed = true; - } - } - } -} +using SpatialLite.Gps.Geometries; +using System; +using System.IO; +using System.Text; +using System.Xml; + +namespace SpatialLite.Gps.IO; + +/// +/// Implements data writer that can write GPX data to streams and files. +/// +public class GpxWriter : IDisposable, IGpxWriter +{ + private readonly System.Globalization.CultureInfo _invariantCulture = System.Globalization.CultureInfo.InvariantCulture; + + private readonly XmlWriter _xmlWriter; + private readonly StreamWriter _streamWriter; + private bool _disposed = false; + + /// + /// Initializes a new instance of the GpxWriter class that writes GPX entities to the specified stream. + /// + /// The Stream to write GPX entities to. + /// The settings defining behaviour of the writer. + public GpxWriter(Stream stream, GpxWriterSettings settings) + { + Settings = settings; + settings.IsReadOnly = true; + + XmlWriterSettings writerSetting = new XmlWriterSettings(); + writerSetting.Indent = true; + + _streamWriter = new StreamWriter(stream, new UTF8Encoding(false)); + _xmlWriter = XmlWriter.Create(_streamWriter, writerSetting); + + StartDocument(); + } + + /// + /// Initializes a new instance of the GpxWriter class that writes GPX entities to the specified file. + /// + /// Path to the GPX file. + /// The settings defining behaviour of the writer. + /// If the file exists, it is overwritten, otherwise, a new file is created. + public GpxWriter(string path, GpxWriterSettings settings) + { + Settings = settings; + settings.IsReadOnly = true; + + XmlWriterSettings writerSetting = new XmlWriterSettings(); + writerSetting.Indent = true; + + var fileStream = new FileStream(path, FileMode.Create); + _streamWriter = new StreamWriter(fileStream, new UTF8Encoding(false)); + _xmlWriter = XmlWriter.Create(_streamWriter, writerSetting); + + StartDocument(); + } + + /// + /// Creates root element in the output stream + /// + private void StartDocument() + { + _xmlWriter.WriteStartDocument(); + _xmlWriter.WriteStartElement("gpx", "http://www.topografix.com/GPX/1/1"); + _xmlWriter.WriteAttributeString("version", "1.1"); + _xmlWriter.WriteAttributeString("creator", Settings.GeneratorName ?? "SpatialLite"); + } + + /// + /// Gets settings of the writer + /// + public GpxWriterSettings Settings { get; private set; } + + /// + /// Writes the given waypoint to the output stream + /// + /// The waypoint to write + public void Write(GpxPoint waypoint) + { + WritePoint(waypoint, "wpt"); + } + + /// + /// Writes the given route to the output stream + /// + /// The route to write + public void Write(GpxRoute route) + { + _xmlWriter.WriteStartElement("rte"); + + for (int i = 0; i < route.Points.Count; i++) + { + WritePoint(route.Points[i], "rtept"); + } + if (Settings.WriteMetadata) + { + WriteTrackMetadata(route.Metadata); + } + + _xmlWriter.WriteEndElement(); + } + + /// + /// Writes the given track to the output stream + /// + /// The track to write + public void Write(GpxTrack track) + { + _xmlWriter.WriteStartElement("trk"); + + for (int i = 0; i < track.Geometries.Count; i++) + { + _xmlWriter.WriteStartElement("trkseg"); + + for (int ii = 0; ii < track.Geometries[i].Points.Count; ii++) + { + WritePoint(track.Geometries[i].Points[ii], "trkpt"); + } + + _xmlWriter.WriteEndElement(); + } + + if (Settings.WriteMetadata) + { + WriteTrackMetadata(track.Metadata); + } + + _xmlWriter.WriteEndElement(); + } + + /// + /// Releases all resources used by the GpxWriter. + /// + public void Dispose() + { + Dispose(true); + + GC.SuppressFinalize(this); + } + + /// + /// Writes the given point to the output stream + /// + /// The point to be written + /// The name of the XML element the point is to be written to + private void WritePoint(GpxPoint point, string pointElementName) + { + _xmlWriter.WriteStartElement(pointElementName); + _xmlWriter.WriteAttributeString("lat", point.Position.Y.ToString(_invariantCulture)); + _xmlWriter.WriteAttributeString("lon", point.Position.X.ToString(_invariantCulture)); + + if (!double.IsNaN(point.Position.Z)) + { + _xmlWriter.WriteElementString("ele", point.Position.Z.ToString(_invariantCulture)); + } + + if (point.Timestamp != null) + { + _xmlWriter.WriteElementString("time", point.Timestamp.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", _invariantCulture)); + } + + if (Settings.WriteMetadata) + { + WritePointMetadata(point.Metadata); + } + + _xmlWriter.WriteEndElement(); + } + + /// + /// Writes content of the GpxEntityDetails class to the current position of output stream + /// + /// A GpxEntityDetails object to be written + private void WriteTrackMetadata(GpxTrackMetadata metadata) + { + if (metadata != null) + { + if (metadata.Name != null) + _xmlWriter.WriteElementString("name", metadata.Name); + if (metadata.Comment != null) + _xmlWriter.WriteElementString("cmt", metadata.Comment); + if (metadata.Description != null) + _xmlWriter.WriteElementString("desc", metadata.Description); + if (metadata.Source != null) + _xmlWriter.WriteElementString("src", metadata.Source); + foreach (var link in metadata.Links) + { + WriteLink(link); + } + if (metadata.Comment != null) + _xmlWriter.WriteElementString("type", metadata.Type); + } + } + + /// + /// Writes content of the GpxPointDetails class to the current position of output stream + /// + /// A GpxEntityDetails object to be written + private void WritePointMetadata(GpxPointMetadata metadata) + { + if (metadata != null) + { + if (metadata.Name != null) + { + _xmlWriter.WriteElementString("name", metadata.Name); + } + if (metadata.Comment != null) + { + _xmlWriter.WriteElementString("cmt", metadata.Comment); + } + if (metadata.Description != null) + { + _xmlWriter.WriteElementString("desc", metadata.Description); + } + if (metadata.Source != null) + { + _xmlWriter.WriteElementString("src", metadata.Source); + } + + foreach (var link in metadata.Links) + { + WriteLink(link); + } + + if (metadata.MagVar.HasValue) + { + _xmlWriter.WriteElementString("magvar", metadata.MagVar.Value.ToString(_invariantCulture)); + } + if (metadata.GeoidHeight.HasValue) + { + _xmlWriter.WriteElementString("geoidheight", (metadata.GeoidHeight ?? 0).ToString(_invariantCulture)); + } + if (metadata.Symbol != null) + { + _xmlWriter.WriteElementString("sym", metadata.Symbol); + } + if (metadata.Fix.HasValue) + { + _xmlWriter.WriteElementString("fix", GpxFixHelper.GpsFixToString(metadata.Fix.Value)); + } + if (metadata.SatellitesCount.HasValue) + { + _xmlWriter.WriteElementString("sat", metadata.SatellitesCount.Value.ToString(_invariantCulture)); + } + if (metadata.Hdop.HasValue) + { + _xmlWriter.WriteElementString("hdop", metadata.Hdop.Value.ToString(_invariantCulture)); + } + if (metadata.Vdop.HasValue) + { + _xmlWriter.WriteElementString("vdop", metadata.Vdop.Value.ToString(_invariantCulture)); + } + if (metadata.Pdop.HasValue) + { + _xmlWriter.WriteElementString("pdop", metadata.Pdop.Value.ToString(_invariantCulture)); + } + if (metadata.AgeOfDgpsData.HasValue) + { + _xmlWriter.WriteElementString("ageofdgpsdata", metadata.AgeOfDgpsData.Value.ToString(_invariantCulture)); + } + if (metadata.DgpsId.HasValue) + { + _xmlWriter.WriteElementString("dgpsid", metadata.DgpsId.Value.ToString(_invariantCulture)); + } + } + } + + /// + /// Writes the given link to the output stream + /// + /// The link to be written + private void WriteLink(GpxLink link) + { + _xmlWriter.WriteStartElement("link"); + _xmlWriter.WriteAttributeString("href", link.Url.OriginalString); + + if (link.Text != null) + _xmlWriter.WriteElementString("text", link.Text); + if (link.Type != null) + _xmlWriter.WriteElementString("type", link.Type); + + _xmlWriter.WriteEndElement(); + } + + /// + /// Releases the unmanaged resources used by the GpxWriter and optionally releases the managed resources. + /// + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + _xmlWriter.Dispose(); + + if (_streamWriter != null) + _streamWriter.Dispose(); + } + + _disposed = true; + } + } +} diff --git a/src/SpatialLite.Gps/IO/GpxWriterSettings.cs b/src/SpatialLite.Gps/IO/GpxWriterSettings.cs index a04148b..6d71928 100644 --- a/src/SpatialLite.Gps/IO/GpxWriterSettings.cs +++ b/src/SpatialLite.Gps/IO/GpxWriterSettings.cs @@ -1,55 +1,64 @@ -using System; - -namespace SpatialLite.Gps.IO { - /// - /// Contains settings that determine behaviour of the GpxWriter. - /// - public class GpxWriterSettings { - - bool _writeMetadata = true; - string _generatorName; - - /// - /// Initializes a new instance of the GpxWriterSettings class with default values. - /// - public GpxWriterSettings() { - } - - /// - /// Gets or sets a value indicating whether GpxWriter should write entity metadata. - /// - public bool WriteMetadata { - get { - return _writeMetadata; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'WriteMetadata' property - GpxWriterSettings is read-only."); - } - - _writeMetadata = value; - } - } - - /// - /// Gets or sets the name of the program that will be save to the output file. - /// - public string GeneratorName { - get { - return _generatorName; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'GeneratorName' property - GpxWriterSettings is read-only."); - } - - _generatorName = value; - } - } - - /// - /// Gets or sets value indicating whether properties of the current GpxWriterSettings instance can be changed. - /// - public bool IsReadOnly { get; internal set; } - } -} +using System; + +namespace SpatialLite.Gps.IO; + +/// +/// Contains settings that determine behaviour of the GpxWriter. +/// +public class GpxWriterSettings +{ + private bool _writeMetadata = true; + private string _generatorName; + + /// + /// Initializes a new instance of the GpxWriterSettings class with default values. + /// + public GpxWriterSettings() + { + } + + /// + /// Gets or sets a value indicating whether GpxWriter should write entity metadata. + /// + public bool WriteMetadata + { + get + { + return _writeMetadata; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'WriteMetadata' property - GpxWriterSettings is read-only."); + } + + _writeMetadata = value; + } + } + + /// + /// Gets or sets the name of the program that will be save to the output file. + /// + public string GeneratorName + { + get + { + return _generatorName; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'GeneratorName' property - GpxWriterSettings is read-only."); + } + + _generatorName = value; + } + } + + /// + /// Gets or sets value indicating whether properties of the current GpxWriterSettings instance can be changed. + /// + public bool IsReadOnly { get; internal set; } +} diff --git a/src/SpatialLite.Gps/IO/IGpxReader.cs b/src/SpatialLite.Gps/IO/IGpxReader.cs index 4cfc886..dfd6c9e 100644 --- a/src/SpatialLite.Gps/IO/IGpxReader.cs +++ b/src/SpatialLite.Gps/IO/IGpxReader.cs @@ -1,11 +1,12 @@ -namespace SpatialLite.Gps.IO { - /// - /// Defines functions and properties for classes that can read GPX entities from a source. - /// - public interface IGpxReader { - /// - /// Parses next element of the GPX file - /// - IGpxGeometry Read(); - } -} +namespace SpatialLite.Gps.IO; + +/// +/// Defines functions and properties for classes that can read GPX entities from a source. +/// +public interface IGpxReader +{ + /// + /// Parses next element of the GPX file + /// + IGpxGeometry Read(); +} diff --git a/src/SpatialLite.Gps/IO/IGpxWriter.cs b/src/SpatialLite.Gps/IO/IGpxWriter.cs index 2594100..c1de3df 100644 --- a/src/SpatialLite.Gps/IO/IGpxWriter.cs +++ b/src/SpatialLite.Gps/IO/IGpxWriter.cs @@ -1,26 +1,27 @@ -using SpatialLite.Gps.Geometries; - -namespace SpatialLite.Gps.IO { - /// - /// Defines functions and properties for classes that can writes GPX entities to a destination. - /// - public interface IGpxWriter { - /// - /// Writes GpxWaypoint - /// - /// The waypoint to write. - void Write(GpxPoint waypoint); - - /// - /// Writes GpxRoute - /// - /// The route to write - void Write(GpxRoute route); - - /// - /// Writes GpxTrack - /// - /// The track to write - void Write(GpxTrack track); - } -} +using SpatialLite.Gps.Geometries; + +namespace SpatialLite.Gps.IO; + +/// +/// Defines functions and properties for classes that can writes GPX entities to a destination. +/// +public interface IGpxWriter +{ + /// + /// Writes GpxWaypoint + /// + /// The waypoint to write. + void Write(GpxPoint waypoint); + + /// + /// Writes GpxRoute + /// + /// The route to write + void Write(GpxRoute route); + + /// + /// Writes GpxTrack + /// + /// The track to write + void Write(GpxTrack track); +} diff --git a/src/SpatialLite.Gps/Properties/AssemblyInfo.cs b/src/SpatialLite.Gps/Properties/AssemblyInfo.cs index d354c84..261ebf1 100644 --- a/src/SpatialLite.Gps/Properties/AssemblyInfo.cs +++ b/src/SpatialLite.Gps/Properties/AssemblyInfo.cs @@ -9,4 +9,4 @@ [assembly: AssemblyProduct("SpatialLite.Gps")] [assembly: AssemblyTrademark("")] -[assembly: InternalsVisibleTo("Tests.SpatialLite.Gps")] \ No newline at end of file +[assembly: InternalsVisibleTo("Tests.SpatialLite.Gps")] diff --git a/src/SpatialLite.Osm/EntityCollection.cs b/src/SpatialLite.Osm/EntityCollection.cs index 89bf3c8..3aedd08 100644 --- a/src/SpatialLite.Osm/EntityCollection.cs +++ b/src/SpatialLite.Osm/EntityCollection.cs @@ -1,157 +1,181 @@ using System; using System.Collections.Generic; -namespace SpatialLite.Osm { - /// - /// Represents collection of the OSM entities that optimized for access speed. - /// - /// The type of the entities in the collection. - public class EntityCollection : ITypedEntityCollection where T : IOsmEntity { - - private Dictionary _storage = null; - - /// - /// Initializes a new instance of the EntityCollection class that is empty. - /// - public EntityCollection() { - _storage = new Dictionary(); - } - - /// - /// Initializes a new instance of the EntityCollection class with specified entities. - /// - /// Collection of entities to be populated into this EntityCollection. - public EntityCollection(IEnumerable entities) { - _storage = new Dictionary(); - - foreach (var entity in entities) { - _storage.Add(entity.ID, entity); - } - } - - /// - /// Gets the number of entities in the collection. - /// - public int Count { - get { - return _storage.Count; - } - } - - /// - /// Gets a value indicating whether the collection is read-only. - /// - public bool IsReadOnly { - get { - return false; - } - } - - /// - /// Gets an entity with specific ID from the collection. - /// - /// The ID of the entity to get. - /// entity with the specific ID or null if such entity is not present in the collection. - public T this[long id] { - get { - if (_storage.ContainsKey(id)) { - return _storage[id]; - } - - return default(T); - } - } - - /// - /// Adds specific entity to the collection. - /// - /// The entity to add to the collection. - public void Add(T entity) { - if (entity == null) { - throw new ArgumentNullException("entity", "Cannot add null to EntityCollection"); - } - - if (_storage.ContainsKey(entity.ID)) { - throw new ArgumentException("An entity with the same ID has already been added."); - } - - _storage.Add(entity.ID, entity); - } - - /// - /// Removes all entities form the collection. - /// - public void Clear() { - _storage.Clear(); - } - - /// - /// Determines whether the EntityICollection contains a specific entity. - /// - /// The entity to locate in the EntityCollection - /// true if entity is found in the collection, otherwise false. - public bool Contains(T item) { - if (item == null) { - return false; - } - - return _storage.ContainsKey(item.ID); - } - - /// - /// Determines whether the EntityICollection contains an entity with specific ID. - /// - /// The ID of the entity to locate in the EntityCollection. - /// true if entity is found in the collection, otherwise false. - public bool Contains(long id) { - return _storage.ContainsKey(id); - } - - /// - /// Copies the entire EntityCollection to a compatible one-dimensional Array, starting at the specified index of the target array. - /// - /// The one-dimensional Array that is the destination of the elements copied from EntityCollection. - /// The zero-based index in array at which copying begins. - public void CopyTo(T[] array, int arrayIndex) { - _storage.Values.CopyTo(array, arrayIndex); - } - - /// - /// Removes the specific entity from the collection. - /// - /// The entity to remove from the collection. - /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. - public bool Remove(T entity) { - if (entity == null) { - return false; - } - - return _storage.Remove(entity.ID); - } - - /// - /// Removes an entity with the specific ID from the collection. - /// - /// The ID of the entity to remove from the collection. - /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. - public bool Remove(long id) { - return _storage.Remove(id); - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// A IEnumerator<T> that can be used to iterate through the collection. - public IEnumerator GetEnumerator() { - return _storage.Values.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// A IEnumerator that can be used to iterate through the collection. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { - return this.GetEnumerator(); - } - } +namespace SpatialLite.Osm; + +/// +/// Represents collection of the OSM entities that optimized for access speed. +/// +/// The type of the entities in the collection. +public class EntityCollection : ITypedEntityCollection where T : IOsmEntity +{ + + private readonly Dictionary _storage = null; + + /// + /// Initializes a new instance of the EntityCollection class that is empty. + /// + public EntityCollection() + { + _storage = new Dictionary(); + } + + /// + /// Initializes a new instance of the EntityCollection class with specified entities. + /// + /// Collection of entities to be populated into this EntityCollection. + public EntityCollection(IEnumerable entities) + { + _storage = new Dictionary(); + + foreach (var entity in entities) + { + _storage.Add(entity.ID, entity); + } + } + + /// + /// Gets the number of entities in the collection. + /// + public int Count + { + get + { + return _storage.Count; + } + } + + /// + /// Gets a value indicating whether the collection is read-only. + /// + public bool IsReadOnly + { + get + { + return false; + } + } + + /// + /// Gets an entity with specific ID from the collection. + /// + /// The ID of the entity to get. + /// entity with the specific ID or null if such entity is not present in the collection. + public T this[long id] + { + get + { + if (_storage.TryGetValue(id, out T value)) + { + return value; + } + + return default; + } + } + + /// + /// Adds specific entity to the collection. + /// + /// The entity to add to the collection. + public void Add(T entity) + { + if (entity == null) + { + throw new ArgumentNullException(nameof(entity), "Cannot add null to EntityCollection"); + } + + if (_storage.ContainsKey(entity.ID)) + { + throw new ArgumentException("An entity with the same ID has already been added."); + } + + _storage.Add(entity.ID, entity); + } + + /// + /// Removes all entities form the collection. + /// + public void Clear() + { + _storage.Clear(); + } + + /// + /// Determines whether the EntityICollection contains a specific entity. + /// + /// The entity to locate in the EntityCollection + /// true if entity is found in the collection, otherwise false. + public bool Contains(T item) + { + if (item == null) + { + return false; + } + + return _storage.ContainsKey(item.ID); + } + + /// + /// Determines whether the EntityICollection contains an entity with specific ID. + /// + /// The ID of the entity to locate in the EntityCollection. + /// true if entity is found in the collection, otherwise false. + public bool Contains(long id) + { + return _storage.ContainsKey(id); + } + + /// + /// Copies the entire EntityCollection to a compatible one-dimensional Array, starting at the specified index of the target array. + /// + /// The one-dimensional Array that is the destination of the elements copied from EntityCollection. + /// The zero-based index in array at which copying begins. + public void CopyTo(T[] array, int arrayIndex) + { + _storage.Values.CopyTo(array, arrayIndex); + } + + /// + /// Removes the specific entity from the collection. + /// + /// The entity to remove from the collection. + /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. + public bool Remove(T entity) + { + if (entity == null) + { + return false; + } + + return _storage.Remove(entity.ID); + } + + /// + /// Removes an entity with the specific ID from the collection. + /// + /// The ID of the entity to remove from the collection. + /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. + public bool Remove(long id) + { + return _storage.Remove(id); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// A IEnumerator<T> that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return _storage.Values.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// A IEnumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } diff --git a/src/SpatialLite.Osm/EntityMetadata.cs b/src/SpatialLite.Osm/EntityMetadata.cs index 15c6780..77eacf9 100644 --- a/src/SpatialLite.Osm/EntityMetadata.cs +++ b/src/SpatialLite.Osm/EntityMetadata.cs @@ -1,39 +1,40 @@ -using System; - -namespace SpatialLite.Osm { - /// - /// Contains additional information about OSM entities such as Author, Version, Timesptam of the last change and others. - /// - public class EntityMetadata { - - /// - /// Gets or sets version of the object. - /// - public int Version { get; set; } - - /// - /// Gets or sets date and time when the entity was modified. - /// - public DateTime Timestamp { get; set; } - - /// - /// Gets or sets if of the user who made last modification to the entity. - /// - public int Uid { get; set; } - - /// - /// Gets or sets username of the person who made last modification to the entity. - /// - public string User { get; set; } - - /// - /// Gets or sets changeset id. - /// - public int Changeset { get; set; } - - /// - /// Gets or sets visibility of this item. - /// - public bool Visible { get; set; } - } -} +using System; + +namespace SpatialLite.Osm; + +/// +/// Contains additional information about OSM entities such as Author, Version, Timesptam of the last change and others. +/// +public class EntityMetadata +{ + + /// + /// Gets or sets version of the object. + /// + public int Version { get; set; } + + /// + /// Gets or sets date and time when the entity was modified. + /// + public DateTime Timestamp { get; set; } + + /// + /// Gets or sets if of the user who made last modification to the entity. + /// + public int Uid { get; set; } + + /// + /// Gets or sets username of the person who made last modification to the entity. + /// + public string User { get; set; } + + /// + /// Gets or sets changeset id. + /// + public int Changeset { get; set; } + + /// + /// Gets or sets visibility of this item. + /// + public bool Visible { get; set; } +} diff --git a/src/SpatialLite.Osm/EntityType.cs b/src/SpatialLite.Osm/EntityType.cs index e52a4e0..6944824 100644 --- a/src/SpatialLite.Osm/EntityType.cs +++ b/src/SpatialLite.Osm/EntityType.cs @@ -1,23 +1,24 @@ -namespace SpatialLite.Osm { - /// - /// Defines possible type of object that IOsmGeometryInfo can represent. - /// - public enum EntityType { - /// - /// Unknown type of the entity. - /// - Unknown, - /// - /// Node - /// - Node, - /// - /// Way - /// - Way, - /// - /// Relation - /// - Relation - } -} +namespace SpatialLite.Osm; + +/// +/// Defines possible type of object that IOsmGeometryInfo can represent. +/// +public enum EntityType +{ + /// + /// Unknown type of the entity. + /// + Unknown, + /// + /// Node + /// + Node, + /// + /// Way + /// + Way, + /// + /// Relation + /// + Relation +} diff --git a/src/SpatialLite.Osm/Geometries/IOsmGeometry.cs b/src/SpatialLite.Osm/Geometries/IOsmGeometry.cs index 28d289d..ce3749a 100644 --- a/src/SpatialLite.Osm/Geometries/IOsmGeometry.cs +++ b/src/SpatialLite.Osm/Geometries/IOsmGeometry.cs @@ -1,9 +1,10 @@ -using SpatialLite.Core.API; - -namespace SpatialLite.Osm.Geometries { - /// - /// Represents OSM entity that implements IGeometry interface. - /// - public interface IOsmGeometry : IOsmEntity, IGeometry { - } -} +using SpatialLite.Core.API; + +namespace SpatialLite.Osm.Geometries; + +/// +/// Represents OSM entity that implements IGeometry interface. +/// +public interface IOsmGeometry : IOsmEntity, IGeometry +{ +} diff --git a/src/SpatialLite.Osm/Geometries/Node.cs b/src/SpatialLite.Osm/Geometries/Node.cs index e21a66d..3f2d8d8 100644 --- a/src/SpatialLite.Osm/Geometries/Node.cs +++ b/src/SpatialLite.Osm/Geometries/Node.cs @@ -1,91 +1,99 @@ using SpatialLite.Core.API; using SpatialLite.Core.Geometries; -namespace SpatialLite.Osm.Geometries { +namespace SpatialLite.Osm.Geometries; + +/// +/// Represents OSM node. +/// +public class Node : Point, IOsmGeometry +{ + /// - /// Represents OSM node. + /// Initializes a new instance of the Node class with specified ID. /// - public class Node : Point, IOsmGeometry { - - /// - /// Initializes a new instance of the Node class with specified ID. - /// - /// The ID of the node. - public Node(long id) - : this(id, Coordinate.Empty, new TagsCollection()) { - } + /// The ID of the node. + public Node(long id) + : this(id, Coordinate.Empty, new TagsCollection()) + { + } - /// - /// Initializes a new instance of the Node class with specified ID, Longitude and Latitude. - /// - /// The ID of the node. - /// The longitude of the Node. - /// The latitude of the Node. - public Node(long id, double longitude, double latitude) - : this(id, new Coordinate(longitude, latitude), new TagsCollection()) { - } + /// + /// Initializes a new instance of the Node class with specified ID, Longitude and Latitude. + /// + /// The ID of the node. + /// The longitude of the Node. + /// The latitude of the Node. + public Node(long id, double longitude, double latitude) + : this(id, new Coordinate(longitude, latitude), new TagsCollection()) + { + } - /// - /// Initializes a new instance of the Node class with specified ID, Longitude, Latitude and Tags. - /// - /// The ID of the node. - /// The longitude of the Node. - /// The latitude of the Node. - /// The collection of tags associated with the Node. - public Node(long id, double longitude, double latitude, TagsCollection tags) - : this(id, new Coordinate(longitude, latitude), tags) { - } + /// + /// Initializes a new instance of the Node class with specified ID, Longitude, Latitude and Tags. + /// + /// The ID of the node. + /// The longitude of the Node. + /// The latitude of the Node. + /// The collection of tags associated with the Node. + public Node(long id, double longitude, double latitude, TagsCollection tags) + : this(id, new Coordinate(longitude, latitude), tags) + { + } - /// - /// Initializes a new instance of the Node class with specified ID and Position. - /// - /// The ID of the node. - /// The position of the Node. - public Node(long id, Coordinate position) - : this(id, position, new TagsCollection()) { - } + /// + /// Initializes a new instance of the Node class with specified ID and Position. + /// + /// The ID of the node. + /// The position of the Node. + public Node(long id, Coordinate position) + : this(id, position, new TagsCollection()) + { + } - /// - /// Initializes a new instance of the Node class with specified ID, Position and Tags. - /// - /// The ID of the node. - /// The position of the Node. - /// The collection of tags associated with the Node. - public Node(long id, Coordinate position, TagsCollection tags) - : base(position) { - this.ID = id; - this.Tags = tags; - } + /// + /// Initializes a new instance of the Node class with specified ID, Position and Tags. + /// + /// The ID of the node. + /// The position of the Node. + /// The collection of tags associated with the Node. + public Node(long id, Coordinate position, TagsCollection tags) + : base(position) + { + ID = id; + Tags = tags; + } - /// - /// Creates a new instance of the Node class with data from NodeInfo object - /// - /// NodeInfo object that contains data about node - /// Node object with data from specific NodeInfo object - public static Node FromNodeInfo(NodeInfo info) { - return new Node(info.ID, info.Longitude, info.Latitude, info.Tags) { Metadata = info.Metadata }; - } + /// + /// Creates a new instance of the Node class with data from NodeInfo object + /// + /// NodeInfo object that contains data about node + /// Node object with data from specific NodeInfo object + public static Node FromNodeInfo(NodeInfo info) + { + return new Node(info.ID, info.Longitude, info.Latitude, info.Tags) { Metadata = info.Metadata }; + } - /// - /// Gets or sets ID of the Node. - /// - public long ID { get; set; } + /// + /// Gets or sets ID of the Node. + /// + public long ID { get; set; } - /// - /// Gets or sets the collection of tags associated with the Node. - /// - public TagsCollection Tags { get; set; } + /// + /// Gets or sets the collection of tags associated with the Node. + /// + public TagsCollection Tags { get; set; } - /// - /// Gets or sets metadata of the Node. - /// - public EntityMetadata Metadata { get; set; } + /// + /// Gets or sets metadata of the Node. + /// + public EntityMetadata Metadata { get; set; } - /// - /// Gets type of this entity. - /// - public EntityType EntityType { - get { return EntityType.Node; } - } - } + /// + /// Gets type of this entity. + /// + public EntityType EntityType + { + get { return EntityType.Node; } + } } diff --git a/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs b/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs index 81e60ca..2f1d05a 100644 --- a/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs +++ b/src/SpatialLite.Osm/Geometries/OsmGeometryDatabase.cs @@ -1,93 +1,108 @@ -using System; -using System.Collections.Generic; - -using SpatialLite.Osm.IO; - -namespace SpatialLite.Osm.Geometries { - /// - /// Represents in-memory OSM entities database that contains entities as IOsmGeometry objects. - /// - public class OsmGeometryDatabase : OsmDatabase { - - /// - /// Initializes a new instance of the OsmGeometryDatabase class that is empty. - /// - public OsmGeometryDatabase() - : base() { - } - - /// - /// Initializes a new instance of the OsmGeometryDatabase class with specific entities. - /// - /// Entities to add to the database. - public OsmGeometryDatabase(IEnumerable entities) - : base(entities) { - } - - /// - /// Creates a new instaance of the OsmDatabase class and loads data from specific IOsmReader into it. - /// - /// The IOsmReader to read data from. - /// A value indicatings whether Load function should skip geometries that reference miising geometries. - /// New instance of the OsmDatabase class with data loaded from specified reader. - public static OsmGeometryDatabase Load(IOsmReader reader, bool ignoreReferentialErrors) { - OsmGeometryDatabase db = new OsmGeometryDatabase(); - - List relations = new List(); - - IEntityInfo entityInfo = null; - while ((entityInfo = reader.Read()) != null) { - switch (entityInfo.EntityType) { - case EntityType.Node: db.Nodes.Add(Node.FromNodeInfo(entityInfo as NodeInfo)); break; - case EntityType.Way: - Way toAdd = Way.FromWayInfo(entityInfo as WayInfo, db, !ignoreReferentialErrors); - if (toAdd == null) { - if (!ignoreReferentialErrors) { - throw new ArgumentException(string.Format("Way (ID = {0}) references missing node.", entityInfo.ID)); - } - } - else { - db.Ways.Add(toAdd); - } - - break; - case EntityType.Relation: - RelationInfo ri = entityInfo as RelationInfo; - db.Relations.Add(new Relation(ri.ID) { Tags = ri.Tags, Metadata = ri.Metadata }); - relations.Add(ri); - break; - } - } - - foreach (var relationInfo in relations) { - Relation relation = db.Relations[relationInfo.ID]; - - foreach (var memberInfo in relationInfo.Members) { - RelationMember member = RelationMember.FromRelationMemberInfo(memberInfo, db, false); - if (member == null) { - if (!ignoreReferentialErrors) { - throw new ArgumentException(string.Format("Relation (ID = {0}) references missing OSM entity.", memberInfo.Reference)); - } - - db.Relations.Remove(relation); - } - else { - relation.Geometries.Add(member); - } - } - } - - return db; - } - - /// - /// Saves entities from the database to the specific writer. - /// - /// The IOsmWriter to save entities to. - public override void Save(IOsmWriter writer) { - foreach (var entity in this) { - writer.Write(entity); - } - } - } -} +using SpatialLite.Osm.IO; +using System; +using System.Collections.Generic; + +namespace SpatialLite.Osm.Geometries; + +/// +/// Represents in-memory OSM entities database that contains entities as IOsmGeometry objects. +/// +public class OsmGeometryDatabase : OsmDatabase +{ + + /// + /// Initializes a new instance of the OsmGeometryDatabase class that is empty. + /// + public OsmGeometryDatabase() + : base() + { + } + + /// + /// Initializes a new instance of the OsmGeometryDatabase class with specific entities. + /// + /// Entities to add to the database. + public OsmGeometryDatabase(IEnumerable entities) + : base(entities) + { + } + + /// + /// Creates a new instaance of the OsmDatabase class and loads data from specific IOsmReader into it. + /// + /// The IOsmReader to read data from. + /// A value indicatings whether Load function should skip geometries that reference miising geometries. + /// New instance of the OsmDatabase class with data loaded from specified reader. + public static OsmGeometryDatabase Load(IOsmReader reader, bool ignoreReferentialErrors) + { + OsmGeometryDatabase db = new OsmGeometryDatabase(); + + List relations = new List(); + + IEntityInfo entityInfo; + while ((entityInfo = reader.Read()) != null) + { + switch (entityInfo.EntityType) + { + case EntityType.Node: db.Nodes.Add(Node.FromNodeInfo(entityInfo as NodeInfo)); break; + case EntityType.Way: + Way toAdd = Way.FromWayInfo(entityInfo as WayInfo, db, !ignoreReferentialErrors); + if (toAdd == null) + { + if (!ignoreReferentialErrors) + { + throw new ArgumentException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Way (ID = {0}) references missing node.", entityInfo.ID)); + } + } + else + { + db.Ways.Add(toAdd); + } + + break; + case EntityType.Relation: + RelationInfo ri = entityInfo as RelationInfo; + db.Relations.Add(new Relation(ri.ID) { Tags = ri.Tags, Metadata = ri.Metadata }); + relations.Add(ri); + break; + } + } + + foreach (var relationInfo in relations) + { + Relation relation = db.Relations[relationInfo.ID]; + + foreach (var memberInfo in relationInfo.Members) + { + RelationMember member = RelationMember.FromRelationMemberInfo(memberInfo, db, false); + if (member == null) + { + if (!ignoreReferentialErrors) + { + throw new ArgumentException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Relation (ID = {0}) references missing OSM entity.", memberInfo.Reference)); + } + + db.Relations.Remove(relation); + } + else + { + relation.Geometries.Add(member); + } + } + } + + return db; + } + + /// + /// Saves entities from the database to the specific writer. + /// + /// The IOsmWriter to save entities to. + public override void Save(IOsmWriter writer) + { + foreach (var entity in this) + { + writer.Write(entity); + } + } +} diff --git a/src/SpatialLite.Osm/Geometries/Relation.cs b/src/SpatialLite.Osm/Geometries/Relation.cs index 391d76f..575c9e2 100644 --- a/src/SpatialLite.Osm/Geometries/Relation.cs +++ b/src/SpatialLite.Osm/Geometries/Relation.cs @@ -1,85 +1,92 @@ -using System.Collections.Generic; +using SpatialLite.Core.Geometries; +using System.Collections.Generic; -using SpatialLite.Core.Geometries; +namespace SpatialLite.Osm.Geometries; + +/// +/// Represents OSM relation. +/// +public class Relation : GeometryCollection, IOsmGeometry +{ -namespace SpatialLite.Osm.Geometries { /// - /// Represents OSM relation. + /// Initializes a new instance of the Relation class with the specified ID. /// - public class Relation : GeometryCollection, IOsmGeometry { - - /// - /// Initializes a new instance of the Relation class with the specified ID. - /// - /// The ID of the Relation. - public Relation(long id) - : this(id, new RelationMember[] { }, new TagsCollection()) { - } + /// The ID of the Relation. + public Relation(long id) + : this(id, new RelationMember[] { }, new TagsCollection()) + { + } - /// - /// Initializes a new instance of the Relation class with the specified ID and Members. - /// - /// The ID of the Relation. - /// The memberes of the relation. - public Relation(long id, IEnumerable members) - : this(id, members, new TagsCollection()) { - } + /// + /// Initializes a new instance of the Relation class with the specified ID and Members. + /// + /// The ID of the Relation. + /// The memberes of the relation. + public Relation(long id, IEnumerable members) + : this(id, members, new TagsCollection()) + { + } - /// - /// Initializes a new instance of the Relation class with the specified ID, Members and tags. - /// - /// The ID of the Relation. - /// The memberes of the relation. - /// The collectoin of tags associated with the relation. - public Relation(long id, IEnumerable members, TagsCollection tags) - : base(members) { - this.ID = id; - this.Tags = tags; - } + /// + /// Initializes a new instance of the Relation class with the specified ID, Members and tags. + /// + /// The ID of the Relation. + /// The memberes of the relation. + /// The collectoin of tags associated with the relation. + public Relation(long id, IEnumerable members, TagsCollection tags) + : base(members) + { + ID = id; + Tags = tags; + } - /// - /// Gets or sets ID of the Relation. - /// - public long ID { get; set; } + /// + /// Gets or sets ID of the Relation. + /// + public long ID { get; set; } - /// - /// Gets or sets the collection of tags associated with the Relation. - /// - public TagsCollection Tags { get; set; } + /// + /// Gets or sets the collection of tags associated with the Relation. + /// + public TagsCollection Tags { get; set; } - /// - /// Gets or sets metadata of the Relation. - /// - public EntityMetadata Metadata { get; set; } + /// + /// Gets or sets metadata of the Relation. + /// + public EntityMetadata Metadata { get; set; } - /// - /// Gets type of this entity. - /// - public EntityType EntityType { - get { return EntityType.Relation; } - } + /// + /// Gets type of this entity. + /// + public EntityType EntityType + { + get { return EntityType.Relation; } + } - /// - /// Creates a new instance of the Relation class with data from RelationInfo object. - /// - /// The RelationInfo object that contains data about relation. - /// The collection of entities that can be referenced by the relation. - /// bool value indicating whether references to the missing entities should cause exception. - /// The Relation object created from RelationInfo or null if referenced entity is missing. - public static Relation FromRelationInfo(RelationInfo info, IEntityCollection entities, bool throwOnMissing) { - Relation result = new Relation(info.ID) { Tags = info.Tags, Metadata = info.Metadata }; + /// + /// Creates a new instance of the Relation class with data from RelationInfo object. + /// + /// The RelationInfo object that contains data about relation. + /// The collection of entities that can be referenced by the relation. + /// bool value indicating whether references to the missing entities should cause exception. + /// The Relation object created from RelationInfo or null if referenced entity is missing. + public static Relation FromRelationInfo(RelationInfo info, IEntityCollection entities, bool throwOnMissing) + { + Relation result = new Relation(info.ID) { Tags = info.Tags, Metadata = info.Metadata }; - result.Geometries.Capacity = info.Members.Count; - foreach (var memberInfo in info.Members) { - RelationMember member = RelationMember.FromRelationMemberInfo(memberInfo, entities, throwOnMissing); - if (member == null) { - return null; - } + result.Geometries.Capacity = info.Members.Count; + foreach (var memberInfo in info.Members) + { + RelationMember member = RelationMember.FromRelationMemberInfo(memberInfo, entities, throwOnMissing); + if (member == null) + { + return null; + } - result.Geometries.Add(member); - } + result.Geometries.Add(member); + } - return result; - } - } + return result; + } } diff --git a/src/SpatialLite.Osm/Geometries/RelationMember.cs b/src/SpatialLite.Osm/Geometries/RelationMember.cs index e74afeb..8fcdef7 100644 --- a/src/SpatialLite.Osm/Geometries/RelationMember.cs +++ b/src/SpatialLite.Osm/Geometries/RelationMember.cs @@ -1,129 +1,143 @@ -using System; -using System.Collections.Generic; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace SpatialLite.Osm.Geometries { - /// - /// Ecapsules member of the OSM relation and it's role in the relation. - /// - public class RelationMember : Geometry { - - /// - /// Initializes a new instance of the RelationMember class with empty Role and specified Member. - /// - /// The member of this RelatioinMember. - public RelationMember(IOsmGeometry member) - : this(member, null) { - } - - /// - /// Initializes a new instance of the RelationMember class with specified Role and Member. - /// - /// The member of this RelationMember. - /// The Role of this member in the relation. - public RelationMember(IOsmGeometry member, string role) - : base() { - if (member == null) { - throw new ArgumentNullException("member"); - } - - this.Member = member; - this.Role = role; - - if (member is Node) { - this.MemberType = EntityType.Node; - } - else if (member is Way) { - this.MemberType = EntityType.Way; - } - else if (member is Relation) { - this.MemberType = EntityType.Relation; - } - else { - throw new ArgumentException("Unknown member type."); - } - } - - /// - /// Gets the actual member. - /// - public IOsmGeometry Member { get; private set; } - - /// - /// Gets or sets role of the member in the relation. - /// - public string Role { get; set; } - - /// - /// Gets the type of the Member. - /// - public EntityType MemberType { get; private set; } - - /// - /// Gets a value indicating whether this has Z coordinates. - /// - public override bool Is3D { - get { - return ((Geometry)this.Member).Is3D; - } - } - - /// - /// Gets a value indicating whether this has M values. - /// - public override bool IsMeasured { - get { - return ((Geometry)this.Member).IsMeasured; - } - } - - /// - /// Creates a new instance of the RelationMember class based on the data from RelationInfo object. - /// - /// The RelationMemberInfo object that contains data about member. - /// The entities that can be referenced by RelationMember. - /// bool value indicating whether references to the missing entity should cause exception. - /// The RelationMember object created from RelationMemberInfo or null if referenced node is missing. - public static RelationMember FromRelationMemberInfo(RelationMemberInfo info, IEntityCollection entities, bool throwOnMissing) { - if (info.MemberType == EntityType.Unknown) { - throw new ArgumentException("info.MemberType cannot be EntityType.Unknown"); - } - - if (entities.Contains(info.Reference, info.MemberType) == false) { - if (throwOnMissing) { - throw new ArgumentException(string.Format("Referenced Entity (ID = {0}, type = {1}) not found in entities collection.", info.Reference, info.MemberType), "info.Reference"); - } - else { - return null; - } - } - - RelationMember result = new RelationMember(entities[info.Reference, info.MemberType], info.Role) { MemberType = info.MemberType }; - if (result.Member.EntityType != info.MemberType) { - throw new ArgumentException("Type of the referenced entity doesn't match type of the entity in the collection."); - } - - return result; - } - - /// - /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. - /// - /// - /// Returns an object that specifies the minimal bounding box of the Geometry object. - /// - public override Envelope GetEnvelope() { - return ((Geometry)this.Member).GetEnvelope(); - } - - /// - /// Gets collection of all of this IGeometry object - /// - /// the collection of all of this object - public override IEnumerable GetCoordinates() { - return this.Member.GetCoordinates(); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; +using System.Collections.Generic; + +namespace SpatialLite.Osm.Geometries; + +/// +/// Ecapsules member of the OSM relation and it's role in the relation. +/// +public class RelationMember : Geometry +{ + + /// + /// Initializes a new instance of the RelationMember class with empty Role and specified Member. + /// + /// The member of this RelatioinMember. + public RelationMember(IOsmGeometry member) + : this(member, null) + { + } + + /// + /// Initializes a new instance of the RelationMember class with specified Role and Member. + /// + /// The member of this RelationMember. + /// The Role of this member in the relation. + public RelationMember(IOsmGeometry member, string role) + : base() + { + Member = member ?? throw new ArgumentNullException(nameof(member)); + Role = role; + + if (member is Node) + { + MemberType = EntityType.Node; + } + else if (member is Way) + { + MemberType = EntityType.Way; + } + else if (member is Relation) + { + MemberType = EntityType.Relation; + } + else + { + throw new ArgumentException("Unknown member type."); + } + } + + /// + /// Gets the actual member. + /// + public IOsmGeometry Member { get; private set; } + + /// + /// Gets or sets role of the member in the relation. + /// + public string Role { get; set; } + + /// + /// Gets the type of the Member. + /// + public EntityType MemberType { get; private set; } + + /// + /// Gets a value indicating whether this has Z coordinates. + /// + public override bool Is3D + { + get + { + return ((Geometry)Member).Is3D; + } + } + + /// + /// Gets a value indicating whether this has M values. + /// + public override bool IsMeasured + { + get + { + return ((Geometry)Member).IsMeasured; + } + } + + /// + /// Creates a new instance of the RelationMember class based on the data from RelationInfo object. + /// + /// The RelationMemberInfo object that contains data about member. + /// The entities that can be referenced by RelationMember. + /// bool value indicating whether references to the missing entity should cause exception. + /// The RelationMember object created from RelationMemberInfo or null if referenced node is missing. + public static RelationMember FromRelationMemberInfo(RelationMemberInfo info, IEntityCollection entities, bool throwOnMissing) + { + if (info.MemberType == EntityType.Unknown) + { + throw new ArgumentException("MemberType cannot be EntityType.Unknown", nameof(info)); + } + + if (entities.Contains(info.Reference, info.MemberType) == false) + { + if (throwOnMissing) + { + throw new ArgumentException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Referenced Entity (ID = {0}, type = {1}) not found in entities collection.", info.Reference, info.MemberType), "info.Reference"); + } + else + { + return null; + } + } + + RelationMember result = new RelationMember(entities[info.Reference, info.MemberType], info.Role) { MemberType = info.MemberType }; + if (result.Member.EntityType != info.MemberType) + { + throw new ArgumentException("Type of the referenced entity doesn't match type of the entity in the collection."); + } + + return result; + } + + /// + /// Computes envelope of the IGeometry object. The envelope is defined as a minimal bounding box for a geometry. + /// + /// + /// Returns an object that specifies the minimal bounding box of the Geometry object. + /// + public override Envelope GetEnvelope() + { + return ((Geometry)Member).GetEnvelope(); + } + + /// + /// Gets collection of all of this IGeometry object + /// + /// the collection of all of this object + public override IEnumerable GetCoordinates() + { + return Member.GetCoordinates(); + } +} diff --git a/src/SpatialLite.Osm/Geometries/Way.cs b/src/SpatialLite.Osm/Geometries/Way.cs index 916cb64..9b53f27 100644 --- a/src/SpatialLite.Osm/Geometries/Way.cs +++ b/src/SpatialLite.Osm/Geometries/Way.cs @@ -1,111 +1,121 @@ -using System; +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; using System.Collections.Generic; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; +namespace SpatialLite.Osm.Geometries; + +/// +/// Represents OSM way. +/// +public class Way : LineString, IOsmGeometry +{ + + private readonly WayCoordinateList _coordinatesAdapter; + + /// + /// Initializes a new instance of the Way class with specified ID. + /// + /// The ID of the Way. + public Way(long id) + : this(id, new Node[] { }, new TagsCollection()) + { + } + + /// + /// Initializes a new instance of the Way class with specified ID and given Nodes. + /// + /// The ID of the Way. + /// The colection of Nodes to add to this Way. + public Way(long id, IEnumerable nodes) + : this(id, nodes, new TagsCollection()) + { + } + + /// + /// Initializes a new instance of the Way class with specified ID, Nodes and collection of tags. + /// + /// The ID of the Way. + /// The colection of Nodes to add to this Way. + /// The collection of tags associated with the way. + public Way(long id, IEnumerable nodes, TagsCollection tags) + : base() + { + ID = id; + Tags = tags; + Nodes = new List(nodes); + + _coordinatesAdapter = new WayCoordinateList(Nodes); + } + + /// + /// Gets or sets ID of the Node. + /// + public long ID { get; set; } + + /// + /// Gets or sets the collection of tags associated with the Node. + /// + public TagsCollection Tags { get; set; } + + /// + /// Gets or sets metadata of the Node. + /// + public EntityMetadata Metadata { get; set; } + + /// + /// Gets collection of Nodes of this Way. + /// + public List Nodes { get; private set; } + + /// + /// Gets the list of çoordinates of this Way. + /// + public override ICoordinateList Coordinates + { + get + { + return _coordinatesAdapter; + } + } + + /// + /// Gets type of this entity. + /// + public EntityType EntityType + { + get { return EntityType.Way; } + } -namespace SpatialLite.Osm.Geometries { /// - /// Represents OSM way. + /// Creates a new instance of the Way class based on data from WayInfo object /// - public class Way : LineString, IOsmGeometry { - - private WayCoordinateList _coordinatesAdapter; - - /// - /// Initializes a new instance of the Way class with specified ID. - /// - /// The ID of the Way. - public Way(long id) - : this(id, new Node[] { }, new TagsCollection()) { - } - - /// - /// Initializes a new instance of the Way class with specified ID and given Nodes. - /// - /// The ID of the Way. - /// The colection of Nodes to add to this Way. - public Way(long id, IEnumerable nodes) - : this(id, nodes, new TagsCollection()) { - } - - /// - /// Initializes a new instance of the Way class with specified ID, Nodes and collection of tags. - /// - /// The ID of the Way. - /// The colection of Nodes to add to this Way. - /// The collection of tags associated with the way. - public Way(long id, IEnumerable nodes, TagsCollection tags) - : base() { - this.ID = id; - this.Tags = tags; - this.Nodes = new List(nodes); - - _coordinatesAdapter = new WayCoordinateList(this.Nodes); - } - - /// - /// Gets or sets ID of the Node. - /// - public long ID { get; set; } - - /// - /// Gets or sets the collection of tags associated with the Node. - /// - public TagsCollection Tags { get; set; } - - /// - /// Gets or sets metadata of the Node. - /// - public EntityMetadata Metadata { get; set; } - - /// - /// Gets collection of Nodes of this Way. - /// - public List Nodes { get; private set; } - - /// - /// Gets the list of çoordinates of this Way. - /// - public override ICoordinateList Coordinates { - get { - return _coordinatesAdapter; - } - } - - /// - /// Gets type of this entity. - /// - public EntityType EntityType { - get { return EntityType.Way; } - } - - /// - /// Creates a new instance of the Way class based on data from WayInfo object - /// - /// The WayInfo object that contains data about way - /// The entities that can be referenced by way - /// bool value indicating whether references to the missing nodes should cause exception - /// The Way object created from WayInfo or null if referenced node is missing - public static Way FromWayInfo(WayInfo info, IEntityCollection entities, bool throwOnMissing) { - Way result = new Way(info.ID) { Tags = info.Tags, Metadata = info.Metadata }; - - result.Nodes.Capacity = info.Nodes.Count; - foreach (var nodeID in info.Nodes) { - Node node = entities[nodeID, EntityType.Node] as Node; - if (node != null) { - result.Nodes.Add(node); - } - else { - if (throwOnMissing) { - throw new ArgumentException(string.Format("Referenced Node (ID = {0}) not found in entities collection.", nodeID), "info.ID"); - } - - return null; - } - } - - return result; - } - } + /// The WayInfo object that contains data about way + /// The entities that can be referenced by way + /// bool value indicating whether references to the missing nodes should cause exception + /// The Way object created from WayInfo or null if referenced node is missing + public static Way FromWayInfo(WayInfo info, IEntityCollection entities, bool throwOnMissing) + { + Way result = new Way(info.ID) { Tags = info.Tags, Metadata = info.Metadata }; + + result.Nodes.Capacity = info.Nodes.Count; + foreach (var nodeID in info.Nodes) + { + if (entities[nodeID, EntityType.Node] is Node node) + { + result.Nodes.Add(node); + } + else + { + if (throwOnMissing) + { + throw new ArgumentException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Referenced Node (ID = {0}) not found in entities collection.", nodeID), "info.ID"); + } + + return null; + } + } + + return result; + } } diff --git a/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs b/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs index 3d625c9..dcae5f8 100644 --- a/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs +++ b/src/SpatialLite.Osm/Geometries/WayCoordinateList.cs @@ -1,108 +1,122 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -using SpatialLite.Core.API; - -namespace SpatialLite.Osm.Geometries { - /// - /// Provides a read-only wrapper around list of Nodes that implements ICoordinateList interface. - /// - internal class WayCoordinateList : ICoordinateList { - - /// - /// Initializes a new instance of the WayCoordinateList class with specified source list fo nodes - /// - /// The list of Nodes to be used as source for this WayCoordinateList - public WayCoordinateList(IList source) { - this.Source = source; - } - - /// - /// Gets number of Coordinates in the list. - /// - public int Count { - get { - return this.Source.Count; - } - } - - /// - /// Gets the List of Nodes used as source for this WayCoordinateList. - /// - public IList Source { get; private set; } - - /// - /// Gets or sets Coordinate at the given index. - /// - /// The zero-based index of the Coordinate to get or set. - /// The element at the specified index. - public Coordinate this[int index] { - get { - return this.Source[index].Position; - } - set { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } - } - - /// - /// Adds Coordinate to the end of the list. - /// - /// The Coordinate to add to the list. - public void Add(Coordinate coord) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } - - /// - /// Adds collection of coordinates to the end of the list. - /// - /// The collection of coordinates to add to the list. - public void Add(IEnumerable coords) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } - - /// - /// Insertes Coordinate to the list at the specified index. - /// - /// The zero-based index at which coord should be inserted. - /// The Coordinate to insert into list. - /// If index equals the number of items in the list, then item is appended to the list. - public void Insert(int index, Coordinate coord) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } - - /// - /// Removes Coordinate at the specified index from the list. - /// - /// The zero-based index of the Coordinate to remove. - public void RemoveAt(int index) { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } - - /// - /// Removes all Coordinates from the collection. - /// - public void Clear() { - throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); - } - - /// - /// Returns an enumerator that iterates through the CoordinateList - /// - /// The Enumerator for the CoordinateList - public IEnumerator GetEnumerator() { - foreach (var node in this.Source) { - yield return node.Position; - } - } - - /// - /// Returns an enumerator that iterates through the CoordinateList - /// - /// The Enumerator for the CoordinateList - IEnumerator IEnumerable.GetEnumerator() { - return this.GetEnumerator(); - } - } -} +using SpatialLite.Core.API; +using System; +using System.Collections; +using System.Collections.Generic; + +namespace SpatialLite.Osm.Geometries; + +/// +/// Provides a read-only wrapper around list of Nodes that implements ICoordinateList interface. +/// +internal class WayCoordinateList : ICoordinateList +{ + + /// + /// Initializes a new instance of the WayCoordinateList class with specified source list fo nodes + /// + /// The list of Nodes to be used as source for this WayCoordinateList + public WayCoordinateList(IList source) + { + Source = source; + } + + /// + /// Gets number of Coordinates in the list. + /// + public int Count + { + get + { + return Source.Count; + } + } + + /// + /// Gets the List of Nodes used as source for this WayCoordinateList. + /// + public IList Source { get; private set; } + + /// + /// Gets or sets Coordinate at the given index. + /// + /// The zero-based index of the Coordinate to get or set. + /// The element at the specified index. + public Coordinate this[int index] + { + get + { + return Source[index].Position; + } + set + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } + } + + /// + /// Adds Coordinate to the end of the list. + /// + /// The Coordinate to add to the list. + public void Add(Coordinate coord) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } + + /// + /// Adds collection of coordinates to the end of the list. + /// + /// The collection of coordinates to add to the list. + public void Add(IEnumerable coords) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } + + /// + /// Insertes Coordinate to the list at the specified index. + /// + /// The zero-based index at which coord should be inserted. + /// The Coordinate to insert into list. + /// If index equals the number of items in the list, then item is appended to the list. + public void Insert(int index, Coordinate coord) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } + + /// + /// Removes Coordinate at the specified index from the list. + /// + /// The zero-based index of the Coordinate to remove. + public void RemoveAt(int index) + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } + + /// + /// Removes all Coordinates from the collection. + /// + public void Clear() + { + throw new NotSupportedException("This operation isn't supported - use Nodes property to modify coordinates."); + } + + /// + /// Returns an enumerator that iterates through the CoordinateList + /// + /// The Enumerator for the CoordinateList + public IEnumerator GetEnumerator() + { + foreach (var node in Source) + { + yield return node.Position; + } + } + + /// + /// Returns an enumerator that iterates through the CoordinateList + /// + /// The Enumerator for the CoordinateList + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } +} diff --git a/src/SpatialLite.Osm/IEntityCollection.cs b/src/SpatialLite.Osm/IEntityCollection.cs index 3e85ec6..ec23a96 100644 --- a/src/SpatialLite.Osm/IEntityCollection.cs +++ b/src/SpatialLite.Osm/IEntityCollection.cs @@ -1,33 +1,34 @@ using System.Collections.Generic; -namespace SpatialLite.Osm { +namespace SpatialLite.Osm; + +/// +/// Defines methods and properties for collection of the OSM entities where entities can be accessed by their ID and type. +/// +/// The type of the entitie in the collection. +public interface IEntityCollection : ICollection where T : IOsmEntity +{ /// - /// Defines methods and properties for collection of the OSM entities where entities can be accessed by their ID and type. + /// Gets an entity with specific ID from the collection. /// - /// The type of the entitie in the collection. - public interface IEntityCollection : ICollection where T : IOsmEntity { - /// - /// Gets an entity with specific ID from the collection. - /// - /// The ID of the entity to get. - /// The type of the entity to get. - /// entity with the specific ID or null if such entity is not present in the collection. - T this[long id, EntityType type] { get; } + /// The ID of the entity to get. + /// The type of the entity to get. + /// entity with the specific ID or null if such entity is not present in the collection. + T this[long id, EntityType type] { get; } - /// - /// Removes an entity with the specific ID from the collection. - /// - /// The ID of the entity to remove from the collection. - /// The type of the entity to remove from the collection. - /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. - bool Remove(long id, EntityType type); + /// + /// Removes an entity with the specific ID from the collection. + /// + /// The ID of the entity to remove from the collection. + /// The type of the entity to remove from the collection. + /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. + bool Remove(long id, EntityType type); - /// - /// Determines whether the EntityICollection contains an entity with specific ID. - /// - /// The ID of the entity to locate in the EntityCollection. - /// The type of the entity to locate in the EntityCollection - /// true if entity is found in the collection, otherwise false. - bool Contains(long id, EntityType type); - } + /// + /// Determines whether the EntityICollection contains an entity with specific ID. + /// + /// The ID of the entity to locate in the EntityCollection. + /// The type of the entity to locate in the EntityCollection + /// true if entity is found in the collection, otherwise false. + bool Contains(long id, EntityType type); } diff --git a/src/SpatialLite.Osm/IEntityInfo.cs b/src/SpatialLite.Osm/IEntityInfo.cs index 55832d3..216a5b0 100644 --- a/src/SpatialLite.Osm/IEntityInfo.cs +++ b/src/SpatialLite.Osm/IEntityInfo.cs @@ -1,7 +1,8 @@ -namespace SpatialLite.Osm { - /// - /// Defines common properties for nodes, ways and relations in serialized form. - /// - public interface IEntityInfo : IOsmEntity { - } -} +namespace SpatialLite.Osm; + +/// +/// Defines common properties for nodes, ways and relations in serialized form. +/// +public interface IEntityInfo : IOsmEntity +{ +} diff --git a/src/SpatialLite.Osm/IO/CompressionMode.cs b/src/SpatialLite.Osm/IO/CompressionMode.cs index 9271e24..0bfd02c 100644 --- a/src/SpatialLite.Osm/IO/CompressionMode.cs +++ b/src/SpatialLite.Osm/IO/CompressionMode.cs @@ -1,16 +1,17 @@ -namespace SpatialLite.Osm.IO { - /// - /// Defines compressions that can be used in the PBF format. - /// - public enum CompressionMode { - /// - /// No compresion is used. - /// - None, - - /// - /// Zlib compression. - /// - ZlibDeflate - } -} +namespace SpatialLite.Osm.IO; + +/// +/// Defines compressions that can be used in the PBF format. +/// +public enum CompressionMode +{ + /// + /// No compresion is used. + /// + None, + + /// + /// Zlib compression. + /// + ZlibDeflate +} diff --git a/src/SpatialLite.Osm/IO/IOsmReader.cs b/src/SpatialLite.Osm/IO/IOsmReader.cs index 28d6976..e53e422 100644 --- a/src/SpatialLite.Osm/IO/IOsmReader.cs +++ b/src/SpatialLite.Osm/IO/IOsmReader.cs @@ -1,14 +1,15 @@ -using System; - -namespace SpatialLite.Osm.IO { - /// - /// Defines functions and properties for classes that can read OSM entities from various sources. - /// - public interface IOsmReader : IDisposable { - /// - /// Reads the next Osm entity from a source. - /// - /// IEntityInfo object with information about entity, or null if no more entities are available. - IEntityInfo Read(); - } -} \ No newline at end of file +using System; + +namespace SpatialLite.Osm.IO; + +/// +/// Defines functions and properties for classes that can read OSM entities from various sources. +/// +public interface IOsmReader : IDisposable +{ + /// + /// Reads the next Osm entity from a source. + /// + /// IEntityInfo object with information about entity, or null if no more entities are available. + IEntityInfo Read(); +} diff --git a/src/SpatialLite.Osm/IO/IOsmWriter.cs b/src/SpatialLite.Osm/IO/IOsmWriter.cs index 40d29ad..e467c3f 100644 --- a/src/SpatialLite.Osm/IO/IOsmWriter.cs +++ b/src/SpatialLite.Osm/IO/IOsmWriter.cs @@ -1,26 +1,27 @@ -using System; -using SpatialLite.Osm.Geometries; - -namespace SpatialLite.Osm.IO { - /// - /// Defines functions and properties for classes that can write OSM entities to various destinations. - /// - public interface IOsmWriter : IDisposable { - /// - /// Writes entity to the destination. - /// - /// The entity to write. - void Write(IOsmGeometry entity); - - /// - /// Writes entity info object to the target. - /// - /// The entity info object to wrirte. - void Write(IEntityInfo info); - - /// - /// Clears internal buffers and causes any buffered data to be written to the unerlaying storage. - /// - void Flush(); - } -} +using SpatialLite.Osm.Geometries; +using System; + +namespace SpatialLite.Osm.IO; + +/// +/// Defines functions and properties for classes that can write OSM entities to various destinations. +/// +public interface IOsmWriter : IDisposable +{ + /// + /// Writes entity to the destination. + /// + /// The entity to write. + void Write(IOsmGeometry entity); + + /// + /// Writes entity info object to the target. + /// + /// The entity info object to wrirte. + void Write(IEntityInfo info); + + /// + /// Clears internal buffers and causes any buffered data to be written to the unerlaying storage. + /// + void Flush(); +} diff --git a/src/SpatialLite.Osm/IO/OsmReaderSettings.cs b/src/SpatialLite.Osm/IO/OsmReaderSettings.cs index ea4957d..b5eab3b 100644 --- a/src/SpatialLite.Osm/IO/OsmReaderSettings.cs +++ b/src/SpatialLite.Osm/IO/OsmReaderSettings.cs @@ -1,39 +1,44 @@ -using System; - -namespace SpatialLite.Osm.IO { - /// - /// Contains settings that determine behaviour of OsmReaders. - /// - public class OsmReaderSettings { - - bool _readMetadata = true; - - /// - /// Initializes a new instance of the OsmReaderSettings class with default values. - /// - public OsmReaderSettings() { - this.ReadMetadata = true; - } - - /// - /// Gets a value indicating whether OsmReader should read and parse entity metadata. - /// - public bool ReadMetadata { - get { - return _readMetadata; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'ReadMetadata' property OsmReaderSettings is read-only."); - } - - _readMetadata = value; - } - } - - /// - /// Gets or sets value indicating whether properties of the current OsmReaderSettings instance can be changed. - /// - protected internal bool IsReadOnly { get; internal set; } - } -} +using System; + +namespace SpatialLite.Osm.IO; + +/// +/// Contains settings that determine behaviour of OsmReaders. +/// +public class OsmReaderSettings +{ + private bool _readMetadata = true; + + /// + /// Initializes a new instance of the OsmReaderSettings class with default values. + /// + public OsmReaderSettings() + { + ReadMetadata = true; + } + + /// + /// Gets a value indicating whether OsmReader should read and parse entity metadata. + /// + public bool ReadMetadata + { + get + { + return _readMetadata; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'ReadMetadata' property OsmReaderSettings is read-only."); + } + + _readMetadata = value; + } + } + + /// + /// Gets or sets value indicating whether properties of the current OsmReaderSettings instance can be changed. + /// + protected internal bool IsReadOnly { get; internal set; } +} diff --git a/src/SpatialLite.Osm/IO/OsmWriterSettings.cs b/src/SpatialLite.Osm/IO/OsmWriterSettings.cs index 40a715c..f371c93 100644 --- a/src/SpatialLite.Osm/IO/OsmWriterSettings.cs +++ b/src/SpatialLite.Osm/IO/OsmWriterSettings.cs @@ -1,56 +1,65 @@ -using System; - -namespace SpatialLite.Osm.IO { - /// - /// Contains settings that determine behaviour of the OsmWriterWriter. - /// - public class OsmWriterSettings { - - bool _writeMetadata = true; - string _programName = "SpatialLITE"; - - /// - /// Initializes a new instance of the OsmReaderSettings class with default values. - /// - public OsmWriterSettings() { - this.WriteMetadata = true; - } - - /// - /// Gets or sets a value indicating whether OsmWriter should write entity metadata. - /// - public bool WriteMetadata { - get { - return _writeMetadata; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'WriteMetadata' property - OsmWriterSettings is read-only."); - } - - _writeMetadata = value; - } - } - - /// - /// Gets or sets the name of the program that will be save to the output file. - /// - public string ProgramName { - get { - return _programName; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'ProgramName' property - OsmWriterSettings is read-only."); - } - - _programName = value; - } - } - - /// - /// Gets or sets value indicating whether properties of the current OsmWriterSettings instance can be changed. - /// - protected internal bool IsReadOnly { get; internal set; } - } -} +using System; + +namespace SpatialLite.Osm.IO; + +/// +/// Contains settings that determine behaviour of the OsmWriterWriter. +/// +public class OsmWriterSettings +{ + private bool _writeMetadata = true; + private string _programName = "SpatialLITE"; + + /// + /// Initializes a new instance of the OsmReaderSettings class with default values. + /// + public OsmWriterSettings() + { + WriteMetadata = true; + } + + /// + /// Gets or sets a value indicating whether OsmWriter should write entity metadata. + /// + public bool WriteMetadata + { + get + { + return _writeMetadata; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'WriteMetadata' property - OsmWriterSettings is read-only."); + } + + _writeMetadata = value; + } + } + + /// + /// Gets or sets the name of the program that will be save to the output file. + /// + public string ProgramName + { + get + { + return _programName; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'ProgramName' property - OsmWriterSettings is read-only."); + } + + _programName = value; + } + } + + /// + /// Gets or sets value indicating whether properties of the current OsmWriterSettings instance can be changed. + /// + protected internal bool IsReadOnly { get; internal set; } +} diff --git a/src/SpatialLite.Osm/IO/OsmXmlReader.cs b/src/SpatialLite.Osm/IO/OsmXmlReader.cs index 5c7d4e1..9bedf17 100644 --- a/src/SpatialLite.Osm/IO/OsmXmlReader.cs +++ b/src/SpatialLite.Osm/IO/OsmXmlReader.cs @@ -3,438 +3,504 @@ using System.IO; using Sys = System.Xml; -namespace SpatialLite.Osm.IO { +namespace SpatialLite.Osm.IO; + +/// +/// Represents a OsmReader, that can read OSM entities saved in the XML format. +/// +public class OsmXmlReader : IOsmReader +{ + + private bool _disposed = false; + private Sys.XmlReader _xmlReader; + + /// + /// Underlaying stream to read data from + /// + private readonly Stream _input; + private readonly bool _ownsInputStream = false; + + /// + /// Contains bool value indicating whether XmlReader is inside osm element + /// + private bool _insideOsm; + + /// + /// Initializes a new instance of the OsmXmlReader class that reads data from the specified file. + /// + /// Path to the .osm file. + /// The OsmReaderSettings object that determines behaviour of XmlReader. + public OsmXmlReader(string path, OsmXmlReaderSettings settings) + { + _input = new FileStream(path, FileMode.Open, FileAccess.Read); + _ownsInputStream = true; + + Settings = settings; + Settings.IsReadOnly = true; + InitializeReader(); + } + + /// + /// Initializes a new instance of the OsmXmlReader class that reads data from the specified stream. + /// + /// The stream with osm xml data. + /// The OsmReaderSettings object that determines behaviour of XmlReader. + public OsmXmlReader(Stream stream, OsmXmlReaderSettings settings) + { + _input = stream; + + Settings = settings; + Settings.IsReadOnly = true; + InitializeReader(); + } + + /// + /// Gets OsmReaderSettings object that contains properties which determine behaviour of the reader. + /// + public OsmXmlReaderSettings Settings { get; private set; } + + /// + /// Reads the next OSM entity from the stream. + /// + /// IEntityInfo object with information about entity read from the stream, or null if no more entities are available. + public IEntityInfo Read() + { + IEntityInfo result = null; + + while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement && result == null) + { + switch (_xmlReader.Name) + { + case "node": + result = ReadNode(); + break; + case "way": + result = ReadWay(); + break; + case "relation": + result = ReadRelation(); + break; + default: + _xmlReader.Read(); + break; + } + } + + return result; + } + + /// + /// Releases all resources used by the OsmXmlReader. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Reads Node from the currnt element in the _xmlReader. + /// + /// Information about parsed node. + private NodeInfo ReadNode() + { + // id + string attId = _xmlReader.GetAttribute("id"); + if (attId == null) + { + throw new Sys.XmlException("Attribute 'id' is missing."); + } + + var nodeId = long.Parse(attId, System.Globalization.CultureInfo.InvariantCulture); + + // latitude + string attLat = _xmlReader.GetAttribute("lat"); + if (attLat == null) + { + throw new Sys.XmlException("Attribute 'lat' is missing."); + } + + double nodeLat = double.Parse(attLat, System.Globalization.CultureInfo.InvariantCulture); + + // longitude + string attLon = _xmlReader.GetAttribute("lon"); + if (attLon == null) + { + throw new Sys.XmlException("Attribute 'lon'is missing."); + } + + double nodeLon = double.Parse(attLon, System.Globalization.CultureInfo.InvariantCulture); + + EntityMetadata additionalInfo = null; + if (Settings.ReadMetadata) + { + additionalInfo = ReadMetadata(); + } + + NodeInfo result = new NodeInfo(nodeId, nodeLat, nodeLon, new TagsCollection(), additionalInfo); + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement) + { + if (_xmlReader.NodeType == Sys.XmlNodeType.Element && _xmlReader.Name == "tag") + { + result.Tags.Add(ReadTag()); + } + else + { + _xmlReader.Skip(); + } + } + } + + _xmlReader.Skip(); + return result; + } + + /// + /// Reads Way from the currnt element in the _xmlReader. + /// + /// Information about parsed way. + private WayInfo ReadWay() + { + string attId = _xmlReader.GetAttribute("id"); + if (attId == null) + { + throw new Sys.XmlException("Attribute 'id' is missing."); + } + + var wayId = long.Parse(attId, System.Globalization.CultureInfo.InvariantCulture); + + EntityMetadata additionalInfo = null; + if (Settings.ReadMetadata) + { + additionalInfo = ReadMetadata(); + } + + WayInfo way = new WayInfo(wayId, new TagsCollection(), new List(), additionalInfo); + + if (_xmlReader.IsEmptyElement == false) + { + _xmlReader.Read(); + + while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement) + { + switch (_xmlReader.NodeType) + { + case Sys.XmlNodeType.Element: + switch (_xmlReader.Name) + { + case "nd": + way.Nodes.Add(ReadWayNd()); + continue; + case "tag": + way.Tags.Add(ReadTag()); + continue; + default: + _xmlReader.Skip(); + continue; + } + + default: + _xmlReader.Skip(); + break; + } + } + } + + _xmlReader.Skip(); + return way; + } + + /// + /// Reads Node reference from the currnt Way element in the _xmlReader. + /// + /// Reference to the node. + private long ReadWayNd() + { + string attRef = _xmlReader.GetAttribute("ref"); + if (string.IsNullOrEmpty(attRef)) + { + throw new Sys.XmlException("Attribute 'ref' is missing."); + } + + var nodeId = long.Parse(attRef, System.Globalization.CultureInfo.InvariantCulture); + + _xmlReader.Skip(); + + return nodeId; + } + + /// + /// Reads Relation from the currnt element in the _xmlReader. + /// + /// Information about parsed relation. + private RelationInfo ReadRelation() + { + string attId = _xmlReader.GetAttribute("id"); + if (attId == null) + { + throw new Sys.XmlException("Attribute 'id' is missing."); + } + + var relationId = long.Parse(attId, System.Globalization.CultureInfo.InvariantCulture); + + EntityMetadata additionalInfo = null; + if (Settings.ReadMetadata) + { + additionalInfo = ReadMetadata(); + } + + RelationInfo relation = new RelationInfo(relationId, new TagsCollection(), new List(), additionalInfo); + + if (false == _xmlReader.IsEmptyElement) + { + _xmlReader.Read(); + + while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement) + { + switch (_xmlReader.NodeType) + { + case Sys.XmlNodeType.Element: + switch (_xmlReader.Name) + { + case "member": + relation.Members.Add(ReadRelationMember()); + continue; + case "tag": + relation.Tags.Add(ReadTag()); + continue; + default: + _xmlReader.Skip(); + continue; + } + + default: + _xmlReader.Skip(); + break; + } + } + } + + _xmlReader.Skip(); + + return relation; + } + + /// + /// Reads RelationMember from the current Relation in the _xmlReader. + /// + /// Information about parsed relation member + private RelationMemberInfo ReadRelationMember() + { + string attType = _xmlReader.GetAttribute("type"); + if (string.IsNullOrEmpty(attType)) + { + throw new Sys.XmlException("Attribute 'type' is missing."); + } + + string attRef = _xmlReader.GetAttribute("ref"); + if (string.IsNullOrEmpty(attRef)) + { + throw new Sys.XmlException("Attribute 'ref' is missing."); + } + + var refId = long.Parse(attRef, System.Globalization.CultureInfo.InvariantCulture); + + string attRole = _xmlReader.GetAttribute("role"); + + EntityType memberType; + switch (attType) + { + case "node": + memberType = EntityType.Node; + break; + case "way": + memberType = EntityType.Way; + break; + case "relation": + memberType = EntityType.Relation; + break; + default: + throw new Sys.XmlException("Unknown relation member type"); + } + + _xmlReader.Skip(); + + return new RelationMemberInfo() { MemberType = memberType, Reference = refId, Role = attRole }; + } + + /// + /// Reads Tag from the current element in the _xmlReader. + /// + /// the parsed Tag. + private Tag ReadTag() + { + string attK = _xmlReader.GetAttribute("k"); + if (attK == null) + { + throw new Sys.XmlException("Attribute 'k' is missing."); + } + + string attV = _xmlReader.GetAttribute("v"); + if (attV == null) + { + throw new Sys.XmlException("Attribute 'v' is missing."); + } + + _xmlReader.Skip(); + + return new Tag(attK, attV); + } + + /// + /// Reads metadata of the osm entity + /// + /// Metadata of the entity read from the reader. + private EntityMetadata ReadMetadata() + { + EntityMetadata result = new EntityMetadata(); + + // version + string attVersion = _xmlReader.GetAttribute("version"); + if (attVersion == null) + { + if (Settings.StrictMode) + { + throw new Sys.XmlException("Attribute 'version' is missing."); + } + } + else + { + result.Version = int.Parse(attVersion, System.Globalization.CultureInfo.InvariantCulture); + } + + // changeset + string attChangeset = _xmlReader.GetAttribute("changeset"); + if (attChangeset == null) + { + if (Settings.StrictMode) + { + throw new Sys.XmlException("Attribute 'changeset' is missing."); + } + } + else + { + result.Changeset = int.Parse(attChangeset, System.Globalization.CultureInfo.InvariantCulture); + } + + // uid + string attUid = _xmlReader.GetAttribute("uid"); + if (attUid == null) + { + if (Settings.StrictMode) + { + throw new Sys.XmlException("Attribute 'uid' is missing."); + } + } + else + { + result.Uid = int.Parse(attUid, System.Globalization.CultureInfo.InvariantCulture); + } + + // user + string attrUser = _xmlReader.GetAttribute("user"); + if (attrUser == null) + { + if (Settings.StrictMode) + { + throw new Sys.XmlException("Attribute 'user' is missing."); + } + } + else + { + result.User = attrUser; + } + + // visible + string attVisible = _xmlReader.GetAttribute("visible"); + if (attVisible == null) + { + if (Settings.StrictMode) + { + result.Visible = true; + } + } + else + { + result.Visible = bool.Parse(attVisible); + } + + // timestamp + string attTimestamp = _xmlReader.GetAttribute("timestamp"); + if (attTimestamp == null) + { + if (Settings.StrictMode) + { + throw new Sys.XmlException("Attribute 'timestamp' is missing."); + } + } + else + { + result.Timestamp = DateTime.ParseExact(attTimestamp, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", System.Globalization.CultureInfo.InvariantCulture); + } + + return result; + } + + /// + /// Initializes internal properties + /// + private void InitializeReader() + { + Sys.XmlReaderSettings xmlReaderSettings = new Sys.XmlReaderSettings(); + xmlReaderSettings.IgnoreComments = true; + xmlReaderSettings.IgnoreProcessingInstructions = true; + xmlReaderSettings.IgnoreWhitespace = true; + + _xmlReader = Sys.XmlReader.Create(_input, xmlReaderSettings); + + _xmlReader.Read(); + while (_xmlReader.EOF == false && _insideOsm == false) + { + switch (_xmlReader.NodeType) + { + case Sys.XmlNodeType.Element: + if (_xmlReader.Name != "osm") + { + throw new Sys.XmlException("Invalid xml root element. Expected ."); + } + + _insideOsm = true; + break; + + default: + _xmlReader.Read(); + break; + } + } + } + /// - /// Represents a OsmReader, that can read OSM entities saved in the XML format. + /// Releases the unmanaged resources used by the ComponentLibrary and optionally releases the managed resources. /// - public class OsmXmlReader : IOsmReader { - - private bool _disposed = false; - private Sys.XmlReader _xmlReader; - - /// - /// Underlaying stream to read data from - /// - private Stream _input; - private bool _ownsInputStream = false; - - /// - /// Contains bool value indicating whether XmlReader is inside osm element - /// - private bool _insideOsm; - - /// - /// Initializes a new instance of the OsmXmlReader class that reads data from the specified file. - /// - /// Path to the .osm file. - /// The OsmReaderSettings object that determines behaviour of XmlReader. - public OsmXmlReader(string path, OsmXmlReaderSettings settings) { - _input = new FileStream(path, FileMode.Open, FileAccess.Read); - _ownsInputStream = true; - - this.Settings = settings; - this.Settings.IsReadOnly = true; - this.InitializeReader(); - } - - /// - /// Initializes a new instance of the OsmXmlReader class that reads data from the specified stream. - /// - /// The stream with osm xml data. - /// The OsmReaderSettings object that determines behaviour of XmlReader. - public OsmXmlReader(Stream stream, OsmXmlReaderSettings settings) { - _input = stream; - - this.Settings = settings; - this.Settings.IsReadOnly = true; - this.InitializeReader(); - } - - /// - /// Gets OsmReaderSettings object that contains properties which determine behaviour of the reader. - /// - public OsmXmlReaderSettings Settings { get; private set; } - - /// - /// Reads the next OSM entity from the stream. - /// - /// IEntityInfo object with information about entity read from the stream, or null if no more entities are available. - public IEntityInfo Read() { - IEntityInfo result = null; - - while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement && result == null) { - switch (_xmlReader.Name) { - case "node": - result = this.ReadNode(); - break; - case "way": - result = this.ReadWay(); - break; - case "relation": - result = this.ReadRelation(); - break; - default: - _xmlReader.Read(); - break; - } - } - - return result; - } - - /// - /// Releases all resources used by the OsmXmlReader. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Reads Node from the currnt element in the _xmlReader. - /// - /// Information about parsed node. - private NodeInfo ReadNode() { - // id - string attId = _xmlReader.GetAttribute("id"); - if (attId == null) { - throw new Sys.XmlException("Attribute 'id' is missing."); - } - - var nodeId = long.Parse(attId, System.Globalization.CultureInfo.InvariantCulture); - - // latitude - string attLat = _xmlReader.GetAttribute("lat"); - if (attLat == null) { - throw new Sys.XmlException("Attribute 'lat' is missing."); - } - - double nodeLat = double.Parse(attLat, System.Globalization.CultureInfo.InvariantCulture); - - // longitude - string attLon = _xmlReader.GetAttribute("lon"); - if (attLon == null) { - throw new Sys.XmlException("Attribute 'lon'is missing."); - } - - double nodeLon = double.Parse(attLon, System.Globalization.CultureInfo.InvariantCulture); - - EntityMetadata additionalInfo = null; - if (this.Settings.ReadMetadata) { - additionalInfo = this.ReadMetadata(); - } - - NodeInfo result = new NodeInfo(nodeId, nodeLat, nodeLon, new TagsCollection(), additionalInfo); - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement) { - if (_xmlReader.NodeType == Sys.XmlNodeType.Element && _xmlReader.Name == "tag") { - result.Tags.Add(this.ReadTag()); - } - else { - _xmlReader.Skip(); - } - } - } - - _xmlReader.Skip(); - return result; - } - - /// - /// Reads Way from the currnt element in the _xmlReader. - /// - /// Information about parsed way. - private WayInfo ReadWay() { - string attId = _xmlReader.GetAttribute("id"); - if (attId == null) { - throw new Sys.XmlException("Attribute 'id' is missing."); - } - - var wayId = long.Parse(attId, System.Globalization.CultureInfo.InvariantCulture); - - EntityMetadata additionalInfo = null; - if (this.Settings.ReadMetadata) { - additionalInfo = this.ReadMetadata(); - } - - WayInfo way = new WayInfo(wayId, new TagsCollection(), new List(), additionalInfo); - - if (_xmlReader.IsEmptyElement == false) { - _xmlReader.Read(); - - while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement) { - switch (_xmlReader.NodeType) { - case Sys.XmlNodeType.Element: - switch (_xmlReader.Name) { - case "nd": - way.Nodes.Add(this.ReadWayNd()); - continue; - case "tag": - way.Tags.Add(this.ReadTag()); - continue; - default: - _xmlReader.Skip(); - continue; - } - - default: - _xmlReader.Skip(); - break; - } - } - } - - _xmlReader.Skip(); - return way; - } - - /// - /// Reads Node reference from the currnt Way element in the _xmlReader. - /// - /// Reference to the node. - private long ReadWayNd() { - string attRef = _xmlReader.GetAttribute("ref"); - if (string.IsNullOrEmpty(attRef)) { - throw new Sys.XmlException("Attribute 'ref' is missing."); - } - - var nodeId = long.Parse(attRef, System.Globalization.CultureInfo.InvariantCulture); - - _xmlReader.Skip(); - - return nodeId; - } - - /// - /// Reads Relation from the currnt element in the _xmlReader. - /// - /// Information about parsed relation. - private RelationInfo ReadRelation() { - string attId = _xmlReader.GetAttribute("id"); - if (attId == null) { - throw new Sys.XmlException("Attribute 'id' is missing."); - } - - var relationId = long.Parse(attId, System.Globalization.CultureInfo.InvariantCulture); - - EntityMetadata additionalInfo = null; - if (this.Settings.ReadMetadata) { - additionalInfo = this.ReadMetadata(); - } - - RelationInfo relation = new RelationInfo(relationId, new TagsCollection(), new List(), additionalInfo); - - if (false == _xmlReader.IsEmptyElement) { - _xmlReader.Read(); - - while (_xmlReader.NodeType != Sys.XmlNodeType.EndElement) { - switch (_xmlReader.NodeType) { - case Sys.XmlNodeType.Element: - switch (_xmlReader.Name) { - case "member": - relation.Members.Add(this.ReadRelationMember()); - continue; - case "tag": - relation.Tags.Add(this.ReadTag()); - continue; - default: - _xmlReader.Skip(); - continue; - } - - default: - _xmlReader.Skip(); - break; - } - } - } - - _xmlReader.Skip(); - - return relation; - } - - /// - /// Reads RelationMember from the current Relation in the _xmlReader. - /// - /// Information about parsed relation member - private RelationMemberInfo ReadRelationMember() { - string attType = _xmlReader.GetAttribute("type"); - if (string.IsNullOrEmpty(attType)) { - throw new Sys.XmlException("Attribute 'type' is missing."); - } - - string attRef = _xmlReader.GetAttribute("ref"); - if (string.IsNullOrEmpty(attRef)) { - throw new Sys.XmlException("Attribute 'ref' is missing."); - } - - var refId = long.Parse(attRef, System.Globalization.CultureInfo.InvariantCulture); - - string attRole = _xmlReader.GetAttribute("role"); - - EntityType memberType; - switch (attType) { - case "node": - memberType = EntityType.Node; - break; - case "way": - memberType = EntityType.Way; - break; - case "relation": - memberType = EntityType.Relation; - break; - default: - throw new Sys.XmlException("Unknown relation member type"); - } - - _xmlReader.Skip(); - - return new RelationMemberInfo() { MemberType = memberType, Reference = refId, Role = attRole }; - } - - /// - /// Reads Tag from the current element in the _xmlReader. - /// - /// the parsed Tag. - private Tag ReadTag() { - string attK = _xmlReader.GetAttribute("k"); - if (attK == null) { - throw new Sys.XmlException("Attribute 'k' is missing."); - } - - string attV = _xmlReader.GetAttribute("v"); - if (attV == null) { - throw new Sys.XmlException("Attribute 'v' is missing."); - } - - _xmlReader.Skip(); - - return new Tag(attK, attV); - } - - /// - /// Reads metadata of the osm entity - /// - /// Metadata of the entity read from the reader. - private EntityMetadata ReadMetadata() { - EntityMetadata result = new EntityMetadata(); - - // version - string attVersion = _xmlReader.GetAttribute("version"); - if (attVersion == null) { - if (this.Settings.StrictMode) { - throw new Sys.XmlException("Attribute 'version' is missing."); - } - } - else { - result.Version = int.Parse(attVersion, System.Globalization.CultureInfo.InvariantCulture); - } - - // changeset - string attChangeset = _xmlReader.GetAttribute("changeset"); - if (attChangeset == null) { - if (this.Settings.StrictMode) { - throw new Sys.XmlException("Attribute 'changeset' is missing."); - } - } - else { - result.Changeset = int.Parse(attChangeset, System.Globalization.CultureInfo.InvariantCulture); - } - - // uid - string attUid = _xmlReader.GetAttribute("uid"); - if (attUid == null) { - if (this.Settings.StrictMode) { - throw new Sys.XmlException("Attribute 'uid' is missing."); - } - } - else { - result.Uid = int.Parse(attUid, System.Globalization.CultureInfo.InvariantCulture); - } - - // user - string attrUser = _xmlReader.GetAttribute("user"); - if (attrUser == null) { - if (this.Settings.StrictMode) { - throw new Sys.XmlException("Attribute 'user' is missing."); - } - } - else { - result.User = attrUser; - } - - // visible - string attVisible = _xmlReader.GetAttribute("visible"); - if (attVisible == null) { - if (this.Settings.StrictMode) { - result.Visible = true; - } - } - else { - result.Visible = bool.Parse(attVisible); - } - - // timestamp - string attTimestamp = _xmlReader.GetAttribute("timestamp"); - if (attTimestamp == null) { - if (this.Settings.StrictMode) { - throw new Sys.XmlException("Attribute 'timestamp' is missing."); - } - } - else { - result.Timestamp = DateTime.ParseExact(attTimestamp, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", System.Globalization.CultureInfo.InvariantCulture); - } - - return result; - } - - /// - /// Initializes internal properties - /// - private void InitializeReader() { - Sys.XmlReaderSettings xmlReaderSettings = new Sys.XmlReaderSettings(); - xmlReaderSettings.IgnoreComments = true; - xmlReaderSettings.IgnoreProcessingInstructions = true; - xmlReaderSettings.IgnoreWhitespace = true; - - _xmlReader = Sys.XmlReader.Create(_input, xmlReaderSettings); - - _xmlReader.Read(); - while (_xmlReader.EOF == false && _insideOsm == false) { - switch (_xmlReader.NodeType) { - case Sys.XmlNodeType.Element: - if (_xmlReader.Name != "osm") { - throw new Sys.XmlException("Invalid xml root element. Expected ."); - } - - _insideOsm = true; - break; - - default: - _xmlReader.Read(); - break; - } - } - } - - /// - /// Releases the unmanaged resources used by the ComponentLibrary and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (disposing) { - if (_ownsInputStream) { - _input.Dispose(); - } - } - - _disposed = true; - } - } - } + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + if (_ownsInputStream) + { + _input.Dispose(); + } + } + + _disposed = true; + } + } } diff --git a/src/SpatialLite.Osm/IO/OsmXmlReaderSettings.cs b/src/SpatialLite.Osm/IO/OsmXmlReaderSettings.cs index 31b4ddb..82c440e 100644 --- a/src/SpatialLite.Osm/IO/OsmXmlReaderSettings.cs +++ b/src/SpatialLite.Osm/IO/OsmXmlReaderSettings.cs @@ -1,35 +1,40 @@ -using System; - -namespace SpatialLite.Osm.IO { - /// - /// Contains settings that determine behaviour of the OsmXmlReader. - /// - public class OsmXmlReaderSettings : OsmReaderSettings { - - private bool _strictMode = true; - - /// - /// Gets or sets a value indicating whether OsmXmlReader should run in strct mode. - /// - /// - /// - /// Default value is true. - /// - /// - /// In strict mode missing attributes for entity metadata causes OsmXmlReader to throw an exception. If strict mode is off and some metadata attributes are missing, missing attributes are set to their default values. - /// - /// - public bool StrictMode { - get { - return _strictMode; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'StrictMode' property - OsmXmlReaderSettings is read-only."); - } - - _strictMode = value; - } - } - } -} +using System; + +namespace SpatialLite.Osm.IO; + +/// +/// Contains settings that determine behaviour of the OsmXmlReader. +/// +public class OsmXmlReaderSettings : OsmReaderSettings +{ + + private bool _strictMode = true; + + /// + /// Gets or sets a value indicating whether OsmXmlReader should run in strct mode. + /// + /// + /// + /// Default value is true. + /// + /// + /// In strict mode missing attributes for entity metadata causes OsmXmlReader to throw an exception. If strict mode is off and some metadata attributes are missing, missing attributes are set to their default values. + /// + /// + public bool StrictMode + { + get + { + return _strictMode; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'StrictMode' property - OsmXmlReaderSettings is read-only."); + } + + _strictMode = value; + } + } +} diff --git a/src/SpatialLite.Osm/IO/OsmXmlWriter.cs b/src/SpatialLite.Osm/IO/OsmXmlWriter.cs index 2ae388b..dad4308 100644 --- a/src/SpatialLite.Osm/IO/OsmXmlWriter.cs +++ b/src/SpatialLite.Osm/IO/OsmXmlWriter.cs @@ -1,267 +1,301 @@ -using System; -using System.Text; -using System.IO; -using System.Xml; - -using SpatialLite.Osm.Geometries; - -namespace SpatialLite.Osm.IO { - /// - /// Represents an IOsmWriter, that can write OSM entities to XML format. - /// - public class OsmXmlWriter : IOsmWriter { - - private System.Globalization.CultureInfo _culture = System.Globalization.CultureInfo.InvariantCulture; - private Stream _output; - private bool _ownsOutputStream; - - private XmlWriter _writer; - private bool _isInsideOsm = false; - private bool _disposed = false; - - // underlaying stream writer for writing to files - private StreamWriter _streamWriter; - - /// - /// Initializes a new instance of the OsmXmlWriter class that writes OSM entities to the specified stream. - /// - /// The Stream to write OSM entities to. - /// The settings defining behaviour of the writer. - public OsmXmlWriter(Stream stream, OsmWriterSettings settings) { - this.Settings = settings; - this.Settings.IsReadOnly = true; - - _output = stream; - _ownsOutputStream = false; - - XmlWriterSettings writerSetting = new XmlWriterSettings(); - writerSetting.Indent = true; - - _writer = XmlWriter.Create(stream, writerSetting); - } - - /// - /// Initializes a new instance of the OsmXmlWriter class that writes OSM entities to the specified file. - /// - /// Path to the OSM file. - /// The settings defining behaviour of the writer. - /// If the file exists, it is overwritten, otherwise, a new file is created. - public OsmXmlWriter(string path, OsmWriterSettings settings) { - this.Settings = settings; - this.Settings.IsReadOnly = true; - - _output = new FileStream(path, FileMode.Create, FileAccess.Write); - _ownsOutputStream = true; - - XmlWriterSettings writerSetting = new XmlWriterSettings(); - writerSetting.Indent = true; - - _streamWriter = new StreamWriter(_output, new UTF8Encoding(false)); - _writer = XmlWriter.Create(_streamWriter, writerSetting); - } - - /// - /// Gets settings used by this XmlWriter. - /// - public OsmWriterSettings Settings { get; private set; } - - /// - /// Releases all resources used by the OsmXmlWriter. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Writes specified entity object in XML format to the underlaying stream. - /// - /// Entity to write. - public void Write(IOsmGeometry entity) { - if (entity == null) { - throw new ArgumentNullException("Entity cannot be null", "entity"); - } - - if (_isInsideOsm == false) { - this.StartDocument(); - } - - switch (entity.EntityType) { - case EntityType.Node: this.Write(new NodeInfo((Node)entity)); break; - case EntityType.Way: this.Write(new WayInfo((Way)entity)); break; - case EntityType.Relation: this.Write(new RelationInfo((Relation)entity)); break; - } - } - - /// - /// Writes specified entity data-transfer object in XML format to the underlaying stream. - /// - /// Entity data-transfer object to write. - public void Write(IEntityInfo info) { - if (this.Settings.WriteMetadata) { - if (info.Metadata == null) { - throw new ArgumentException("Entity doesn't contain metadata object, but writer was created with WriteMetadata setting."); - } - } - - if (_isInsideOsm == false) { - this.StartDocument(); - } - - switch (info.EntityType) { - case EntityType.Node: this.WriteNode((NodeInfo)info); break; - case EntityType.Way: this.WriteWay((WayInfo)info); break; - case EntityType.Relation: this.WriteRelation((RelationInfo)info); break; - } - } - - /// - /// Causes any buffered data to be written to the underlaying storage. - /// - public void Flush() { - _writer.Flush(); - } - - /// - /// Writes <osm> start element to the output stream. - /// - private void StartDocument() { - _writer.WriteStartElement("osm"); - if (string.IsNullOrEmpty(this.Settings.ProgramName) == false) { - _writer.WriteAttributeString("generator", this.Settings.ProgramName); - } - - _isInsideOsm = true; - } - - /// - /// Writes <osm> end element to the output stream. - /// - private void EndDocument() { - _writer.WriteEndElement(); - _isInsideOsm = false; - } - - /// - /// Writes node to the output streram. - /// - /// The Node to be written. - private void WriteNode(NodeInfo info) { - _writer.WriteStartElement("node"); - _writer.WriteAttributeString("lon", info.Longitude.ToString(_culture)); - _writer.WriteAttributeString("lat", info.Latitude.ToString(_culture)); - _writer.WriteAttributeString("id", info.ID.ToString(_culture)); - - if (this.Settings.WriteMetadata) { - this.WriteMetadata(info.Metadata); - } - - this.WriteTags(info.Tags); - - _writer.WriteEndElement(); - } - - /// - /// Writes way to the output stream - /// - /// The Way to be written - private void WriteWay(WayInfo info) { - _writer.WriteStartElement("way"); - _writer.WriteAttributeString("id", info.ID.ToString(_culture)); - - if (this.Settings.WriteMetadata) { - this.WriteMetadata(info.Metadata); - } - - this.WriteTags(info.Tags); - - for (int i = 0; i < info.Nodes.Count; i++) { - _writer.WriteStartElement("nd"); - _writer.WriteAttributeString("ref", info.Nodes[i].ToString(_culture)); - _writer.WriteEndElement(); - } - - _writer.WriteEndElement(); - } - - /// - /// Writes relation to the output stream. - /// - /// The relation to be written. - private void WriteRelation(RelationInfo info) { - _writer.WriteStartElement("relation"); - _writer.WriteAttributeString("id", info.ID.ToString(_culture)); - - if (this.Settings.WriteMetadata) { - this.WriteMetadata(info.Metadata); - } - - this.WriteTags(info.Tags); - - for (int i = 0; i < info.Members.Count; i++) { - _writer.WriteStartElement("member"); - _writer.WriteAttributeString("ref", info.Members[i].Reference.ToString(_culture)); - _writer.WriteAttributeString("role", info.Members[i].Role); - _writer.WriteAttributeString("type", info.Members[i].MemberType.ToString().ToLower()); - _writer.WriteEndElement(); - } - - _writer.WriteEndElement(); - } - - /// - /// Writes collection of tags to the output stream. - /// - /// The collection of tags to write. - private void WriteTags(TagsCollection tags) { - foreach (var tag in tags) { - _writer.WriteStartElement("tag"); - _writer.WriteAttributeString("k", tag.Key); - _writer.WriteAttributeString("v", tag.Value); - _writer.WriteEndElement(); - } - } - - /// - /// Writes detailed attributes of the OSM entity. - /// - /// The entity whose attributes to be written. - private void WriteMetadata(EntityMetadata medatata) { - _writer.WriteAttributeString("version", medatata.Version.ToString(_culture)); - _writer.WriteAttributeString("changeset", medatata.Changeset.ToString(_culture)); - - //HACK ? write only valid user data - if (medatata.Uid > 0) { - _writer.WriteAttributeString("uid", medatata.Uid.ToString(_culture)); - _writer.WriteAttributeString("user", medatata.User); - } - - _writer.WriteAttributeString("visible", medatata.Visible.ToString().ToLower()); - _writer.WriteAttributeString("timestamp", medatata.Timestamp.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'")); - } - - /// - /// Releases the unmanaged resources used by the OsmXmlWriter and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (_writer != null) { - _writer.Dispose(); - } - - if (disposing) { - if (_streamWriter != null) { - _streamWriter.Dispose(); - } - - if (_ownsOutputStream) { - _output.Dispose(); - } - } - - _disposed = true; - } - } - } -} +using SpatialLite.Osm.Geometries; +using System; +using System.IO; +using System.Text; +using System.Xml; + +namespace SpatialLite.Osm.IO; + +/// +/// Represents an IOsmWriter, that can write OSM entities to XML format. +/// +public class OsmXmlWriter : IOsmWriter +{ + + private readonly System.Globalization.CultureInfo _culture = System.Globalization.CultureInfo.InvariantCulture; + private readonly Stream _output; + private readonly bool _ownsOutputStream; + + private readonly XmlWriter _writer; + private bool _isInsideOsm = false; + private bool _disposed = false; + + // underlaying stream writer for writing to files + private readonly StreamWriter _streamWriter; + + /// + /// Initializes a new instance of the OsmXmlWriter class that writes OSM entities to the specified stream. + /// + /// The Stream to write OSM entities to. + /// The settings defining behaviour of the writer. + public OsmXmlWriter(Stream stream, OsmWriterSettings settings) + { + Settings = settings; + Settings.IsReadOnly = true; + + _output = stream; + _ownsOutputStream = false; + + XmlWriterSettings writerSetting = new XmlWriterSettings(); + writerSetting.Indent = true; + + _writer = XmlWriter.Create(stream, writerSetting); + } + + /// + /// Initializes a new instance of the OsmXmlWriter class that writes OSM entities to the specified file. + /// + /// Path to the OSM file. + /// The settings defining behaviour of the writer. + /// If the file exists, it is overwritten, otherwise, a new file is created. + public OsmXmlWriter(string path, OsmWriterSettings settings) + { + Settings = settings; + Settings.IsReadOnly = true; + + _output = new FileStream(path, FileMode.Create, FileAccess.Write); + _ownsOutputStream = true; + + XmlWriterSettings writerSetting = new XmlWriterSettings(); + writerSetting.Indent = true; + + _streamWriter = new StreamWriter(_output, new UTF8Encoding(false)); + _writer = XmlWriter.Create(_streamWriter, writerSetting); + } + + /// + /// Gets settings used by this XmlWriter. + /// + public OsmWriterSettings Settings { get; private set; } + + /// + /// Releases all resources used by the OsmXmlWriter. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Writes specified entity object in XML format to the underlaying stream. + /// + /// Entity to write. + public void Write(IOsmGeometry entity) + { + if (entity == null) + { + throw new ArgumentNullException(nameof(entity), "Entity cannot be null"); + } + + if (_isInsideOsm == false) + { + StartDocument(); + } + + switch (entity.EntityType) + { + case EntityType.Node: Write(new NodeInfo((Node)entity)); break; + case EntityType.Way: Write(new WayInfo((Way)entity)); break; + case EntityType.Relation: Write(new RelationInfo((Relation)entity)); break; + } + } + + /// + /// Writes specified entity data-transfer object in XML format to the underlaying stream. + /// + /// Entity data-transfer object to write. + public void Write(IEntityInfo info) + { + if (Settings.WriteMetadata) + { + if (info.Metadata == null) + { + throw new ArgumentException("Entity doesn't contain metadata object, but writer was created with WriteMetadata setting."); + } + } + + if (_isInsideOsm == false) + { + StartDocument(); + } + + switch (info.EntityType) + { + case EntityType.Node: WriteNode((NodeInfo)info); break; + case EntityType.Way: WriteWay((WayInfo)info); break; + case EntityType.Relation: WriteRelation((RelationInfo)info); break; + } + } + + /// + /// Causes any buffered data to be written to the underlaying storage. + /// + public void Flush() + { + _writer.Flush(); + } + + /// + /// Writes <osm> start element to the output stream. + /// + private void StartDocument() + { + _writer.WriteStartElement("osm"); + if (string.IsNullOrEmpty(Settings.ProgramName) == false) + { + _writer.WriteAttributeString("generator", Settings.ProgramName); + } + + _isInsideOsm = true; + } + + /// + /// Writes <osm> end element to the output stream. + /// + private void EndDocument() + { + _writer.WriteEndElement(); + _isInsideOsm = false; + } + + /// + /// Writes node to the output streram. + /// + /// The Node to be written. + private void WriteNode(NodeInfo info) + { + _writer.WriteStartElement("node"); + _writer.WriteAttributeString("lon", info.Longitude.ToString(_culture)); + _writer.WriteAttributeString("lat", info.Latitude.ToString(_culture)); + _writer.WriteAttributeString("id", info.ID.ToString(_culture)); + + if (Settings.WriteMetadata) + { + WriteMetadata(info.Metadata); + } + + WriteTags(info.Tags); + + _writer.WriteEndElement(); + } + + /// + /// Writes way to the output stream + /// + /// The Way to be written + private void WriteWay(WayInfo info) + { + _writer.WriteStartElement("way"); + _writer.WriteAttributeString("id", info.ID.ToString(_culture)); + + if (Settings.WriteMetadata) + { + WriteMetadata(info.Metadata); + } + + WriteTags(info.Tags); + + for (int i = 0; i < info.Nodes.Count; i++) + { + _writer.WriteStartElement("nd"); + _writer.WriteAttributeString("ref", info.Nodes[i].ToString(_culture)); + _writer.WriteEndElement(); + } + + _writer.WriteEndElement(); + } + + /// + /// Writes relation to the output stream. + /// + /// The relation to be written. + private void WriteRelation(RelationInfo info) + { + _writer.WriteStartElement("relation"); + _writer.WriteAttributeString("id", info.ID.ToString(_culture)); + + if (Settings.WriteMetadata) + { + WriteMetadata(info.Metadata); + } + + WriteTags(info.Tags); + + for (int i = 0; i < info.Members.Count; i++) + { + _writer.WriteStartElement("member"); + _writer.WriteAttributeString("ref", info.Members[i].Reference.ToString(_culture)); + _writer.WriteAttributeString("role", info.Members[i].Role); + _writer.WriteAttributeString("type", info.Members[i].MemberType.ToString().ToLower(_culture)); + _writer.WriteEndElement(); + } + + _writer.WriteEndElement(); + } + + /// + /// Writes collection of tags to the output stream. + /// + /// The collection of tags to write. + private void WriteTags(TagsCollection tags) + { + foreach (var tag in tags) + { + _writer.WriteStartElement("tag"); + _writer.WriteAttributeString("k", tag.Key); + _writer.WriteAttributeString("v", tag.Value); + _writer.WriteEndElement(); + } + } + + /// + /// Writes detailed attributes of the OSM entity. + /// + /// The entity whose attributes to be written. + private void WriteMetadata(EntityMetadata medatata) + { + _writer.WriteAttributeString("version", medatata.Version.ToString(_culture)); + _writer.WriteAttributeString("changeset", medatata.Changeset.ToString(_culture)); + + //HACK ? write only valid user data + if (medatata.Uid > 0) + { + _writer.WriteAttributeString("uid", medatata.Uid.ToString(_culture)); + _writer.WriteAttributeString("user", medatata.User); + } + + _writer.WriteAttributeString("visible", medatata.Visible.ToString().ToLower(_culture)); + _writer.WriteAttributeString("timestamp", medatata.Timestamp.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", _culture)); + } + + /// + /// Releases the unmanaged resources used by the OsmXmlWriter and optionally releases the managed resources. + /// + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (_writer != null) + { + _writer.Dispose(); + } + + if (disposing) + { + if (_streamWriter != null) + { + _streamWriter.Dispose(); + } + + if (_ownsOutputStream) + { + _output.Dispose(); + } + } + + _disposed = true; + } + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/Blob.cs b/src/SpatialLite.Osm/IO/Pbf/Blob.cs index 626a9c0..b7d88c8 100644 --- a/src/SpatialLite.Osm/IO/Pbf/Blob.cs +++ b/src/SpatialLite.Osm/IO/Pbf/Blob.cs @@ -1,29 +1,29 @@ -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represents content of the file block. - /// - [ProtoContract] - internal class Blob { - - /// - /// Gets or sets blob content if no compression is used. - /// - [ProtoMember(1, IsRequired = false, Name = "raw")] - public byte[] Raw { get; set; } - - /// - /// Gets or sets uncopressed size of the blob content if ZLIB compression is used. - /// - [ProtoMember(2, IsRequired = false, Name = "raw_size")] - public int? RawSize { get; set; } - - /// - /// Gets or sets blob content if ZLIB compression is used. - /// - [ProtoMember(3, IsRequired = false, Name = "zlib_data")] - public byte[] ZlibData { get; set; } - - } -} +using ProtoBuf; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represents content of the file block. +/// +[ProtoContract] +internal class Blob +{ + + /// + /// Gets or sets blob content if no compression is used. + /// + [ProtoMember(1, IsRequired = false, Name = "raw")] + public byte[] Raw { get; set; } + + /// + /// Gets or sets uncopressed size of the blob content if ZLIB compression is used. + /// + [ProtoMember(2, IsRequired = false, Name = "raw_size")] + public int? RawSize { get; set; } + + /// + /// Gets or sets blob content if ZLIB compression is used. + /// + [ProtoMember(3, IsRequired = false, Name = "zlib_data")] + public byte[] ZlibData { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/BlobHeader.cs b/src/SpatialLite.Osm/IO/Pbf/BlobHeader.cs index 9321d01..f1d2b96 100644 --- a/src/SpatialLite.Osm/IO/Pbf/BlobHeader.cs +++ b/src/SpatialLite.Osm/IO/Pbf/BlobHeader.cs @@ -1,32 +1,32 @@ -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represents header of the fileblock. - /// - [ProtoContract] - internal class BlobHeader { - - /// - /// Gets or sets type of the fileblock. - /// - /// - /// Supported values are 'OSMHeader' and 'OSMData'. - /// S - [ProtoMember(1, IsRequired = true, Name = "type")] - public string Type { get; set; } - - /// - /// Gets or sets an arbitrary blob that may include metadata about the following blob. For future use. - /// - [ProtoMember(2, IsRequired = false, Name = "indexdata")] - public byte[] IndexData { get; set; } - - /// - /// Gets or sets size of the subsequent Blob message. - /// - [ProtoMember(3, IsRequired = true, Name = "datasize")] - public int DataSize { get; set; } - - } -} +using ProtoBuf; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represents header of the fileblock. +/// +[ProtoContract] +internal class BlobHeader +{ + + /// + /// Gets or sets type of the fileblock. + /// + /// + /// Supported values are 'OSMHeader' and 'OSMData'. + /// S + [ProtoMember(1, IsRequired = true, Name = "type")] + public string Type { get; set; } + + /// + /// Gets or sets an arbitrary blob that may include metadata about the following blob. For future use. + /// + [ProtoMember(2, IsRequired = false, Name = "indexdata")] + public byte[] IndexData { get; set; } + + /// + /// Gets or sets size of the subsequent Blob message. + /// + [ProtoMember(3, IsRequired = true, Name = "datasize")] + public int DataSize { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs b/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs index 6b48752..5089545 100644 --- a/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs +++ b/src/SpatialLite.Osm/IO/Pbf/EntityInfoBuffer.cs @@ -1,152 +1,173 @@ -using System.Collections.Generic; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Stores entities to be written to output PBF. - /// - /// The type of entities to store. - internal class EntityInfoBuffer : IStringTableBuilder, IEnumerable where T : class, IEntityInfo { - - private List _storage = null; - private Dictionary _stringTable; - - private int _stringTableSize = 0; - private int _estimatedEntityDataSize = 0; - private bool _writeMetadata; - - /// - /// Initializes a new instance of the EntityInfoBuffer class. - /// - /// A value indicating whether writer is writing entity metadata (neccessary for size estimation). - public EntityInfoBuffer(bool writeMetadata) { - _storage = new List(10000); - _stringTable = new Dictionary(); - - _stringTableSize = 0; - _estimatedEntityDataSize = 0; - - _writeMetadata = writeMetadata; - - //add dummy value to the string table to get rid of 0 index - this.GetStringIndex(string.Empty); - } - - /// - /// Get maximal estimated size of data in buffer. - /// - /// - /// Actual size of the data should be smaller because proto buffer library compresess data. - /// - public int EstimatedMaxSize { - get { - return _estimatedEntityDataSize + _stringTableSize; - } - } - - /// - /// Gets number of entities in the buffer. - /// - public int Count { - get { - return _storage.Count; - } - } - - /// - /// Adds specific entity to buffer - /// - /// The entity to add - public void Add(T item) { - _storage.Add(item); - - foreach (var tag in item.Tags) { - this.GetStringIndex(tag.Key); - this.GetStringIndex(tag.Value); - - _estimatedEntityDataSize += 8; - } - - if (item.EntityType == EntityType.Node) { - _estimatedEntityDataSize += 3 * 8; - } - else if (item.EntityType == EntityType.Way) { - WayInfo wayItem = item as WayInfo; - _estimatedEntityDataSize += 8 + wayItem.Nodes.Count * 8; - } - else if (item.EntityType == EntityType.Relation) { - RelationInfo relationItem = item as RelationInfo; - _estimatedEntityDataSize += 8 + relationItem.Members.Count * 12; - } - - if (_writeMetadata) { - _estimatedEntityDataSize += 28; - } - } - - /// - /// Remove all data from buffer. - /// - public void Clear() { - _storage.Clear(); - _stringTable.Clear(); - - _estimatedEntityDataSize = 0; - _stringTableSize = 0; - - //add dummy value to the string table to get rid of 0 index - this.GetStringIndex(string.Empty); - } - - /// - /// Gets index of the string in StringTable being constructed. - /// - /// The string to locate in StringTable. - /// Index of the string in the StringTable. - public uint GetStringIndex(string str) { - if (_stringTable.ContainsKey(str)) { - return _stringTable[str]; - } - else { - uint index = (uint)_stringTable.Count; - _stringTable.Add(str, index); - _stringTableSize += str.Length; - - return index; - } - } - - /// - /// Creates a StringTable object with data from StringTable object. - /// - /// The StringTable object with data from the buffer. - public StringTable BuildStringTable() { - StringTable result = new StringTable(); - result.Storage = new List(_stringTable.Count); - for (int i = 0; i < _stringTable.Count; i++) { - result.Storage.Add(new byte[0]); - } - - foreach (var item in _stringTable) { - result[item.Value] = item.Key; - } - - return result; - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// A IEnumerator<T> that can be used to iterate through the collection. - public IEnumerator GetEnumerator() { - return _storage.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// A IEnumerator that can be used to iterate through the collection. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { - return _storage.GetEnumerator(); - } - } -} +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Stores entities to be written to output PBF. +/// +/// The type of entities to store. +internal class EntityInfoBuffer : IStringTableBuilder, IEnumerable where T : class, IEntityInfo +{ + + private readonly List _storage = null; + private readonly Dictionary _stringTable; + + private int _stringTableSize = 0; + private int _estimatedEntityDataSize = 0; + private readonly bool _writeMetadata; + + /// + /// Initializes a new instance of the EntityInfoBuffer class. + /// + /// A value indicating whether writer is writing entity metadata (neccessary for size estimation). + public EntityInfoBuffer(bool writeMetadata) + { + _storage = new List(10000); + _stringTable = new Dictionary(); + + _stringTableSize = 0; + _estimatedEntityDataSize = 0; + + _writeMetadata = writeMetadata; + + //add dummy value to the string table to get rid of 0 index + GetStringIndex(string.Empty); + } + + /// + /// Get maximal estimated size of data in buffer. + /// + /// + /// Actual size of the data should be smaller because proto buffer library compresess data. + /// + public int EstimatedMaxSize + { + get + { + return _estimatedEntityDataSize + _stringTableSize; + } + } + + /// + /// Gets number of entities in the buffer. + /// + public int Count + { + get + { + return _storage.Count; + } + } + + /// + /// Adds specific entity to buffer + /// + /// The entity to add + public void Add(T item) + { + _storage.Add(item); + + foreach (var tag in item.Tags) + { + GetStringIndex(tag.Key); + GetStringIndex(tag.Value); + + _estimatedEntityDataSize += 8; + } + + if (item.EntityType == EntityType.Node) + { + _estimatedEntityDataSize += 3 * 8; + } + else if (item.EntityType == EntityType.Way) + { + WayInfo wayItem = item as WayInfo; + _estimatedEntityDataSize += 8 + wayItem.Nodes.Count * 8; + } + else if (item.EntityType == EntityType.Relation) + { + RelationInfo relationItem = item as RelationInfo; + _estimatedEntityDataSize += 8 + relationItem.Members.Count * 12; + } + + if (_writeMetadata) + { + _estimatedEntityDataSize += 28; + } + } + + /// + /// Remove all data from buffer. + /// + public void Clear() + { + _storage.Clear(); + _stringTable.Clear(); + + _estimatedEntityDataSize = 0; + _stringTableSize = 0; + + //add dummy value to the string table to get rid of 0 index + GetStringIndex(string.Empty); + } + + /// + /// Gets index of the string in StringTable being constructed. + /// + /// The string to locate in StringTable. + /// Index of the string in the StringTable. + public uint GetStringIndex(string str) + { + if (_stringTable.TryGetValue(str, out uint value)) + { + return value; + } + else + { + uint index = (uint)_stringTable.Count; + _stringTable.Add(str, index); + _stringTableSize += str.Length; + + return index; + } + } + + /// + /// Creates a StringTable object with data from StringTable object. + /// + /// The StringTable object with data from the buffer. + public StringTable BuildStringTable() + { + StringTable result = new StringTable(); + result.Storage = new List(_stringTable.Count); + for (int i = 0; i < _stringTable.Count; i++) + { + result.Storage.Add(new byte[0]); + } + + foreach (var item in _stringTable) + { + result[item.Value] = item.Key; + } + + return result; + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// A IEnumerator<T> that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return _storage.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// A IEnumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return _storage.GetEnumerator(); + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/HeaderBBox.cs b/src/SpatialLite.Osm/IO/Pbf/HeaderBBox.cs index d4617e0..6b6dbec 100644 --- a/src/SpatialLite.Osm/IO/Pbf/HeaderBBox.cs +++ b/src/SpatialLite.Osm/IO/Pbf/HeaderBBox.cs @@ -1,35 +1,35 @@ -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represents rectangular envelope of data. - /// - [ProtoContract(Name = "HeaderBBox")] - internal class HeaderBBox { - - /// - /// Gets or sets Bootom boundary of the BBox. - /// - [ProtoMember(4, Name = "bottom", IsRequired = true, DataFormat = DataFormat.ZigZag)] - public long Bottom { get; set; } - - /// - /// Gets or sets Left boundary of the BBox. - /// - [ProtoMember(1, Name = "left", IsRequired = true, DataFormat = DataFormat.ZigZag)] - public long Left { get; set; } - - /// - /// Gets or sets Right boundary of the BBox. - /// - [ProtoMember(2, Name = "right", IsRequired = true, DataFormat = DataFormat.ZigZag)] - public long Right { get; set; } - - /// - /// Gets or sets Top boundary of the BBox. - /// - [ProtoMember(3, Name = "top", IsRequired = true, DataFormat = DataFormat.ZigZag)] - public long Top { get; set; } - - } -} +using ProtoBuf; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represents rectangular envelope of data. +/// +[ProtoContract(Name = "HeaderBBox")] +internal class HeaderBBox +{ + + /// + /// Gets or sets Bootom boundary of the BBox. + /// + [ProtoMember(4, Name = "bottom", IsRequired = true, DataFormat = DataFormat.ZigZag)] + public long Bottom { get; set; } + + /// + /// Gets or sets Left boundary of the BBox. + /// + [ProtoMember(1, Name = "left", IsRequired = true, DataFormat = DataFormat.ZigZag)] + public long Left { get; set; } + + /// + /// Gets or sets Right boundary of the BBox. + /// + [ProtoMember(2, Name = "right", IsRequired = true, DataFormat = DataFormat.ZigZag)] + public long Right { get; set; } + + /// + /// Gets or sets Top boundary of the BBox. + /// + [ProtoMember(3, Name = "top", IsRequired = true, DataFormat = DataFormat.ZigZag)] + public long Top { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/IStringTableBuilder.cs b/src/SpatialLite.Osm/IO/Pbf/IStringTableBuilder.cs index 3090bd1..ab55331 100644 --- a/src/SpatialLite.Osm/IO/Pbf/IStringTableBuilder.cs +++ b/src/SpatialLite.Osm/IO/Pbf/IStringTableBuilder.cs @@ -1,19 +1,20 @@ -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Defines function for object that can be used to build StringTables. - /// - internal interface IStringTableBuilder { - /// - /// Gets index of the string in StringTable being constructed. - /// - /// The string to locate in StringTable. - /// Index of the string in the StringTable. - uint GetStringIndex(string str); - - /// - /// Creates a StringTable object with data from StringTable object. - /// - /// The StringTable object with data from the IStringBuilder. - StringTable BuildStringTable(); - } -} +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Defines function for object that can be used to build StringTables. +/// +internal interface IStringTableBuilder +{ + /// + /// Gets index of the string in StringTable being constructed. + /// + /// The string to locate in StringTable. + /// Index of the string in the StringTable. + uint GetStringIndex(string str); + + /// + /// Creates a StringTable object with data from StringTable object. + /// + /// The StringTable object with data from the IStringBuilder. + StringTable BuildStringTable(); +} diff --git a/src/SpatialLite.Osm/IO/Pbf/OsmHeader.cs b/src/SpatialLite.Osm/IO/Pbf/OsmHeader.cs index 4e7da96..4825219 100644 --- a/src/SpatialLite.Osm/IO/Pbf/OsmHeader.cs +++ b/src/SpatialLite.Osm/IO/Pbf/OsmHeader.cs @@ -1,50 +1,52 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represents header message of the PBF file. - /// - [ProtoContract(Name = "HeaderBlock")] - internal class OsmHeader { - private IList _optionalFeatures = new List(); - private IList _requiredFeatures = new List(); - - /// - /// Gets or sets bounding box of the data in the file - /// - [ProtoMember(1, Name = "bbox", IsRequired = false)] - public HeaderBBox BBox { get; set; } - - /// - /// Gets or sets collection of optional features that parser could take advantege of - /// - [ProtoMember(5, Name = "optional_features")] - public IList OptionalFeatures { - get { return _optionalFeatures; } - set { _optionalFeatures = value; } - } - - /// - /// Gets or sets collection of required features that parser must suppor to process the file - /// - [ProtoMember(4, Name = "required_features")] - public IList RequiredFeatures { - get { return _requiredFeatures; } - set { _requiredFeatures = value; } - } - - /// - /// Gets or sets source of the data - /// - [ProtoMember(0x11, Name = "source", IsRequired = false)] - public string Source { get; set; } - - /// - /// Gets or sets identification of writing program - /// - [ProtoMember(0x10, Name = "writingprogram", IsRequired = false)] - public string WritingProgram { get; set; } - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represents header message of the PBF file. +/// +[ProtoContract(Name = "HeaderBlock")] +internal class OsmHeader +{ + private IList _optionalFeatures = new List(); + private IList _requiredFeatures = new List(); + + /// + /// Gets or sets bounding box of the data in the file + /// + [ProtoMember(1, Name = "bbox", IsRequired = false)] + public HeaderBBox BBox { get; set; } + + /// + /// Gets or sets collection of optional features that parser could take advantege of + /// + [ProtoMember(5, Name = "optional_features")] + public IList OptionalFeatures + { + get { return _optionalFeatures; } + set { _optionalFeatures = value; } + } + + /// + /// Gets or sets collection of required features that parser must suppor to process the file + /// + [ProtoMember(4, Name = "required_features")] + public IList RequiredFeatures + { + get { return _requiredFeatures; } + set { _requiredFeatures = value; } + } + + /// + /// Gets or sets source of the data + /// + [ProtoMember(0x11, Name = "source", IsRequired = false)] + public string Source { get; set; } + + /// + /// Gets or sets identification of writing program + /// + [ProtoMember(0x10, Name = "writingprogram", IsRequired = false)] + public string WritingProgram { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfChangeset.cs b/src/SpatialLite.Osm/IO/Pbf/PbfChangeset.cs index 3781b3c..1780864 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfChangeset.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfChangeset.cs @@ -1,17 +1,17 @@ -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for changesets. - /// - [ProtoContract(Name = "ChangeSet")] - public class PbfChangeset { - - /// - /// Gets or sets id of the changeset. - /// - [ProtoMember(1, IsRequired = true, Name = "id")] - public long ID { get; set; } - - } -} +using ProtoBuf; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for changesets. +/// +[ProtoContract(Name = "ChangeSet")] +public class PbfChangeset +{ + + /// + /// Gets or sets id of the changeset. + /// + [ProtoMember(1, IsRequired = true, Name = "id")] + public long ID { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfDenseMetadata.cs b/src/SpatialLite.Osm/IO/Pbf/PbfDenseMetadata.cs index 18d40dd..525b418 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfDenseMetadata.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfDenseMetadata.cs @@ -1,100 +1,108 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for metadata in dense format. - /// - [ProtoContract(Name = "DenseInfo")] - internal class PbfDenseMetadata { - private IList _changeset = new List(); - private IList _timestamp = new List(); - private IList _userId = new List(); - private IList _userNameIndex = new List(); - private IList _version = new List(); - private IList _visible = new List(); - - /// - /// Initializes a new instance of the DenseInfo class with internal fields initialized to default capacity. - /// - public PbfDenseMetadata() { - _changeset = new List(); - _timestamp = new List(); - _userId = new List(); - _userNameIndex = new List(); - _version = new List(); - _visible = new List(); - } - - /// - /// Initializes a new instance of the DenseInfo class with internal fields initialized to specified capacity. - /// - /// The desired capacity of internal fields. - public PbfDenseMetadata(int capacity) { - _changeset = new List(capacity); - _timestamp = new List(capacity); - _userId = new List(capacity); - _userNameIndex = new List(capacity); - _version = new List(capacity); - _visible = new List(capacity); - } - - /// - /// Gets or sets changeset id for corresponding node in DenseNodes. Property is delta encoded. - /// - [ProtoMember(3, Name = "changeset", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] - public IList Changeset { - get { return _changeset; } - set { _changeset = value; } - } - - /// - /// Gets or sets timestamp as number of DateGranularity from UNIX 1970 epoch for the corresponding node in DenseNodes. Property is delta encoded. - /// - /// - /// DateTime LastChange = _unixEpoch.AddMilliseconds(timestamp * block.DateGranularity). - /// - [ProtoMember(2, Name = "timestamp", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] - public IList Timestamp { - get { return _timestamp; } - set { _timestamp = value; } - } - - /// - /// Gets or sets UserId for corresponding node in DenseNodes. Property is delta encoded. - /// - [ProtoMember(4, Name = "uid", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] - public IList UserId { - get { return _userId; } - set { _userId = value; } - } - - /// - /// Gets or sets index of the UserName in StringTable for corresponding node in DenseNodes. Property is delta encoded. - /// - [ProtoMember(5, Name = "user_sid", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] - public IList UserNameIndex { - get { return _userNameIndex; } - set { _userNameIndex = value; } - } - - /// - /// Gets or sets version of the corresponding node in DenseNodes. - /// - [ProtoMember(1, Name = "version", Options = MemberSerializationOptions.Packed)] - public IList Version { - get { return _version; } - set { _version = value; } - } - - /// - /// Gets or sets visible attribute for corresponding node in DenseNodes. - /// - [ProtoMember(6, Name = "visible", Options = MemberSerializationOptions.Packed)] - public IList Visible { - get { return _visible; } - set { _visible = value; } - } - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for metadata in dense format. +/// +[ProtoContract(Name = "DenseInfo")] +internal class PbfDenseMetadata +{ + private IList _changeset = new List(); + private IList _timestamp = new List(); + private IList _userId = new List(); + private IList _userNameIndex = new List(); + private IList _version = new List(); + private IList _visible = new List(); + + /// + /// Initializes a new instance of the DenseInfo class with internal fields initialized to default capacity. + /// + public PbfDenseMetadata() + { + _changeset = new List(); + _timestamp = new List(); + _userId = new List(); + _userNameIndex = new List(); + _version = new List(); + _visible = new List(); + } + + /// + /// Initializes a new instance of the DenseInfo class with internal fields initialized to specified capacity. + /// + /// The desired capacity of internal fields. + public PbfDenseMetadata(int capacity) + { + _changeset = new List(capacity); + _timestamp = new List(capacity); + _userId = new List(capacity); + _userNameIndex = new List(capacity); + _version = new List(capacity); + _visible = new List(capacity); + } + + /// + /// Gets or sets changeset id for corresponding node in DenseNodes. Property is delta encoded. + /// + [ProtoMember(3, Name = "changeset", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] + public IList Changeset + { + get { return _changeset; } + set { _changeset = value; } + } + + /// + /// Gets or sets timestamp as number of DateGranularity from UNIX 1970 epoch for the corresponding node in DenseNodes. Property is delta encoded. + /// + /// + /// DateTime LastChange = _unixEpoch.AddMilliseconds(timestamp * block.DateGranularity). + /// + [ProtoMember(2, Name = "timestamp", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] + public IList Timestamp + { + get { return _timestamp; } + set { _timestamp = value; } + } + + /// + /// Gets or sets UserId for corresponding node in DenseNodes. Property is delta encoded. + /// + [ProtoMember(4, Name = "uid", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] + public IList UserId + { + get { return _userId; } + set { _userId = value; } + } + + /// + /// Gets or sets index of the UserName in StringTable for corresponding node in DenseNodes. Property is delta encoded. + /// + [ProtoMember(5, Name = "user_sid", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] + public IList UserNameIndex + { + get { return _userNameIndex; } + set { _userNameIndex = value; } + } + + /// + /// Gets or sets version of the corresponding node in DenseNodes. + /// + [ProtoMember(1, Name = "version", Options = MemberSerializationOptions.Packed)] + public IList Version + { + get { return _version; } + set { _version = value; } + } + + /// + /// Gets or sets visible attribute for corresponding node in DenseNodes. + /// + [ProtoMember(6, Name = "visible", Options = MemberSerializationOptions.Packed)] + public IList Visible + { + get { return _visible; } + set { _visible = value; } + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfDenseNodes.cs b/src/SpatialLite.Osm/IO/Pbf/PbfDenseNodes.cs index 5769501..099b05d 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfDenseNodes.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfDenseNodes.cs @@ -1,89 +1,95 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for nodes saved in dense format. - /// - [ProtoContract(Name = "DenseNodes")] - internal class PbfDenseNodes { - - private IList _id = null; - private IList _latitude = null; - private IList _longitude = null; - private IList _keysVals = null; - - /// - /// Initializes a new instance of the DenseNodes class with internal fields initialized to default capacity. - /// - public PbfDenseNodes() { - _id = new List(); - _latitude = new List(); - _longitude = new List(); - _keysVals = new List(); - } - - /// - /// Initializes a new instance of the DenseInfo class with internal fields initialized to specified capacity. - /// - /// The desired capacity of internal fields. - public PbfDenseNodes(int capacity) { - _id = new List(capacity); - _latitude = new List(capacity); - _longitude = new List(capacity); - _keysVals = new List(capacity); - } - - /// - /// Gets or sets ids of the nodes. This property is delta encoded. - /// - [ProtoMember(1, Name = "id", IsRequired = true, DataFormat = DataFormat.ZigZag, Options = MemberSerializationOptions.Packed)] - public IList Id { - get { return _id; } - set { _id = value; } - } - - /// - /// Gets or sets latitudes of the nodes as number of granularity steps from the LatOffset. This property is delta encoded. - /// - /// - /// double nodeLat = 1E-09 * (block.LatOffset + (block.Granularity * Latitude)); - /// - [ProtoMember(8, Name = "lat", IsRequired = true, DataFormat = DataFormat.ZigZag, Options = MemberSerializationOptions.Packed)] - public IList Latitude { - get { return _latitude; } - set { _latitude = value; } - } - - /// - /// Gets or sets longitude of the nodes as number of granularity steps from the LonOffset. This property is delta encoded. - /// - /// - /// double nodeLon = 1E-09 * (block.LonOffset + (block.Granularity * Longitude)); - /// - [ProtoMember(9, Name = "lon", IsRequired = true, DataFormat = DataFormat.ZigZag, Options = MemberSerializationOptions.Packed)] - public IList Longitude { - get { return _longitude; } - set { _longitude = value; } - } - - /// - /// Gets or sets entities metadata encoded in the DenseInfo object - /// - [ProtoMember(5, Name = "denseinfo", IsRequired = false)] - public PbfDenseMetadata DenseInfo { get; set; } - - /// - /// Gets or sets tags for nodes. - /// - /// - /// Tags are saved as (KeyIndex, ValueIndex) pairs. Tags for concesutive nodes are seprated by 0. - /// - [ProtoMember(10, Name = "keys_vals", Options = MemberSerializationOptions.Packed)] - public IList KeysVals { - get { return _keysVals; } - set { _keysVals = value; } - } - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for nodes saved in dense format. +/// +[ProtoContract(Name = "DenseNodes")] +internal class PbfDenseNodes +{ + + private IList _id = null; + private IList _latitude = null; + private IList _longitude = null; + private IList _keysVals = null; + + /// + /// Initializes a new instance of the DenseNodes class with internal fields initialized to default capacity. + /// + public PbfDenseNodes() + { + _id = new List(); + _latitude = new List(); + _longitude = new List(); + _keysVals = new List(); + } + + /// + /// Initializes a new instance of the DenseInfo class with internal fields initialized to specified capacity. + /// + /// The desired capacity of internal fields. + public PbfDenseNodes(int capacity) + { + _id = new List(capacity); + _latitude = new List(capacity); + _longitude = new List(capacity); + _keysVals = new List(capacity); + } + + /// + /// Gets or sets ids of the nodes. This property is delta encoded. + /// + [ProtoMember(1, Name = "id", IsRequired = true, DataFormat = DataFormat.ZigZag, Options = MemberSerializationOptions.Packed)] + public IList Id + { + get { return _id; } + set { _id = value; } + } + + /// + /// Gets or sets latitudes of the nodes as number of granularity steps from the LatOffset. This property is delta encoded. + /// + /// + /// double nodeLat = 1E-09 * (block.LatOffset + (block.Granularity * Latitude)); + /// + [ProtoMember(8, Name = "lat", IsRequired = true, DataFormat = DataFormat.ZigZag, Options = MemberSerializationOptions.Packed)] + public IList Latitude + { + get { return _latitude; } + set { _latitude = value; } + } + + /// + /// Gets or sets longitude of the nodes as number of granularity steps from the LonOffset. This property is delta encoded. + /// + /// + /// double nodeLon = 1E-09 * (block.LonOffset + (block.Granularity * Longitude)); + /// + [ProtoMember(9, Name = "lon", IsRequired = true, DataFormat = DataFormat.ZigZag, Options = MemberSerializationOptions.Packed)] + public IList Longitude + { + get { return _longitude; } + set { _longitude = value; } + } + + /// + /// Gets or sets entities metadata encoded in the DenseInfo object + /// + [ProtoMember(5, Name = "denseinfo", IsRequired = false)] + public PbfDenseMetadata DenseInfo { get; set; } + + /// + /// Gets or sets tags for nodes. + /// + /// + /// Tags are saved as (KeyIndex, ValueIndex) pairs. Tags for concesutive nodes are seprated by 0. + /// + [ProtoMember(10, Name = "keys_vals", Options = MemberSerializationOptions.Packed)] + public IList KeysVals + { + get { return _keysVals; } + set { _keysVals = value; } + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfMetadata.cs b/src/SpatialLite.Osm/IO/Pbf/PbfMetadata.cs index 2f3160c..3a7b4bf 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfMetadata.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfMetadata.cs @@ -1,41 +1,41 @@ -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for Entity metadata. - /// - [ProtoContract(Name = "Info")] - internal class PbfMetadata { - - /// - /// Gets or sets changeset ID. - /// - [ProtoMember(3, Name = "changeset", IsRequired = false)] - public long? Changeset { get; set; } - - /// - /// Gets or sets Timestamp. - /// - [ProtoMember(2, Name = "timestamp", IsRequired = false)] - public long? Timestamp { get; set; } - - /// - /// Gets or sets UserID. - /// - [ProtoMember(4, Name = "uid", IsRequired = false)] - public int? UserID { get; set; } - - /// - /// Gets or sets index of the username in string table. - /// - [ProtoMember(5, Name = "user_sid", IsRequired = false)] - public int? UserNameIndex { get; set; } - - /// - /// Gets or sets version of the entity. - /// - [ProtoMember(1, Name = "version", IsRequired = false)] - public int? Version { get; set; } - - } -} +using ProtoBuf; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for Entity metadata. +/// +[ProtoContract(Name = "Info")] +internal class PbfMetadata +{ + + /// + /// Gets or sets changeset ID. + /// + [ProtoMember(3, Name = "changeset", IsRequired = false)] + public long? Changeset { get; set; } + + /// + /// Gets or sets Timestamp. + /// + [ProtoMember(2, Name = "timestamp", IsRequired = false)] + public long? Timestamp { get; set; } + + /// + /// Gets or sets UserID. + /// + [ProtoMember(4, Name = "uid", IsRequired = false)] + public int? UserID { get; set; } + + /// + /// Gets or sets index of the username in string table. + /// + [ProtoMember(5, Name = "user_sid", IsRequired = false)] + public int? UserNameIndex { get; set; } + + /// + /// Gets or sets version of the entity. + /// + [ProtoMember(1, Name = "version", IsRequired = false)] + public int? Version { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfNode.cs b/src/SpatialLite.Osm/IO/Pbf/PbfNode.cs index ad9fd2c..b8ca5c9 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfNode.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfNode.cs @@ -1,49 +1,48 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for nodes. - /// - [ProtoContract(Name = "Node")] - internal class PbfNode { - - /// - /// Gets or sets ID of the node. - /// - [ProtoMember(1, IsRequired = true, Name = "id", DataFormat = DataFormat.ZigZag)] - public long ID { get; set; } - - /// - /// Gets or sets indexes of tag's keys in string table. - /// - [ProtoMember(2, Name = "keys", Options = MemberSerializationOptions.Packed)] - public List Keys { get; set; } - - /// - /// Gets or sets indexes of tag's values in string table. - /// - [ProtoMember(3, Name = "vals", Options = MemberSerializationOptions.Packed)] - public List Values { get; set; } - - /// - /// Gets or sets entity metadata. - /// - [ProtoMember(4, IsRequired = false, Name = "info")] - public PbfMetadata Metadata { get; set; } - - /// - /// Gets or sets Latitude of the node as number of granularity steps from LatOffset. - /// - [ProtoMember(8, IsRequired = true, Name = "lat", DataFormat = DataFormat.ZigZag)] - public long Latitude { get; set; } - - /// - /// Gets or sets Longitude of the node as number of granularity steps from LonOffset. - /// - [ProtoMember(9, IsRequired = true, Name = "lon", DataFormat = DataFormat.ZigZag)] - public long Longitude { get; set; } - - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for nodes. +/// +[ProtoContract(Name = "Node")] +internal class PbfNode +{ + + /// + /// Gets or sets ID of the node. + /// + [ProtoMember(1, IsRequired = true, Name = "id", DataFormat = DataFormat.ZigZag)] + public long ID { get; set; } + + /// + /// Gets or sets indexes of tag's keys in string table. + /// + [ProtoMember(2, Name = "keys", Options = MemberSerializationOptions.Packed)] + public List Keys { get; set; } + + /// + /// Gets or sets indexes of tag's values in string table. + /// + [ProtoMember(3, Name = "vals", Options = MemberSerializationOptions.Packed)] + public List Values { get; set; } + + /// + /// Gets or sets entity metadata. + /// + [ProtoMember(4, IsRequired = false, Name = "info")] + public PbfMetadata Metadata { get; set; } + + /// + /// Gets or sets Latitude of the node as number of granularity steps from LatOffset. + /// + [ProtoMember(8, IsRequired = true, Name = "lat", DataFormat = DataFormat.ZigZag)] + public long Latitude { get; set; } + + /// + /// Gets or sets Longitude of the node as number of granularity steps from LonOffset. + /// + [ProtoMember(9, IsRequired = true, Name = "lon", DataFormat = DataFormat.ZigZag)] + public long Longitude { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfRelation.cs b/src/SpatialLite.Osm/IO/Pbf/PbfRelation.cs index 5201ca8..8b08401 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfRelation.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfRelation.cs @@ -1,86 +1,91 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for relations. - /// - [ProtoContract(Name = "Relation")] - internal class PbfRelation { - - private IList _memberIds = null; - private IList _rolesIndexes = null; - private IList _types = null; - - /// - /// Initializes a new instance of the PbfRelation class with internal fields initialized to default capacity. - /// - public PbfRelation() { - _memberIds = new List(); - _rolesIndexes = new List(); - _types = new List(); - } - - /// - /// Initializes a new instance of the PbfRelation class with internal fields initialized to specified capacity. - /// - /// The desired capacity of internal fields. - public PbfRelation(int capacity) { - _memberIds = new List(capacity); - _rolesIndexes = new List(capacity); - _types = new List(capacity); - } - - /// - /// Gets or sets ID of the relation. - /// - [ProtoMember(1, Name = "id", IsRequired = true)] - public long ID { get; set; } - - /// - /// Gets or sets relation metadata. - /// - [ProtoMember(4, Name = "info", IsRequired = false)] - public PbfMetadata Metadata { get; set; } - - /// - /// Gets or sets indexes of tag's keys in string table. - /// - [ProtoMember(2, Name = "keys", Options = MemberSerializationOptions.Packed)] - public IList Keys { get; set; } - - /// - /// Gets or sets indexes of tag's values in string table. - /// - [ProtoMember(3, Name = "vals", Options = MemberSerializationOptions.Packed)] - public IList Values { get; set; } - - /// - /// Gets or sets IDs of the relation members. This propeerty is delta encoded. - /// - [ProtoMember(9, Name = "memids", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] - public IList MemberIds { - get { return _memberIds; } - set { _memberIds = value; } - } - - /// - /// Gets or sets index of the role in string table for appropriate members. - /// - [ProtoMember(8, Name = "roles_sid", Options = MemberSerializationOptions.Packed)] - public IList RolesIndexes { - get { return _rolesIndexes; } - set { _rolesIndexes = value; } - } - - /// - /// Gets or sets type of the relation members. - /// - [ProtoMember(10, Name = "types", Options = MemberSerializationOptions.Packed)] - public IList Types { - get { return _types; } - set { _types = value; } - } - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for relations. +/// +[ProtoContract(Name = "Relation")] +internal class PbfRelation +{ + + private IList _memberIds = null; + private IList _rolesIndexes = null; + private IList _types = null; + + /// + /// Initializes a new instance of the PbfRelation class with internal fields initialized to default capacity. + /// + public PbfRelation() + { + _memberIds = new List(); + _rolesIndexes = new List(); + _types = new List(); + } + + /// + /// Initializes a new instance of the PbfRelation class with internal fields initialized to specified capacity. + /// + /// The desired capacity of internal fields. + public PbfRelation(int capacity) + { + _memberIds = new List(capacity); + _rolesIndexes = new List(capacity); + _types = new List(capacity); + } + + /// + /// Gets or sets ID of the relation. + /// + [ProtoMember(1, Name = "id", IsRequired = true)] + public long ID { get; set; } + + /// + /// Gets or sets relation metadata. + /// + [ProtoMember(4, Name = "info", IsRequired = false)] + public PbfMetadata Metadata { get; set; } + + /// + /// Gets or sets indexes of tag's keys in string table. + /// + [ProtoMember(2, Name = "keys", Options = MemberSerializationOptions.Packed)] + public IList Keys { get; set; } + + /// + /// Gets or sets indexes of tag's values in string table. + /// + [ProtoMember(3, Name = "vals", Options = MemberSerializationOptions.Packed)] + public IList Values { get; set; } + + /// + /// Gets or sets IDs of the relation members. This propeerty is delta encoded. + /// + [ProtoMember(9, Name = "memids", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] + public IList MemberIds + { + get { return _memberIds; } + set { _memberIds = value; } + } + + /// + /// Gets or sets index of the role in string table for appropriate members. + /// + [ProtoMember(8, Name = "roles_sid", Options = MemberSerializationOptions.Packed)] + public IList RolesIndexes + { + get { return _rolesIndexes; } + set { _rolesIndexes = value; } + } + + /// + /// Gets or sets type of the relation members. + /// + [ProtoMember(10, Name = "types", Options = MemberSerializationOptions.Packed)] + public IList Types + { + get { return _types; } + set { _types = value; } + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfRelationMemberType.cs b/src/SpatialLite.Osm/IO/Pbf/PbfRelationMemberType.cs index 61b9564..653988d 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfRelationMemberType.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfRelationMemberType.cs @@ -1,19 +1,20 @@ -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Defines possible types of the relation member. - /// - public enum PbfRelationMemberType { - /// - /// Relation member is Node. - /// - Node, - /// - /// Relation member is Way. - /// - Way, - /// - /// Relation member is Relation. - /// - Relation - } -} +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Defines possible types of the relation member. +/// +public enum PbfRelationMemberType +{ + /// + /// Relation member is Node. + /// + Node, + /// + /// Relation member is Way. + /// + Way, + /// + /// Relation member is Relation. + /// + Relation +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PbfWay.cs b/src/SpatialLite.Osm/IO/Pbf/PbfWay.cs index 1b8d028..17c43ac 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PbfWay.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PbfWay.cs @@ -1,62 +1,65 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represetns data transfer object used by PBF serializer for Ways. - /// - [ ProtoContract(Name = "Way")] - internal class PbfWay { - - private IList _refs = null; - - /// - /// Initializes a new instance of the PbfWay class with internal fields initialized to default capacity. - /// - public PbfWay() { - _refs = new List(); - } - - /// - /// Initializes a new instance of the PbfWay class with internal fields initialized to specified capacity. - /// - /// The desired capacity of internal fields. - public PbfWay(int capacity) { - _refs = new List(capacity); - } - - /// - /// Gets or sets ID of the way. - /// - [ProtoMember(1, Name = "id", IsRequired = true)] - public long ID { get; set; } - - /// - /// Gets or sets indexes of tag's keys in string table. - /// - [ProtoMember(2, Name = "keys", Options = MemberSerializationOptions.Packed)] - public IList Keys { get; set; } - - /// - /// Gets or sets indexes of tag's values in string table. - /// - [ProtoMember(3, Name = "vals", Options = MemberSerializationOptions.Packed)] - public IList Values { get; set; } - - /// - /// Gets or sets entity metadata . - /// - [ProtoMember(4, Name = "info", IsRequired = false)] - public PbfMetadata Metadata { get; set; } - - /// - /// Gets or sets IDs of nodes referenced by the way. This property is delta encoded. - /// - [ProtoMember(8, Name = "refs", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] - public IList Refs { - get { return _refs; } - set { _refs = value; } - } - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represetns data transfer object used by PBF serializer for Ways. +/// +[ProtoContract(Name = "Way")] +internal class PbfWay +{ + + private IList _refs = null; + + /// + /// Initializes a new instance of the PbfWay class with internal fields initialized to default capacity. + /// + public PbfWay() + { + _refs = new List(); + } + + /// + /// Initializes a new instance of the PbfWay class with internal fields initialized to specified capacity. + /// + /// The desired capacity of internal fields. + public PbfWay(int capacity) + { + _refs = new List(capacity); + } + + /// + /// Gets or sets ID of the way. + /// + [ProtoMember(1, Name = "id", IsRequired = true)] + public long ID { get; set; } + + /// + /// Gets or sets indexes of tag's keys in string table. + /// + [ProtoMember(2, Name = "keys", Options = MemberSerializationOptions.Packed)] + public IList Keys { get; set; } + + /// + /// Gets or sets indexes of tag's values in string table. + /// + [ProtoMember(3, Name = "vals", Options = MemberSerializationOptions.Packed)] + public IList Values { get; set; } + + /// + /// Gets or sets entity metadata . + /// + [ProtoMember(4, Name = "info", IsRequired = false)] + public PbfMetadata Metadata { get; set; } + + /// + /// Gets or sets IDs of nodes referenced by the way. This property is delta encoded. + /// + [ProtoMember(8, Name = "refs", Options = MemberSerializationOptions.Packed, DataFormat = DataFormat.ZigZag)] + public IList Refs + { + get { return _refs; } + set { _refs = value; } + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PrimitiveBlock.cs b/src/SpatialLite.Osm/IO/Pbf/PrimitiveBlock.cs index 4e664ee..f10ff30 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PrimitiveBlock.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PrimitiveBlock.cs @@ -1,57 +1,59 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represents content of the fileblock's data stream. - /// - [ProtoContract(Name = "PrimitiveBlock")] - internal class PrimitiveBlock { - - private int _granularity = 100; - private int _date_granularity = 1000; - - /// - /// Gets or sets StringTable with all strings used in the block. - /// - [ProtoMember(1, IsRequired = true, Name = "stringtable")] - public StringTable StringTable { get; set; } - - /// - /// Gets or sets PrimitiveGroup object with OSM entities. - /// - [ProtoMember(2, Name = "primitivegroup")] - public List PrimitiveGroup { get; set; } - - /// - /// Gets or sets granularity of the position data. Default value is 1000. - /// - [ProtoMember(16, IsRequired = false, Name = "granularity")] - public int Granularity { - get { return _granularity; } - set { _granularity = value; } - } - - /// - /// Gets or sets latitude offset. - /// - [ProtoMember(19, IsRequired = false, Name = "lat_offset")] - public long LatOffset { get; set; } - - /// - /// Gets or sets longitude offset. - /// - [ProtoMember(20, IsRequired = false, Name = "lon_offset")] - public long LonOffset { get; set; } - - /// - /// Gets or sets granularity of the DateTime data. Default value is 100. - /// - [ProtoMember(18, IsRequired = false, Name = "date_granularity")] - public int DateGranularity { - get { return _date_granularity; } - set { _date_granularity = value; } - } - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represents content of the fileblock's data stream. +/// +[ProtoContract(Name = "PrimitiveBlock")] +internal class PrimitiveBlock +{ + + private int _granularity = 100; + private int _date_granularity = 1000; + + /// + /// Gets or sets StringTable with all strings used in the block. + /// + [ProtoMember(1, IsRequired = true, Name = "stringtable")] + public StringTable StringTable { get; set; } + + /// + /// Gets or sets PrimitiveGroup object with OSM entities. + /// + [ProtoMember(2, Name = "primitivegroup")] + public List PrimitiveGroup { get; set; } + + /// + /// Gets or sets granularity of the position data. Default value is 1000. + /// + [ProtoMember(16, IsRequired = false, Name = "granularity")] + public int Granularity + { + get { return _granularity; } + set { _granularity = value; } + } + + /// + /// Gets or sets latitude offset. + /// + [ProtoMember(19, IsRequired = false, Name = "lat_offset")] + public long LatOffset { get; set; } + + /// + /// Gets or sets longitude offset. + /// + [ProtoMember(20, IsRequired = false, Name = "lon_offset")] + public long LonOffset { get; set; } + + /// + /// Gets or sets granularity of the DateTime data. Default value is 100. + /// + [ProtoMember(18, IsRequired = false, Name = "date_granularity")] + public int DateGranularity + { + get { return _date_granularity; } + set { _date_granularity = value; } + } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/PrimitiveGroup.cs b/src/SpatialLite.Osm/IO/Pbf/PrimitiveGroup.cs index 94af545..3c46fac 100644 --- a/src/SpatialLite.Osm/IO/Pbf/PrimitiveGroup.cs +++ b/src/SpatialLite.Osm/IO/Pbf/PrimitiveGroup.cs @@ -1,43 +1,42 @@ -using System.Collections.Generic; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Represents container for PBF data transfer objects for OSM entities. - /// - [ProtoContract(Name = "PrimitiveGroup")] - internal class PrimitiveGroup { - - /// - /// Gets or sets collection of nodes. - /// - [ProtoMember(1, Name = "nodes")] - public List Nodes { get; set; } - - /// - /// Gets or sets collection of nodes serialized in dense format. - /// - [ProtoMember(2, IsRequired = false, Name = "dense")] - public PbfDenseNodes DenseNodes { get; set; } - - /// - /// Gets or sets collection of way. - /// - [ProtoMember(3, Name = "ways")] - public List Ways { get; set; } - - /// - /// Gets or sets collection of relations. - /// - [ProtoMember(4, Name = "relations")] - public List Relations { get; set; } - - /// - /// Gets or sets collection of changesets. - /// - [ProtoMember(5, Name = "changesets")] - public List Changesets { get; set; } - - } -} +using ProtoBuf; +using System.Collections.Generic; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Represents container for PBF data transfer objects for OSM entities. +/// +[ProtoContract(Name = "PrimitiveGroup")] +internal class PrimitiveGroup +{ + + /// + /// Gets or sets collection of nodes. + /// + [ProtoMember(1, Name = "nodes")] + public List Nodes { get; set; } + + /// + /// Gets or sets collection of nodes serialized in dense format. + /// + [ProtoMember(2, IsRequired = false, Name = "dense")] + public PbfDenseNodes DenseNodes { get; set; } + + /// + /// Gets or sets collection of way. + /// + [ProtoMember(3, Name = "ways")] + public List Ways { get; set; } + + /// + /// Gets or sets collection of relations. + /// + [ProtoMember(4, Name = "relations")] + public List Relations { get; set; } + + /// + /// Gets or sets collection of changesets. + /// + [ProtoMember(5, Name = "changesets")] + public List Changesets { get; set; } +} diff --git a/src/SpatialLite.Osm/IO/Pbf/StringTable.cs b/src/SpatialLite.Osm/IO/Pbf/StringTable.cs index 0650961..2e6d743 100644 --- a/src/SpatialLite.Osm/IO/Pbf/StringTable.cs +++ b/src/SpatialLite.Osm/IO/Pbf/StringTable.cs @@ -1,63 +1,72 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using ProtoBuf; - -namespace SpatialLite.Osm.IO.Pbf { - /// - /// Stores all strings for Primitive block. - /// - [ProtoContract(Name = "StringTable")] - public class StringTable { - - private List _s = new List(); - - /// - /// Gets or sets collection of strings serialized as byte array. - /// - [ProtoMember(1, Name = "s", DataFormat = DataFormat.Default)] - public List Storage { - get { return _s; } - set { _s = value; } - } - - /// - /// Gets or sets string at specified position. - /// - /// The index of the string. - /// string at specified position. - [ProtoIgnore] - public string this[int index] { - get { - if (index >= this.Storage.Count) { - throw new ArgumentOutOfRangeException("index"); - } - - return Encoding.UTF8.GetString(this.Storage[index], 0, this.Storage[index].Length); - } - set { - if (index >= this.Storage.Count) { - throw new ArgumentOutOfRangeException("index"); - } - - this.Storage[index] = Encoding.UTF8.GetBytes(value); - } - } - - /// - /// Gets or sets string at specified position. - /// - /// The index of the string. - /// string at specified position. - [ProtoIgnore] - public string this[uint index] { - get { - return this[(int)index]; - } - set { - this[(int)index] = value; - } - } - } -} +using ProtoBuf; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SpatialLite.Osm.IO.Pbf; + +/// +/// Stores all strings for Primitive block. +/// +[ProtoContract(Name = "StringTable")] +public class StringTable +{ + + private List _s = new List(); + + /// + /// Gets or sets collection of strings serialized as byte array. + /// + [ProtoMember(1, Name = "s", DataFormat = DataFormat.Default)] + public List Storage + { + get { return _s; } + set { _s = value; } + } + + /// + /// Gets or sets string at specified position. + /// + /// The index of the string. + /// string at specified position. + [ProtoIgnore] + public string this[int index] + { + get + { + if (index >= Storage.Count) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + return Encoding.UTF8.GetString(Storage[index], 0, Storage[index].Length); + } + set + { + if (index >= Storage.Count) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + Storage[index] = Encoding.UTF8.GetBytes(value); + } + } + + /// + /// Gets or sets string at specified position. + /// + /// The index of the string. + /// string at specified position. + [ProtoIgnore] + public string this[uint index] + { + get + { + return this[(int)index]; + } + set + { + this[(int)index] = value; + } + } +} diff --git a/src/SpatialLite.Osm/IO/PbfReader.cs b/src/SpatialLite.Osm/IO/PbfReader.cs index 1f23dd6..f0f38cf 100644 --- a/src/SpatialLite.Osm/IO/PbfReader.cs +++ b/src/SpatialLite.Osm/IO/PbfReader.cs @@ -1,438 +1,528 @@ -using System; +using ProtoBuf; +using SpatialLite.Osm.IO.Pbf; +using System; using System.Collections.Generic; -using System.Linq; using System.IO; -using ProtoBuf; -using SpatialLite.Osm.IO.Pbf; +using System.Linq; + +namespace SpatialLite.Osm.IO; + +/// +/// Represents IOsmReader that can read OSM entities from PBF format. +/// +public class PbfReader : IOsmReader +{ -namespace SpatialLite.Osm.IO { /// - /// Represents IOsmReader that can read OSM entities from PBF format. + /// Defines maximal allowed size of uncompressed OsmData block. Larger blocks are considered invalid. /// - public class PbfReader : IOsmReader { - - /// - /// Defines maximal allowed size of uncompressed OsmData block. Larger blocks are considered invalid. - /// - public const int MaxDataBlockSize = 32 * 1024 * 1024; - - /// - /// Defines maximal allowed size of uncopressed OsmHeader block. Larger blocks are considered invalid. - /// - public const int MaxHeaderBlockSize = 64 * 1024; - - private bool _disposed = false; - private Stream _input; - private Queue _cache; - private DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0); - - /// - /// Initializes a new instance of the PbfReader class that read data form specified stream. - /// - /// The input stream. - /// The OsmReaderSettings object that determines behaviour of PbfReader. - public PbfReader(Stream input, OsmReaderSettings settings) { - _input = input; - _cache = new Queue(); - - this.Settings = settings; - this.Settings.IsReadOnly = true; - - BlobHeader blobHeader = null; - while ((blobHeader = this.ReadBlobHeader()) != null) { - try { - if (blobHeader.Type == "OSMHeader") { - OsmHeader osmHeader = (OsmHeader)this.ReadBlob(blobHeader); - this.ProcessOsmHeader(osmHeader); - return; - } else if (blobHeader.Type == "OSMData") { - throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block before 'OSMData' block."); - } else { - _input.Seek(blobHeader.DataSize, SeekOrigin.Current); - } - } catch (ProtoException ex) { - throw new InvalidDataException("Input stream contains unsupported data", ex); + public const int MaxDataBlockSize = 32 * 1024 * 1024; + + /// + /// Defines maximal allowed size of uncopressed OsmHeader block. Larger blocks are considered invalid. + /// + public const int MaxHeaderBlockSize = 64 * 1024; + + private bool _disposed = false; + private readonly Stream _input; + private readonly Queue _cache; + private readonly DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0); + + /// + /// Initializes a new instance of the PbfReader class that read data form specified stream. + /// + /// The input stream. + /// The OsmReaderSettings object that determines behaviour of PbfReader. + public PbfReader(Stream input, OsmReaderSettings settings) + { + _input = input; + _cache = new Queue(); + + Settings = settings; + Settings.IsReadOnly = true; + + BlobHeader blobHeader; + while ((blobHeader = ReadBlobHeader()) != null) + { + try + { + if (blobHeader.Type == "OSMHeader") + { + OsmHeader osmHeader = (OsmHeader)ReadBlob(blobHeader); + ProcessOsmHeader(osmHeader); + return; + } + else if (blobHeader.Type == "OSMData") + { + throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block before 'OSMData' block."); + } + else + { + _input.Seek(blobHeader.DataSize, SeekOrigin.Current); } } - - throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block."); + catch (ProtoException ex) + { + throw new InvalidDataException("Input stream contains unsupported data", ex); + } } - /// - /// Initializes a new instance of the PbfReader class that read data form specified file. - /// - /// The path to the input file. - /// The OsmReaderSettings object that determines behaviour of PbfReader. - public PbfReader(string path, OsmReaderSettings settings) { - _input = new FileStream(path, FileMode.Open, FileAccess.Read); - _cache = new Queue(); - - this.Settings = settings; - this.Settings.IsReadOnly = true; - - BlobHeader blobHeader = null; - while ((blobHeader = this.ReadBlobHeader()) != null) { - try { - if (blobHeader.Type == "OSMHeader") { - OsmHeader osmHeader = (OsmHeader)this.ReadBlob(blobHeader); - this.ProcessOsmHeader(osmHeader); - return; - } else if (blobHeader.Type == "OSMData") { - throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block before 'OSMData' block."); - } else { - _input.Seek(blobHeader.DataSize, SeekOrigin.Current); - } - } catch (ProtoException ex) { - throw new InvalidDataException("Input stream contains unsupported data", ex); + throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block."); + } + + /// + /// Initializes a new instance of the PbfReader class that read data form specified file. + /// + /// The path to the input file. + /// The OsmReaderSettings object that determines behaviour of PbfReader. + public PbfReader(string path, OsmReaderSettings settings) + { + _input = new FileStream(path, FileMode.Open, FileAccess.Read); + _cache = new Queue(); + + Settings = settings; + Settings.IsReadOnly = true; + + BlobHeader blobHeader; + while ((blobHeader = ReadBlobHeader()) != null) + { + try + { + if (blobHeader.Type == "OSMHeader") + { + OsmHeader osmHeader = (OsmHeader)ReadBlob(blobHeader); + ProcessOsmHeader(osmHeader); + return; + } + else if (blobHeader.Type == "OSMData") + { + throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block before 'OSMData' block."); + } + else + { + _input.Seek(blobHeader.DataSize, SeekOrigin.Current); } } - - throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block."); + catch (ProtoException ex) + { + throw new InvalidDataException("Input stream contains unsupported data", ex); + } } - /// - /// Gets OsmReaderSettings object that contains properties which determine behaviour of the OSM reader. - /// - public OsmReaderSettings Settings { get; private set; } - - /// - /// Reads next OSM entity from the stream. - /// - /// Parsed OSM entity from the stream or null if no other entity is available. - public IEntityInfo Read() { - if (_cache.Count > 0) { - return _cache.Dequeue(); - } else { - BlobHeader blobHeader = null; - while (_cache.Count == 0 && (blobHeader = this.ReadBlobHeader()) != null) { - PrimitiveBlock data = this.ReadBlob(blobHeader) as PrimitiveBlock; - if (data != null) { - foreach (PrimitiveGroup group in data.PrimitiveGroup) { - this.ProcessPrimitiveGroup(data, group); - } + throw new InvalidDataException("Input stream doesn't contain an 'OSMHeader' block."); + } + + /// + /// Gets OsmReaderSettings object that contains properties which determine behaviour of the OSM reader. + /// + public OsmReaderSettings Settings { get; private set; } + + /// + /// Reads next OSM entity from the stream. + /// + /// Parsed OSM entity from the stream or null if no other entity is available. + public IEntityInfo Read() + { + if (_cache.Count > 0) + { + return _cache.Dequeue(); + } + else + { + BlobHeader blobHeader; + while (_cache.Count == 0 && (blobHeader = ReadBlobHeader()) != null) + { + if (ReadBlob(blobHeader) is PrimitiveBlock data) + { + foreach (PrimitiveGroup group in data.PrimitiveGroup) + { + ProcessPrimitiveGroup(data, group); } } } + } - if (_cache.Count > 0) { - return _cache.Dequeue(); - } else { - return null; - } + if (_cache.Count > 0) + { + return _cache.Dequeue(); + } + else + { + return null; } + } - /// - /// Releases all resources used by the PbfReader. - /// - public void Dispose() { - Dispose(true); + /// + /// Releases all resources used by the PbfReader. + /// + public void Dispose() + { + Dispose(true); - GC.SuppressFinalize(this); + GC.SuppressFinalize(this); + } + + /// + /// Reads and deserializes a BlobHeader from input stream. + /// + /// Deserialized BlobHeader object or null if end of the stream is reached. + private BlobHeader ReadBlobHeader() + { + if (_input.Position < _input.Length) + { + return Serializer.DeserializeWithLengthPrefix(_input, PrefixStyle.Fixed32BigEndian); } - /// - /// Reads and deserializes a BlobHeader from input stream. - /// - /// Deserialized BlobHeader object or null if end of the stream is reached. - private BlobHeader ReadBlobHeader() { - if (_input.Position < _input.Length) { - return Serializer.DeserializeWithLengthPrefix(_input, PrefixStyle.Fixed32BigEndian); - } + return null; + } - return null; + /// + /// Read blob and deserializes its content. + /// + /// Header of the blob. + /// Deserialized content of the read blob or null if blob contains unknown data. + private object ReadBlob(BlobHeader header) + { + byte[] buffer = new byte[header.DataSize]; + _input.Read(buffer, 0, header.DataSize); + Blob blob = Serializer.Deserialize(new MemoryStream(buffer)); + + Stream blobContentStream; + if (blob.Raw != null) + { + blobContentStream = new MemoryStream(blob.Raw); } + else if (blob.ZlibData != null) + { + MemoryStream deflateStreamData = new MemoryStream(blob.ZlibData); - /// - /// Read blob and deserializes its content. - /// - /// Header of the blob. - /// Deserialized content of the read blob or null if blob contains unknown data. - private object ReadBlob(BlobHeader header) { - byte[] buffer = new byte[header.DataSize]; - _input.Read(buffer, 0, header.DataSize); - Blob blob = Serializer.Deserialize(new MemoryStream(buffer)); - - Stream blobContentStream; - if (blob.Raw != null) { - blobContentStream = new MemoryStream(blob.Raw); - } else if (blob.ZlibData != null) { - MemoryStream deflateStreamData = new MemoryStream(blob.ZlibData); - - //skip ZLIB header - deflateStreamData.Seek(2, SeekOrigin.Begin); - - blobContentStream = new System.IO.Compression.DeflateStream(deflateStreamData, System.IO.Compression.CompressionMode.Decompress); - } else { - throw new NotSupportedException(); - } - - if (header.Type.Equals("OSMData", StringComparison.OrdinalIgnoreCase)) { - if ((blob.RawSize.HasValue && blob.RawSize > MaxDataBlockSize) || (blob.RawSize.HasValue == false && blobContentStream.Length > MaxDataBlockSize)) { - throw new InvalidDataException("Invalid OSMData block"); - } + //skip ZLIB header + deflateStreamData.Seek(2, SeekOrigin.Begin); - return Serializer.Deserialize(blobContentStream); - } else if (header.Type.Equals("OSMHeader", StringComparison.OrdinalIgnoreCase)) { - if ((blob.RawSize.HasValue && blob.RawSize > MaxHeaderBlockSize) || (blob.RawSize.HasValue == false && blobContentStream.Length > MaxHeaderBlockSize)) { - throw new InvalidDataException("Invalid OSMHeader block"); - } + blobContentStream = new System.IO.Compression.DeflateStream(deflateStreamData, System.IO.Compression.CompressionMode.Decompress); + } + else + { + throw new NotSupportedException(); + } - try { - return Serializer.Deserialize(blobContentStream); - } catch (ProtoException ex) { - throw new InvalidDataException("Invalid OSMData block", ex); - } - } else { - return null; + if (header.Type.Equals("OSMData", StringComparison.OrdinalIgnoreCase)) + { + if ((blob.RawSize.HasValue && blob.RawSize > MaxDataBlockSize) || (blob.RawSize.HasValue == false && blobContentStream.Length > MaxDataBlockSize)) + { + throw new InvalidDataException("Invalid OSMData block"); } + + return Serializer.Deserialize(blobContentStream); } + else if (header.Type.Equals("OSMHeader", StringComparison.OrdinalIgnoreCase)) + { + if ((blob.RawSize.HasValue && blob.RawSize > MaxHeaderBlockSize) || (blob.RawSize.HasValue == false && blobContentStream.Length > MaxHeaderBlockSize)) + { + throw new InvalidDataException("Invalid OSMHeader block"); + } - /// - /// Checks OsmHeader required features and if any of required features isn't supported, NotSupportedException is thrown. - /// - /// OsmHeader object to process. - private void ProcessOsmHeader(OsmHeader header) { - string[] supportedFeatures = new string[] { "OsmSchema-V0.6", "DenseNodes" }; - foreach (var required in header.RequiredFeatures) { - if (supportedFeatures.Contains(required) == false) { - throw new NotSupportedException(string.Format("Processing specified PBF file requires '{0}' feature which isn't supported by PbfReader.", required)); - } + try + { + return Serializer.Deserialize(blobContentStream); + } + catch (ProtoException ex) + { + throw new InvalidDataException("Invalid OSMData block", ex); } } - - /// - /// Processes OSM entities in Primitive group. - /// - /// The PrimitiveBlock that contains specified PrimitiveGroup. - /// The PrimitiveGroup to process. - private void ProcessPrimitiveGroup(PrimitiveBlock block, PrimitiveGroup group) { - this.ProcessNodes(block, group); - this.ProcessDenseNodes(block, group); - this.ProcessWays(block, group); - this.ProcessRelations(block, group); + else + { + return null; } + } - /// - /// Processes all nodes in non-dense format from the PrimitiveGroup and adds them to the output queue. - /// - /// The PrimitiveBlock that contains specified PrimitiveGroup. - /// The PrimitiveGroup with nodes to process. - private void ProcessNodes(PrimitiveBlock block, PrimitiveGroup group) { - if (group.Nodes == null) { - return; + /// + /// Checks OsmHeader required features and if any of required features isn't supported, NotSupportedException is thrown. + /// + /// OsmHeader object to process. + private void ProcessOsmHeader(OsmHeader header) + { + string[] supportedFeatures = new string[] { "OsmSchema-V0.6", "DenseNodes" }; + foreach (var required in header.RequiredFeatures) + { + if (supportedFeatures.Contains(required) == false) + { + throw new NotSupportedException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Processing specified PBF file requires '{0}' feature which isn't supported by PbfReader.", required)); } + } + } - foreach (PbfNode node in group.Nodes) { - double lat = 1E-09 * (block.LatOffset + (block.Granularity * node.Latitude)); - double lon = 1E-09 * (block.LonOffset + (block.Granularity * node.Longitude)); - - List tags = new List(); - if (node.Keys != null) { - for (int i = 0; i < node.Keys.Count; i++) { - tags.Add(new Tag(block.StringTable[node.Keys[i]], block.StringTable[node.Values[i]])); - } - } - - EntityMetadata metadata = this.ProcessMetadata(node.Metadata, block); + /// + /// Processes OSM entities in Primitive group. + /// + /// The PrimitiveBlock that contains specified PrimitiveGroup. + /// The PrimitiveGroup to process. + private void ProcessPrimitiveGroup(PrimitiveBlock block, PrimitiveGroup group) + { + ProcessNodes(block, group); + ProcessDenseNodes(block, group); + ProcessWays(block, group); + ProcessRelations(block, group); + } - NodeInfo parsed = new NodeInfo((long)node.ID, lat, lon, new TagsCollection(tags), metadata); - _cache.Enqueue(parsed); - } + /// + /// Processes all nodes in non-dense format from the PrimitiveGroup and adds them to the output queue. + /// + /// The PrimitiveBlock that contains specified PrimitiveGroup. + /// The PrimitiveGroup with nodes to process. + private void ProcessNodes(PrimitiveBlock block, PrimitiveGroup group) + { + if (group.Nodes == null) + { + return; } - /// - /// Processes all nodes in dense format from the PrimitiveGroup and adds them to the output queue. - /// - /// The PrimitiveBlock that contains specified PrimitiveGroup. - /// The PrimitiveGroup with nodes to process. - private void ProcessDenseNodes(PrimitiveBlock block, PrimitiveGroup group) { - if (group.DenseNodes == null) { - return; + foreach (PbfNode node in group.Nodes) + { + double lat = 1E-09 * (block.LatOffset + (block.Granularity * node.Latitude)); + double lon = 1E-09 * (block.LonOffset + (block.Granularity * node.Longitude)); + + List tags = new List(); + if (node.Keys != null) + { + for (int i = 0; i < node.Keys.Count; i++) + { + tags.Add(new Tag(block.StringTable[node.Keys[i]], block.StringTable[node.Values[i]])); + } } - long idStore = 0; - long latStore = 0; - long lonStore = 0; + EntityMetadata metadata = ProcessMetadata(node.Metadata, block); + + NodeInfo parsed = new NodeInfo(node.ID, lat, lon, new TagsCollection(tags), metadata); + _cache.Enqueue(parsed); + } + } - int keyValueIndex = 0; + /// + /// Processes all nodes in dense format from the PrimitiveGroup and adds them to the output queue. + /// + /// The PrimitiveBlock that contains specified PrimitiveGroup. + /// The PrimitiveGroup with nodes to process. + private void ProcessDenseNodes(PrimitiveBlock block, PrimitiveGroup group) + { + if (group.DenseNodes == null) + { + return; + } - long timestampStore = 0; - long changesetStore = 0; - int userIdStore = 0; - int usernameIdStore = 0; + long idStore = 0; + long latStore = 0; + long lonStore = 0; - for (int i = 0; i < group.DenseNodes.Id.Count; i++) { - idStore += group.DenseNodes.Id[i]; - lonStore += group.DenseNodes.Longitude[i]; - latStore += group.DenseNodes.Latitude[i]; + int keyValueIndex = 0; - double lat = 1E-09 * (block.LatOffset + (block.Granularity * latStore)); - double lon = 1E-09 * (block.LonOffset + (block.Granularity * lonStore)); + long timestampStore = 0; + long changesetStore = 0; + int userIdStore = 0; + int usernameIdStore = 0; - List tags = new List(); - if (group.DenseNodes.KeysVals.Count > 0) { - while (group.DenseNodes.KeysVals[keyValueIndex] != 0) { - string key = block.StringTable[group.DenseNodes.KeysVals[keyValueIndex++]]; - string value = block.StringTable[group.DenseNodes.KeysVals[keyValueIndex++]]; + for (int i = 0; i < group.DenseNodes.Id.Count; i++) + { + idStore += group.DenseNodes.Id[i]; + lonStore += group.DenseNodes.Longitude[i]; + latStore += group.DenseNodes.Latitude[i]; - tags.Add(new Tag(key, value)); - } + double lat = 1E-09 * (block.LatOffset + (block.Granularity * latStore)); + double lon = 1E-09 * (block.LonOffset + (block.Granularity * lonStore)); - //Skip '0' used as delimiter - keyValueIndex++; - } + List tags = new List(); + if (group.DenseNodes.KeysVals.Count > 0) + { + while (group.DenseNodes.KeysVals[keyValueIndex] != 0) + { + string key = block.StringTable[group.DenseNodes.KeysVals[keyValueIndex++]]; + string value = block.StringTable[group.DenseNodes.KeysVals[keyValueIndex++]]; - EntityMetadata metadata = null; - if (this.Settings.ReadMetadata && group.DenseNodes.DenseInfo != null) { - timestampStore += group.DenseNodes.DenseInfo.Timestamp[i]; - changesetStore += group.DenseNodes.DenseInfo.Changeset[i]; - userIdStore += group.DenseNodes.DenseInfo.UserId[i]; - usernameIdStore += group.DenseNodes.DenseInfo.UserNameIndex[i]; - - metadata = new EntityMetadata() { - Changeset = (int)changesetStore, - Timestamp = _unixEpoch.AddMilliseconds(timestampStore * block.DateGranularity), - Uid = userIdStore, - User = block.StringTable[usernameIdStore], - Version = group.DenseNodes.DenseInfo.Version[i], - Visible = true - }; - - if (group.DenseNodes.DenseInfo.Visible.Count > 0) { - metadata.Visible = group.DenseNodes.DenseInfo.Visible[i]; - } + tags.Add(new Tag(key, value)); } - NodeInfo parsed = new NodeInfo((long)idStore, lat, lon, new TagsCollection(tags), metadata); - _cache.Enqueue(parsed); + //Skip '0' used as delimiter + keyValueIndex++; } - } - /// - /// Processes all ways from the PrimitiveGroup and adds them to the output queue. - /// - /// The PrimitiveBlock that contains specified PrimitiveGroup. - /// The PrimitiveGroup with nodes to process. - private void ProcessWays(PrimitiveBlock block, PrimitiveGroup group) { - if (group.Ways == null) { - return; + EntityMetadata metadata = null; + if (Settings.ReadMetadata && group.DenseNodes.DenseInfo != null) + { + timestampStore += group.DenseNodes.DenseInfo.Timestamp[i]; + changesetStore += group.DenseNodes.DenseInfo.Changeset[i]; + userIdStore += group.DenseNodes.DenseInfo.UserId[i]; + usernameIdStore += group.DenseNodes.DenseInfo.UserNameIndex[i]; + + metadata = new EntityMetadata() + { + Changeset = (int)changesetStore, + Timestamp = _unixEpoch.AddMilliseconds(timestampStore * block.DateGranularity), + Uid = userIdStore, + User = block.StringTable[usernameIdStore], + Version = group.DenseNodes.DenseInfo.Version[i], + Visible = true + }; + + if (group.DenseNodes.DenseInfo.Visible.Count > 0) + { + metadata.Visible = group.DenseNodes.DenseInfo.Visible[i]; + } } - foreach (var way in group.Ways) { - long refStore = 0; - List refs = new List(way.Refs.Count); - - for (int i = 0; i < way.Refs.Count; i++) { - refStore += (long)way.Refs[i]; - refs.Add(refStore); - } + NodeInfo parsed = new NodeInfo(idStore, lat, lon, new TagsCollection(tags), metadata); + _cache.Enqueue(parsed); + } + } - List tags = new List(); - if (way.Keys != null) { - for (int i = 0; i < way.Keys.Count; i++) { - tags.Add(new Tag(block.StringTable[way.Keys[i]], block.StringTable[way.Values[i]])); - } - } + /// + /// Processes all ways from the PrimitiveGroup and adds them to the output queue. + /// + /// The PrimitiveBlock that contains specified PrimitiveGroup. + /// The PrimitiveGroup with nodes to process. + private void ProcessWays(PrimitiveBlock block, PrimitiveGroup group) + { + if (group.Ways == null) + { + return; + } - EntityMetadata metadata = this.ProcessMetadata(way.Metadata, block); + foreach (var way in group.Ways) + { + long refStore = 0; + List refs = new List(way.Refs.Count); - WayInfo parsed = new WayInfo((long)way.ID, new TagsCollection(tags), refs, metadata); - _cache.Enqueue(parsed); + for (int i = 0; i < way.Refs.Count; i++) + { + refStore += way.Refs[i]; + refs.Add(refStore); } - } - /// - /// Processes all relations from the PrimitiveGroup and adds them to the output queue. - /// - /// The PrimitiveBlock that contains specified PrimitiveGroup. - /// The PrimitiveGroup with nodes to process. - private void ProcessRelations(PrimitiveBlock block, PrimitiveGroup group) { - if (group.Relations == null) { - return; + List tags = new List(); + if (way.Keys != null) + { + for (int i = 0; i < way.Keys.Count; i++) + { + tags.Add(new Tag(block.StringTable[way.Keys[i]], block.StringTable[way.Values[i]])); + } } - foreach (var relation in group.Relations) { - long memberRefStore = 0; + EntityMetadata metadata = ProcessMetadata(way.Metadata, block); - List members = new List(); - for (int i = 0; i < relation.MemberIds.Count; i++) { - memberRefStore += (long)relation.MemberIds[i]; - string role = block.StringTable[relation.RolesIndexes[i]]; + WayInfo parsed = new WayInfo(way.ID, new TagsCollection(tags), refs, metadata); + _cache.Enqueue(parsed); + } + } - EntityType memberType = 0; - switch (relation.Types[i]) { - case PbfRelationMemberType.Node: memberType = EntityType.Node; break; - case PbfRelationMemberType.Way: memberType = EntityType.Way; break; - case PbfRelationMemberType.Relation: memberType = EntityType.Relation; break; - } + /// + /// Processes all relations from the PrimitiveGroup and adds them to the output queue. + /// + /// The PrimitiveBlock that contains specified PrimitiveGroup. + /// The PrimitiveGroup with nodes to process. + private void ProcessRelations(PrimitiveBlock block, PrimitiveGroup group) + { + if (group.Relations == null) + { + return; + } - members.Add(new RelationMemberInfo() { MemberType = memberType, Reference = memberRefStore, Role = role }); + foreach (var relation in group.Relations) + { + long memberRefStore = 0; + + List members = new List(); + for (int i = 0; i < relation.MemberIds.Count; i++) + { + memberRefStore += relation.MemberIds[i]; + string role = block.StringTable[relation.RolesIndexes[i]]; + + EntityType memberType = 0; + switch (relation.Types[i]) + { + case PbfRelationMemberType.Node: memberType = EntityType.Node; break; + case PbfRelationMemberType.Way: memberType = EntityType.Way; break; + case PbfRelationMemberType.Relation: memberType = EntityType.Relation; break; } - List tags = new List(); - if (relation.Keys != null) { - for (int i = 0; i < relation.Keys.Count; i++) { - tags.Add(new Tag(block.StringTable[relation.Keys[i]], block.StringTable[relation.Values[i]])); - } - } - - EntityMetadata metadata = this.ProcessMetadata(relation.Metadata, block); + members.Add(new RelationMemberInfo() { MemberType = memberType, Reference = memberRefStore, Role = role }); + } - RelationInfo parsed = new RelationInfo((long)relation.ID, new TagsCollection(tags), members, metadata); - _cache.Enqueue(parsed); + List tags = new List(); + if (relation.Keys != null) + { + for (int i = 0; i < relation.Keys.Count; i++) + { + tags.Add(new Tag(block.StringTable[relation.Keys[i]], block.StringTable[relation.Values[i]])); + } } - } - /// - /// Processes entity metadata. - /// - /// Serilized metadata. - /// PrimitiveBlock that contains metadata being processed. - /// Parsed metadata. - private EntityMetadata ProcessMetadata(PbfMetadata serializedMetadata, PrimitiveBlock block) { - EntityMetadata metadata = null; + EntityMetadata metadata = ProcessMetadata(relation.Metadata, block); - if (this.Settings.ReadMetadata && serializedMetadata != null) { - //PBF has no field for 'visible' property, true is default value for OSM entity read from PBF file - metadata = new EntityMetadata() { Visible = true }; - if (serializedMetadata.Changeset.HasValue) { - metadata.Changeset = (int)serializedMetadata.Changeset.Value; - } + RelationInfo parsed = new RelationInfo(relation.ID, new TagsCollection(tags), members, metadata); + _cache.Enqueue(parsed); + } + } - if (serializedMetadata.Timestamp.HasValue) { - metadata.Timestamp = _unixEpoch.AddMilliseconds(serializedMetadata.Timestamp.Value * block.DateGranularity); - } + /// + /// Processes entity metadata. + /// + /// Serilized metadata. + /// PrimitiveBlock that contains metadata being processed. + /// Parsed metadata. + private EntityMetadata ProcessMetadata(PbfMetadata serializedMetadata, PrimitiveBlock block) + { + EntityMetadata metadata = null; + + if (Settings.ReadMetadata && serializedMetadata != null) + { + //PBF has no field for 'visible' property, true is default value for OSM entity read from PBF file + metadata = new EntityMetadata() { Visible = true }; + if (serializedMetadata.Changeset.HasValue) + { + metadata.Changeset = (int)serializedMetadata.Changeset.Value; + } - if (serializedMetadata.UserID.HasValue) { - metadata.Uid = serializedMetadata.UserID.Value; - } + if (serializedMetadata.Timestamp.HasValue) + { + metadata.Timestamp = _unixEpoch.AddMilliseconds(serializedMetadata.Timestamp.Value * block.DateGranularity); + } - if (serializedMetadata.UserNameIndex.HasValue) { - metadata.User = block.StringTable[serializedMetadata.UserNameIndex.Value]; - } + if (serializedMetadata.UserID.HasValue) + { + metadata.Uid = serializedMetadata.UserID.Value; + } - if (serializedMetadata.Version.HasValue) { - metadata.Version = serializedMetadata.Version.Value; - } + if (serializedMetadata.UserNameIndex.HasValue) + { + metadata.User = block.StringTable[serializedMetadata.UserNameIndex.Value]; } - return metadata; + if (serializedMetadata.Version.HasValue) + { + metadata.Version = serializedMetadata.Version.Value; + } } - /// - /// Releases the unmanaged resources used by the PbfReader and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!this._disposed) { - if (disposing) { - if (_input != null) { - _input.Dispose(); - } - } + return metadata; + } - _disposed = true; + /// + /// Releases the unmanaged resources used by the PbfReader and optionally releases the managed resources. + /// + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + if (_input != null) + { + _input.Dispose(); + } } + + _disposed = true; } } } diff --git a/src/SpatialLite.Osm/IO/PbfWriter.cs b/src/SpatialLite.Osm/IO/PbfWriter.cs index d4440d4..f147d98 100644 --- a/src/SpatialLite.Osm/IO/PbfWriter.cs +++ b/src/SpatialLite.Osm/IO/PbfWriter.cs @@ -1,569 +1,637 @@ -using System; -using System.Collections.Generic; -using System.IO; - -using ProtoBuf; -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm.IO.Pbf; - -namespace SpatialLite.Osm.IO { - /// - /// Represents IOsmWriter that writes OSM entities to Pbf format. - /// - public class PbfWriter : IOsmWriter { - - /// - /// Defines maximal allowed size of uncompressed OsmData block. Larger blocks are considered invalid. - /// - public const int MaxDataBlockSize = 16 * 1024 * 1024; - - private DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0); - - private bool _disposed = false; - private Stream _output; - private bool _ownsOutputStream; - - private EntityInfoBuffer _nodesBuffer; - private EntityInfoBuffer _wayBuffer; - private EntityInfoBuffer _relationBuffer; - - /// - /// Initializes a new instance of the PbfWriter class that writes entities to specified stream with given settings. - /// - /// The stream to write entities to. - /// The settings defining behaviour of the writer. - public PbfWriter(Stream stream, PbfWriterSettings settings) { - this.Settings = settings; - this.Settings.IsReadOnly = true; - _output = stream; - _ownsOutputStream = false; - - this.InitializeBuffers(); - this.WriteHeader(); - } - - /// - /// Initializes a new instance of the PbfWriter class that writes entities to specified file with given settings. - /// - /// Path to the file to write entities to. - /// The settings defining behaviour of the writer. - public PbfWriter(string filename, PbfWriterSettings settings) { - this.Settings = settings; - this.Settings.IsReadOnly = true; - _output = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite); - _ownsOutputStream = true; - - this.InitializeBuffers(); - this.WriteHeader(); - } - - /// - /// Gets settings used by this PbfWriter. - /// - public PbfWriterSettings Settings { get; private set; } - - /// - /// Writes specified entity in PBF format to the underlaying stream. - /// - /// Entity to write. - /// - /// PbfWriter uses internal buffers and writes entities to the output stream in blocks. To force PbfWriter to clear internal buffers and write data to the underlaying stream use Flush() function. - /// - public void Write(IEntityInfo entity) { - if (this.Settings.WriteMetadata) { - if (entity.Metadata == null) { - throw new ArgumentException("Entity doesn't contain metadata obejct, but writer was created with WriteMetadata setting."); - } - - if (entity.Metadata.User == null) { - throw new ArgumentNullException("Entity.Metadata.User cannot be null."); - } - } - - switch (entity.EntityType) { - case EntityType.Node: _nodesBuffer.Add(entity as NodeInfo); break; - case EntityType.Way: _wayBuffer.Add(entity as WayInfo); break; - case EntityType.Relation: _relationBuffer.Add(entity as RelationInfo); break; - } - - if (_nodesBuffer.EstimatedMaxSize > MaxDataBlockSize) { - this.Flush(EntityType.Node); - } - - if (_wayBuffer.EstimatedMaxSize > MaxDataBlockSize) { - this.Flush(EntityType.Way); - } - - if (_relationBuffer.EstimatedMaxSize > MaxDataBlockSize) { - this.Flush(EntityType.Relation); - } - } - - /// - /// Writes specific IOsmGeometry in PBF format to the underlaying stream. - /// - /// Entity to write. - /// - /// PbfWriter uses internal buffers and writes entities to the output stream in blocks. To force PbfWriter to clear internal buffers and write data to the underlaying stream use Flush() function. - /// - public void Write(IOsmGeometry entity) { - if (entity == null) { - throw new ArgumentNullException("Entity cannot be null", "entity"); - } - - switch (entity.EntityType) { - case EntityType.Node: this.Write(new NodeInfo((Geometries.Node)entity)); break; - case EntityType.Way: this.Write(new WayInfo((Geometries.Way)entity)); break; - case EntityType.Relation: this.Write(new RelationInfo((Geometries.Relation)entity)); break; - } - } - - /// - /// Clears internal buffers and causes any buffered data to be written to the unerlaying storage. - /// - public void Flush() { - this.Flush(EntityType.Node); - this.Flush(EntityType.Way); - this.Flush(EntityType.Relation); - } - - /// - /// Releases all resources used by the PbfWriter. - /// - public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Creates internal buffers and initializes them to default capacity. - /// - private void InitializeBuffers() { - _nodesBuffer = new EntityInfoBuffer(this.Settings.WriteMetadata); - _wayBuffer = new EntityInfoBuffer(this.Settings.WriteMetadata); - _relationBuffer = new EntityInfoBuffer(this.Settings.WriteMetadata); - } - - /// - /// Clears internal buffer for specified EntityType and writes all buffered data the underlaying storage. - /// - /// The type of entity to process - private void Flush(EntityType entityType) { - PrimitiveBlock primitiveBlock = this.BuildPrimitiveBlock(entityType); - if (primitiveBlock == null) { - return; - } - - MemoryStream primitiveBlockStream = new MemoryStream(); - Serializer.Serialize(primitiveBlockStream, primitiveBlock); - - //byte[] buffer = new byte[primitiveBlockStream.Length]; - //Array.Copy(primitiveBlockStream.GetBuffer(), buffer, primitiveBlockStream.Length); - - this.WriteBlob("OSMData", primitiveBlockStream.ToArray()); - } - - /// - /// Writes PBF file header to the underlaying stream. - /// - private void WriteHeader() { - OsmHeader header = new OsmHeader(); - header.RequiredFeatures.Add("OsmSchema-V0.6"); - - if (this.Settings.UseDenseFormat) { - header.RequiredFeatures.Add("DenseNodes"); - } - - if (this.Settings.WriteMetadata) { - header.OptionalFeatures.Add("Has_Metadata"); - } - - using (MemoryStream stream = new MemoryStream()) { - Serializer.Serialize(stream, header); - - //byte[] buffer = new byte[stream.Length]; - //Array.Copy(stream.GetBuffer(), buffer, stream.Length); - - this.WriteBlob("OSMHeader", stream.ToArray()); - } - } - - /// - /// Writes blob and it's header to the underlaying stream. - /// - /// The type of the blob. - /// The pbf serialized content of the blob. - private void WriteBlob(string blobType, byte[] blobContent) { - Blob blob = new Blob(); - if (this.Settings.Compression == CompressionMode.None) { - blob.Raw = blobContent; - } - else if (this.Settings.Compression == CompressionMode.ZlibDeflate) { - MemoryStream zlibStream = new MemoryStream(); - - //ZLIB header - zlibStream.WriteByte(120); - zlibStream.WriteByte(156); - - using (System.IO.Compression.DeflateStream deflateSteram = new System.IO.Compression.DeflateStream(zlibStream, System.IO.Compression.CompressionMode.Compress, true)) { - deflateSteram.Write(blobContent, 0, blobContent.Length); - } - - blob.RawSize = (int)blobContent.Length; - blob.ZlibData = zlibStream.ToArray(); - } - - MemoryStream blobStream = new MemoryStream(); - Serializer.Serialize(blobStream, blob); - - BlobHeader header = new BlobHeader(); - header.Type = blobType; - header.DataSize = (int)blobStream.Length; - Serializer.SerializeWithLengthPrefix(_output, header, PrefixStyle.Fixed32BigEndian); - - blobStream.WriteTo(_output); - } - - /// - /// Creates a PrimitiveBlock with entities of specified type from data in tokens. - /// - /// The type of entity to include in PrimitiveBlock. - /// PrimitiveBlock with entities of specified type or null if tokens doesn't contain any entities of specified type. - private PrimitiveBlock BuildPrimitiveBlock(EntityType entityType) { - PrimitiveBlock result = new PrimitiveBlock(); - - result.PrimitiveGroup = new List(); - PrimitiveGroup entityGroup = null; - switch (entityType) { - case EntityType.Node: - entityGroup = this.BuildNodesPrimitiveGroup(result.DateGranularity, result.Granularity, result.LatOffset, result.LonOffset); - result.StringTable = _nodesBuffer.BuildStringTable(); - _nodesBuffer.Clear(); - break; - case EntityType.Way: - entityGroup = this.BuildWaysPrimitiveGroup(result.DateGranularity); - result.StringTable = _wayBuffer.BuildStringTable(); - _wayBuffer.Clear(); - break; - case EntityType.Relation: - entityGroup = this.BuildRelationsPrimitiveGroup(result.DateGranularity); - result.StringTable = _relationBuffer.BuildStringTable(); - _relationBuffer.Clear(); - break; - } - - if (entityGroup == null) { - return null; - } - - result.PrimitiveGroup.Add(entityGroup); - - return result; - } - - /// - /// Creates a PrimitiveGroup with serialized nodes from tokens. - /// - /// Timestamp granularity defined in PrimitiveBlock. - /// Granularity defined in PrimitiveBlock. - /// Latitude offset defined in PrimitiveBlock. - /// Longitude offset defined in PrimitiveBlock. - /// PrimitiveGroup with nodes from tokens or null if tokens is empty. - private PrimitiveGroup BuildNodesPrimitiveGroup(int timestampGranularity, int positionGranularity, long latOffset, long lonOffset) { - PrimitiveGroup result = null; - - if (_nodesBuffer.Count > 0) { - result = new PrimitiveGroup(); - - if (this.Settings.UseDenseFormat) { - result.DenseNodes = this.BuildDenseNodes(timestampGranularity, positionGranularity, latOffset, lonOffset); - } - else { - result.Nodes = this.BuildNodes(timestampGranularity, positionGranularity, latOffset, lonOffset); - } - } - - return result; - } - - /// - /// Creates a PrimitiveGroup with serialized ways from tokens. - /// - /// Timestamp granularity defined in PrimitiveBlock. - /// PrimitiveGroup with ways from tokens or null if tokens is empty. - private PrimitiveGroup BuildWaysPrimitiveGroup(int timestampGranularity) { - PrimitiveGroup result = null; - - if (_wayBuffer.Count > 0) { - result = new PrimitiveGroup(); - - result.Ways = this.BuildWays(timestampGranularity); - } - - return result; - } - - /// - /// Creates a PrimitiveGroup with serialized relations objects from relation tokens. - /// - /// Timestamp granularity defined in PrimitiveBlock. - /// PrimitiveGroup with relations from tokens or null if tokens is empty. - private PrimitiveGroup BuildRelationsPrimitiveGroup(int timestampGranularity) { - PrimitiveGroup result = null; - - if (_relationBuffer.Count > 0) { - result = new PrimitiveGroup(); - - result.Relations = this.BuildRelations(timestampGranularity); - } - - return result; - } - - /// - /// Creates a collection of Node objects from nodes in tokens. - /// - /// Timestamp granularity as defined in PrimitiveBlock. - /// Granularity as defined in PrimitiveBlock. - /// Latitude offset as defined in PrimitiveBlock. - /// Longitude offset as defined in PrimitiveBlock. - /// The DenseNode obejct with data from nodes in tokens. - private List BuildNodes(int timestampGranularity, int positionGranularity, long latOffset, long lonOffset) { - List result = new List(_nodesBuffer.Count); - foreach (var node in _nodesBuffer) { - PbfNode toAdd = new PbfNode(); - - toAdd.ID = node.ID; - toAdd.Latitude = (long)Math.Round(((node.Latitude / 1E-09) - latOffset) / positionGranularity); - toAdd.Longitude = (long)Math.Round(((node.Longitude / 1E-09) - lonOffset) / positionGranularity); - - if (node.Tags.Count > 0) { - toAdd.Keys = new List(); - toAdd.Values = new List(); - - foreach (var tag in node.Tags) { - toAdd.Keys.Add(_nodesBuffer.GetStringIndex(tag.Key)); - toAdd.Values.Add(_nodesBuffer.GetStringIndex(tag.Value)); - } - } - - if (node.Metadata != null && this.Settings.WriteMetadata) { - toAdd.Metadata = this.BuildInfo(node.Metadata, timestampGranularity, _nodesBuffer); - } - - result.Add(toAdd); - } - - return result; - } - - /// - /// Creates DenseNode obejcet from nodes in tokens. - /// - /// Timestamp granularity as defined in PrimitiveBlock. - /// Granularity as defined in PrimitiveBlock. - /// Latitude offset as defined in PrimitiveBlock. - /// Longitude offset as defined in PrimitiveBlock. - /// The DenseNode obejct with data from nodes in tokens. - private PbfDenseNodes BuildDenseNodes(int timestampGranularity, int positionGranularity, long latOffset, long lonOffset) { - PbfDenseNodes result = new PbfDenseNodes(_nodesBuffer.Count); - - long lastID = 0; - long lastLat = 0; - long lastLon = 0; - - foreach (var node in _nodesBuffer) { - result.Id.Add(node.ID - lastID); - lastID = node.ID; - - long latValue = (long)Math.Round(((node.Latitude / 1E-09) - latOffset) / positionGranularity); - result.Latitude.Add(latValue - lastLat); - lastLat = latValue; - - long lonValue = (long)Math.Round(((node.Longitude / 1E-09) - lonOffset) / positionGranularity); - result.Longitude.Add(lonValue - lastLon); - lastLon = lonValue; - - foreach (var tag in node.Tags) { - result.KeysVals.Add((int)_nodesBuffer.GetStringIndex(tag.Key)); - result.KeysVals.Add((int)_nodesBuffer.GetStringIndex(tag.Value)); - } - - result.KeysVals.Add(0); - } - - if (this.Settings.WriteMetadata) { - result.DenseInfo = this.BuildDenseInfo(timestampGranularity); - } - - return result; - } - - /// - /// Creates collection of PbfWay objects from ways in tokens. - /// - /// Timestamp granularity as defined in PrimitiveBlock. - /// The collection of PbfWay objects created from relations in tokens. - private List BuildWays(int timestampGranularity) { - List result = new List(); - - foreach (var way in _wayBuffer) { - long lastRef = 0; - - PbfWay toAdd = new PbfWay(); - - toAdd.ID = way.ID; - - if (way.Nodes.Count > 0) { - toAdd.Refs = new List(way.Nodes.Count); - - for (int i = 0; i < way.Nodes.Count; i++) { - toAdd.Refs.Add(way.Nodes[i] - lastRef); - lastRef = way.Nodes[i]; - } - } - - if (way.Tags.Count > 0) { - toAdd.Keys = new List(); - toAdd.Values = new List(); - - foreach (var tag in way.Tags) { - toAdd.Keys.Add(_wayBuffer.GetStringIndex(tag.Key)); - toAdd.Values.Add(_wayBuffer.GetStringIndex(tag.Value)); - } - } - - if (way.Metadata != null && this.Settings.WriteMetadata) { - toAdd.Metadata = this.BuildInfo(way.Metadata, timestampGranularity, _wayBuffer); - } - - result.Add(toAdd); - } - - return result; - } - - /// - /// Creates collection of PbfRelation objects from relations in tokens. - /// - /// Timestamp granularity as defined in PrimitiveBlock. - /// The collection of PbfRelation objects created from relations in tokens. - private List BuildRelations(int timestampGranularity) { - List result = new List(); - - foreach (var relation in _relationBuffer) { - PbfRelation toAdd = new PbfRelation(); - toAdd.ID = relation.ID; - - long lastRef = 0; - foreach (var member in relation.Members) { - toAdd.MemberIds.Add(member.Reference - lastRef); - lastRef = member.Reference; - - toAdd.RolesIndexes.Add((int)_relationBuffer.GetStringIndex(member.Role ?? string.Empty)); - PbfRelationMemberType memberType = 0; - switch (member.MemberType) { - case EntityType.Node: memberType = PbfRelationMemberType.Node; break; - case EntityType.Way: memberType = PbfRelationMemberType.Way; break; - case EntityType.Relation: memberType = PbfRelationMemberType.Relation; break; - } - - toAdd.Types.Add(memberType); - } - - toAdd.Keys = new List(relation.Tags.Count); - toAdd.Values = new List(relation.Tags.Count); - - if (relation.Tags.Count > 0) { - foreach (var tag in relation.Tags) { - toAdd.Keys.Add(_relationBuffer.GetStringIndex(tag.Key)); - toAdd.Values.Add(_relationBuffer.GetStringIndex(tag.Value)); - } - } - - if (relation.Metadata != null && this.Settings.WriteMetadata) { - toAdd.Metadata = this.BuildInfo(relation.Metadata, timestampGranularity, _relationBuffer); - } - - result.Add(toAdd); - } - - return result; - } - - /// - /// Creates a DenseInfo object with metadata for nodes in tokens. - /// - /// Timestamp granularity as defined in PrimitiveBlock. - /// DenseInfo object with metadata for noes in tokens. - private PbfDenseMetadata BuildDenseInfo(int timestampGranularity) { - PbfDenseMetadata result = new PbfDenseMetadata(_nodesBuffer.Count); - - long lastChangeset = 0; - long lastTimestamp = 0; - int lastUid = 0; - int lastUserNameIndex = 0; - - foreach (var node in _nodesBuffer) { - EntityMetadata metadata = node.Metadata ?? new EntityMetadata(); - - result.Changeset.Add(metadata.Changeset - lastChangeset); - lastChangeset = metadata.Changeset; - - long timestampValue = (long)Math.Round((metadata.Timestamp - _unixEpoch).TotalMilliseconds / timestampGranularity); - result.Timestamp.Add(timestampValue - lastTimestamp); - lastTimestamp = timestampValue; - - result.UserId.Add(metadata.Uid - lastUid); - lastUid = metadata.Uid; - - int userNameIndex = (int)_nodesBuffer.GetStringIndex(metadata.User); - result.UserNameIndex.Add(userNameIndex - lastUserNameIndex); - lastUserNameIndex = userNameIndex; - - result.Version.Add(metadata.Version); - result.Visible.Add(metadata.Visible); - } - - return result; - } - - /// - /// Creates an PbfMetadata obejct from given Metadata. - /// - /// Metadata obejct to be used as source of data. - /// Timestamp granularity as defined in PrimitiveBlock. - /// IStrignTable object to save string values to. - /// PbfMetadata obejct with data from specified metadata object. - private PbfMetadata BuildInfo(EntityMetadata metadata, int timestampGranularity, IStringTableBuilder stringTableBuilder) { - PbfMetadata result = new PbfMetadata(); - result.Changeset = metadata.Changeset; - result.Timestamp = (long)Math.Round((metadata.Timestamp - _unixEpoch).TotalMilliseconds / timestampGranularity); - result.UserID = metadata.Uid; - result.UserNameIndex = (int)stringTableBuilder.GetStringIndex(metadata.User); - result.Version = metadata.Version; - - return result; - } - - /// - /// Releases the unmanaged resources used by the PbfWriter and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - private void Dispose(bool disposing) { - if (!_disposed) { - if (disposing) { - this.Flush(); - - if (_output != null) { - if (_ownsOutputStream) { - _output.Dispose(); - } - } - } - - _disposed = true; - } - } - } -} +using ProtoBuf; +using SpatialLite.Osm.Geometries; +using SpatialLite.Osm.IO.Pbf; +using System; +using System.Collections.Generic; +using System.IO; + +namespace SpatialLite.Osm.IO; + +/// +/// Represents IOsmWriter that writes OSM entities to Pbf format. +/// +public class PbfWriter : IOsmWriter +{ + + /// + /// Defines maximal allowed size of uncompressed OsmData block. Larger blocks are considered invalid. + /// + public const int MaxDataBlockSize = 16 * 1024 * 1024; + + private readonly DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0); + + private bool _disposed = false; + private readonly Stream _output; + private readonly bool _ownsOutputStream; + + private EntityInfoBuffer _nodesBuffer; + private EntityInfoBuffer _wayBuffer; + private EntityInfoBuffer _relationBuffer; + + /// + /// Initializes a new instance of the PbfWriter class that writes entities to specified stream with given settings. + /// + /// The stream to write entities to. + /// The settings defining behaviour of the writer. + public PbfWriter(Stream stream, PbfWriterSettings settings) + { + Settings = settings; + Settings.IsReadOnly = true; + _output = stream; + _ownsOutputStream = false; + + InitializeBuffers(); + WriteHeader(); + } + + /// + /// Initializes a new instance of the PbfWriter class that writes entities to specified file with given settings. + /// + /// Path to the file to write entities to. + /// The settings defining behaviour of the writer. + public PbfWriter(string filename, PbfWriterSettings settings) + { + Settings = settings; + Settings.IsReadOnly = true; + _output = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite); + _ownsOutputStream = true; + + InitializeBuffers(); + WriteHeader(); + } + + /// + /// Gets settings used by this PbfWriter. + /// + public PbfWriterSettings Settings { get; private set; } + + /// + /// Writes specified entity in PBF format to the underlaying stream. + /// + /// Entity to write. + /// + /// PbfWriter uses internal buffers and writes entities to the output stream in blocks. To force PbfWriter to clear internal buffers and write data to the underlaying stream use Flush() function. + /// + public void Write(IEntityInfo entity) + { + if (Settings.WriteMetadata) + { + if (entity.Metadata == null) + { + throw new ArgumentException("Entity doesn't contain metadata obejct, but writer was created with WriteMetadata setting."); + } + + if (entity.Metadata.User == null) + { + throw new ArgumentNullException(nameof(entity), "Entity.Metadata.User cannot be null."); + } + } + + switch (entity.EntityType) + { + case EntityType.Node: _nodesBuffer.Add(entity as NodeInfo); break; + case EntityType.Way: _wayBuffer.Add(entity as WayInfo); break; + case EntityType.Relation: _relationBuffer.Add(entity as RelationInfo); break; + } + + if (_nodesBuffer.EstimatedMaxSize > MaxDataBlockSize) + { + Flush(EntityType.Node); + } + + if (_wayBuffer.EstimatedMaxSize > MaxDataBlockSize) + { + Flush(EntityType.Way); + } + + if (_relationBuffer.EstimatedMaxSize > MaxDataBlockSize) + { + Flush(EntityType.Relation); + } + } + + /// + /// Writes specific IOsmGeometry in PBF format to the underlaying stream. + /// + /// Entity to write. + /// + /// PbfWriter uses internal buffers and writes entities to the output stream in blocks. To force PbfWriter to clear internal buffers and write data to the underlaying stream use Flush() function. + /// + public void Write(IOsmGeometry entity) + { + if (entity == null) + { + throw new ArgumentNullException(nameof(entity), "Entity cannot be null"); + } + + switch (entity.EntityType) + { + case EntityType.Node: Write(new NodeInfo((Geometries.Node)entity)); break; + case EntityType.Way: Write(new WayInfo((Geometries.Way)entity)); break; + case EntityType.Relation: Write(new RelationInfo((Geometries.Relation)entity)); break; + } + } + + /// + /// Clears internal buffers and causes any buffered data to be written to the unerlaying storage. + /// + public void Flush() + { + Flush(EntityType.Node); + Flush(EntityType.Way); + Flush(EntityType.Relation); + } + + /// + /// Releases all resources used by the PbfWriter. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Creates internal buffers and initializes them to default capacity. + /// + private void InitializeBuffers() + { + _nodesBuffer = new EntityInfoBuffer(Settings.WriteMetadata); + _wayBuffer = new EntityInfoBuffer(Settings.WriteMetadata); + _relationBuffer = new EntityInfoBuffer(Settings.WriteMetadata); + } + + /// + /// Clears internal buffer for specified EntityType and writes all buffered data the underlaying storage. + /// + /// The type of entity to process + private void Flush(EntityType entityType) + { + PrimitiveBlock primitiveBlock = BuildPrimitiveBlock(entityType); + if (primitiveBlock == null) + { + return; + } + + MemoryStream primitiveBlockStream = new MemoryStream(); + Serializer.Serialize(primitiveBlockStream, primitiveBlock); + + //byte[] buffer = new byte[primitiveBlockStream.Length]; + //Array.Copy(primitiveBlockStream.GetBuffer(), buffer, primitiveBlockStream.Length); + + WriteBlob("OSMData", primitiveBlockStream.ToArray()); + } + + /// + /// Writes PBF file header to the underlaying stream. + /// + private void WriteHeader() + { + OsmHeader header = new OsmHeader(); + header.RequiredFeatures.Add("OsmSchema-V0.6"); + + if (Settings.UseDenseFormat) + { + header.RequiredFeatures.Add("DenseNodes"); + } + + if (Settings.WriteMetadata) + { + header.OptionalFeatures.Add("Has_Metadata"); + } + + using (MemoryStream stream = new MemoryStream()) + { + Serializer.Serialize(stream, header); + + //byte[] buffer = new byte[stream.Length]; + //Array.Copy(stream.GetBuffer(), buffer, stream.Length); + + WriteBlob("OSMHeader", stream.ToArray()); + } + } + + /// + /// Writes blob and it's header to the underlaying stream. + /// + /// The type of the blob. + /// The pbf serialized content of the blob. + private void WriteBlob(string blobType, byte[] blobContent) + { + Blob blob = new Blob(); + if (Settings.Compression == CompressionMode.None) + { + blob.Raw = blobContent; + } + else if (Settings.Compression == CompressionMode.ZlibDeflate) + { + MemoryStream zlibStream = new MemoryStream(); + + //ZLIB header + zlibStream.WriteByte(120); + zlibStream.WriteByte(156); + + using (System.IO.Compression.DeflateStream deflateSteram = new System.IO.Compression.DeflateStream(zlibStream, System.IO.Compression.CompressionMode.Compress, true)) + { + deflateSteram.Write(blobContent, 0, blobContent.Length); + } + + blob.RawSize = blobContent.Length; + blob.ZlibData = zlibStream.ToArray(); + } + + MemoryStream blobStream = new MemoryStream(); + Serializer.Serialize(blobStream, blob); + + BlobHeader header = new BlobHeader(); + header.Type = blobType; + header.DataSize = (int)blobStream.Length; + Serializer.SerializeWithLengthPrefix(_output, header, PrefixStyle.Fixed32BigEndian); + + blobStream.WriteTo(_output); + } + + /// + /// Creates a PrimitiveBlock with entities of specified type from data in tokens. + /// + /// The type of entity to include in PrimitiveBlock. + /// PrimitiveBlock with entities of specified type or null if tokens doesn't contain any entities of specified type. + private PrimitiveBlock BuildPrimitiveBlock(EntityType entityType) + { + PrimitiveBlock result = new PrimitiveBlock(); + + result.PrimitiveGroup = new List(); + PrimitiveGroup entityGroup = null; + switch (entityType) + { + case EntityType.Node: + entityGroup = BuildNodesPrimitiveGroup(result.DateGranularity, result.Granularity, result.LatOffset, result.LonOffset); + result.StringTable = _nodesBuffer.BuildStringTable(); + _nodesBuffer.Clear(); + break; + case EntityType.Way: + entityGroup = BuildWaysPrimitiveGroup(result.DateGranularity); + result.StringTable = _wayBuffer.BuildStringTable(); + _wayBuffer.Clear(); + break; + case EntityType.Relation: + entityGroup = BuildRelationsPrimitiveGroup(result.DateGranularity); + result.StringTable = _relationBuffer.BuildStringTable(); + _relationBuffer.Clear(); + break; + } + + if (entityGroup == null) + { + return null; + } + + result.PrimitiveGroup.Add(entityGroup); + + return result; + } + + /// + /// Creates a PrimitiveGroup with serialized nodes from tokens. + /// + /// Timestamp granularity defined in PrimitiveBlock. + /// Granularity defined in PrimitiveBlock. + /// Latitude offset defined in PrimitiveBlock. + /// Longitude offset defined in PrimitiveBlock. + /// PrimitiveGroup with nodes from tokens or null if tokens is empty. + private PrimitiveGroup BuildNodesPrimitiveGroup(int timestampGranularity, int positionGranularity, long latOffset, long lonOffset) + { + PrimitiveGroup result = null; + + if (_nodesBuffer.Count > 0) + { + result = new PrimitiveGroup(); + + if (Settings.UseDenseFormat) + { + result.DenseNodes = BuildDenseNodes(timestampGranularity, positionGranularity, latOffset, lonOffset); + } + else + { + result.Nodes = BuildNodes(timestampGranularity, positionGranularity, latOffset, lonOffset); + } + } + + return result; + } + + /// + /// Creates a PrimitiveGroup with serialized ways from tokens. + /// + /// Timestamp granularity defined in PrimitiveBlock. + /// PrimitiveGroup with ways from tokens or null if tokens is empty. + private PrimitiveGroup BuildWaysPrimitiveGroup(int timestampGranularity) + { + PrimitiveGroup result = null; + + if (_wayBuffer.Count > 0) + { + result = new PrimitiveGroup(); + + result.Ways = BuildWays(timestampGranularity); + } + + return result; + } + + /// + /// Creates a PrimitiveGroup with serialized relations objects from relation tokens. + /// + /// Timestamp granularity defined in PrimitiveBlock. + /// PrimitiveGroup with relations from tokens or null if tokens is empty. + private PrimitiveGroup BuildRelationsPrimitiveGroup(int timestampGranularity) + { + PrimitiveGroup result = null; + + if (_relationBuffer.Count > 0) + { + result = new PrimitiveGroup(); + + result.Relations = BuildRelations(timestampGranularity); + } + + return result; + } + + /// + /// Creates a collection of Node objects from nodes in tokens. + /// + /// Timestamp granularity as defined in PrimitiveBlock. + /// Granularity as defined in PrimitiveBlock. + /// Latitude offset as defined in PrimitiveBlock. + /// Longitude offset as defined in PrimitiveBlock. + /// The DenseNode obejct with data from nodes in tokens. + private List BuildNodes(int timestampGranularity, int positionGranularity, long latOffset, long lonOffset) + { + List result = new List(_nodesBuffer.Count); + foreach (var node in _nodesBuffer) + { + PbfNode toAdd = new PbfNode(); + + toAdd.ID = node.ID; + toAdd.Latitude = (long)Math.Round(((node.Latitude / 1E-09) - latOffset) / positionGranularity); + toAdd.Longitude = (long)Math.Round(((node.Longitude / 1E-09) - lonOffset) / positionGranularity); + + if (node.Tags.Count > 0) + { + toAdd.Keys = new List(); + toAdd.Values = new List(); + + foreach (var tag in node.Tags) + { + toAdd.Keys.Add(_nodesBuffer.GetStringIndex(tag.Key)); + toAdd.Values.Add(_nodesBuffer.GetStringIndex(tag.Value)); + } + } + + if (node.Metadata != null && Settings.WriteMetadata) + { + toAdd.Metadata = BuildInfo(node.Metadata, timestampGranularity, _nodesBuffer); + } + + result.Add(toAdd); + } + + return result; + } + + /// + /// Creates DenseNode obejcet from nodes in tokens. + /// + /// Timestamp granularity as defined in PrimitiveBlock. + /// Granularity as defined in PrimitiveBlock. + /// Latitude offset as defined in PrimitiveBlock. + /// Longitude offset as defined in PrimitiveBlock. + /// The DenseNode obejct with data from nodes in tokens. + private PbfDenseNodes BuildDenseNodes(int timestampGranularity, int positionGranularity, long latOffset, long lonOffset) + { + PbfDenseNodes result = new PbfDenseNodes(_nodesBuffer.Count); + + long lastID = 0; + long lastLat = 0; + long lastLon = 0; + + foreach (var node in _nodesBuffer) + { + result.Id.Add(node.ID - lastID); + lastID = node.ID; + + long latValue = (long)Math.Round(((node.Latitude / 1E-09) - latOffset) / positionGranularity); + result.Latitude.Add(latValue - lastLat); + lastLat = latValue; + + long lonValue = (long)Math.Round(((node.Longitude / 1E-09) - lonOffset) / positionGranularity); + result.Longitude.Add(lonValue - lastLon); + lastLon = lonValue; + + foreach (var tag in node.Tags) + { + result.KeysVals.Add((int)_nodesBuffer.GetStringIndex(tag.Key)); + result.KeysVals.Add((int)_nodesBuffer.GetStringIndex(tag.Value)); + } + + result.KeysVals.Add(0); + } + + if (Settings.WriteMetadata) + { + result.DenseInfo = BuildDenseInfo(timestampGranularity); + } + + return result; + } + + /// + /// Creates collection of PbfWay objects from ways in tokens. + /// + /// Timestamp granularity as defined in PrimitiveBlock. + /// The collection of PbfWay objects created from relations in tokens. + private List BuildWays(int timestampGranularity) + { + List result = new List(); + + foreach (var way in _wayBuffer) + { + long lastRef = 0; + + PbfWay toAdd = new PbfWay(); + + toAdd.ID = way.ID; + + if (way.Nodes.Count > 0) + { + toAdd.Refs = new List(way.Nodes.Count); + + for (int i = 0; i < way.Nodes.Count; i++) + { + toAdd.Refs.Add(way.Nodes[i] - lastRef); + lastRef = way.Nodes[i]; + } + } + + if (way.Tags.Count > 0) + { + toAdd.Keys = new List(); + toAdd.Values = new List(); + + foreach (var tag in way.Tags) + { + toAdd.Keys.Add(_wayBuffer.GetStringIndex(tag.Key)); + toAdd.Values.Add(_wayBuffer.GetStringIndex(tag.Value)); + } + } + + if (way.Metadata != null && Settings.WriteMetadata) + { + toAdd.Metadata = BuildInfo(way.Metadata, timestampGranularity, _wayBuffer); + } + + result.Add(toAdd); + } + + return result; + } + + /// + /// Creates collection of PbfRelation objects from relations in tokens. + /// + /// Timestamp granularity as defined in PrimitiveBlock. + /// The collection of PbfRelation objects created from relations in tokens. + private List BuildRelations(int timestampGranularity) + { + List result = new List(); + + foreach (var relation in _relationBuffer) + { + PbfRelation toAdd = new PbfRelation(); + toAdd.ID = relation.ID; + + long lastRef = 0; + foreach (var member in relation.Members) + { + toAdd.MemberIds.Add(member.Reference - lastRef); + lastRef = member.Reference; + + toAdd.RolesIndexes.Add((int)_relationBuffer.GetStringIndex(member.Role ?? string.Empty)); + PbfRelationMemberType memberType = 0; + switch (member.MemberType) + { + case EntityType.Node: memberType = PbfRelationMemberType.Node; break; + case EntityType.Way: memberType = PbfRelationMemberType.Way; break; + case EntityType.Relation: memberType = PbfRelationMemberType.Relation; break; + } + + toAdd.Types.Add(memberType); + } + + toAdd.Keys = new List(relation.Tags.Count); + toAdd.Values = new List(relation.Tags.Count); + + if (relation.Tags.Count > 0) + { + foreach (var tag in relation.Tags) + { + toAdd.Keys.Add(_relationBuffer.GetStringIndex(tag.Key)); + toAdd.Values.Add(_relationBuffer.GetStringIndex(tag.Value)); + } + } + + if (relation.Metadata != null && Settings.WriteMetadata) + { + toAdd.Metadata = BuildInfo(relation.Metadata, timestampGranularity, _relationBuffer); + } + + result.Add(toAdd); + } + + return result; + } + + /// + /// Creates a DenseInfo object with metadata for nodes in tokens. + /// + /// Timestamp granularity as defined in PrimitiveBlock. + /// DenseInfo object with metadata for noes in tokens. + private PbfDenseMetadata BuildDenseInfo(int timestampGranularity) + { + PbfDenseMetadata result = new PbfDenseMetadata(_nodesBuffer.Count); + + long lastChangeset = 0; + long lastTimestamp = 0; + int lastUid = 0; + int lastUserNameIndex = 0; + + foreach (var node in _nodesBuffer) + { + EntityMetadata metadata = node.Metadata ?? new EntityMetadata(); + + result.Changeset.Add(metadata.Changeset - lastChangeset); + lastChangeset = metadata.Changeset; + + long timestampValue = (long)Math.Round((metadata.Timestamp - _unixEpoch).TotalMilliseconds / timestampGranularity); + result.Timestamp.Add(timestampValue - lastTimestamp); + lastTimestamp = timestampValue; + + result.UserId.Add(metadata.Uid - lastUid); + lastUid = metadata.Uid; + + int userNameIndex = (int)_nodesBuffer.GetStringIndex(metadata.User); + result.UserNameIndex.Add(userNameIndex - lastUserNameIndex); + lastUserNameIndex = userNameIndex; + + result.Version.Add(metadata.Version); + result.Visible.Add(metadata.Visible); + } + + return result; + } + + /// + /// Creates an PbfMetadata obejct from given Metadata. + /// + /// Metadata obejct to be used as source of data. + /// Timestamp granularity as defined in PrimitiveBlock. + /// IStrignTable object to save string values to. + /// PbfMetadata obejct with data from specified metadata object. + private PbfMetadata BuildInfo(EntityMetadata metadata, int timestampGranularity, IStringTableBuilder stringTableBuilder) + { + PbfMetadata result = new PbfMetadata(); + result.Changeset = metadata.Changeset; + result.Timestamp = (long)Math.Round((metadata.Timestamp - _unixEpoch).TotalMilliseconds / timestampGranularity); + result.UserID = metadata.Uid; + result.UserNameIndex = (int)stringTableBuilder.GetStringIndex(metadata.User); + result.Version = metadata.Version; + + return result; + } + + /// + /// Releases the unmanaged resources used by the PbfWriter and optionally releases the managed resources. + /// + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + private void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + Flush(); + + if (_output != null) + { + if (_ownsOutputStream) + { + _output.Dispose(); + } + } + } + + _disposed = true; + } + } +} diff --git a/src/SpatialLite.Osm/IO/PbfWriterSettings.cs b/src/SpatialLite.Osm/IO/PbfWriterSettings.cs index 432b207..7e01a72 100644 --- a/src/SpatialLite.Osm/IO/PbfWriterSettings.cs +++ b/src/SpatialLite.Osm/IO/PbfWriterSettings.cs @@ -1,53 +1,63 @@ -using System; - -namespace SpatialLite.Osm.IO { - /// - /// Contains settings that determine behaviour of the PbfWriter. - /// - public class PbfWriterSettings : OsmWriterSettings { - - private bool _useDenseFormat; - private CompressionMode _compression; - - /// - /// Initializes a new instance of the PbfWriterSettings class with default values. - /// - public PbfWriterSettings() - : base() { - this.UseDenseFormat = true; - this.Compression = CompressionMode.ZlibDeflate; - } - - /// - /// Gets or sets a value indicating whether PbfWriter should use dense format for serializing nodes. - /// - public bool UseDenseFormat { - get { - return _useDenseFormat; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'UseDenseFromat' property - PbfReaderSettings is read-only"); - } - - _useDenseFormat = value; - } - } - - /// - /// Gets or sets a compression to be used by PbfWriter. - /// - public CompressionMode Compression { - get { - return _compression; - } - set { - if (this.IsReadOnly) { - throw new InvalidOperationException("Cannot change the 'Compression' property - PbfReaderSettings is read-only"); - } - - _compression = value; - } - } - } -} +using System; + +namespace SpatialLite.Osm.IO; + +/// +/// Contains settings that determine behaviour of the PbfWriter. +/// +public class PbfWriterSettings : OsmWriterSettings +{ + + private bool _useDenseFormat; + private CompressionMode _compression; + + /// + /// Initializes a new instance of the PbfWriterSettings class with default values. + /// + public PbfWriterSettings() + : base() + { + UseDenseFormat = true; + Compression = CompressionMode.ZlibDeflate; + } + + /// + /// Gets or sets a value indicating whether PbfWriter should use dense format for serializing nodes. + /// + public bool UseDenseFormat + { + get + { + return _useDenseFormat; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'UseDenseFromat' property - PbfReaderSettings is read-only"); + } + + _useDenseFormat = value; + } + } + + /// + /// Gets or sets a compression to be used by PbfWriter. + /// + public CompressionMode Compression + { + get + { + return _compression; + } + set + { + if (IsReadOnly) + { + throw new InvalidOperationException("Cannot change the 'Compression' property - PbfReaderSettings is read-only"); + } + + _compression = value; + } + } +} diff --git a/src/SpatialLite.Osm/IOsmEntity.cs b/src/SpatialLite.Osm/IOsmEntity.cs index 462fb2f..64d67fe 100644 --- a/src/SpatialLite.Osm/IOsmEntity.cs +++ b/src/SpatialLite.Osm/IOsmEntity.cs @@ -1,28 +1,28 @@ -namespace SpatialLite.Osm { - /// - /// Defines properties for all OSM entities. - /// - public interface IOsmEntity { +namespace SpatialLite.Osm; - /// - /// Gets or sets ID of the object. - /// - long ID { get; set; } +/// +/// Defines properties for all OSM entities. +/// +public interface IOsmEntity +{ - /// - /// Gets or sets the collection of tags associated with the IOsmGeometry. - /// - TagsCollection Tags { get; set; } + /// + /// Gets or sets ID of the object. + /// + long ID { get; set; } - /// - /// Gets or sets detailed information about OSM entity. - /// - EntityMetadata Metadata { get; set; } + /// + /// Gets or sets the collection of tags associated with the IOsmGeometry. + /// + TagsCollection Tags { get; set; } - /// - /// Gets type of the entity. - /// - EntityType EntityType { get; } + /// + /// Gets or sets detailed information about OSM entity. + /// + EntityMetadata Metadata { get; set; } - } + /// + /// Gets type of the entity. + /// + EntityType EntityType { get; } } diff --git a/src/SpatialLite.Osm/ITypedEntityCollection.cs b/src/SpatialLite.Osm/ITypedEntityCollection.cs index 66f7714..0d9358b 100644 --- a/src/SpatialLite.Osm/ITypedEntityCollection.cs +++ b/src/SpatialLite.Osm/ITypedEntityCollection.cs @@ -1,30 +1,31 @@ using System.Collections.Generic; -namespace SpatialLite.Osm { +namespace SpatialLite.Osm; + +/// +/// Defines methods and properties for collection of the OSM entities of single where entities can be accessed by their ID. +/// +/// The type of the entitie in the collection. +public interface ITypedEntityCollection : ICollection where T : IOsmEntity +{ /// - /// Defines methods and properties for collection of the OSM entities of single where entities can be accessed by their ID. + /// Gets an entity with specific ID from the collection. /// - /// The type of the entitie in the collection. - public interface ITypedEntityCollection : ICollection where T : IOsmEntity { - /// - /// Gets an entity with specific ID from the collection. - /// - /// The ID of the entity to get. - /// entity with the specific ID or null if such entity is not present in the collection. - T this[long id] { get; } + /// The ID of the entity to get. + /// entity with the specific ID or null if such entity is not present in the collection. + T this[long id] { get; } - /// - /// Removes an entity with the specific ID from the collection. - /// - /// The ID of the entity to remove from the collection. - /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. - bool Remove(long id); + /// + /// Removes an entity with the specific ID from the collection. + /// + /// The ID of the entity to remove from the collection. + /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. + bool Remove(long id); - /// - /// Determines whether the EntityICollection contains an entity with specific ID. - /// - /// The ID of the entity to locate in the EntityCollection. - /// true if entity is found in the collection, otherwise false. - bool Contains(long id); - } + /// + /// Determines whether the EntityICollection contains an entity with specific ID. + /// + /// The ID of the entity to locate in the EntityCollection. + /// true if entity is found in the collection, otherwise false. + bool Contains(long id); } diff --git a/src/SpatialLite.Osm/NodeInfo.cs b/src/SpatialLite.Osm/NodeInfo.cs index 1461d2a..cf5076a 100644 --- a/src/SpatialLite.Osm/NodeInfo.cs +++ b/src/SpatialLite.Osm/NodeInfo.cs @@ -1,77 +1,82 @@ -using System; +using SpatialLite.Osm.Geometries; +using System; -using SpatialLite.Osm.Geometries; +namespace SpatialLite.Osm; + +/// +/// Represents information about node. +/// +public class NodeInfo : IEntityInfo +{ -namespace SpatialLite.Osm { /// - /// Represents information about node. + /// Initializes a new instance of the NodeInfo class with specified ID, latitude, longitude, collection of tags and optionally EntityMetadata. /// - public class NodeInfo : IEntityInfo { - - /// - /// Initializes a new instance of the NodeInfo class with specified ID, latitude, longitude, collection of tags and optionally EntityMetadata. - /// - /// The id of the node. - /// The latitude of the node. - /// The longitude of the node. - /// The collection of thag associated with the node. - /// The EntityMetadata structure with additinal properties. Default value is null. - public NodeInfo(long id, double latitude, double longitude, TagsCollection tags, EntityMetadata additionalInfo = null) { - this.ID = id; - this.Latitude = latitude; - this.Longitude = longitude; - this.Tags = tags; - this.Metadata = additionalInfo; - } + /// The id of the node. + /// The latitude of the node. + /// The longitude of the node. + /// The collection of thag associated with the node. + /// The EntityMetadata structure with additinal properties. Default value is null. + public NodeInfo(long id, double latitude, double longitude, TagsCollection tags, EntityMetadata additionalInfo = null) + { + ID = id; + Latitude = latitude; + Longitude = longitude; + Tags = tags; + Metadata = additionalInfo; + } - /// - /// Initializes a new instance of the NodeInfo class with data from Node. - /// - /// The Node obejct to take data from. - public NodeInfo(Node node) { - if (node == null) { - throw new ArgumentNullException("Node parameter cannot be null", "node"); - } + /// + /// Initializes a new instance of the NodeInfo class with data from Node. + /// + /// The Node obejct to take data from. + public NodeInfo(Node node) + { + if (node == null) + { + throw new ArgumentNullException(nameof(node), "Node parameter cannot be null"); + } - this.ID = node.ID; - this.Longitude = node.Position.X; - this.Latitude = node.Position.Y; - this.Tags = node.Tags; - this.Metadata = node.Metadata; - } + ID = node.ID; + Longitude = node.Position.X; + Latitude = node.Position.Y; + Tags = node.Tags; + Metadata = node.Metadata; + } - /// - /// Gets type of the object that is represented by this IOsmGeometryInfo. - /// - public EntityType EntityType { - get { - return EntityType.Node; - } - } + /// + /// Gets type of the object that is represented by this IOsmGeometryInfo. + /// + public EntityType EntityType + { + get + { + return EntityType.Node; + } + } - /// - /// Gets ID of the object. - /// - public long ID { get; set; } + /// + /// Gets ID of the object. + /// + public long ID { get; set; } - /// - /// Gets the collection of tags associated with this node. - /// - public TagsCollection Tags { get; set; } + /// + /// Gets the collection of tags associated with this node. + /// + public TagsCollection Tags { get; set; } - /// - /// Gets the latitude of the node. - /// - public double Latitude { get; set; } + /// + /// Gets the latitude of the node. + /// + public double Latitude { get; set; } - /// - /// Gets the longitude of the node. - /// - public double Longitude { get; set; } + /// + /// Gets the longitude of the node. + /// + public double Longitude { get; set; } - /// - /// Gets or sets metadata of this Node. - /// - public EntityMetadata Metadata { get; set; } - } + /// + /// Gets or sets metadata of this Node. + /// + public EntityMetadata Metadata { get; set; } } diff --git a/src/SpatialLite.Osm/OsmDatabase.cs b/src/SpatialLite.Osm/OsmDatabase.cs index ced2f3e..f737043 100644 --- a/src/SpatialLite.Osm/OsmDatabase.cs +++ b/src/SpatialLite.Osm/OsmDatabase.cs @@ -1,229 +1,265 @@ -using System; +using SpatialLite.Osm.IO; +using System; using System.Collections.Generic; -using SpatialLite.Osm.IO; - -namespace SpatialLite.Osm { - /// - /// Represents in-memory database of OSM entities. - /// - /// Generic type that relresents all nodes, ways and relations - /// The type of Nodes - /// The type of Ways - /// The type of Relations - public class OsmDatabase : IEntityCollection where T : IOsmEntity where N : T where W : T where R : T { - - /// - /// Initializes a new instance of the OsmDatabase class that is empty. - /// - internal OsmDatabase() { - this.Nodes = new EntityCollection(); - this.Ways = new EntityCollection(); - this.Relations = new EntityCollection(); - } - - /// - /// Initializes a new instance of the OsmDatabase class with specific entities. - /// - /// Entities to add to the database. - internal OsmDatabase(IEnumerable entities) - : this() { - foreach (var entity in entities) { - this.Add(entity); - } - } - - /// - /// Gets collection of nodes in the database. - /// - public ITypedEntityCollection Nodes { get; private set; } - - /// - /// Gets collection of ways in the database. - /// - public ITypedEntityCollection Ways { get; private set; } - - /// - /// Gets collection of relations in the database. - /// - public ITypedEntityCollection Relations { get; private set; } - - /// - /// Gets the number of entities in the collection. - /// - public int Count { - get { - return this.Nodes.Count + this.Ways.Count + this.Relations.Count; - } - } - - /// - /// Gets a value indicating whether the collection is read-only. - /// - public bool IsReadOnly { - get { - return false; - } - } - - /// - /// Gets an entity with specific ID from the collection. - /// - /// The ID of the entity to get. - /// The type of the entity to get. - /// entity with the specific ID or null if such entity is not present in the collection. - public T this[long id, EntityType type] { - get { - if (type == EntityType.Node && this.Nodes.Contains(id)) { - return (T)this.Nodes[id]; - } - - if (type == EntityType.Way && this.Ways.Contains(id)) { - return (T)this.Ways[id]; - } - - if (type == EntityType.Relation && this.Relations.Contains(id)) { - return (T)this.Relations[id]; - } - - return default(T); - } - } - - /// - /// When overridden in derived class, saves entities from the database to specific writer. - /// - /// IOsmWriter to save entities to. - public virtual void Save(IOsmWriter writer) { - } - - /// - /// Removes an entity with the specific ID from the collection. - /// - /// The ID of the entity to remove from the collection. - /// The type of the entity to remove from the collection. - /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. - public bool Remove(long id, EntityType type) { - if (this.Nodes.Contains(id)) { - return this.Nodes.Remove(id); - } - - if (this.Ways.Contains(id)) { - return this.Ways.Remove(id); - } - - if (this.Relations.Contains(id)) { - return this.Relations.Remove(id); - } - - return false; - } - - /// - /// Determines whether the EntityICollection contains an entity with specific ID. - /// - /// The ID of the entity to locate in the EntityCollection. - /// The type of the entity to locate in the EntityCollection - /// true if entity is found in the collection, otherwise false. - public bool Contains(long id, EntityType type) { - switch (type) { - case EntityType.Node: return this.Nodes.Contains(id); - case EntityType.Way: return this.Ways.Contains(id); - case EntityType.Relation: return this.Relations.Contains(id); + +namespace SpatialLite.Osm; + +/// +/// Represents in-memory database of OSM entities. +/// +/// Generic type that relresents all nodes, ways and relations +/// The type of Nodes +/// The type of Ways +/// The type of Relations +public class OsmDatabase : IEntityCollection where T : IOsmEntity where N : T where W : T where R : T +{ + + /// + /// Initializes a new instance of the OsmDatabase class that is empty. + /// + internal OsmDatabase() + { + Nodes = new EntityCollection(); + Ways = new EntityCollection(); + Relations = new EntityCollection(); + } + + /// + /// Initializes a new instance of the OsmDatabase class with specific entities. + /// + /// Entities to add to the database. + internal OsmDatabase(IEnumerable entities) + : this() + { + foreach (var entity in entities) + { + Add(entity); + } + } + + /// + /// Gets collection of nodes in the database. + /// + public ITypedEntityCollection Nodes { get; private set; } + + /// + /// Gets collection of ways in the database. + /// + public ITypedEntityCollection Ways { get; private set; } + + /// + /// Gets collection of relations in the database. + /// + public ITypedEntityCollection Relations { get; private set; } + + /// + /// Gets the number of entities in the collection. + /// + public int Count + { + get + { + return Nodes.Count + Ways.Count + Relations.Count; + } + } + + /// + /// Gets a value indicating whether the collection is read-only. + /// + public bool IsReadOnly + { + get + { + return false; + } + } + + /// + /// Gets an entity with specific ID from the collection. + /// + /// The ID of the entity to get. + /// The type of the entity to get. + /// entity with the specific ID or null if such entity is not present in the collection. + public T this[long id, EntityType type] + { + get + { + if (type == EntityType.Node && Nodes.Contains(id)) + { + return Nodes[id]; } - throw new NotImplementedException(); - } - - /// - /// Adds specified entity to the collection. - /// - /// The entity to add to the collection. - public void Add(T entity) { - if (entity == null) { - throw new ArgumentNullException("entity", "Cannot add null to EntityCollection"); - } - - if (this.Contains(entity.ID, entity.EntityType)) { - throw new ArgumentException("An entity with the same ID has already been added."); - } - - switch (entity.EntityType) { - case EntityType.Node: this.Nodes.Add((N)entity); break; - case EntityType.Way: this.Ways.Add((W)entity); break; - case EntityType.Relation: this.Relations.Add((R)entity); break; - } - } - - /// - /// Removes all entities form the collection. - /// - public void Clear() { - this.Nodes.Clear(); - this.Ways.Clear(); - this.Relations.Clear(); - } - - /// - /// Determines whether the EntityICollection contains a specific entity. - /// - /// The entity to locate in the EntityCollection. - /// true if entity is found in the collection, otherwise false. - public bool Contains(T item) { - if (item == null) { - return false; - } - - return this.Contains(item.ID, item.EntityType); - } - - /// - /// Copies the entire EntityCollection to a compatible one-dimensional Array, starting at the specified index of the target array. - /// - /// The one-dimensional Array that is the destination of the elements copied from EntityCollection. - /// The zero-based index in array at which copying begins. - public void CopyTo(T[] array, int arrayIndex) { - foreach (var entity in this) { - array[arrayIndex++] = entity; - } - } - - /// - /// Removes the specific entity from the collection. - /// - /// The entity to remove from the collection. - /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. - public bool Remove(T entity) { - if (entity == null) { - return false; - } - - return this.Remove(entity.ID, entity.EntityType); - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// A IEnumerator<T> that can be used to iterate through the collection. - public IEnumerator GetEnumerator() { - foreach (var node in this.Nodes) { - yield return node; - } - - foreach (var way in this.Ways) { - yield return way; - } - - foreach (var relation in this.Relations) { - yield return relation; - } - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// A IEnumerator that can be used to iterate through the collection. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { - return this.GetEnumerator(); - } + if (type == EntityType.Way && Ways.Contains(id)) + { + return Ways[id]; + } + + if (type == EntityType.Relation && Relations.Contains(id)) + { + return Relations[id]; + } + + return default; + } + } + + /// + /// When overridden in derived class, saves entities from the database to specific writer. + /// + /// IOsmWriter to save entities to. + public virtual void Save(IOsmWriter writer) + { + } + + /// + /// Removes an entity with the specific ID from the collection. + /// + /// The ID of the entity to remove from the collection. + /// The type of the entity to remove from the collection. + /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. + public bool Remove(long id, EntityType type) + { + if (Nodes.Contains(id)) + { + return Nodes.Remove(id); + } + + if (Ways.Contains(id)) + { + return Ways.Remove(id); + } + + if (Relations.Contains(id)) + { + return Relations.Remove(id); + } + + return false; + } + + /// + /// Determines whether the EntityICollection contains an entity with specific ID. + /// + /// The ID of the entity to locate in the EntityCollection. + /// The type of the entity to locate in the EntityCollection + /// true if entity is found in the collection, otherwise false. + public bool Contains(long id, EntityType type) + { + switch (type) + { + case EntityType.Node: return Nodes.Contains(id); + case EntityType.Way: return Ways.Contains(id); + case EntityType.Relation: return Relations.Contains(id); + } + + throw new NotImplementedException(); + } + + /// + /// Adds specified entity to the collection. + /// + /// The entity to add to the collection. + public void Add(T entity) + { + if (entity == null) + { + throw new ArgumentNullException(nameof(entity), "Cannot add null to EntityCollection"); + } + + if (Contains(entity.ID, entity.EntityType)) + { + throw new ArgumentException("An entity with the same ID has already been added."); + } + + switch (entity.EntityType) + { + case EntityType.Node: Nodes.Add((N)entity); break; + case EntityType.Way: Ways.Add((W)entity); break; + case EntityType.Relation: Relations.Add((R)entity); break; + } + } + + /// + /// Removes all entities form the collection. + /// + public void Clear() + { + Nodes.Clear(); + Ways.Clear(); + Relations.Clear(); + } + + /// + /// Determines whether the EntityICollection contains a specific entity. + /// + /// The entity to locate in the EntityCollection. + /// true if entity is found in the collection, otherwise false. + public bool Contains(T item) + { + if (item == null) + { + return false; + } + + return Contains(item.ID, item.EntityType); + } + + /// + /// Copies the entire EntityCollection to a compatible one-dimensional Array, starting at the specified index of the target array. + /// + /// The one-dimensional Array that is the destination of the elements copied from EntityCollection. + /// The zero-based index in array at which copying begins. + public void CopyTo(T[] array, int arrayIndex) + { + foreach (var entity in this) + { + array[arrayIndex++] = entity; + } + } + + /// + /// Removes the specific entity from the collection. + /// + /// The entity to remove from the collection. + /// true if entity was successfully removed from the ICollection; otherwise, false. This method also returns false if entity is not found in the original collection. + public bool Remove(T entity) + { + if (entity == null) + { + return false; + } + + return Remove(entity.ID, entity.EntityType); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// A IEnumerator<T> that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + foreach (var node in Nodes) + { + yield return node; + } + + foreach (var way in Ways) + { + yield return way; + } + + foreach (var relation in Relations) + { + yield return relation; + } + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// A IEnumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); } } diff --git a/src/SpatialLite.Osm/OsmEntityInfoDatabase.cs b/src/SpatialLite.Osm/OsmEntityInfoDatabase.cs index 7e0843a..0b6ded7 100644 --- a/src/SpatialLite.Osm/OsmEntityInfoDatabase.cs +++ b/src/SpatialLite.Osm/OsmEntityInfoDatabase.cs @@ -1,56 +1,63 @@ -using System.Collections.Generic; - -using SpatialLite.Osm.IO; - -namespace SpatialLite.Osm { - /// - /// Represents in-memory OSM entities database that contains entities as IEntityInfo objects. - /// - public class OsmEntityInfoDatabase : OsmDatabase { - - /// - /// Initializes a new instance of the OsmEntityInfoDatabase class that is empty. - /// - public OsmEntityInfoDatabase() - : base() { - } - - /// - /// Initializes a new instance of the OsmEntityInfoDatabase class with specific entities. - /// - /// Entities to add to the database. - public OsmEntityInfoDatabase(IEnumerable entities) - : base(entities) { - } - - /// - /// Creates a new instaance of the OsmDatabase class and loads data from specific IOsmReader into it. - /// - /// The IOsmReader to read data from. - /// New instance of the OsmDAtabase class with data loaded from specified reader. - public static OsmEntityInfoDatabase Load(IOsmReader reader) { - OsmEntityInfoDatabase db = new OsmEntityInfoDatabase(); - - IEntityInfo entityInfo = null; - while ((entityInfo = reader.Read()) != null) { - switch (entityInfo.EntityType) { - case EntityType.Node: db.Nodes.Add((NodeInfo)entityInfo); break; - case EntityType.Way: db.Ways.Add((WayInfo)entityInfo); break; - case EntityType.Relation: db.Relations.Add((RelationInfo)entityInfo); break; - } - } - - return db; - } - - /// - /// Saves entities from the database to specific writer. - /// - /// IOsmWriter to save entities to. - public override void Save(IOsmWriter writer) { - foreach (var entity in this) { - writer.Write(entity); - } - } - } -} +using SpatialLite.Osm.IO; +using System.Collections.Generic; + +namespace SpatialLite.Osm; + +/// +/// Represents in-memory OSM entities database that contains entities as IEntityInfo objects. +/// +public class OsmEntityInfoDatabase : OsmDatabase +{ + + /// + /// Initializes a new instance of the OsmEntityInfoDatabase class that is empty. + /// + public OsmEntityInfoDatabase() + : base() + { + } + + /// + /// Initializes a new instance of the OsmEntityInfoDatabase class with specific entities. + /// + /// Entities to add to the database. + public OsmEntityInfoDatabase(IEnumerable entities) + : base(entities) + { + } + + /// + /// Creates a new instaance of the OsmDatabase class and loads data from specific IOsmReader into it. + /// + /// The IOsmReader to read data from. + /// New instance of the OsmDAtabase class with data loaded from specified reader. + public static OsmEntityInfoDatabase Load(IOsmReader reader) + { + OsmEntityInfoDatabase db = new OsmEntityInfoDatabase(); + + IEntityInfo entityInfo; + while ((entityInfo = reader.Read()) != null) + { + switch (entityInfo.EntityType) + { + case EntityType.Node: db.Nodes.Add((NodeInfo)entityInfo); break; + case EntityType.Way: db.Ways.Add((WayInfo)entityInfo); break; + case EntityType.Relation: db.Relations.Add((RelationInfo)entityInfo); break; + } + } + + return db; + } + + /// + /// Saves entities from the database to specific writer. + /// + /// IOsmWriter to save entities to. + public override void Save(IOsmWriter writer) + { + foreach (var entity in this) + { + writer.Write(entity); + } + } +} diff --git a/src/SpatialLite.Osm/Properties/AssemblyInfo.cs b/src/SpatialLite.Osm/Properties/AssemblyInfo.cs index 2912abd..2cb1564 100644 --- a/src/SpatialLite.Osm/Properties/AssemblyInfo.cs +++ b/src/SpatialLite.Osm/Properties/AssemblyInfo.cs @@ -18,4 +18,4 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("81094df5-f2b1-49e1-b545-e6f0528de92b")] -[assembly: InternalsVisibleTo("Tests.SpatialLite.Osm")] \ No newline at end of file +[assembly: InternalsVisibleTo("Tests.SpatialLite.Osm")] diff --git a/src/SpatialLite.Osm/RelationInfo.cs b/src/SpatialLite.Osm/RelationInfo.cs index c79f754..d498797 100644 --- a/src/SpatialLite.Osm/RelationInfo.cs +++ b/src/SpatialLite.Osm/RelationInfo.cs @@ -1,73 +1,80 @@ -using System; +using SpatialLite.Osm.Geometries; +using System; using System.Collections.Generic; -using SpatialLite.Osm.Geometries; -namespace SpatialLite.Osm { +namespace SpatialLite.Osm; + +/// +/// Represents information about relation. +/// +public class RelationInfo : IEntityInfo +{ + /// - /// Represents information about relation. + /// Initializes a new instance of the RelationInfo class with specified ID, Tags, Member and optionally EntityMetadata. /// - public class RelationInfo : IEntityInfo { + /// The id of the relation. + /// The collection of tags associated with the relation. + /// The members of the relation. + /// The EntityMetadata structure with additinal properties. Default value is null. + public RelationInfo(long id, TagsCollection tags, IList members, EntityMetadata additionalInfo = null) + { + ID = id; + Tags = tags; + Members = members; + Metadata = additionalInfo; + } - /// - /// Initializes a new instance of the RelationInfo class with specified ID, Tags, Member and optionally EntityMetadata. - /// - /// The id of the relation. - /// The collection of tags associated with the relation. - /// The members of the relation. - /// The EntityMetadata structure with additinal properties. Default value is null. - public RelationInfo(long id, TagsCollection tags, IList members, EntityMetadata additionalInfo = null) { - this.ID = id; - this.Tags = tags; - this.Members = members; - this.Metadata = additionalInfo; - } - - /// - /// Initializes a new instance of the RelationInfo class with data from specific Relation. - /// - /// The Relation object to copy data from. - public RelationInfo(Relation source) { - if (source == null) { - throw new ArgumentNullException("Source relation cannot be null", "source"); - } + /// + /// Initializes a new instance of the RelationInfo class with data from specific Relation. + /// + /// The Relation object to copy data from. + public RelationInfo(Relation source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source), "Source relation cannot be null"); + } - this.ID = source.ID; - this.Tags = source.Tags; - this.Metadata = source.Metadata; + ID = source.ID; + Tags = source.Tags; + Metadata = source.Metadata; - this.Members = new List(source.Geometries.Count); - foreach (var member in source.Geometries) { - this.Members.Add(new RelationMemberInfo(member)); - } - } + Members = new List(source.Geometries.Count); + foreach (var member in source.Geometries) + { + Members.Add(new RelationMemberInfo(member)); + } + } - /// - /// Gets type of the object that is represented by this IOsmGeometryInfo. - /// - public EntityType EntityType { - get { - return EntityType.Relation; - } - } + /// + /// Gets type of the object that is represented by this IOsmGeometryInfo. + /// + public EntityType EntityType + { + get + { + return EntityType.Relation; + } + } - /// - /// Gets ID of the relation. - /// - public long ID { get; set; } + /// + /// Gets ID of the relation. + /// + public long ID { get; set; } - /// - /// Gets the collection of tags associated with the relation. - /// - public TagsCollection Tags { get; set; } + /// + /// Gets the collection of tags associated with the relation. + /// + public TagsCollection Tags { get; set; } - /// - /// Gets list of members of the relation. - /// - public IList Members { get; set; } + /// + /// Gets list of members of the relation. + /// + public IList Members { get; set; } - /// - /// Gets additional information about this RelationInfo. - /// - public EntityMetadata Metadata { get; set; } - } + /// + /// Gets additional information about this RelationInfo. + /// + public EntityMetadata Metadata { get; set; } } diff --git a/src/SpatialLite.Osm/RelationMemberInfo.cs b/src/SpatialLite.Osm/RelationMemberInfo.cs index 2451771..4ba0c3a 100644 --- a/src/SpatialLite.Osm/RelationMemberInfo.cs +++ b/src/SpatialLite.Osm/RelationMemberInfo.cs @@ -1,35 +1,36 @@ using SpatialLite.Osm.Geometries; -namespace SpatialLite.Osm { - /// - /// Represents information about relation member. - /// - public struct RelationMemberInfo { +namespace SpatialLite.Osm; - /// - /// The type of the member (node, way, relation) - /// - public EntityType MemberType; +/// +/// Represents information about relation member. +/// +public struct RelationMemberInfo +{ - /// - /// The role of the member in relation - /// - public string Role; + /// + /// The type of the member (node, way, relation) + /// + public EntityType MemberType { get; set; } - /// - /// The ID of the member entity - /// - public long Reference; + /// + /// The role of the member in relation + /// + public string Role { get; set; } - /// - /// Initializes a new instance of the RelationMemberInfo structure with values from specific RelationMember. - /// - /// The RelationMember object to copy valyes from. - public RelationMemberInfo(RelationMember source) { - this.Reference = source.Member.ID; - this.MemberType = source.MemberType; - this.Role = source.Role; - } + /// + /// The ID of the member entity + /// + public long Reference { get; set; } - } + /// + /// Initializes a new instance of the RelationMemberInfo structure with values from specific RelationMember. + /// + /// The RelationMember object to copy valyes from. + public RelationMemberInfo(RelationMember source) + { + Reference = source.Member.ID; + MemberType = source.MemberType; + Role = source.Role; + } } diff --git a/src/SpatialLite.Osm/Tag.cs b/src/SpatialLite.Osm/Tag.cs index 8fe782f..e95eeb1 100644 --- a/src/SpatialLite.Osm/Tag.cs +++ b/src/SpatialLite.Osm/Tag.cs @@ -1,92 +1,102 @@ -using System; - -namespace SpatialLite.Osm { - /// - /// Represents OSM tag and it's value. - /// - public class Tag { - - private string _key; - private string _value; - - /// - /// Initializes a new instance of the Tag class with specified key and value. - /// - /// The key of the Tag. - /// The value of the Tag. - public Tag(string key, string value) { - if (key == null) { - throw new ArgumentNullException("Parameter 'key' can't be null."); - } - - if (key == string.Empty) { - throw new ArgumentException("Parameter 'key' can't be empty string."); - } - - if (value == null) { - throw new ArgumentNullException("Parameter 'value' can't be null."); - } - - _key = key; - _value = value; - } - - /// - /// Gets the key of the tag. - /// - public string Key { - get { - return _key; - } - } - - /// - /// Gets the value of the tag. - /// - public string Value { - get { - return _value; - } - } - - /// - /// Compares the current Tag object with the specified object for equivalence. - /// - /// The object to test for equivalence with the current Tag object. - /// true if the objects are equal, otherwise returns false. - public override bool Equals(object obj) { - if (obj == null) { - return false; - } - - Tag other = obj as Tag; - if (other != null) { - return Equals(other); - } - else { - return false; - } - } - - /// - /// Compares the current Tag object with the specified Tag. - /// - /// The Tag to test for equivalence with the current Tag object. - /// true if the objects are equal, otherwise returns false. - public bool Equals(Tag other) { - if (other == null) { - return false; - } - - return _key.Equals(other._key) && _value.Equals(other._value); - } - - /// - /// Returns the hash code for the current object. - /// - /// An integer hash code. - public override int GetHashCode() { - return unchecked(_key.GetHashCode() * 83 + _value.GetHashCode()); - } - } -} +using System; + +namespace SpatialLite.Osm; + +/// +/// Represents OSM tag and it's value. +/// +public class Tag +{ + + private readonly string _key; + private readonly string _value; + + /// + /// Initializes a new instance of the Tag class with specified key and value. + /// + /// The key of the Tag. + /// The value of the Tag. + public Tag(string key, string value) + { + if (key == null) + { + throw new ArgumentNullException(nameof(key), "Parameter 'key' can't be null."); + } + + if (key == string.Empty) + { + throw new ArgumentException("Parameter 'key' can't be empty string."); + } + + _key = key; + _value = value ?? throw new ArgumentNullException(nameof(value), "Parameter 'value' can't be null."); + } + + /// + /// Gets the key of the tag. + /// + public string Key + { + get + { + return _key; + } + } + + /// + /// Gets the value of the tag. + /// + public string Value + { + get + { + return _value; + } + } + + /// + /// Compares the current Tag object with the specified object for equivalence. + /// + /// The object to test for equivalence with the current Tag object. + /// true if the objects are equal, otherwise returns false. + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (obj is Tag other) + { + return Equals(other); + } + else + { + return false; + } + } + + /// + /// Compares the current Tag object with the specified Tag. + /// + /// The Tag to test for equivalence with the current Tag object. + /// true if the objects are equal, otherwise returns false. + public bool Equals(Tag other) + { + if (other == null) + { + return false; + } + + return _key.Equals(other._key) && _value.Equals(other._value); + } + + /// + /// Returns the hash code for the current object. + /// + /// An integer hash code. + public override int GetHashCode() + { + return unchecked(_key.GetHashCode() * 83 + _value.GetHashCode()); + } +} diff --git a/src/SpatialLite.Osm/TagsCollection.cs b/src/SpatialLite.Osm/TagsCollection.cs index 206d47e..ab66dd8 100644 --- a/src/SpatialLite.Osm/TagsCollection.cs +++ b/src/SpatialLite.Osm/TagsCollection.cs @@ -1,222 +1,266 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace SpatialLite.Osm { - /// - /// Represents collection of Tags that are accesible by their key. - /// - public class TagsCollection : ICollection { - - private List _tags; - - /// - /// Initializes a new instance of the TagsCollection class. - /// - public TagsCollection() { - } - - /// - /// Initializes a new instance of the TagsCollection class with specified tags. - /// - /// Collection of tags. - public TagsCollection(IEnumerable tags) { - _tags = new List(tags.Count()); - - foreach (var tag in tags) { - this.Add(tag); - } - } - - /// - /// Gets the number of Tags in the TagsCollection. - /// - public int Count { - get { - if (_tags == null) { - return 0; - } - else { - return _tags.Count; - } - } - } - - /// - /// Gets a value indicating whether the TagsCollection is read-only. - /// - public bool IsReadOnly { - get { return false; } - } - - /// - /// Gets or sets value of the Tag with given key. - /// - /// The string key of Tag. - /// The value of the Tag or null if Tag isn't found. - public string this[string key] { - get { - Tag tag = this.GetTag(key); - return tag.Value; - } - set { - if (this.Contains(key)) { - this.Remove(key); - this.Add(new Tag(key, value)); - } - else { - this.Add(new Tag(key, value)); - } - } - } - - /// - /// Adds Tag to the TagsCollection. - /// - /// The Tag to add to the TagsCollection. - public void Add(Tag tag) { - if (_tags == null) { - _tags = new List(); - } - - if (this.Contains(tag.Key)) { - throw new ArgumentException(string.Format("Tag with key '{0}' is already present in the collection.", tag.Key)); - } - - _tags.Add(tag); - } - - /// - /// Removes all items from the TagsCollection. - /// - public void Clear() { - if (_tags != null) { - _tags.Clear(); - } - } - - /// - /// Determines whether the TagsCollection contains a specific value. - /// - /// The Tag to locate in the TagsCollection. - /// true if item is found in the TagsCollection; otherwise, false. - public bool Contains(Tag item) { - if (_tags == null) { - return false; - } - - return _tags.Contains(item); - } - - /// - /// Determines whether the TagsCollection contains a Tag with specified key. - /// - /// The key of a Tag to locate in the TagsCollection. - /// true if item is found in the TagsCollection; otherwise, false. - public bool Contains(string key) { - if (_tags == null) { - return false; - } - - for (int i = 0; i < _tags.Count; i++) { - if (_tags[i].Key == key) { - return true; - } - } - - return false; - } - - /// - /// opies the entire TagCollection to a compatible one-dimensional Array, starting at the specified index of the target array. - /// - /// The one-dimensional Array that is the destination of the elements copied from TagCollection. - /// The zero-based index in array at which copying begins. - public void CopyTo(Tag[] array, int arrayIndex) { - if (_tags != null) { - _tags.CopyTo(array, arrayIndex); - } - } - - /// - /// Gets Tag with the specified key from the collection. - /// - /// The key of the Tag. - /// Tag with specified Key or null, if the Tag is not found in the TagsCollection. - public Tag GetTag(string key) { - if (_tags == null) { - throw new ArgumentException(string.Format("Tag with key '{0}' is not present in the collection.", key)); - } - - for (int i = 0; i < _tags.Count; i++) { - if (_tags[i].Key == key) { - return _tags[i]; - } - } - - throw new ArgumentException(string.Format("Tag with key '{0}' is not present in the collection.", key)); - } - - /// - /// Removes the specific Tag from the TagsCollection. - /// - /// The Tag to remove from the TagsCollection. - /// true if item was successfully removed from the TagsCollection, otherwise false. This method also returns false if item is not found in the original TagsCollection. - public bool Remove(Tag item) { - if (_tags == null) { - return false; - } - - return _tags.Remove(item); - } - - /// - /// Removes the Tag with specified key from the TagsCollection. - /// - /// The Key of the Tag to remove from the TagsCollection. - /// true if item was successfully removed from the TagsCollection, otherwise false. This method also returns false if item is not found in the original TagsCollection. - public bool Remove(string key) { - if (this.Contains(key)) { - Tag tag = this.GetTag(key); - return this.Remove(tag); - } - else { - return false; - } - } - - /// - /// Returns an generic enumerator that iterates through a collection. - /// - /// An generic IEnumerator object that can be used to iterate through the collection. - public IEnumerator GetEnumerator() { - if (_tags == null) { - return this.GetEmptyEnumerator(); - } - else { - return _tags.GetEnumerator(); - } - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// An IEnumerator object that can be used to iterate through the collection. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { - if (_tags == null) { - return this.GetEmptyEnumerator(); - } - else { - return _tags.GetEnumerator(); - } - } - - /// - /// Returns Enumerator for empty collection. - /// - /// Enumerator that returns no items. - private IEnumerator GetEmptyEnumerator() { - yield break; - } - } -} +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; + +namespace SpatialLite.Osm; + +/// +/// Represents collection of Tags that are accesible by their key. +/// +public class TagsCollection : ICollection +{ + + private List _tags; + + /// + /// Initializes a new instance of the TagsCollection class. + /// + public TagsCollection() + { + } + + /// + /// Initializes a new instance of the TagsCollection class with specified tags. + /// + /// Collection of tags. + public TagsCollection(IEnumerable tags) + { + _tags = new List(tags.Count()); + + foreach (var tag in tags) + { + Add(tag); + } + } + + /// + /// Gets the number of Tags in the TagsCollection. + /// + public int Count + { + get + { + if (_tags == null) + { + return 0; + } + else + { + return _tags.Count; + } + } + } + + /// + /// Gets a value indicating whether the TagsCollection is read-only. + /// + public bool IsReadOnly + { + get { return false; } + } + + /// + /// Gets or sets value of the Tag with given key. + /// + /// The string key of Tag. + /// The value of the Tag or null if Tag isn't found. + public string this[string key] + { + get + { + Tag tag = GetTag(key); + return tag.Value; + } + set + { + if (Contains(key)) + { + Remove(key); + Add(new Tag(key, value)); + } + else + { + Add(new Tag(key, value)); + } + } + } + + /// + /// Adds Tag to the TagsCollection. + /// + /// The Tag to add to the TagsCollection. + public void Add(Tag tag) + { + if (_tags == null) + { + _tags = new List(); + } + + if (Contains(tag.Key)) + { + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Tag with key '{0}' is already present in the collection.", tag.Key)); + } + + _tags.Add(tag); + } + + /// + /// Removes all items from the TagsCollection. + /// + public void Clear() + { + if (_tags != null) + { + _tags.Clear(); + } + } + + /// + /// Determines whether the TagsCollection contains a specific value. + /// + /// The Tag to locate in the TagsCollection. + /// true if item is found in the TagsCollection; otherwise, false. + public bool Contains(Tag item) + { + if (_tags == null) + { + return false; + } + + return _tags.Contains(item); + } + + /// + /// Determines whether the TagsCollection contains a Tag with specified key. + /// + /// The key of a Tag to locate in the TagsCollection. + /// true if item is found in the TagsCollection; otherwise, false. + public bool Contains(string key) + { + if (_tags == null) + { + return false; + } + + for (int i = 0; i < _tags.Count; i++) + { + if (_tags[i].Key == key) + { + return true; + } + } + + return false; + } + + /// + /// opies the entire TagCollection to a compatible one-dimensional Array, starting at the specified index of the target array. + /// + /// The one-dimensional Array that is the destination of the elements copied from TagCollection. + /// The zero-based index in array at which copying begins. + public void CopyTo(Tag[] array, int arrayIndex) + { + if (_tags != null) + { + _tags.CopyTo(array, arrayIndex); + } + } + + /// + /// Gets Tag with the specified key from the collection. + /// + /// The key of the Tag. + /// Tag with specified Key or null, if the Tag is not found in the TagsCollection. + public Tag GetTag(string key) + { + if (_tags == null) + { + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Tag with key '{0}' is not present in the collection.", key)); + } + + for (int i = 0; i < _tags.Count; i++) + { + if (_tags[i].Key == key) + { + return _tags[i]; + } + } + + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Tag with key '{0}' is not present in the collection.", key)); + } + + /// + /// Removes the specific Tag from the TagsCollection. + /// + /// The Tag to remove from the TagsCollection. + /// true if item was successfully removed from the TagsCollection, otherwise false. This method also returns false if item is not found in the original TagsCollection. + public bool Remove(Tag item) + { + if (_tags == null) + { + return false; + } + + return _tags.Remove(item); + } + + /// + /// Removes the Tag with specified key from the TagsCollection. + /// + /// The Key of the Tag to remove from the TagsCollection. + /// true if item was successfully removed from the TagsCollection, otherwise false. This method also returns false if item is not found in the original TagsCollection. + public bool Remove(string key) + { + if (Contains(key)) + { + Tag tag = GetTag(key); + return Remove(tag); + } + else + { + return false; + } + } + + /// + /// Returns an generic enumerator that iterates through a collection. + /// + /// An generic IEnumerator object that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + if (_tags == null) + { + return GetEmptyEnumerator(); + } + else + { + return _tags.GetEnumerator(); + } + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// An IEnumerator object that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + if (_tags == null) + { + return GetEmptyEnumerator(); + } + else + { + return _tags.GetEnumerator(); + } + } + + /// + /// Returns Enumerator for empty collection. + /// + /// Enumerator that returns no items. + private IEnumerator GetEmptyEnumerator() + { + yield break; + } +} diff --git a/src/SpatialLite.Osm/WayInfo.cs b/src/SpatialLite.Osm/WayInfo.cs index aa44c25..ca9716f 100644 --- a/src/SpatialLite.Osm/WayInfo.cs +++ b/src/SpatialLite.Osm/WayInfo.cs @@ -1,77 +1,83 @@ -using System; +using SpatialLite.Osm.Geometries; +using System; using System.Collections.Generic; -using SpatialLite.Osm.Geometries; +namespace SpatialLite.Osm; + +/// +/// Represents information about way. +/// +/// +/// Nodes are represented with their id's only. +/// +public class WayInfo : IEntityInfo +{ -namespace SpatialLite.Osm { /// - /// Represents information about way. + /// Initializes a new instance of the WayInfo class with specified ID, Nodes, collection of tags and optionaly EntityMetadata. /// - /// - /// Nodes are represented with their id's only. - /// - public class WayInfo : IEntityInfo { - - /// - /// Initializes a new instance of the WayInfo class with specified ID, Nodes, collection of tags and optionaly EntityMetadata. - /// - /// The Id of the way. - /// The collection of tags associated with the way. - /// The nodes of the way. - /// The EntityMetadata structure with additinal properties. Default value is null. - public WayInfo(long id, TagsCollection tags, IList nodes, EntityMetadata additionalInfo = null) { - this.ID = id; - this.Tags = tags; - this.Nodes = nodes; - this.Metadata = additionalInfo; - } + /// The Id of the way. + /// The collection of tags associated with the way. + /// The nodes of the way. + /// The EntityMetadata structure with additinal properties. Default value is null. + public WayInfo(long id, TagsCollection tags, IList nodes, EntityMetadata additionalInfo = null) + { + ID = id; + Tags = tags; + Nodes = nodes; + Metadata = additionalInfo; + } - /// - /// Initializes a new instance of the WayInfo class with data from specific Way - /// - /// The way to get data from - public WayInfo(Way way) { - if (way == null) { - throw new ArgumentNullException("Way parameter cannot be null", "way"); - } + /// + /// Initializes a new instance of the WayInfo class with data from specific Way + /// + /// The way to get data from + public WayInfo(Way way) + { + if (way == null) + { + throw new ArgumentNullException(nameof(way), "Way parameter cannot be null"); + } - this.ID = way.ID; - this.Tags = way.Tags; - this.Metadata = way.Metadata; + ID = way.ID; + Tags = way.Tags; + Metadata = way.Metadata; - this.Nodes = new List(way.Nodes.Count); - foreach (var node in way.Nodes) { - this.Nodes.Add(node.ID); - } - } + Nodes = new List(way.Nodes.Count); + foreach (var node in way.Nodes) + { + Nodes.Add(node.ID); + } + } - /// - /// Gets type of the object that is represented by this WayInfo. - /// - public EntityType EntityType { - get { - return EntityType.Way; - } - } + /// + /// Gets type of the object that is represented by this WayInfo. + /// + public EntityType EntityType + { + get + { + return EntityType.Way; + } + } - /// - /// Gets ID of the object. - /// - public long ID { get; set; } + /// + /// Gets ID of the object. + /// + public long ID { get; set; } - /// - /// Gets the collection of tags associated with this WayInfo. - /// - public TagsCollection Tags { get; set; } + /// + /// Gets the collection of tags associated with this WayInfo. + /// + public TagsCollection Tags { get; set; } - /// - /// Gets the list of id's of this way nodes. - /// - public IList Nodes { get; private set; } + /// + /// Gets the list of id's of this way nodes. + /// + public IList Nodes { get; private set; } - /// - /// Gets additional information about this IOsmGeometryInfo. - /// - public EntityMetadata Metadata { get; set; } - } + /// + /// Gets additional information about this IOsmGeometryInfo. + /// + public EntityMetadata Metadata { get; set; } } diff --git a/src/Tests.SpatialLite.Core/API/CoordinateTests.cs b/src/Tests.SpatialLite.Core/API/CoordinateTests.cs index 947e936..8051620 100644 --- a/src/Tests.SpatialLite.Core/API/CoordinateTests.cs +++ b/src/Tests.SpatialLite.Core/API/CoordinateTests.cs @@ -1,196 +1,212 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; -using Xunit.Extensions; - -using SpatialLite.Core.API; - -namespace Tests.SpatialLite.Core.API { - public class CoordinateTests { - double xCoordinate = 3.5; - double yCoordinate = 4.2; - double zCoordinate = 10.5; - double mValue = 100.4; - - [Fact] - public void Constructor_XY_SetsXYValuesAndZMNaN() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate); - - Assert.Equal(xCoordinate, target.X); - Assert.Equal(yCoordinate, target.Y); - Assert.Equal(double.NaN, target.Z); - Assert.Equal(double.NaN, target.M); - } - - [Fact] - public void Constructor_XYZ_SetsXYZValuesAndMNaN() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate); - - Assert.Equal(xCoordinate, target.X); - Assert.Equal(yCoordinate, target.Y); - Assert.Equal(zCoordinate, target.Z); - Assert.Equal(double.NaN, target.M); - } - - [Fact] - public void Constructor_XYZM_SetsXYZMValues() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - - Assert.Equal(xCoordinate, target.X); - Assert.Equal(yCoordinate, target.Y); - Assert.Equal(zCoordinate, target.Z); - Assert.Equal(mValue, target.M); - } - - [Fact] - public void Is3D_ReturnsFalseForNaNZCoordinate() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate); - - Assert.False(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsTrueFor3D() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate); - - Assert.True(target.Is3D); - } - - [Fact] - public void IsMeasured_ReturnsFalseForNaNMCoordinate() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsTrueForMeasuredCoordinate() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - - Assert.True(target.IsMeasured); - } - - [Fact] - public void Equals_ReturnsTrueForCoordinateWithTheSameOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - - Assert.True(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnsTrueForNaNCoordinates() { - Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - - Assert.True(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnsFalseForNull() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - object other = null; - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnsFalseForOtherObjectType() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - object other = "string"; - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnsFalseForCoordinateWithDifferentOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate + 1, mValue + 1); - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals2D_ReturnsTrueForCoordinateWithTheSameOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - - Assert.True(target.Equals2D(other)); - } - - [Fact] - public void Equals2D_ReturnsTrueForCoordinateWithTheDifferentZMOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate + 1, mValue + 1); - - Assert.True(target.Equals2D(other)); - } - - [Fact] - public void Equals2D_ReturnsTrueForNaNCoordinates() { - Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - - Assert.True(target.Equals2D(other)); - } - - [Fact] - public void Equals2D_ReturnsFalseForCoordinateWithDifferentXYOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate, mValue); - - Assert.False(target.Equals2D(other)); - } - - [Fact] - public void EqualsOperator_ReturnsTrueForCoordinateWithTheSameOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - - Assert.True(target == other); - } - - [Fact] - public void EqualsOperator_ReturnsTrueForNaNCoordinates() { - Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - - Assert.True(target == other); - } - - [Fact] - public void EqualsOperator_ReturnsFalseForCoordinateWithDifferentOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate + 1, mValue + 1); - - Assert.False(target == other); - } - - [Fact] - public void NotEqualsOperator_ReturnsFalseForCoordinateWithTheSameOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - - Assert.False(target != other); - } - - [Fact] - public void NotEqualsOperator_ReturnsFalseForNaNCoordinates() { - Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); - - Assert.False(target != other); - } - - [Fact] - public void NotEqualsOperator_ReturnsTrueForCoordinateWithDifferentOrdinates() { - Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); - Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate + 1, mValue + 1); - - Assert.True(target != other); - } - } -} +using SpatialLite.Core.API; +using Xunit; + +namespace Tests.SpatialLite.Core.API; + +public class CoordinateTests +{ + private readonly double xCoordinate = 3.5; + private readonly double yCoordinate = 4.2; + private readonly double zCoordinate = 10.5; + private readonly double mValue = 100.4; + + [Fact] + public void Constructor_XY_SetsXYValuesAndZMNaN() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate); + + Assert.Equal(xCoordinate, target.X); + Assert.Equal(yCoordinate, target.Y); + Assert.Equal(double.NaN, target.Z); + Assert.Equal(double.NaN, target.M); + } + + [Fact] + public void Constructor_XYZ_SetsXYZValuesAndMNaN() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate); + + Assert.Equal(xCoordinate, target.X); + Assert.Equal(yCoordinate, target.Y); + Assert.Equal(zCoordinate, target.Z); + Assert.Equal(double.NaN, target.M); + } + + [Fact] + public void Constructor_XYZM_SetsXYZMValues() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + + Assert.Equal(xCoordinate, target.X); + Assert.Equal(yCoordinate, target.Y); + Assert.Equal(zCoordinate, target.Z); + Assert.Equal(mValue, target.M); + } + + [Fact] + public void Is3D_ReturnsFalseForNaNZCoordinate() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate); + + Assert.False(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsTrueFor3D() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate); + + Assert.True(target.Is3D); + } + + [Fact] + public void IsMeasured_ReturnsFalseForNaNMCoordinate() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsTrueForMeasuredCoordinate() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + + Assert.True(target.IsMeasured); + } + + [Fact] + public void Equals_ReturnsTrueForCoordinateWithTheSameOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + + Assert.True(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnsTrueForNaNCoordinates() + { + Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + + Assert.True(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnsFalseForNull() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + object other = null; + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnsFalseForOtherObjectType() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + object other = "string"; + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnsFalseForCoordinateWithDifferentOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate + 1, mValue + 1); + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals2D_ReturnsTrueForCoordinateWithTheSameOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + + Assert.True(target.Equals2D(other)); + } + + [Fact] + public void Equals2D_ReturnsTrueForCoordinateWithTheDifferentZMOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate + 1, mValue + 1); + + Assert.True(target.Equals2D(other)); + } + + [Fact] + public void Equals2D_ReturnsTrueForNaNCoordinates() + { + Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + + Assert.True(target.Equals2D(other)); + } + + [Fact] + public void Equals2D_ReturnsFalseForCoordinateWithDifferentXYOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate, mValue); + + Assert.False(target.Equals2D(other)); + } + + [Fact] + public void EqualsOperator_ReturnsTrueForCoordinateWithTheSameOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + + Assert.True(target == other); + } + + [Fact] + public void EqualsOperator_ReturnsTrueForNaNCoordinates() + { + Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + + Assert.True(target == other); + } + + [Fact] + public void EqualsOperator_ReturnsFalseForCoordinateWithDifferentOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate + 1, mValue + 1); + + Assert.False(target == other); + } + + [Fact] + public void NotEqualsOperator_ReturnsFalseForCoordinateWithTheSameOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + + Assert.False(target != other); + } + + [Fact] + public void NotEqualsOperator_ReturnsFalseForNaNCoordinates() + { + Coordinate target = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + Coordinate other = new Coordinate(double.NaN, double.NaN, double.NaN, double.NaN); + + Assert.False(target != other); + } + + [Fact] + public void NotEqualsOperator_ReturnsTrueForCoordinateWithDifferentOrdinates() + { + Coordinate target = new Coordinate(xCoordinate, yCoordinate, zCoordinate, mValue); + Coordinate other = new Coordinate(xCoordinate + 1, yCoordinate + 1, zCoordinate + 1, mValue + 1); + + Assert.True(target != other); + } +} diff --git a/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs b/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs index ea04057..bb8bb02 100644 --- a/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs +++ b/src/Tests.SpatialLite.Core/API/EnvelopeTests.cs @@ -1,237 +1,251 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; -using Xunit.Extensions; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Core.API { - public class EnvelopeTests { - - Coordinate[] _coordinates = new Coordinate[] { - new Coordinate(1, 10, 100, 1000), - new Coordinate(0, 0, 0, 0), - new Coordinate(-1, -10, -100, -1000) - }; - - Coordinate _insideCoordinate = new Coordinate(0.5, 0.5, 0.5, 0.5); - Coordinate _lowerValues = new Coordinate(-2, -20, -200, -2000); - Coordinate _higherValues = new Coordinate(2, 20, 200, 2000); - - double[] _expectedBounds = new double[] { -1, 1, -10, 10, -100, 100, -1000, 1000 }; - - static public IEnumerable _XYZEnvelopeDifferentBounds { - get { - yield return new object[] { new Coordinate[] { new Coordinate(1 + 1, 2, 100, 1000), new Coordinate(5, 6, 200, 2000)} }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2 + 1, 100, 1000), new Coordinate(5, 6, 200, 2000) } }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100 + 1, 1000), new Coordinate(5, 6, 200, 2000) } }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000 + 1), new Coordinate(5, 6, 200, 2000) } }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5 + 1, 6, 200, 2000) } }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5, 6 + 1, 200, 2000) } }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5, 6, 200 + 1, 2000) } }; - yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5, 6, 200, 2000 + 1) } }; - } - } - - internal void CheckBoundaries(Envelope target, double minX, double maxX, double minY, double maxY, double minZ, double maxZ, double minM, double maxM) { - Assert.Equal(minX, target.MinX); - Assert.Equal(maxX, target.MaxX); - Assert.Equal(minY, target.MinY); - Assert.Equal(maxY, target.MaxY); - Assert.Equal(minZ, target.MinZ); - Assert.Equal(maxZ, target.MaxZ); - Assert.Equal(minM, target.MinM); - Assert.Equal(maxM, target.MaxM); - } - - [Fact] - public void Constructor__InitializesBoundsToNaNValues() { - Envelope target = new Envelope(); - - Assert.Equal(double.NaN, target.MinX); - Assert.Equal(double.NaN, target.MaxX); - Assert.Equal(double.NaN, target.MinY); - Assert.Equal(double.NaN, target.MaxY); - Assert.Equal(double.NaN, target.MinZ); - Assert.Equal(double.NaN, target.MaxZ); - Assert.Equal(double.NaN, target.MinM); - Assert.Equal(double.NaN, target.MaxM); - } - - [Fact] - public void Constructor_Coordinate_InitializesXYZProperties() { - Envelope target = new Envelope(_coordinates[0]); - - CheckBoundaries(target, _coordinates[0].X, _coordinates[0].X, _coordinates[0].Y, _coordinates[0].Y, _coordinates[0].Z, _coordinates[0].Z, _coordinates[0].M, _coordinates[0].M); - } - - [Fact] - public void Constructor_IEnumerableCoordinate_SetsMinMaxValues() { - Envelope source = new Envelope(_coordinates); - - Envelope target = new Envelope(source); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Constructor_Envelope_CopiesMinMaxValues() { - Envelope source = new Envelope(_coordinates); - - Envelope target = new Envelope(source); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_Coordinate_SetsMinMaxValuesOnEmptyEnvelope() { - Envelope target = new Envelope(); - target.Extend(_coordinates[0]); - - CheckBoundaries(target, _coordinates[0].X, _coordinates[0].X, _coordinates[0].Y, _coordinates[0].Y, - _coordinates[0].Z, _coordinates[0].Z, _coordinates[0].M, _coordinates[0].M); - } - - [Fact] - public void Extend_Coordinate_DoNothingIfCoordinateIsEmpty() { - Envelope target = new Envelope(_coordinates); - - target.Extend(Coordinate.Empty); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_Coordinate_ExtendsEnvelopeToLowerValues() { - Envelope target = new Envelope(_coordinates); - - target.Extend(_lowerValues); - - CheckBoundaries(target, _lowerValues.X, _expectedBounds[1], _lowerValues.Y, _expectedBounds[3], _lowerValues.Z, _expectedBounds[5], _lowerValues.M, _expectedBounds[7]); - } - - [Fact] - public void Extend_Coordinate_ExtendsEnvelopeToHigherValues() { - Envelope target = new Envelope(_coordinates); - - target.Extend(_higherValues); - - CheckBoundaries(target, _expectedBounds[0], _higherValues.X, _expectedBounds[2], _higherValues.Y, _expectedBounds[4], _higherValues.Z, _expectedBounds[6], _higherValues.M); - } - - [Fact] - public void Extend_Coordinate_DoNothingForCoordinateInsideEnvelope() { - Envelope target = new Envelope(_coordinates); - - target.Extend(_insideCoordinate); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_IEnumerableCoordinate_SetsMinMaxValuesOnEmptyEnvelope() { - Envelope target = new Envelope(); - - target.Extend(_coordinates); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_IEnumerableCoordinate_DoNothingForEmptyCollection() { - Envelope target = new Envelope(_coordinates); - - target.Extend(new Coordinate[] {}); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_IEnumerableCoordinate_ExtendsEnvelope() { - Envelope target = new Envelope(_coordinates); - - target.Extend(new Coordinate[] {_lowerValues, _higherValues }); - - CheckBoundaries(target, _lowerValues.X, _higherValues.X, _lowerValues.Y, _higherValues.Y, _lowerValues.Z, _higherValues.Z, _lowerValues.M, _higherValues.M); - } - - [Fact] - public void Extend_Envelope_SetsMinMaxValuesOnEmptyEnvelope() { - Envelope target = new Envelope(); - - target.Extend(new Envelope(_coordinates)); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_Envelope_DoNothingIfEnvelopeIsInsideTargetEnvelope() { - Envelope target = new Envelope(_coordinates); - - target.Extend(new Envelope(_coordinates[1])); - - CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], - _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); - } - - [Fact] - public void Extend_Envelope_ExtendsEnvelope() { - Envelope target = new Envelope(_coordinates); - - target.Extend(new Envelope(new Coordinate[] {_lowerValues, _higherValues})); - - CheckBoundaries(target, _lowerValues.X, _higherValues.X, _lowerValues.Y, _higherValues.Y, _lowerValues.Z, _higherValues.Z, _lowerValues.M, _higherValues.M); - } - - [Fact] - public void Equals_ReturnsTrueForSameObjectInstance() { - Envelope target = new Envelope(_coordinates); - - Assert.True(target.Equals(target)); - } - - [Fact] - public void Equals_ReturnsTrueForTheEnvelopeWithTheSameBounds() { - Envelope target = new Envelope(_coordinates); - Envelope other = new Envelope(target); - - Assert.True(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnsFalseForNull() { - Envelope target = new Envelope(_coordinates); - object other = null; - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnsFalseForOtherObjectType() { - Envelope target = new Envelope(_coordinates); - object other = "string"; - - Assert.False(target.Equals(other)); - } - - [Theory] - [MemberData(nameof(_XYZEnvelopeDifferentBounds))] - public void Equals_ReturnsFalseForTheEnvelopeWithDifferentBounds(Coordinate[] corners) { - Envelope target = new Envelope(_coordinates); - Envelope other = new Envelope(corners); - - Assert.False(target.Equals(other)); - } - } -} +using SpatialLite.Core.API; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Core.API; + +public class EnvelopeTests +{ + private readonly Coordinate[] _coordinates = new Coordinate[] { + new Coordinate(1, 10, 100, 1000), + new Coordinate(0, 0, 0, 0), + new Coordinate(-1, -10, -100, -1000) + }; + private Coordinate _insideCoordinate = new Coordinate(0.5, 0.5, 0.5, 0.5); + private Coordinate _lowerValues = new Coordinate(-2, -20, -200, -2000); + private Coordinate _higherValues = new Coordinate(2, 20, 200, 2000); + private readonly double[] _expectedBounds = new double[] { -1, 1, -10, 10, -100, 100, -1000, 1000 }; + + public static IEnumerable _XYZEnvelopeDifferentBounds + { + get + { + yield return new object[] { new Coordinate[] { new Coordinate(1 + 1, 2, 100, 1000), new Coordinate(5, 6, 200, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2 + 1, 100, 1000), new Coordinate(5, 6, 200, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100 + 1, 1000), new Coordinate(5, 6, 200, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000 + 1), new Coordinate(5, 6, 200, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5 + 1, 6, 200, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5, 6 + 1, 200, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5, 6, 200 + 1, 2000) } }; + yield return new object[] { new Coordinate[] { new Coordinate(1, 2, 100, 1000), new Coordinate(5, 6, 200, 2000 + 1) } }; + } + } + + internal void CheckBoundaries(Envelope target, double minX, double maxX, double minY, double maxY, double minZ, double maxZ, double minM, double maxM) + { + Assert.Equal(minX, target.MinX); + Assert.Equal(maxX, target.MaxX); + Assert.Equal(minY, target.MinY); + Assert.Equal(maxY, target.MaxY); + Assert.Equal(minZ, target.MinZ); + Assert.Equal(maxZ, target.MaxZ); + Assert.Equal(minM, target.MinM); + Assert.Equal(maxM, target.MaxM); + } + + [Fact] + public void Constructor__InitializesBoundsToNaNValues() + { + Envelope target = new Envelope(); + + Assert.Equal(double.NaN, target.MinX); + Assert.Equal(double.NaN, target.MaxX); + Assert.Equal(double.NaN, target.MinY); + Assert.Equal(double.NaN, target.MaxY); + Assert.Equal(double.NaN, target.MinZ); + Assert.Equal(double.NaN, target.MaxZ); + Assert.Equal(double.NaN, target.MinM); + Assert.Equal(double.NaN, target.MaxM); + } + + [Fact] + public void Constructor_Coordinate_InitializesXYZProperties() + { + Envelope target = new Envelope(_coordinates[0]); + + CheckBoundaries(target, _coordinates[0].X, _coordinates[0].X, _coordinates[0].Y, _coordinates[0].Y, _coordinates[0].Z, _coordinates[0].Z, _coordinates[0].M, _coordinates[0].M); + } + + [Fact] + public void Constructor_IEnumerableCoordinate_SetsMinMaxValues() + { + Envelope source = new Envelope(_coordinates); + + Envelope target = new Envelope(source); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Constructor_Envelope_CopiesMinMaxValues() + { + Envelope source = new Envelope(_coordinates); + + Envelope target = new Envelope(source); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_Coordinate_SetsMinMaxValuesOnEmptyEnvelope() + { + Envelope target = new Envelope(); + target.Extend(_coordinates[0]); + + CheckBoundaries(target, _coordinates[0].X, _coordinates[0].X, _coordinates[0].Y, _coordinates[0].Y, + _coordinates[0].Z, _coordinates[0].Z, _coordinates[0].M, _coordinates[0].M); + } + + [Fact] + public void Extend_Coordinate_DoNothingIfCoordinateIsEmpty() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(Coordinate.Empty); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_Coordinate_ExtendsEnvelopeToLowerValues() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(_lowerValues); + + CheckBoundaries(target, _lowerValues.X, _expectedBounds[1], _lowerValues.Y, _expectedBounds[3], _lowerValues.Z, _expectedBounds[5], _lowerValues.M, _expectedBounds[7]); + } + + [Fact] + public void Extend_Coordinate_ExtendsEnvelopeToHigherValues() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(_higherValues); + + CheckBoundaries(target, _expectedBounds[0], _higherValues.X, _expectedBounds[2], _higherValues.Y, _expectedBounds[4], _higherValues.Z, _expectedBounds[6], _higherValues.M); + } + + [Fact] + public void Extend_Coordinate_DoNothingForCoordinateInsideEnvelope() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(_insideCoordinate); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_IEnumerableCoordinate_SetsMinMaxValuesOnEmptyEnvelope() + { + Envelope target = new Envelope(); + + target.Extend(_coordinates); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_IEnumerableCoordinate_DoNothingForEmptyCollection() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(new Coordinate[] { }); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_IEnumerableCoordinate_ExtendsEnvelope() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(new Coordinate[] { _lowerValues, _higherValues }); + + CheckBoundaries(target, _lowerValues.X, _higherValues.X, _lowerValues.Y, _higherValues.Y, _lowerValues.Z, _higherValues.Z, _lowerValues.M, _higherValues.M); + } + + [Fact] + public void Extend_Envelope_SetsMinMaxValuesOnEmptyEnvelope() + { + Envelope target = new Envelope(); + + target.Extend(new Envelope(_coordinates)); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_Envelope_DoNothingIfEnvelopeIsInsideTargetEnvelope() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(new Envelope(_coordinates[1])); + + CheckBoundaries(target, _expectedBounds[0], _expectedBounds[1], _expectedBounds[2], _expectedBounds[3], + _expectedBounds[4], _expectedBounds[5], _expectedBounds[6], _expectedBounds[7]); + } + + [Fact] + public void Extend_Envelope_ExtendsEnvelope() + { + Envelope target = new Envelope(_coordinates); + + target.Extend(new Envelope(new Coordinate[] { _lowerValues, _higherValues })); + + CheckBoundaries(target, _lowerValues.X, _higherValues.X, _lowerValues.Y, _higherValues.Y, _lowerValues.Z, _higherValues.Z, _lowerValues.M, _higherValues.M); + } + + [Fact] + public void Equals_ReturnsTrueForSameObjectInstance() + { + Envelope target = new Envelope(_coordinates); + + Assert.True(target.Equals(target)); + } + + [Fact] + public void Equals_ReturnsTrueForTheEnvelopeWithTheSameBounds() + { + Envelope target = new Envelope(_coordinates); + Envelope other = new Envelope(target); + + Assert.True(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnsFalseForNull() + { + Envelope target = new Envelope(_coordinates); + object other = null; + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnsFalseForOtherObjectType() + { + Envelope target = new Envelope(_coordinates); + object other = "string"; + + Assert.False(target.Equals(other)); + } + + [Theory] + [MemberData(nameof(_XYZEnvelopeDifferentBounds))] + public void Equals_ReturnsFalseForTheEnvelopeWithDifferentBounds(Coordinate[] corners) + { + Envelope target = new Envelope(_coordinates); + Envelope other = new Envelope(corners); + + Assert.False(target.Equals(other)); + } +} diff --git a/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs b/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs index b73a5af..32869ab 100644 --- a/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs +++ b/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DCalculatorTests.cs @@ -1,232 +1,254 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; -using Xunit.Extensions; -using Moq; - -using SpatialLite.Core.API; -using SpatialLite.Core.Algorithms; - -namespace Tests.SpatialLite.Core.Algorithms { - public class Euclidean2DCalculatorTests { - public static IEnumerable CoordinatesSameXYOrdinates { - get { - yield return new object[] { new Coordinate(10.1, 100.2), new Coordinate(10.1, 100.2) }; - yield return new object[] { new Coordinate(10.1, 100.2), new Coordinate(10.1, 100.2, 1) }; - yield return new object[] { new Coordinate(10.1, 100.2), new Coordinate(10.1, 100.2, 1, 1) }; - } - } - - [Theory] - [MemberData(nameof(CoordinatesSameXYOrdinates))] - public void ComputeDistance_CoordinateCoordinate_ReturnsZeroForPointsWithSameXYCoordinates(Coordinate c1, Coordinate c2) { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c1, c2); - - Assert.Equal(0, distance); - } - - public static IEnumerable CoordinatesDistanceTestData { - get { - yield return new object[] { new Coordinate(-1, 0), new Coordinate(1, 0), 2 }; - yield return new object[] { new Coordinate(0, -1), new Coordinate(0, 1), 2 }; - yield return new object[] { new Coordinate(2, 1), new Coordinate(-1, -3), 5 }; - } - } - - [Theory] - [MemberData(nameof(CoordinatesDistanceTestData))] - public void ComputeDistance_CoordinateCoordinate_ReturnsDistanceBetweenCoordinates(Coordinate c1, Coordinate c2, double expectedDistance) { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c1, c2); - - Assert.Equal(expectedDistance, distance); - } - - [Fact] - public void ComputeDistance_CoordinateCoordinate_IgnoresZOrdinate() { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(new Coordinate(-1, 0, 100), new Coordinate(1, 0, -100)); - - Assert.Equal(2, distance); - } - - [Fact] - public void ComputeDistance_CoordinateLineLineSegmentMode_ReturnsDistanceToEndPointsIfPointsProjectionLiesOutsideSegment() { - Coordinate A = new Coordinate(1, 1); - Coordinate B = new Coordinate(-1, -1); - Coordinate c1 = new Coordinate(1,2); - Coordinate c2 = new Coordinate(-1,-2); - - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distanceC1 = target.CalculateDistance(c1, A, B, LineMode.LineSegment); - Assert.Equal(1, distanceC1); - - double distanceC2 = target.CalculateDistance(c2, A, B, LineMode.LineSegment); - Assert.Equal(1, distanceC2); - } - - public static IEnumerable LineSegmentDistanceTestData { - get { - yield return new object[] { new Coordinate(0.5, 1), new Coordinate(-1, 0), new Coordinate(1, 0), 1 }; - yield return new object[] { new Coordinate(1, 0.5), new Coordinate(0, -1), new Coordinate(0, 1), 1 }; - yield return new object[] { new Coordinate(-1, 1), new Coordinate(-5, -5), new Coordinate(5,5), Math.Sqrt(2) }; - } - } - - [Theory] - [MemberData(nameof(LineSegmentDistanceTestData))] - public void ComputeDistance_CoordinateLineLineSegmentMode_ComputesPerpendicularDistanceToLineIfPointsProjectionLiesInside(Coordinate c, Coordinate A, Coordinate B, double expectedDistance) { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c, A, B, LineMode.LineSegment); - Assert.Equal(expectedDistance, distance); - } - - public static IEnumerable LineSegmentDistanceZeroDistanceTestData { - get { - yield return new object[] { new Coordinate(0, 0), new Coordinate(-1, 0), new Coordinate(1, 0) }; - yield return new object[] { new Coordinate(0, -1), new Coordinate(0, -1), new Coordinate(0, 1) }; - yield return new object[] { new Coordinate(0, 0), new Coordinate(0, -1), new Coordinate(0, 1) }; - } - } - - [Theory] - [MemberData(nameof(LineSegmentDistanceZeroDistanceTestData))] - public void ComputeDistance_CoordinateLineLineSegmentMode_ReturnsZeroIfPointLiesOnLineSegment(Coordinate c, Coordinate A, Coordinate B) { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c, A, B, LineMode.LineSegment); - Assert.Equal(0, distance); - } - - [Fact] - public void ComputeDistance_CoordinateLineLineSegmentMode_ReturnsPointDistanceIfABAreEquals() { - Coordinate A = new Coordinate(1, 1); - Coordinate B = new Coordinate(1, 1); - Coordinate c = new Coordinate(1, 2); - - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c, A, B, LineMode.LineSegment); - Assert.Equal(1, distance); - } - - [Fact] - public void ComputeDistance_CoordinateLineLineMode_ReturnsPointDistanceIfABAreEquals() { - Coordinate A = new Coordinate(1, 1); - Coordinate B = new Coordinate(1, 1); - Coordinate c = new Coordinate(1, 2); - - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c, A, B, LineMode.Line); - Assert.Equal(1, distance); - } - - public static IEnumerable LineDistanceZeroDistanceTestData { - get { - yield return new object[] { new Coordinate(-2, -2), new Coordinate(-1, -1), new Coordinate(1, 1) }; - yield return new object[] { new Coordinate(2, 2), new Coordinate(-1, -1), new Coordinate(1, 1) }; - yield return new object[] { new Coordinate(0, 0), new Coordinate(-1, -1), new Coordinate(1, 1) }; - } - } - - [Theory] - [MemberData(nameof(LineDistanceZeroDistanceTestData))] - public void ComputeDistance_CoordinateLineLineMode_ReturnsZeroIfPointLiesOnLine(Coordinate c, Coordinate A, Coordinate B) { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c, A, B, LineMode.Line); - Assert.Equal(0, distance); - } - - public static IEnumerable LineDistanceTestData { - get { - yield return new object[] { new Coordinate(-3, -1), new Coordinate(-1, -1), new Coordinate(1, 1), Math.Sqrt(2) }; - yield return new object[] { new Coordinate(-1, 1), new Coordinate(-1, -1), new Coordinate(1, 1), Math.Sqrt(2) }; - yield return new object[] { new Coordinate(3, 1), new Coordinate(-1, -1), new Coordinate(1, 1), Math.Sqrt(2) }; - } - } - - [Theory] - [MemberData(nameof(LineDistanceTestData))] - public void ComputeDistance_CoordinateLineLineMode_ComputesPerpendicularDistanceToLine(Coordinate c, Coordinate A, Coordinate B, double expectedDistance) { - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double distance = target.CalculateDistance(c, A, B, LineMode.Line); - Assert.Equal(expectedDistance, distance); - } - - [Fact] - public void ComputeArea_ThrowsExceptionIfNumberOfVerticesIsLesserThen3() { - Mock listM = new Mock(); - listM.SetupGet(l => l.Count).Returns(2); - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - Assert.Throws(() => target.CalculateArea(listM.Object)); - } - - [Fact] - public void ComputeArea_ReturnsAreaOfConvexPolygon() { - Coordinate[] coordinates = new Coordinate[] { new Coordinate(1, 1), new Coordinate(2, 0.5), new Coordinate(3, 1), new Coordinate(3, 2), new Coordinate(1, 2) }; - double expectedArea = 2.5; - - Mock listM = new Mock(); - listM.SetupGet(list => list.Count).Returns(5); - listM.Setup(list => list[0]).Returns(coordinates[0]); - listM.Setup(list => list[1]).Returns(coordinates[1]); - listM.Setup(list => list[2]).Returns(coordinates[2]); - listM.Setup(list => list[3]).Returns(coordinates[3]); - listM.Setup(list => list[4]).Returns(coordinates[4]); - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double area = target.CalculateArea(listM.Object); - Assert.Equal(expectedArea, area); - } - - [Fact] - public void ComputeArea_ReturnsAreaOfConcavePolygon() { - Coordinate[] coordinates = new Coordinate[] { new Coordinate(1, 1), new Coordinate(2, 1.5), new Coordinate(3, 1), new Coordinate(3, 2), new Coordinate(1, 2) }; - double expectedArea = 1.5; - - Mock listM = new Mock(); - listM.SetupGet(list => list.Count).Returns(5); - listM.Setup(list => list[0]).Returns(coordinates[0]); - listM.Setup(list => list[1]).Returns(coordinates[1]); - listM.Setup(list => list[2]).Returns(coordinates[2]); - listM.Setup(list => list[3]).Returns(coordinates[3]); - listM.Setup(list => list[4]).Returns(coordinates[4]); - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double area = target.CalculateArea(listM.Object); - Assert.Equal(expectedArea, area); - } - - [Fact] - public void ComputeArea_ReturnsCorrectAreaIfLastCoordinateIsSameAsFirst() { - Coordinate[] coordinates = new Coordinate[] { new Coordinate(1, 1), new Coordinate(2, 0.5), new Coordinate(3, 1), new Coordinate(3, 2), new Coordinate(1, 2), new Coordinate(1, 1) }; - double expectedArea = 2.5; - - Mock listM = new Mock(); - listM.SetupGet(list => list.Count).Returns(6); - listM.Setup(list => list[0]).Returns(coordinates[0]); - listM.Setup(list => list[1]).Returns(coordinates[1]); - listM.Setup(list => list[2]).Returns(coordinates[2]); - listM.Setup(list => list[3]).Returns(coordinates[3]); - listM.Setup(list => list[4]).Returns(coordinates[4]); - listM.Setup(list => list[5]).Returns(coordinates[5]); - Euclidean2DCalculator target = new Euclidean2DCalculator(); - - double area = target.CalculateArea(listM.Object); - Assert.Equal(expectedArea, area); - } - } -} \ No newline at end of file +using Moq; +using SpatialLite.Core.Algorithms; +using SpatialLite.Core.API; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Core.Algorithms; + +public class Euclidean2DCalculatorTests +{ + public static IEnumerable CoordinatesSameXYOrdinates + { + get + { + yield return new object[] { new Coordinate(10.1, 100.2), new Coordinate(10.1, 100.2) }; + yield return new object[] { new Coordinate(10.1, 100.2), new Coordinate(10.1, 100.2, 1) }; + yield return new object[] { new Coordinate(10.1, 100.2), new Coordinate(10.1, 100.2, 1, 1) }; + } + } + + [Theory] + [MemberData(nameof(CoordinatesSameXYOrdinates))] + public void ComputeDistance_CoordinateCoordinate_ReturnsZeroForPointsWithSameXYCoordinates(Coordinate c1, Coordinate c2) + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c1, c2); + + Assert.Equal(0, distance); + } + + public static IEnumerable CoordinatesDistanceTestData + { + get + { + yield return new object[] { new Coordinate(-1, 0), new Coordinate(1, 0), 2 }; + yield return new object[] { new Coordinate(0, -1), new Coordinate(0, 1), 2 }; + yield return new object[] { new Coordinate(2, 1), new Coordinate(-1, -3), 5 }; + } + } + + [Theory] + [MemberData(nameof(CoordinatesDistanceTestData))] + public void ComputeDistance_CoordinateCoordinate_ReturnsDistanceBetweenCoordinates(Coordinate c1, Coordinate c2, double expectedDistance) + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c1, c2); + + Assert.Equal(expectedDistance, distance); + } + + [Fact] + public void ComputeDistance_CoordinateCoordinate_IgnoresZOrdinate() + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(new Coordinate(-1, 0, 100), new Coordinate(1, 0, -100)); + + Assert.Equal(2, distance); + } + + [Fact] + public void ComputeDistance_CoordinateLineLineSegmentMode_ReturnsDistanceToEndPointsIfPointsProjectionLiesOutsideSegment() + { + Coordinate A = new Coordinate(1, 1); + Coordinate B = new Coordinate(-1, -1); + Coordinate c1 = new Coordinate(1, 2); + Coordinate c2 = new Coordinate(-1, -2); + + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distanceC1 = target.CalculateDistance(c1, A, B, LineMode.LineSegment); + Assert.Equal(1, distanceC1); + + double distanceC2 = target.CalculateDistance(c2, A, B, LineMode.LineSegment); + Assert.Equal(1, distanceC2); + } + + public static IEnumerable LineSegmentDistanceTestData + { + get + { + yield return new object[] { new Coordinate(0.5, 1), new Coordinate(-1, 0), new Coordinate(1, 0), 1 }; + yield return new object[] { new Coordinate(1, 0.5), new Coordinate(0, -1), new Coordinate(0, 1), 1 }; + yield return new object[] { new Coordinate(-1, 1), new Coordinate(-5, -5), new Coordinate(5, 5), Math.Sqrt(2) }; + } + } + + [Theory] + [MemberData(nameof(LineSegmentDistanceTestData))] + public void ComputeDistance_CoordinateLineLineSegmentMode_ComputesPerpendicularDistanceToLineIfPointsProjectionLiesInside(Coordinate c, Coordinate A, Coordinate B, double expectedDistance) + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c, A, B, LineMode.LineSegment); + Assert.Equal(expectedDistance, distance); + } + + public static IEnumerable LineSegmentDistanceZeroDistanceTestData + { + get + { + yield return new object[] { new Coordinate(0, 0), new Coordinate(-1, 0), new Coordinate(1, 0) }; + yield return new object[] { new Coordinate(0, -1), new Coordinate(0, -1), new Coordinate(0, 1) }; + yield return new object[] { new Coordinate(0, 0), new Coordinate(0, -1), new Coordinate(0, 1) }; + } + } + + [Theory] + [MemberData(nameof(LineSegmentDistanceZeroDistanceTestData))] + public void ComputeDistance_CoordinateLineLineSegmentMode_ReturnsZeroIfPointLiesOnLineSegment(Coordinate c, Coordinate A, Coordinate B) + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c, A, B, LineMode.LineSegment); + Assert.Equal(0, distance); + } + + [Fact] + public void ComputeDistance_CoordinateLineLineSegmentMode_ReturnsPointDistanceIfABAreEquals() + { + Coordinate A = new Coordinate(1, 1); + Coordinate B = new Coordinate(1, 1); + Coordinate c = new Coordinate(1, 2); + + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c, A, B, LineMode.LineSegment); + Assert.Equal(1, distance); + } + + [Fact] + public void ComputeDistance_CoordinateLineLineMode_ReturnsPointDistanceIfABAreEquals() + { + Coordinate A = new Coordinate(1, 1); + Coordinate B = new Coordinate(1, 1); + Coordinate c = new Coordinate(1, 2); + + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c, A, B, LineMode.Line); + Assert.Equal(1, distance); + } + + public static IEnumerable LineDistanceZeroDistanceTestData + { + get + { + yield return new object[] { new Coordinate(-2, -2), new Coordinate(-1, -1), new Coordinate(1, 1) }; + yield return new object[] { new Coordinate(2, 2), new Coordinate(-1, -1), new Coordinate(1, 1) }; + yield return new object[] { new Coordinate(0, 0), new Coordinate(-1, -1), new Coordinate(1, 1) }; + } + } + + [Theory] + [MemberData(nameof(LineDistanceZeroDistanceTestData))] + public void ComputeDistance_CoordinateLineLineMode_ReturnsZeroIfPointLiesOnLine(Coordinate c, Coordinate A, Coordinate B) + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c, A, B, LineMode.Line); + Assert.Equal(0, distance); + } + + public static IEnumerable LineDistanceTestData + { + get + { + yield return new object[] { new Coordinate(-3, -1), new Coordinate(-1, -1), new Coordinate(1, 1), Math.Sqrt(2) }; + yield return new object[] { new Coordinate(-1, 1), new Coordinate(-1, -1), new Coordinate(1, 1), Math.Sqrt(2) }; + yield return new object[] { new Coordinate(3, 1), new Coordinate(-1, -1), new Coordinate(1, 1), Math.Sqrt(2) }; + } + } + + [Theory] + [MemberData(nameof(LineDistanceTestData))] + public void ComputeDistance_CoordinateLineLineMode_ComputesPerpendicularDistanceToLine(Coordinate c, Coordinate A, Coordinate B, double expectedDistance) + { + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double distance = target.CalculateDistance(c, A, B, LineMode.Line); + Assert.Equal(expectedDistance, distance); + } + + [Fact] + public void ComputeArea_ThrowsExceptionIfNumberOfVerticesIsLesserThen3() + { + Mock listM = new Mock(); + listM.SetupGet(l => l.Count).Returns(2); + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + Assert.Throws(() => target.CalculateArea(listM.Object)); + } + + [Fact] + public void ComputeArea_ReturnsAreaOfConvexPolygon() + { + Coordinate[] coordinates = new Coordinate[] { new Coordinate(1, 1), new Coordinate(2, 0.5), new Coordinate(3, 1), new Coordinate(3, 2), new Coordinate(1, 2) }; + double expectedArea = 2.5; + + Mock listM = new Mock(); + listM.SetupGet(list => list.Count).Returns(5); + listM.Setup(list => list[0]).Returns(coordinates[0]); + listM.Setup(list => list[1]).Returns(coordinates[1]); + listM.Setup(list => list[2]).Returns(coordinates[2]); + listM.Setup(list => list[3]).Returns(coordinates[3]); + listM.Setup(list => list[4]).Returns(coordinates[4]); + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double area = target.CalculateArea(listM.Object); + Assert.Equal(expectedArea, area); + } + + [Fact] + public void ComputeArea_ReturnsAreaOfConcavePolygon() + { + Coordinate[] coordinates = new Coordinate[] { new Coordinate(1, 1), new Coordinate(2, 1.5), new Coordinate(3, 1), new Coordinate(3, 2), new Coordinate(1, 2) }; + double expectedArea = 1.5; + + Mock listM = new Mock(); + listM.SetupGet(list => list.Count).Returns(5); + listM.Setup(list => list[0]).Returns(coordinates[0]); + listM.Setup(list => list[1]).Returns(coordinates[1]); + listM.Setup(list => list[2]).Returns(coordinates[2]); + listM.Setup(list => list[3]).Returns(coordinates[3]); + listM.Setup(list => list[4]).Returns(coordinates[4]); + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double area = target.CalculateArea(listM.Object); + Assert.Equal(expectedArea, area); + } + + [Fact] + public void ComputeArea_ReturnsCorrectAreaIfLastCoordinateIsSameAsFirst() + { + Coordinate[] coordinates = new Coordinate[] { new Coordinate(1, 1), new Coordinate(2, 0.5), new Coordinate(3, 1), new Coordinate(3, 2), new Coordinate(1, 2), new Coordinate(1, 1) }; + double expectedArea = 2.5; + + Mock listM = new Mock(); + listM.SetupGet(list => list.Count).Returns(6); + listM.Setup(list => list[0]).Returns(coordinates[0]); + listM.Setup(list => list[1]).Returns(coordinates[1]); + listM.Setup(list => list[2]).Returns(coordinates[2]); + listM.Setup(list => list[3]).Returns(coordinates[3]); + listM.Setup(list => list[4]).Returns(coordinates[4]); + listM.Setup(list => list[5]).Returns(coordinates[5]); + Euclidean2DCalculator target = new Euclidean2DCalculator(); + + double area = target.CalculateArea(listM.Object); + Assert.Equal(expectedArea, area); + } +} diff --git a/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs b/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs index 3f39061..5c183cf 100644 --- a/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs +++ b/src/Tests.SpatialLite.Core/Algorithms/Euclidean2DLocatorTests.cs @@ -1,271 +1,294 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; -using Xunit.Extensions; - -using SpatialLite.Core.API; -using SpatialLite.Core.Algorithms; -using SpatialLite.Core.Geometries; -using SpatialLite.Core.IO; - -namespace Tests.SpatialLite.Core.Algorithms { - public class Euclidean2DLocatorTests { - - [Fact] - public void IsOnLine_ReturnsTrueIfPointIsOnAorB() { - Coordinate a = new Coordinate(-10, 0); - Coordinate b = new Coordinate(3, 2); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.IsOnLine(a, a, b, LineMode.Line)); - Assert.True(target.IsOnLine(b, a, b, LineMode.Line)); - } - - public static IEnumerable PointsBetweenAB { - get { - yield return new object[] { new Coordinate(1, 1), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.Line }; - yield return new object[] { new Coordinate(1, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.Line }; - yield return new object[] { new Coordinate(1, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.Line }; - yield return new object[] { new Coordinate(1, 1), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.LineSegment }; - yield return new object[] { new Coordinate(1, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.LineSegment }; - yield return new object[] { new Coordinate(1, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.LineSegment }; - } - } - - [Theory] - [MemberData(nameof(PointsBetweenAB))] - public void IsOnLine_ReturnsTrueIfPointLiesBetweenAAndB(Coordinate c, Coordinate a, Coordinate b, LineMode mode) { - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.IsOnLine(c, a, b, mode)); - } - - public static IEnumerable PointsOnAB { - get { - yield return new object[] { new Coordinate(-11, 1), new Coordinate(-10, 1), new Coordinate(10, 1) }; - yield return new object[] { new Coordinate(11, 1), new Coordinate(-10, 1), new Coordinate(10, 1) }; - } - } - - [Theory] - [MemberData(nameof(PointsOnAB))] - public void IsOnLine_ReturnsTrueIfPointLiesOnABAndModeIsLine(Coordinate c, Coordinate a, Coordinate b) { - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.IsOnLine(c, a, b, LineMode.Line)); - } - - [Theory] - [MemberData(nameof(PointsOnAB))] - public void IsOnLine_ReturnsFalseIfPointLiesOnABAndModeIsLineSegment(Coordinate c, Coordinate a, Coordinate b) { - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.IsOnLine(c, a, b, LineMode.LineSegment)); - } - - public static IEnumerable PointsNotOnAB { - get { - yield return new object[] { new Coordinate(1, 2), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.Line }; - yield return new object[] { new Coordinate(2, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.Line }; - yield return new object[] { new Coordinate(0, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.Line }; - yield return new object[] { new Coordinate(1, 2), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.LineSegment }; - yield return new object[] { new Coordinate(2, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.LineSegment }; - yield return new object[] { new Coordinate(0, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.LineSegment }; - } - } - - [Theory] - [MemberData(nameof(PointsNotOnAB))] - public void IsOnLine_ReturnsFalseIfPointDoEsNotLieOnAB(Coordinate c, Coordinate a, Coordinate b, LineMode mode) { - Euclidean2DLocator target = new Euclidean2DLocator(); - Assert.False(target.IsOnLine(c, a, b, mode)); - } - - [Fact] - public void IsInRing_ThrowsArgumentExceptionIfRingHasLessThen3Points() { - Coordinate c = new Coordinate(0, 0); - CoordinateList ring = new CoordinateList(new Coordinate[] { new Coordinate(0, 1), new Coordinate(1, 0) }); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.Throws(() => target.IsInRing(c, ring)); - } - - [Fact] - public void IsInRing_ThrowsArgumentExceptionIfCoordinateListDoesNotRepresentRing() { - Coordinate c = new Coordinate(0, 0); - CoordinateList ring = new CoordinateList(new Coordinate[] { new Coordinate(0, 1), new Coordinate(1, 0), new Coordinate(1, 2) }); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.Throws(() => target.IsInRing(c, ring)); - } - - [Fact] - public void IsInRing_ReturnsTrueIfPointIsInSimpleRing() { - string wktRing = "linestring (-1 -1, 1 -1, 1 1, -1 1, -1 -1)"; - LineString ring = WktReader.Parse(wktRing); - - Coordinate c = new Coordinate(0.5, 0.5); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.IsInRing(c, ring.Coordinates)); - } - - [Fact] - public void IsInRing_ReturnsTrueIfPointIsInRingAndCYCoordinateIsSameAsVertexYCoordinate() { - string wktRing = "linestring (-1 -1, 1 -1, 1 0.5, 1 1, -1 1, -1 -1)"; - LineString ring = WktReader.Parse(wktRing); - - Coordinate c = new Coordinate(0.5, 0.5); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.IsInRing(c, ring.Coordinates)); - } - - [Fact] - public void IsInRing_ReturnsTrueIfPointIsInConcaveRing() { - string wktRing = "linestring (0 0, 2 0, 1 1, 1 2, 0 0)"; - LineString ring = WktReader.Parse(wktRing); - - Coordinate c = new Coordinate(1, 0.5); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.IsInRing(c, ring.Coordinates)); - } - - [Fact] - public void IsInRing_ReturnsFalseIfPointIsOutsideSimpleRing() { - string wktRing = "linestring (-1 -1, 1 -1, 1 1, -1 1, -1 -1)"; - LineString ring = WktReader.Parse(wktRing); - - Coordinate c = new Coordinate(2, 2); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.IsInRing(c, ring.Coordinates)); - } - - [Fact] - public void IsInRing_ReturnsFalseIfPointIsOutsideRing() { - string wktRing = "linestring (0 0, 2 0, 1 1, 1 2, 0 0)"; - LineString ring = WktReader.Parse(wktRing); - - Coordinate c = new Coordinate(3, 0); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.IsInRing(c, ring.Coordinates)); - } - - [Fact] - public void IsInRing_ReturnsFalseIfPointIsInRingAndCYCoordinateIsSameAsVertexYCoordinate() { - string wktRing = "linestring (-1 -1, 1 -1, 1 0.5, 1 1, -1 1, -1 -1)"; - LineString ring = WktReader.Parse(wktRing); - - Coordinate c = new Coordinate(-2, 0.5); - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.IsInRing(c, ring.Coordinates)); - } - - - - [Fact] - public void Intersects_ReturnsFalseForParallelLines() { - Coordinate A1 = new Coordinate(1.0, 1.0); - Coordinate B1 = new Coordinate(2.0, 2.0); - - Coordinate A2 = new Coordinate(2.0, 1.0); - Coordinate B2 = new Coordinate(3.0, 2.0); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.Line)); - } - - [Fact] - public void Intersects_ReturnsTrueForLinesThatIntersectsOutsideLineSegments() { - Coordinate A1 = new Coordinate(1.0, 1.0); - Coordinate B1 = new Coordinate(2.0, 1.0); - - Coordinate A2 = new Coordinate(2.0, 0.0); - Coordinate B2 = new Coordinate(3.0, 1.0); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.Line)); - } - - [Fact] - public void Intersects_ReturnsFalseForLineAndLineSegmentThatIntersectsOutsideLineSegment1() { - Coordinate A1 = new Coordinate(1.0, 1.0); - Coordinate B1 = new Coordinate(2.0, 1.0); - - Coordinate A2 = new Coordinate(2.0, 0.0); - Coordinate B2 = new Coordinate(3.0, 1.0); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.Line)); - } - - [Fact] - public void Intersects_ReturnsFalseForLineAndLineSegmentThatIntersectsOutsideLineSegment2() { - Coordinate A1 = new Coordinate(1.0, 1.0); - Coordinate B1 = new Coordinate(2.0, 1.0); - - Coordinate A2 = new Coordinate(2.0, 0.0); - Coordinate B2 = new Coordinate(3.0, 0.5); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.LineSegment)); - } - - [Fact] - public void Intersects_ReturnsFalseForNonIntersectingLineSegments() { - Coordinate A1 = new Coordinate(1.0, 1.0); - Coordinate B1 = new Coordinate(2.0, 1.0); - - Coordinate A2 = new Coordinate(2.0, 0.0); - Coordinate B2 = new Coordinate(3.0, 1.0); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.LineSegment)); - } - - [Fact] - public void Intersects_ReturnsTrueForIntersectingLineSegments() { - Coordinate A1 = new Coordinate(1.0, 1.0); - Coordinate B1 = new Coordinate(3.0, 1.0); - - Coordinate A2 = new Coordinate(1.0, 0.0); - Coordinate B2 = new Coordinate(3.0, 2.0); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.LineSegment)); - } - - [Fact] - public void Intersects_LineLine_ReturnsaFalseForNonIntersectingLines() { - ICoordinateList line1 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 1.0), new Coordinate(2.0, 1.0), new Coordinate(2.0, 2.0) }); - ICoordinateList line2 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 0.0), new Coordinate(2.0, 0.0), new Coordinate(2.0, -1.0) }); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.False(target.Intersects(line1, line2)); - } - - [Fact] - public void Intersects_LineLine_ReturnsaTrueForIntersectingLines() { - ICoordinateList line1 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 1.0), new Coordinate(2.0, 1.0), new Coordinate(2.0, 2.0) }); - ICoordinateList line2 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 0.0), new Coordinate(1.5, 2.0), new Coordinate(2.0, -1.0) }); - - Euclidean2DLocator target = new Euclidean2DLocator(); - - Assert.True(target.Intersects(line1, line2)); - } - } -} +using SpatialLite.Core.Algorithms; +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using SpatialLite.Core.IO; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Core.Algorithms; + +public class Euclidean2DLocatorTests +{ + + [Fact] + public void IsOnLine_ReturnsTrueIfPointIsOnAorB() + { + Coordinate a = new Coordinate(-10, 0); + Coordinate b = new Coordinate(3, 2); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.IsOnLine(a, a, b, LineMode.Line)); + Assert.True(target.IsOnLine(b, a, b, LineMode.Line)); + } + + public static IEnumerable PointsBetweenAB + { + get + { + yield return new object[] { new Coordinate(1, 1), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.Line }; + yield return new object[] { new Coordinate(1, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.Line }; + yield return new object[] { new Coordinate(1, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.Line }; + yield return new object[] { new Coordinate(1, 1), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.LineSegment }; + yield return new object[] { new Coordinate(1, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.LineSegment }; + yield return new object[] { new Coordinate(1, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.LineSegment }; + } + } + + [Theory] + [MemberData(nameof(PointsBetweenAB))] + public void IsOnLine_ReturnsTrueIfPointLiesBetweenAAndB(Coordinate c, Coordinate a, Coordinate b, LineMode mode) + { + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.IsOnLine(c, a, b, mode)); + } + + public static IEnumerable PointsOnAB + { + get + { + yield return new object[] { new Coordinate(-11, 1), new Coordinate(-10, 1), new Coordinate(10, 1) }; + yield return new object[] { new Coordinate(11, 1), new Coordinate(-10, 1), new Coordinate(10, 1) }; + } + } + + [Theory] + [MemberData(nameof(PointsOnAB))] + public void IsOnLine_ReturnsTrueIfPointLiesOnABAndModeIsLine(Coordinate c, Coordinate a, Coordinate b) + { + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.IsOnLine(c, a, b, LineMode.Line)); + } + + [Theory] + [MemberData(nameof(PointsOnAB))] + public void IsOnLine_ReturnsFalseIfPointLiesOnABAndModeIsLineSegment(Coordinate c, Coordinate a, Coordinate b) + { + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.IsOnLine(c, a, b, LineMode.LineSegment)); + } + + public static IEnumerable PointsNotOnAB + { + get + { + yield return new object[] { new Coordinate(1, 2), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.Line }; + yield return new object[] { new Coordinate(2, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.Line }; + yield return new object[] { new Coordinate(0, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.Line }; + yield return new object[] { new Coordinate(1, 2), new Coordinate(-10, 1), new Coordinate(10, 1), LineMode.LineSegment }; + yield return new object[] { new Coordinate(2, 1), new Coordinate(1, 10), new Coordinate(1, -10), LineMode.LineSegment }; + yield return new object[] { new Coordinate(0, 1), new Coordinate(2, 2), new Coordinate(-1, -1), LineMode.LineSegment }; + } + } + + [Theory] + [MemberData(nameof(PointsNotOnAB))] + public void IsOnLine_ReturnsFalseIfPointDoEsNotLieOnAB(Coordinate c, Coordinate a, Coordinate b, LineMode mode) + { + Euclidean2DLocator target = new Euclidean2DLocator(); + Assert.False(target.IsOnLine(c, a, b, mode)); + } + + [Fact] + public void IsInRing_ThrowsArgumentExceptionIfRingHasLessThen3Points() + { + Coordinate c = new Coordinate(0, 0); + CoordinateList ring = new CoordinateList(new Coordinate[] { new Coordinate(0, 1), new Coordinate(1, 0) }); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.Throws(() => target.IsInRing(c, ring)); + } + + [Fact] + public void IsInRing_ThrowsArgumentExceptionIfCoordinateListDoesNotRepresentRing() + { + Coordinate c = new Coordinate(0, 0); + CoordinateList ring = new CoordinateList(new Coordinate[] { new Coordinate(0, 1), new Coordinate(1, 0), new Coordinate(1, 2) }); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.Throws(() => target.IsInRing(c, ring)); + } + + [Fact] + public void IsInRing_ReturnsTrueIfPointIsInSimpleRing() + { + string wktRing = "linestring (-1 -1, 1 -1, 1 1, -1 1, -1 -1)"; + LineString ring = WktReader.Parse(wktRing); + + Coordinate c = new Coordinate(0.5, 0.5); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.IsInRing(c, ring.Coordinates)); + } + + [Fact] + public void IsInRing_ReturnsTrueIfPointIsInRingAndCYCoordinateIsSameAsVertexYCoordinate() + { + string wktRing = "linestring (-1 -1, 1 -1, 1 0.5, 1 1, -1 1, -1 -1)"; + LineString ring = WktReader.Parse(wktRing); + + Coordinate c = new Coordinate(0.5, 0.5); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.IsInRing(c, ring.Coordinates)); + } + + [Fact] + public void IsInRing_ReturnsTrueIfPointIsInConcaveRing() + { + string wktRing = "linestring (0 0, 2 0, 1 1, 1 2, 0 0)"; + LineString ring = WktReader.Parse(wktRing); + + Coordinate c = new Coordinate(1, 0.5); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.IsInRing(c, ring.Coordinates)); + } + + [Fact] + public void IsInRing_ReturnsFalseIfPointIsOutsideSimpleRing() + { + string wktRing = "linestring (-1 -1, 1 -1, 1 1, -1 1, -1 -1)"; + LineString ring = WktReader.Parse(wktRing); + + Coordinate c = new Coordinate(2, 2); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.IsInRing(c, ring.Coordinates)); + } + + [Fact] + public void IsInRing_ReturnsFalseIfPointIsOutsideRing() + { + string wktRing = "linestring (0 0, 2 0, 1 1, 1 2, 0 0)"; + LineString ring = WktReader.Parse(wktRing); + + Coordinate c = new Coordinate(3, 0); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.IsInRing(c, ring.Coordinates)); + } + + [Fact] + public void IsInRing_ReturnsFalseIfPointIsInRingAndCYCoordinateIsSameAsVertexYCoordinate() + { + string wktRing = "linestring (-1 -1, 1 -1, 1 0.5, 1 1, -1 1, -1 -1)"; + LineString ring = WktReader.Parse(wktRing); + + Coordinate c = new Coordinate(-2, 0.5); + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.IsInRing(c, ring.Coordinates)); + } + + + + [Fact] + public void Intersects_ReturnsFalseForParallelLines() + { + Coordinate A1 = new Coordinate(1.0, 1.0); + Coordinate B1 = new Coordinate(2.0, 2.0); + + Coordinate A2 = new Coordinate(2.0, 1.0); + Coordinate B2 = new Coordinate(3.0, 2.0); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.Line)); + } + + [Fact] + public void Intersects_ReturnsTrueForLinesThatIntersectsOutsideLineSegments() + { + Coordinate A1 = new Coordinate(1.0, 1.0); + Coordinate B1 = new Coordinate(2.0, 1.0); + + Coordinate A2 = new Coordinate(2.0, 0.0); + Coordinate B2 = new Coordinate(3.0, 1.0); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.Line)); + } + + [Fact] + public void Intersects_ReturnsFalseForLineAndLineSegmentThatIntersectsOutsideLineSegment1() + { + Coordinate A1 = new Coordinate(1.0, 1.0); + Coordinate B1 = new Coordinate(2.0, 1.0); + + Coordinate A2 = new Coordinate(2.0, 0.0); + Coordinate B2 = new Coordinate(3.0, 1.0); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.Line)); + } + + [Fact] + public void Intersects_ReturnsFalseForLineAndLineSegmentThatIntersectsOutsideLineSegment2() + { + Coordinate A1 = new Coordinate(1.0, 1.0); + Coordinate B1 = new Coordinate(2.0, 1.0); + + Coordinate A2 = new Coordinate(2.0, 0.0); + Coordinate B2 = new Coordinate(3.0, 0.5); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.LineSegment)); + } + + [Fact] + public void Intersects_ReturnsFalseForNonIntersectingLineSegments() + { + Coordinate A1 = new Coordinate(1.0, 1.0); + Coordinate B1 = new Coordinate(2.0, 1.0); + + Coordinate A2 = new Coordinate(2.0, 0.0); + Coordinate B2 = new Coordinate(3.0, 1.0); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.LineSegment)); + } + + [Fact] + public void Intersects_ReturnsTrueForIntersectingLineSegments() + { + Coordinate A1 = new Coordinate(1.0, 1.0); + Coordinate B1 = new Coordinate(3.0, 1.0); + + Coordinate A2 = new Coordinate(1.0, 0.0); + Coordinate B2 = new Coordinate(3.0, 2.0); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.LineSegment)); + } + + [Fact] + public void Intersects_LineLine_ReturnsaFalseForNonIntersectingLines() + { + ICoordinateList line1 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 1.0), new Coordinate(2.0, 1.0), new Coordinate(2.0, 2.0) }); + ICoordinateList line2 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 0.0), new Coordinate(2.0, 0.0), new Coordinate(2.0, -1.0) }); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.False(target.Intersects(line1, line2)); + } + + [Fact] + public void Intersects_LineLine_ReturnsaTrueForIntersectingLines() + { + ICoordinateList line1 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 1.0), new Coordinate(2.0, 1.0), new Coordinate(2.0, 2.0) }); + ICoordinateList line2 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 0.0), new Coordinate(1.5, 2.0), new Coordinate(2.0, -1.0) }); + + Euclidean2DLocator target = new Euclidean2DLocator(); + + Assert.True(target.Intersects(line1, line2)); + } +} diff --git a/src/Tests.SpatialLite.Core/Algorithms/Sphere2DCalculatorTests.cs b/src/Tests.SpatialLite.Core/Algorithms/Sphere2DCalculatorTests.cs index c260b54..3090cff 100644 --- a/src/Tests.SpatialLite.Core/Algorithms/Sphere2DCalculatorTests.cs +++ b/src/Tests.SpatialLite.Core/Algorithms/Sphere2DCalculatorTests.cs @@ -1,155 +1,161 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using SpatialLite.Core.API; -using SpatialLite.Core.Algorithms; - -using Xunit; -using Moq; - -namespace Tests.SpatialLite.Core.Algorithms { - public class Sphere2DCalculatorTests { - - [Fact] - public void CalculateDistance_CoordinateCoordinate_Returns0ForSameCoordinate() { - Coordinate c = new Coordinate(10.1, 100.2); - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c, c); - - Assert.Equal(0, distance); - } - - //TODO more test cases - [Fact] - public void CalculateDistance_CoordinateCoordinate_ReturnsDistanceOf2Points() { - Coordinate c1 = new Coordinate(0, 0); - Coordinate c2 = new Coordinate(0, 90); - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c1, c2); - double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 4; - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateDsitance_CoordinateCoordinate_CalculateDistancesAcross0DegBoundary() { - Coordinate c1 = new Coordinate(-45, 0); - Coordinate c2 = new Coordinate(45, 0); - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c1, c2); - double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 4; - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateDsitance_CoordinateCoordinate_CalculateDistancesAcross180DegBoundary() { - Coordinate c1 = new Coordinate(-135, 0); - Coordinate c2 = new Coordinate(135, 0); - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c1, c2); - double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 4; - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateDistance_LineCoordinate_ReturnsDistanceToInfiniteLine() { - Coordinate a = new Coordinate(0, 0); - Coordinate b = new Coordinate(90, 0); - Coordinate c = new Coordinate(120, 45); - - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c, a, b, LineMode.Line); - double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 8; - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateDistance_LineCoordinate_ReturnsDistanceToLineSegment() { - Coordinate a = new Coordinate(0, 0); - Coordinate b = new Coordinate(90, 0); - Coordinate c = new Coordinate(45, 45); - - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c, a, b, LineMode.LineSegment); - double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 8; - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateDistance_LineCoordinate_ReturnsDistanceToEndPointIfPointIsOutsideLineSegment() { - Coordinate a = new Coordinate(0, 0); - Coordinate b = new Coordinate(90, 0); - Coordinate c = new Coordinate(95, 45); - - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c, a, b, LineMode.LineSegment); - double expectedDistance = target.CalculateDistance(b, c); - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateDistance_LineCoordinate_ReturnsDistanceToEndPointIfPointIsOutsideLineSegment2() { - Coordinate a = new Coordinate(0, 0); - Coordinate b = new Coordinate(90, 0); - Coordinate c = new Coordinate(5, 45); - - Sphere2DCalculator target = new Sphere2DCalculator(); - - double distance = target.CalculateDistance(c, a, b, LineMode.LineSegment); - double expectedDistance = target.CalculateDistance(a, c); - - Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); - } - - [Fact] - public void CalculateArea_CalculatesAreaOfPolygonPointFirstPointDoesNotEqualLast() { - Coordinate[] coordinates = new Coordinate[] { new Coordinate(0, 0), new Coordinate(90, 0), new Coordinate(0, 90) }; - - Mock listM = new Mock(); - listM.SetupGet(list => list.Count).Returns(3); - listM.Setup(list => list[0]).Returns(coordinates[0]); - listM.Setup(list => list[1]).Returns(coordinates[1]); - listM.Setup(list => list[2]).Returns(coordinates[2]); - - double expectedArea = 4 * Math.PI * Sphere2DCalculator.EarthRadius * Sphere2DCalculator.EarthRadius / 8; - - Sphere2DCalculator target = new Sphere2DCalculator(); - - double area = target.CalculateArea(listM.Object); - Assert.InRange(area, expectedArea * 0.995, expectedArea * 1.005); - } - - [Fact] - public void CalculateArea_CalculatesAreaOfPolygonPointFirstPointEqualsLast() { - Coordinate[] coordinates = new Coordinate[] { new Coordinate(0, 0), new Coordinate(90, 0), new Coordinate(0, 90) }; - - Mock listM = new Mock(); - listM.SetupGet(list => list.Count).Returns(4); - listM.Setup(list => list[0]).Returns(coordinates[0]); - listM.Setup(list => list[1]).Returns(coordinates[1]); - listM.Setup(list => list[2]).Returns(coordinates[2]); - listM.Setup(list => list[3]).Returns(coordinates[0]); - - double expectedArea = 4 * Math.PI * Sphere2DCalculator.EarthRadius * Sphere2DCalculator.EarthRadius / 8; - - Sphere2DCalculator target = new Sphere2DCalculator(); - - double area = target.CalculateArea(listM.Object); - Assert.InRange(area, expectedArea * 0.995, expectedArea * 1.005); - } - } -} +using Moq; +using SpatialLite.Core.Algorithms; +using SpatialLite.Core.API; +using System; +using Xunit; + +namespace Tests.SpatialLite.Core.Algorithms; + +public class Sphere2DCalculatorTests +{ + + [Fact] + public void CalculateDistance_CoordinateCoordinate_Returns0ForSameCoordinate() + { + Coordinate c = new Coordinate(10.1, 100.2); + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c, c); + + Assert.Equal(0, distance); + } + + //TODO more test cases + [Fact] + public void CalculateDistance_CoordinateCoordinate_ReturnsDistanceOf2Points() + { + Coordinate c1 = new Coordinate(0, 0); + Coordinate c2 = new Coordinate(0, 90); + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c1, c2); + double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 4; + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateDsitance_CoordinateCoordinate_CalculateDistancesAcross0DegBoundary() + { + Coordinate c1 = new Coordinate(-45, 0); + Coordinate c2 = new Coordinate(45, 0); + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c1, c2); + double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 4; + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateDsitance_CoordinateCoordinate_CalculateDistancesAcross180DegBoundary() + { + Coordinate c1 = new Coordinate(-135, 0); + Coordinate c2 = new Coordinate(135, 0); + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c1, c2); + double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 4; + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateDistance_LineCoordinate_ReturnsDistanceToInfiniteLine() + { + Coordinate a = new Coordinate(0, 0); + Coordinate b = new Coordinate(90, 0); + Coordinate c = new Coordinate(120, 45); + + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c, a, b, LineMode.Line); + double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 8; + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateDistance_LineCoordinate_ReturnsDistanceToLineSegment() + { + Coordinate a = new Coordinate(0, 0); + Coordinate b = new Coordinate(90, 0); + Coordinate c = new Coordinate(45, 45); + + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c, a, b, LineMode.LineSegment); + double expectedDistance = Math.PI * 2 * Sphere2DCalculator.EarthRadius / 8; + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateDistance_LineCoordinate_ReturnsDistanceToEndPointIfPointIsOutsideLineSegment() + { + Coordinate a = new Coordinate(0, 0); + Coordinate b = new Coordinate(90, 0); + Coordinate c = new Coordinate(95, 45); + + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c, a, b, LineMode.LineSegment); + double expectedDistance = target.CalculateDistance(b, c); + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateDistance_LineCoordinate_ReturnsDistanceToEndPointIfPointIsOutsideLineSegment2() + { + Coordinate a = new Coordinate(0, 0); + Coordinate b = new Coordinate(90, 0); + Coordinate c = new Coordinate(5, 45); + + Sphere2DCalculator target = new Sphere2DCalculator(); + + double distance = target.CalculateDistance(c, a, b, LineMode.LineSegment); + double expectedDistance = target.CalculateDistance(a, c); + + Assert.InRange(distance, expectedDistance * 0.995, expectedDistance * 1.005); + } + + [Fact] + public void CalculateArea_CalculatesAreaOfPolygonPointFirstPointDoesNotEqualLast() + { + Coordinate[] coordinates = new Coordinate[] { new Coordinate(0, 0), new Coordinate(90, 0), new Coordinate(0, 90) }; + + Mock listM = new Mock(); + listM.SetupGet(list => list.Count).Returns(3); + listM.Setup(list => list[0]).Returns(coordinates[0]); + listM.Setup(list => list[1]).Returns(coordinates[1]); + listM.Setup(list => list[2]).Returns(coordinates[2]); + + double expectedArea = 4 * Math.PI * Sphere2DCalculator.EarthRadius * Sphere2DCalculator.EarthRadius / 8; + + Sphere2DCalculator target = new Sphere2DCalculator(); + + double area = target.CalculateArea(listM.Object); + Assert.InRange(area, expectedArea * 0.995, expectedArea * 1.005); + } + + [Fact] + public void CalculateArea_CalculatesAreaOfPolygonPointFirstPointEqualsLast() + { + Coordinate[] coordinates = new Coordinate[] { new Coordinate(0, 0), new Coordinate(90, 0), new Coordinate(0, 90) }; + + Mock listM = new Mock(); + listM.SetupGet(list => list.Count).Returns(4); + listM.Setup(list => list[0]).Returns(coordinates[0]); + listM.Setup(list => list[1]).Returns(coordinates[1]); + listM.Setup(list => list[2]).Returns(coordinates[2]); + listM.Setup(list => list[3]).Returns(coordinates[0]); + + double expectedArea = 4 * Math.PI * Sphere2DCalculator.EarthRadius * Sphere2DCalculator.EarthRadius / 8; + + Sphere2DCalculator target = new Sphere2DCalculator(); + + double area = target.CalculateArea(listM.Object); + Assert.InRange(area, expectedArea * 0.995, expectedArea * 1.005); + } +} diff --git a/src/Tests.SpatialLite.Core/Data/TestDataReader.cs b/src/Tests.SpatialLite.Core/Data/TestDataReader.cs index 70f6c86..25e1b45 100644 --- a/src/Tests.SpatialLite.Core/Data/TestDataReader.cs +++ b/src/Tests.SpatialLite.Core/Data/TestDataReader.cs @@ -1,24 +1,23 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; - -namespace Tests.SpatialLite.Core.Data { - public static class TestDataReader { - public static Stream Open(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream("Tests.SpatialLite.Core.Data.IO." + name); - } - - public static byte[] Read(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - - var stream = new MemoryStream(); - assembly.GetManifestResourceStream("Tests.SpatialLite.Core.Data.IO." + name).CopyTo(stream); - - return stream.ToArray(); - } - } -} +using System.IO; +using System.Reflection; + +namespace Tests.SpatialLite.Core.Data; + +public static class TestDataReader +{ + public static Stream Open(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + return assembly.GetManifestResourceStream("Tests.SpatialLite.Core.Data.IO." + name); + } + + public static byte[] Read(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + + var stream = new MemoryStream(); + assembly.GetManifestResourceStream("Tests.SpatialLite.Core.Data.IO." + name).CopyTo(stream); + + return stream.ToArray(); + } +} diff --git a/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs b/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs index 7c8aba7..f7969fe 100644 --- a/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/CoordinateListTests.cs @@ -1,149 +1,160 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Core.Geometries { - public class CoordinateListTests { - - Coordinate _coordinate = new Coordinate(-10, -20, -200); - - Coordinate[] _coordinates = new Coordinate[] { - new Coordinate(12,10,100), - new Coordinate(22,20,200), - new Coordinate(32,30,300) - }; - - [Fact] - public void Constructor__CreatesEmptyList() { - CoordinateList target = new CoordinateList(); - - Assert.Empty(target); - } - - [Fact] - public void Constructor_IEnumerable_CreatesListWithSpecifiedItems() { - CoordinateList target = new CoordinateList(_coordinates); - - for (int i = 0; i < _coordinates.Length; i++) { - Assert.Equal(_coordinates[i], target[i]); - } - } - - [Fact] - public void Indexer_GetsAndSetsValues() { - CoordinateList target = new CoordinateList(_coordinates); - - Assert.Equal(_coordinates[1], target[1]); - - target[1] = _coordinate; - Assert.Equal(_coordinate, target[1]); - } - - [Fact] - public void Count_Returns0ForEmptyList() { - CoordinateList target = new CoordinateList(); - - Assert.Equal(0, target.Count); - } - - [Fact] - public void Count_ReturnsNumberOfCoordinates() { - CoordinateList target = new CoordinateList(_coordinates); - - Assert.Equal(_coordinates.Length, target.Count); - } - - [Fact] - public void Add_AppendsCoordinateToTheEndOfList() { - CoordinateList target = new CoordinateList(_coordinates); - target.Add(_coordinate); - - Assert.Equal(_coordinate, target.Last()); - } - - [Fact] - public void Add_IncresesCount() { - CoordinateList target = new CoordinateList(_coordinates); - target.Add(_coordinate); - - Assert.Equal(_coordinates.Length + 1, target.Count); - } - - [Fact] - public void Add_AppendsCollectionOfCoordinatesToTheEndOfList() { - CoordinateList target = new CoordinateList(new Coordinate[] {_coordinate}); - target.Add(_coordinates); - - for (int i = 0; i < _coordinates.Length; i++) { - Assert.Equal(_coordinates[i], target[i + 1]); - } - } - - [Fact] - public void Add_IncresesCount2() { - CoordinateList target = new CoordinateList(new Coordinate[] { _coordinate }); - target.Add(_coordinates); - - Assert.Equal(_coordinates.Length + 1, target.Count); - } - - [Fact] - public void Insert_InsertsCoordinateToSpecifiedIndex() { - int index = 1; - CoordinateList target = new CoordinateList(_coordinates); - target.Insert(index, _coordinate); - - Assert.Equal(_coordinate, target[index]); - } - - [Fact] - public void Insert_IncresesCount() { - int index = 1; - CoordinateList target = new CoordinateList(_coordinates); - target.Insert(index, _coordinate); - - Assert.Equal(_coordinates.Length + 1, target.Count); - } - - [Fact] - public void Insert_AppendsCoordinateToListIfIndexEqulasCount() { - CoordinateList target = new CoordinateList(_coordinates); - target.Insert(target.Count, _coordinate); - - Assert.Equal(_coordinate, target.Last()); - Assert.Equal(_coordinates.Length + 1, target.Count); - } - - [Fact] - public void RemoveAt_RemovesCoordinateAtIndex() { - CoordinateList target = new CoordinateList(_coordinates); - target.RemoveAt(1); - - Assert.Equal(_coordinates[0], target[0]); - Assert.Equal(_coordinates[2], target[1]); - } - - [Fact] - public void RemoveAt_DecreasesCount() { - CoordinateList target = new CoordinateList(_coordinates); - target.RemoveAt(1); - - Assert.Equal(_coordinates.Length - 1, target.Count); - } - - [Fact] - public void Clear_RemovesAllCoordinatesFromList() { - CoordinateList target = new CoordinateList(_coordinates); - target.Clear(); - - Assert.Empty(target.ToArray()); - Assert.Equal(0, target.Count); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Core.Geometries; + +public class CoordinateListTests +{ + private Coordinate _coordinate = new Coordinate(-10, -20, -200); + private readonly Coordinate[] _coordinates = new Coordinate[] { + new Coordinate(12,10,100), + new Coordinate(22,20,200), + new Coordinate(32,30,300) + }; + + [Fact] + public void Constructor__CreatesEmptyList() + { + CoordinateList target = new CoordinateList(); + + Assert.Empty(target); + } + + [Fact] + public void Constructor_IEnumerable_CreatesListWithSpecifiedItems() + { + CoordinateList target = new CoordinateList(_coordinates); + + for (int i = 0; i < _coordinates.Length; i++) + { + Assert.Equal(_coordinates[i], target[i]); + } + } + + [Fact] + public void Indexer_GetsAndSetsValues() + { + CoordinateList target = new CoordinateList(_coordinates); + + Assert.Equal(_coordinates[1], target[1]); + + target[1] = _coordinate; + Assert.Equal(_coordinate, target[1]); + } + + [Fact] + public void Count_Returns0ForEmptyList() + { + CoordinateList target = new CoordinateList(); + + Assert.Equal(0, target.Count); + } + + [Fact] + public void Count_ReturnsNumberOfCoordinates() + { + CoordinateList target = new CoordinateList(_coordinates); + + Assert.Equal(_coordinates.Length, target.Count); + } + + [Fact] + public void Add_AppendsCoordinateToTheEndOfList() + { + CoordinateList target = new CoordinateList(_coordinates); + target.Add(_coordinate); + + Assert.Equal(_coordinate, target.Last()); + } + + [Fact] + public void Add_IncresesCount() + { + CoordinateList target = new CoordinateList(_coordinates); + target.Add(_coordinate); + + Assert.Equal(_coordinates.Length + 1, target.Count); + } + + [Fact] + public void Add_AppendsCollectionOfCoordinatesToTheEndOfList() + { + CoordinateList target = new CoordinateList(new Coordinate[] { _coordinate }); + target.Add(_coordinates); + + for (int i = 0; i < _coordinates.Length; i++) + { + Assert.Equal(_coordinates[i], target[i + 1]); + } + } + + [Fact] + public void Add_IncresesCount2() + { + CoordinateList target = new CoordinateList(new Coordinate[] { _coordinate }); + target.Add(_coordinates); + + Assert.Equal(_coordinates.Length + 1, target.Count); + } + + [Fact] + public void Insert_InsertsCoordinateToSpecifiedIndex() + { + int index = 1; + CoordinateList target = new CoordinateList(_coordinates); + target.Insert(index, _coordinate); + + Assert.Equal(_coordinate, target[index]); + } + + [Fact] + public void Insert_IncresesCount() + { + int index = 1; + CoordinateList target = new CoordinateList(_coordinates); + target.Insert(index, _coordinate); + + Assert.Equal(_coordinates.Length + 1, target.Count); + } + + [Fact] + public void Insert_AppendsCoordinateToListIfIndexEqulasCount() + { + CoordinateList target = new CoordinateList(_coordinates); + target.Insert(target.Count, _coordinate); + + Assert.Equal(_coordinate, target.Last()); + Assert.Equal(_coordinates.Length + 1, target.Count); + } + + [Fact] + public void RemoveAt_RemovesCoordinateAtIndex() + { + CoordinateList target = new CoordinateList(_coordinates); + target.RemoveAt(1); + + Assert.Equal(_coordinates[0], target[0]); + Assert.Equal(_coordinates[2], target[1]); + } + + [Fact] + public void RemoveAt_DecreasesCount() + { + CoordinateList target = new CoordinateList(_coordinates); + target.RemoveAt(1); + + Assert.Equal(_coordinates.Length - 1, target.Count); + } + + [Fact] + public void Clear_RemovesAllCoordinatesFromList() + { + CoordinateList target = new CoordinateList(_coordinates); + target.Clear(); + + Assert.Empty(target.ToArray()); + Assert.Equal(0, target.Count); + } +} diff --git a/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs b/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs index b6aa419..9fcd6a2 100644 --- a/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/GeometryCollectionTests.cs @@ -1,112 +1,117 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Core.Geometries { - public class GeometryCollectionTests { - - Point[] _geometries; - - Coordinate[] _coordinatesXYZM = new Coordinate[] { - new Coordinate(12,10,100, 1000), - new Coordinate(22,20,200, 2000), - new Coordinate(32,30,300, 3000) - }; - - public GeometryCollectionTests() { - _geometries = new Point[3]; - _geometries[0] = new Point(1, 2, 3); - _geometries[1] = new Point(1.1, 2.1, 3.1); - _geometries[2] = new Point(1.2, 2.2, 3.2); - } - - private void CheckGeometries(GeometryCollection target, Geometry[] geometries) { - Assert.Equal(geometries.Length, target.Geometries.Count); - - for (int i = 0; i < geometries.Length; i++) { - Assert.Same(geometries[i], target.Geometries[i]); - } - } - - [Fact] - public void Constructor__CreatesNewEmptyCollection() { - GeometryCollection target = new GeometryCollection(); - - Assert.NotNull(target.Geometries); - Assert.Empty(target.Geometries); - } - - [Fact] - public void Constructor_IEnumerable_CreateNewCollectionWithData() { - GeometryCollection target = new GeometryCollection(_geometries); - - CheckGeometries(target, _geometries); - } - - [Fact] - public void Is3D_ReturnsFalseForEmptyCollection() { - GeometryCollection target = new GeometryCollection(); - - Assert.False(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsFalseForCollectionOf2DObjects() { - var members2d = new Geometry[] { new Point(1, 2), new Point(2, 3) }; - GeometryCollection target = new GeometryCollection(members2d); - - Assert.False(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsTrueForCollectionWithAtLeastOne3DObject() { - GeometryCollection target = new GeometryCollection(_geometries); - - Assert.True(target.Is3D); - } - - [Fact] - public void IsMeasured_ReturnsFalseForEmptyCollection() { - GeometryCollection target = new GeometryCollection(); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsFalseForCollectionOfNonMeasuredObjects() { - GeometryCollection target = new GeometryCollection(_geometries); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsTrueForCollectionWithAtLeastOneMeasuredObject() { - var members = new Geometry[] { new Point(1, 2), new Point(2, 3, 4, 5) }; - GeometryCollection target = new GeometryCollection(members); - - Assert.True(target.IsMeasured); - } - - [Fact] - public void GetEnvelopeReturnsEmptyEnvelopeForEmptyCollection() { - GeometryCollection target = new GeometryCollection(); - - Assert.Equal(Envelope.Empty, target.GetEnvelope()); - } - - [Fact] - public void GetEnvelopeReturnsUnionOfMembersEnvelopes() { - GeometryCollection target = new GeometryCollection(_geometries); - Envelope expected = new Envelope(new Coordinate[] {_geometries[0].Position, _geometries[1].Position, _geometries[2].Position}); - - Assert.Equal(expected, target.GetEnvelope()); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Core.Geometries; + +public class GeometryCollectionTests +{ + private readonly Point[] _geometries; + private readonly Coordinate[] _coordinatesXYZM = new Coordinate[] { + new Coordinate(12,10,100, 1000), + new Coordinate(22,20,200, 2000), + new Coordinate(32,30,300, 3000) + }; + + public GeometryCollectionTests() + { + _geometries = new Point[3]; + _geometries[0] = new Point(1, 2, 3); + _geometries[1] = new Point(1.1, 2.1, 3.1); + _geometries[2] = new Point(1.2, 2.2, 3.2); + } + + private void CheckGeometries(GeometryCollection target, Geometry[] geometries) + { + Assert.Equal(geometries.Length, target.Geometries.Count); + + for (int i = 0; i < geometries.Length; i++) + { + Assert.Same(geometries[i], target.Geometries[i]); + } + } + + [Fact] + public void Constructor__CreatesNewEmptyCollection() + { + GeometryCollection target = new GeometryCollection(); + + Assert.NotNull(target.Geometries); + Assert.Empty(target.Geometries); + } + + [Fact] + public void Constructor_IEnumerable_CreateNewCollectionWithData() + { + GeometryCollection target = new GeometryCollection(_geometries); + + CheckGeometries(target, _geometries); + } + + [Fact] + public void Is3D_ReturnsFalseForEmptyCollection() + { + GeometryCollection target = new GeometryCollection(); + + Assert.False(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsFalseForCollectionOf2DObjects() + { + var members2d = new Geometry[] { new Point(1, 2), new Point(2, 3) }; + GeometryCollection target = new GeometryCollection(members2d); + + Assert.False(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsTrueForCollectionWithAtLeastOne3DObject() + { + GeometryCollection target = new GeometryCollection(_geometries); + + Assert.True(target.Is3D); + } + + [Fact] + public void IsMeasured_ReturnsFalseForEmptyCollection() + { + GeometryCollection target = new GeometryCollection(); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsFalseForCollectionOfNonMeasuredObjects() + { + GeometryCollection target = new GeometryCollection(_geometries); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsTrueForCollectionWithAtLeastOneMeasuredObject() + { + var members = new Geometry[] { new Point(1, 2), new Point(2, 3, 4, 5) }; + GeometryCollection target = new GeometryCollection(members); + + Assert.True(target.IsMeasured); + } + + [Fact] + public void GetEnvelopeReturnsEmptyEnvelopeForEmptyCollection() + { + GeometryCollection target = new GeometryCollection(); + + Assert.Equal(Envelope.Empty, target.GetEnvelope()); + } + + [Fact] + public void GetEnvelopeReturnsUnionOfMembersEnvelopes() + { + GeometryCollection target = new GeometryCollection(_geometries); + Envelope expected = new Envelope(new Coordinate[] { _geometries[0].Position, _geometries[1].Position, _geometries[2].Position }); + + Assert.Equal(expected, target.GetEnvelope()); + } +} diff --git a/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs b/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs index ac58604..587da35 100644 --- a/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/LineStringTests.cs @@ -1,164 +1,175 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Core.Geometries { - public class LineStringTests { - - Coordinate[] _coordinatesXY = new Coordinate[] { - new Coordinate(12,10), - new Coordinate(22,20), - new Coordinate(32,30) - }; - - Coordinate[] _coordinatesXYZ = new Coordinate[] { - new Coordinate(12,10,100), - new Coordinate(22,20,200), - new Coordinate(32,30,300) - }; - - Coordinate[] _coordinatesXYZM = new Coordinate[] { - new Coordinate(12,10,100, 1000), - new Coordinate(22,20,200, 2000), - new Coordinate(32,30,300, 3000) - }; - - - private void CheckCoordinates(LineString target, Coordinate[] expectedPoints) { - Assert.Equal(expectedPoints.Length, target.Coordinates.Count); - - for (int i = 0; i < expectedPoints.Length; i++) { - Assert.Equal(expectedPoints[i], target.Coordinates[i]); - } - } - - [Fact] - public void Constructor__CreatesEmptyLineString() { - LineString target = new LineString(); - - Assert.Equal(0, target.Coordinates.Count); - } - - [Fact] - public void Constructor_IEnumerable_CreatesLineStringFromCoordinates() { - LineString target = new LineString(_coordinatesXYZ); - - CheckCoordinates(target, _coordinatesXYZ); - } - - [Fact] - public void Is3D_ReturnsFalseForEmptyLineString() { - LineString target = new LineString(); - - Assert.False(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsFalseForAll2DCoords() { - LineString target = new LineString(_coordinatesXY); - - Assert.False(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsTrueForAll3DCoords() { - LineString target = new LineString(_coordinatesXYZ); - - Assert.True(target.Is3D); - } - - [Fact] - public void IsMeasured_ReturnsFalseForEmptyLineString() { - LineString target = new LineString(); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsFalseForNonMeasuredCoords() { - LineString target = new LineString(_coordinatesXYZ); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsTrueForMeasuredCoords() { - LineString target = new LineString(_coordinatesXYZM); - - Assert.True(target.IsMeasured); - } - - [Fact] - public void Start_ReturnsEmptyCoordinateForEmptyLineString() { - LineString target = new LineString(); - - Assert.Equal(Coordinate.Empty, target.Start); - } - - [Fact] - public void Start_ReturnsFirstCoordinate() { - LineString target = new LineString(_coordinatesXYZ); - - Assert.Equal(_coordinatesXYZ.First(), target.Start); - } - - [Fact] - public void End_ReturnsEmptyCoordinateForEmptyLineString() { - LineString target = new LineString(); - - Assert.Equal(Coordinate.Empty, target.End); - } - - [Fact] - public void End_ReturnsLastCoordinate() { - LineString target = new LineString(_coordinatesXYZ); - - Assert.Equal(_coordinatesXYZ.Last(), target.End); - } - - [Fact] - public void IsClosed_ReturnsTrueForClosedLineString() { - LineString target = new LineString(_coordinatesXYZ); - target.Coordinates.Add(target.Coordinates[0]); - - Assert.True(target.IsClosed); - } - - [Fact] - public void IsClosed_ReturnsFalseForOpenLineString() { - LineString target = new LineString(_coordinatesXYZ); - - Assert.False(target.IsClosed); - } - - [Fact] - public void IsClosed_ReturnsFalseForEmptyLineString() { - LineString target = new LineString(); - - Assert.False(target.IsClosed); - } - - [Fact] - public void GetEnvelope_ReturnsEmptyEnvelopeForEmptyLineString() { - LineString target = new LineString(); - Envelope envelope = target.GetEnvelope(); - - Assert.Equal(Envelope.Empty, envelope); - } - - [Fact] - public void GetEnvelope_ReturnsEnvelopeOfLineString() { - LineString target = new LineString(_coordinatesXYZ); - Envelope expected = new Envelope(_coordinatesXYZ); - - Assert.Equal(expected, target.GetEnvelope()); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Core.Geometries; + +public class LineStringTests +{ + private readonly Coordinate[] _coordinatesXY = new Coordinate[] { + new Coordinate(12,10), + new Coordinate(22,20), + new Coordinate(32,30) + }; + private readonly Coordinate[] _coordinatesXYZ = new Coordinate[] { + new Coordinate(12,10,100), + new Coordinate(22,20,200), + new Coordinate(32,30,300) + }; + private readonly Coordinate[] _coordinatesXYZM = new Coordinate[] { + new Coordinate(12,10,100, 1000), + new Coordinate(22,20,200, 2000), + new Coordinate(32,30,300, 3000) + }; + + + private void CheckCoordinates(LineString target, Coordinate[] expectedPoints) + { + Assert.Equal(expectedPoints.Length, target.Coordinates.Count); + + for (int i = 0; i < expectedPoints.Length; i++) + { + Assert.Equal(expectedPoints[i], target.Coordinates[i]); + } + } + + [Fact] + public void Constructor__CreatesEmptyLineString() + { + LineString target = new LineString(); + + Assert.Equal(0, target.Coordinates.Count); + } + + [Fact] + public void Constructor_IEnumerable_CreatesLineStringFromCoordinates() + { + LineString target = new LineString(_coordinatesXYZ); + + CheckCoordinates(target, _coordinatesXYZ); + } + + [Fact] + public void Is3D_ReturnsFalseForEmptyLineString() + { + LineString target = new LineString(); + + Assert.False(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsFalseForAll2DCoords() + { + LineString target = new LineString(_coordinatesXY); + + Assert.False(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsTrueForAll3DCoords() + { + LineString target = new LineString(_coordinatesXYZ); + + Assert.True(target.Is3D); + } + + [Fact] + public void IsMeasured_ReturnsFalseForEmptyLineString() + { + LineString target = new LineString(); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsFalseForNonMeasuredCoords() + { + LineString target = new LineString(_coordinatesXYZ); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsTrueForMeasuredCoords() + { + LineString target = new LineString(_coordinatesXYZM); + + Assert.True(target.IsMeasured); + } + + [Fact] + public void Start_ReturnsEmptyCoordinateForEmptyLineString() + { + LineString target = new LineString(); + + Assert.Equal(Coordinate.Empty, target.Start); + } + + [Fact] + public void Start_ReturnsFirstCoordinate() + { + LineString target = new LineString(_coordinatesXYZ); + + Assert.Equal(_coordinatesXYZ.First(), target.Start); + } + + [Fact] + public void End_ReturnsEmptyCoordinateForEmptyLineString() + { + LineString target = new LineString(); + + Assert.Equal(Coordinate.Empty, target.End); + } + + [Fact] + public void End_ReturnsLastCoordinate() + { + LineString target = new LineString(_coordinatesXYZ); + + Assert.Equal(_coordinatesXYZ.Last(), target.End); + } + + [Fact] + public void IsClosed_ReturnsTrueForClosedLineString() + { + LineString target = new LineString(_coordinatesXYZ); + target.Coordinates.Add(target.Coordinates[0]); + + Assert.True(target.IsClosed); + } + + [Fact] + public void IsClosed_ReturnsFalseForOpenLineString() + { + LineString target = new LineString(_coordinatesXYZ); + + Assert.False(target.IsClosed); + } + + [Fact] + public void IsClosed_ReturnsFalseForEmptyLineString() + { + LineString target = new LineString(); + + Assert.False(target.IsClosed); + } + + [Fact] + public void GetEnvelope_ReturnsEmptyEnvelopeForEmptyLineString() + { + LineString target = new LineString(); + Envelope envelope = target.GetEnvelope(); + + Assert.Equal(Envelope.Empty, envelope); + } + + [Fact] + public void GetEnvelope_ReturnsEnvelopeOfLineString() + { + LineString target = new LineString(_coordinatesXYZ); + Envelope expected = new Envelope(_coordinatesXYZ); + + Assert.Equal(expected, target.GetEnvelope()); + } +} diff --git a/src/Tests.SpatialLite.Core/Geometries/MultiLineStringTests.cs b/src/Tests.SpatialLite.Core/Geometries/MultiLineStringTests.cs index e501782..03a5059 100644 --- a/src/Tests.SpatialLite.Core/Geometries/MultiLineStringTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/MultiLineStringTests.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Tests.SpatialLite.Core.Geometries { - public class MultiLineStringTests { - //The current implementation of MultiLineString just calls parents constructors, so nothing worth testing - } -} +namespace Tests.SpatialLite.Core.Geometries; + +public class MultiLineStringTests +{ + //The current implementation of MultiLineString just calls parents constructors, so nothing worth testing +} diff --git a/src/Tests.SpatialLite.Core/Geometries/MultiPointTests.cs b/src/Tests.SpatialLite.Core/Geometries/MultiPointTests.cs index 1c42c4c..4fc72a6 100644 --- a/src/Tests.SpatialLite.Core/Geometries/MultiPointTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/MultiPointTests.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Tests.SpatialLite.Core.Geometries { - public class MultiPointTests { - //The current implementation of MultiPoint just calls parent constructors, so nothing worth testing - } -} +namespace Tests.SpatialLite.Core.Geometries; + +public class MultiPointTests +{ + //The current implementation of MultiPoint just calls parent constructors, so nothing worth testing +} diff --git a/src/Tests.SpatialLite.Core/Geometries/MultiPolygonTests.cs b/src/Tests.SpatialLite.Core/Geometries/MultiPolygonTests.cs index 08a3083..f80c8a0 100644 --- a/src/Tests.SpatialLite.Core/Geometries/MultiPolygonTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/MultiPolygonTests.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Tests.SpatialLite.Core.Geometries { - public class MultiPolygonTests { - //The current implementation of MultiPolygon just calls parents constructors, so nothing worth testing - } -} +namespace Tests.SpatialLite.Core.Geometries; + +public class MultiPolygonTests +{ + //The current implementation of MultiPolygon just calls parents constructors, so nothing worth testing +} diff --git a/src/Tests.SpatialLite.Core/Geometries/PointTests.cs b/src/Tests.SpatialLite.Core/Geometries/PointTests.cs index 4100b11..1848790 100644 --- a/src/Tests.SpatialLite.Core/Geometries/PointTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/PointTests.cs @@ -1,125 +1,130 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Core.Geometries { - public class PointTests { - - double _xOrdinate = 3.5; - double _yOrdinate = 4.2; - double _zOrdinate = 10.5; - double _mValue = 100.4; - - Coordinate _coordinate; - public PointTests() { - _coordinate = new Coordinate(_xOrdinate, _yOrdinate, _zOrdinate, _mValue); - } - - private void ChenckPosition(Point target, double x, double y, double z, double m) { - Assert.Equal(x, target.Position.X); - Assert.Equal(y, target.Position.Y); - Assert.Equal(z, target.Position.Z); - Assert.Equal(m, target.Position.M); - } - - [Fact] - public void Constructor__CreatesPointWithEmptyPosition() { - Point target = new Point(); - - Assert.Equal(Coordinate.Empty, target.Position); - } - - [Fact] - public void Constructor_XY_SetsCoordinates() { - Point target = new Point(_xOrdinate, _yOrdinate); - - ChenckPosition(target, _xOrdinate, _yOrdinate, double.NaN, double.NaN); - } - - [Fact] - public void Constructor_XYZ_SetsCoordinates() { - Point target = new Point(_xOrdinate, _yOrdinate, _zOrdinate); - - ChenckPosition(target, _xOrdinate, _yOrdinate, _zOrdinate, double.NaN); - } - - [Fact] - public void Constructor_XYZM_SetsCoordinates() { - Point target = new Point(_xOrdinate, _yOrdinate, _zOrdinate, _mValue); - - ChenckPosition(target, _xOrdinate, _yOrdinate, _zOrdinate, _mValue); - } - - [Fact] - public void Constructor_Coordinate_SetsCoordinates() { - Point target = new Point(_coordinate); - - Assert.Equal(_coordinate, target.Position); - } - - [Fact] - public void Is3D_ReturnsTrueFor3DPoint() { - Point target = new Point(_xOrdinate, _yOrdinate, _zOrdinate); - - Assert.True(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsFalseFor2DPoint() { - Point target = new Point(_xOrdinate, _yOrdinate); - - Assert.False(target.Is3D); - } - - [Fact] - public void IsMeasured_ReturnsTrueForMeasuredPoint() { - Point target = new Point(_xOrdinate, _yOrdinate, double.NaN, _mValue); - - Assert.True(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsFalseForNonMeasuredPoint() { - Point target = new Point(_xOrdinate, _yOrdinate); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void GetEnvelope_ReturnsEmptyEnvelopeForEmptyPoint() { - Point target = new Point(); - Envelope envelope = target.GetEnvelope(); - - Assert.Equal(double.NaN, envelope.MinX); - Assert.Equal(double.NaN, envelope.MaxX); - Assert.Equal(double.NaN, envelope.MinY); - Assert.Equal(double.NaN, envelope.MaxY); - Assert.Equal(double.NaN, envelope.MinZ); - Assert.Equal(double.NaN, envelope.MaxZ); - Assert.Equal(double.NaN, envelope.MinM); - Assert.Equal(double.NaN, envelope.MaxM); - } - - [Fact] - public void GetEnvelope_ReturnsEnvelopeThatCoversOnePoint() { - Point target = new Point(_coordinate); - Envelope envelope = target.GetEnvelope(); - - Assert.Equal(_coordinate.X, envelope.MinX); - Assert.Equal(_coordinate.X, envelope.MaxX); - Assert.Equal(_coordinate.Y, envelope.MinY); - Assert.Equal(_coordinate.Y, envelope.MaxY); - Assert.Equal(_coordinate.Z, envelope.MinZ); - Assert.Equal(_coordinate.Z, envelope.MaxZ); - Assert.Equal(_coordinate.M, envelope.MinM); - Assert.Equal(_coordinate.M, envelope.MaxM); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Core.Geometries; + +public class PointTests +{ + private readonly double _xOrdinate = 3.5; + private readonly double _yOrdinate = 4.2; + private readonly double _zOrdinate = 10.5; + private readonly double _mValue = 100.4; + private Coordinate _coordinate; + public PointTests() + { + _coordinate = new Coordinate(_xOrdinate, _yOrdinate, _zOrdinate, _mValue); + } + + private void ChenckPosition(Point target, double x, double y, double z, double m) + { + Assert.Equal(x, target.Position.X); + Assert.Equal(y, target.Position.Y); + Assert.Equal(z, target.Position.Z); + Assert.Equal(m, target.Position.M); + } + + [Fact] + public void Constructor__CreatesPointWithEmptyPosition() + { + Point target = new Point(); + + Assert.Equal(Coordinate.Empty, target.Position); + } + + [Fact] + public void Constructor_XY_SetsCoordinates() + { + Point target = new Point(_xOrdinate, _yOrdinate); + + ChenckPosition(target, _xOrdinate, _yOrdinate, double.NaN, double.NaN); + } + + [Fact] + public void Constructor_XYZ_SetsCoordinates() + { + Point target = new Point(_xOrdinate, _yOrdinate, _zOrdinate); + + ChenckPosition(target, _xOrdinate, _yOrdinate, _zOrdinate, double.NaN); + } + + [Fact] + public void Constructor_XYZM_SetsCoordinates() + { + Point target = new Point(_xOrdinate, _yOrdinate, _zOrdinate, _mValue); + + ChenckPosition(target, _xOrdinate, _yOrdinate, _zOrdinate, _mValue); + } + + [Fact] + public void Constructor_Coordinate_SetsCoordinates() + { + Point target = new Point(_coordinate); + + Assert.Equal(_coordinate, target.Position); + } + + [Fact] + public void Is3D_ReturnsTrueFor3DPoint() + { + Point target = new Point(_xOrdinate, _yOrdinate, _zOrdinate); + + Assert.True(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsFalseFor2DPoint() + { + Point target = new Point(_xOrdinate, _yOrdinate); + + Assert.False(target.Is3D); + } + + [Fact] + public void IsMeasured_ReturnsTrueForMeasuredPoint() + { + Point target = new Point(_xOrdinate, _yOrdinate, double.NaN, _mValue); + + Assert.True(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsFalseForNonMeasuredPoint() + { + Point target = new Point(_xOrdinate, _yOrdinate); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void GetEnvelope_ReturnsEmptyEnvelopeForEmptyPoint() + { + Point target = new Point(); + Envelope envelope = target.GetEnvelope(); + + Assert.Equal(double.NaN, envelope.MinX); + Assert.Equal(double.NaN, envelope.MaxX); + Assert.Equal(double.NaN, envelope.MinY); + Assert.Equal(double.NaN, envelope.MaxY); + Assert.Equal(double.NaN, envelope.MinZ); + Assert.Equal(double.NaN, envelope.MaxZ); + Assert.Equal(double.NaN, envelope.MinM); + Assert.Equal(double.NaN, envelope.MaxM); + } + + [Fact] + public void GetEnvelope_ReturnsEnvelopeThatCoversOnePoint() + { + Point target = new Point(_coordinate); + Envelope envelope = target.GetEnvelope(); + + Assert.Equal(_coordinate.X, envelope.MinX); + Assert.Equal(_coordinate.X, envelope.MaxX); + Assert.Equal(_coordinate.Y, envelope.MinY); + Assert.Equal(_coordinate.Y, envelope.MaxY); + Assert.Equal(_coordinate.Z, envelope.MinZ); + Assert.Equal(_coordinate.Z, envelope.MaxZ); + Assert.Equal(_coordinate.M, envelope.MinM); + Assert.Equal(_coordinate.M, envelope.MaxM); + } +} diff --git a/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs b/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs index 2f584b6..e3bf4dd 100644 --- a/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/PolygonTests.cs @@ -1,126 +1,129 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Core.Geometries { - public class PolygonTests { - - Coordinate[] _coordinatesXY = new Coordinate[] { - new Coordinate(1, 2), new Coordinate(1.1, 2.1), new Coordinate(1.2, 2.2), new Coordinate(1.3, 2.3) - }; - - Coordinate[] _coordinatesXYZ = new Coordinate[] { - new Coordinate(1, 2, 3), new Coordinate(1.1, 2.1, 3.1), new Coordinate(1.2, 2.2, 3.2), new Coordinate(1.3, 2.3, 3.3) - }; - - Coordinate[] _coordinatesXYZM = new Coordinate[] { - new Coordinate(1, 2, 3, 10), new Coordinate(1.1, 2.1, 3.1, 20), new Coordinate(1.2, 2.2, 3.2, 30), new Coordinate(1.3, 2.3, 3.3, 40) - }; - - CoordinateList _exteriorRing3D; - CoordinateList[] _interiorRings3D; - - public PolygonTests() { - _exteriorRing3D = new CoordinateList(_coordinatesXYZ); - - _interiorRings3D = new CoordinateList[2]; - _interiorRings3D[0] = new CoordinateList(new Coordinate[] { _coordinatesXYZ[0], _coordinatesXYZ[1], _coordinatesXYZ[0] }); - _interiorRings3D[1] = new CoordinateList(new Coordinate[] { _coordinatesXYZ[1], _coordinatesXYZ[2], _coordinatesXYZ[1] }); - } - - private void CheckInteriorRings(Polygon target, CoordinateList[] expected) { - Assert.Equal(expected.Length, target.InteriorRings.Count); - for (int i = 0; i < expected.Length; i++) { - Assert.Same(expected[i], target.InteriorRings[i]); - } - } - - [Fact] - public void Constructor__CreatesEmptyPolygonAndInitializesProperties() { - Polygon target = new Polygon(); - - Assert.NotNull(target.ExteriorRing); - Assert.Empty(target.ExteriorRing); - - Assert.NotNull(target.InteriorRings); - Assert.Empty(target.InteriorRings); - } - - [Fact] - public void Constructor_ExteriorRing_CreatesPolygonWithExteriorBoundary() { - Polygon target = new Polygon(_exteriorRing3D); - - Assert.Same(_exteriorRing3D, target.ExteriorRing); - - Assert.NotNull(target.InteriorRings); - Assert.Empty(target.InteriorRings); - } - - [Fact] - public void Is3D_ReturnsTrueFor3DExteriorRing() { - Polygon target = new Polygon(_exteriorRing3D); - - Assert.True(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsFalseForEmptyPolygon() { - Polygon target = new Polygon(); - - Assert.False(target.Is3D); - } - - [Fact] - public void Is3D_ReturnsFalseFor2DExteriorRing() { - Polygon target = new Polygon(new CoordinateList(_coordinatesXY)); - - Assert.False(target.Is3D); - } - - [Fact] - public void IsMeasured_ReturnsTrueForMeasuredExteriorRing() { - Polygon target = new Polygon(new CoordinateList(_coordinatesXYZM)); - - Assert.True(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsFalseForEmptyPolygon() { - Polygon target = new Polygon(); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void IsMeasured_ReturnsFalseForNonMeasuredExteriorRing() { - Polygon target = new Polygon(new CoordinateList(_coordinatesXYZ)); - - Assert.False(target.IsMeasured); - } - - [Fact] - public void GetEnvelope_ReturnsEmptyEnvelopeForEmptyPolygon() { - Polygon target = new Polygon(); - Envelope envelope = target.GetEnvelope(); - - Assert.Equal(Envelope.Empty, envelope); - } - - [Fact] - public void GetEnvelopeReturnsEnvelopeOfLineString() { - Envelope expectedEnvelope = new Envelope(_coordinatesXYZ); - - Polygon target = new Polygon(_exteriorRing3D); - Envelope envelope = target.GetEnvelope(); - - Assert.Equal(expectedEnvelope, envelope); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Core.Geometries; + +public class PolygonTests +{ + private readonly Coordinate[] _coordinatesXY = new Coordinate[] { + new Coordinate(1, 2), new Coordinate(1.1, 2.1), new Coordinate(1.2, 2.2), new Coordinate(1.3, 2.3) + }; + private readonly Coordinate[] _coordinatesXYZ = new Coordinate[] { + new Coordinate(1, 2, 3), new Coordinate(1.1, 2.1, 3.1), new Coordinate(1.2, 2.2, 3.2), new Coordinate(1.3, 2.3, 3.3) + }; + private readonly Coordinate[] _coordinatesXYZM = new Coordinate[] { + new Coordinate(1, 2, 3, 10), new Coordinate(1.1, 2.1, 3.1, 20), new Coordinate(1.2, 2.2, 3.2, 30), new Coordinate(1.3, 2.3, 3.3, 40) + }; + private readonly CoordinateList _exteriorRing3D; + private readonly CoordinateList[] _interiorRings3D; + + public PolygonTests() + { + _exteriorRing3D = new CoordinateList(_coordinatesXYZ); + + _interiorRings3D = new CoordinateList[2]; + _interiorRings3D[0] = new CoordinateList(new Coordinate[] { _coordinatesXYZ[0], _coordinatesXYZ[1], _coordinatesXYZ[0] }); + _interiorRings3D[1] = new CoordinateList(new Coordinate[] { _coordinatesXYZ[1], _coordinatesXYZ[2], _coordinatesXYZ[1] }); + } + + private void CheckInteriorRings(Polygon target, CoordinateList[] expected) + { + Assert.Equal(expected.Length, target.InteriorRings.Count); + for (int i = 0; i < expected.Length; i++) + { + Assert.Same(expected[i], target.InteriorRings[i]); + } + } + + [Fact] + public void Constructor__CreatesEmptyPolygonAndInitializesProperties() + { + Polygon target = new Polygon(); + + Assert.NotNull(target.ExteriorRing); + Assert.Empty(target.ExteriorRing); + + Assert.NotNull(target.InteriorRings); + Assert.Empty(target.InteriorRings); + } + + [Fact] + public void Constructor_ExteriorRing_CreatesPolygonWithExteriorBoundary() + { + Polygon target = new Polygon(_exteriorRing3D); + + Assert.Same(_exteriorRing3D, target.ExteriorRing); + + Assert.NotNull(target.InteriorRings); + Assert.Empty(target.InteriorRings); + } + + [Fact] + public void Is3D_ReturnsTrueFor3DExteriorRing() + { + Polygon target = new Polygon(_exteriorRing3D); + + Assert.True(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsFalseForEmptyPolygon() + { + Polygon target = new Polygon(); + + Assert.False(target.Is3D); + } + + [Fact] + public void Is3D_ReturnsFalseFor2DExteriorRing() + { + Polygon target = new Polygon(new CoordinateList(_coordinatesXY)); + + Assert.False(target.Is3D); + } + + [Fact] + public void IsMeasured_ReturnsTrueForMeasuredExteriorRing() + { + Polygon target = new Polygon(new CoordinateList(_coordinatesXYZM)); + + Assert.True(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsFalseForEmptyPolygon() + { + Polygon target = new Polygon(); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void IsMeasured_ReturnsFalseForNonMeasuredExteriorRing() + { + Polygon target = new Polygon(new CoordinateList(_coordinatesXYZ)); + + Assert.False(target.IsMeasured); + } + + [Fact] + public void GetEnvelope_ReturnsEmptyEnvelopeForEmptyPolygon() + { + Polygon target = new Polygon(); + Envelope envelope = target.GetEnvelope(); + + Assert.Equal(Envelope.Empty, envelope); + } + + [Fact] + public void GetEnvelopeReturnsEnvelopeOfLineString() + { + Envelope expectedEnvelope = new Envelope(_coordinatesXYZ); + + Polygon target = new Polygon(_exteriorRing3D); + Envelope envelope = target.GetEnvelope(); + + Assert.Equal(expectedEnvelope, envelope); + } +} diff --git a/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs b/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs index 0a26188..f04fa05 100644 --- a/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs +++ b/src/Tests.SpatialLite.Core/Geometries/ReadOnlyCoordinateListTests.cs @@ -1,84 +1,91 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core.Geometries; -using SpatialLite.Core.API; - -namespace Tests.SpatialLite.Core.Geometries { - public class ReadOnlyCoordinateListTests { - List _points = new List(new Point[] { - new Point(5, 1.1, 2.2), - new Point(6, 10.1, -20.2), - new Point(7, -30.1, 40.2) }); - - - [Fact] - public void Constructor_Source_SetsSource() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Same(_points, target.Source); - } - - [Fact] - public void Indexer_Get_ReturnsCoordinatesFromSourceList() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - for (int i = 0; i < _points.Count; i++) { - Assert.Equal(_points[i].Position, target[i]); - } - } - - [Fact] - public void Indexer_Set_ThrowsNotSupportedException() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Throws(() => target[0] = new Coordinate(10.1, 11.2)); - } - - [Fact] - public void Count_GetsNumberOfItemsInSourceCollection() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Equal(_points.Count, target.Count); - } - - [Fact] - public void Add_Coordinate_ThowsNotSupportedException() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Throws(() => target.Add(Coordinate.Empty)); - } - - [Fact] - public void Add_Coordinates_ThowsNotSupportedException() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Throws(() => target.Add(new Coordinate[] { Coordinate.Empty })); - } - - [Fact] - public void Insert_Index_Coordinate_ThowsNotSupportedException() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Throws(() => target.Insert(0, Coordinate.Empty)); - } - - [Fact] - public void RemoveAt_Index_ThowsNotSupportedException() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Throws(() => target.RemoveAt(0)); - } - - [Fact] - public void Clear_ThowsNotSupportedException() { - ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); - - Assert.Throws(() => target.Clear()); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Core.Geometries; + +public class ReadOnlyCoordinateListTests +{ + private readonly List _points = new List(new Point[] { + new Point(5, 1.1, 2.2), + new Point(6, 10.1, -20.2), + new Point(7, -30.1, 40.2) }); + + + [Fact] + public void Constructor_Source_SetsSource() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Same(_points, target.Source); + } + + [Fact] + public void Indexer_Get_ReturnsCoordinatesFromSourceList() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + for (int i = 0; i < _points.Count; i++) + { + Assert.Equal(_points[i].Position, target[i]); + } + } + + [Fact] + public void Indexer_Set_ThrowsNotSupportedException() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Throws(() => target[0] = new Coordinate(10.1, 11.2)); + } + + [Fact] + public void Count_GetsNumberOfItemsInSourceCollection() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Equal(_points.Count, target.Count); + } + + [Fact] + public void Add_Coordinate_ThowsNotSupportedException() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Throws(() => target.Add(Coordinate.Empty)); + } + + [Fact] + public void Add_Coordinates_ThowsNotSupportedException() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Throws(() => target.Add(new Coordinate[] { Coordinate.Empty })); + } + + [Fact] + public void Insert_Index_Coordinate_ThowsNotSupportedException() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Throws(() => target.Insert(0, Coordinate.Empty)); + } + + [Fact] + public void RemoveAt_Index_ThowsNotSupportedException() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Throws(() => target.RemoveAt(0)); + } + + [Fact] + public void Clear_ThowsNotSupportedException() + { + ReadOnlyCoordinateList target = new ReadOnlyCoordinateList(_points); + + Assert.Throws(target.Clear); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs b/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs index 4503ba9..8fc4ea6 100644 --- a/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WkbReaderTests.cs @@ -1,614 +1,688 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -using Xunit; -using Tests.SpatialLite.Core.Data; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; -using SpatialLite.Core.IO; - -namespace Tests.SpatialLite.Core.IO { - public class WkbReaderTests { - [Fact] - public void Constructor_Stream_ThrowsAgrumentNullExceptioIfStreamIsNull() { - Stream stream = null; - Assert.Throws(() => new WkbReader(stream)); - } - - [Fact] - public void Constructor_Path_ThrowsFileNotFoundExceptioIfFileDoesNotExists() { - Assert.Throws(() => new WkbReader("non-existing-file.wkb")); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = "../../../Data/IO/point-3DM.wkb"; - - WkbReader target = new WkbReader(filename); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToStream() { - var stream = TestDataReader.Open("point-3DM.wkb"); - - WkbReader target = new WkbReader(stream); - target.Dispose(); - - Assert.False(stream.CanRead); - } - - [Fact] - public void Read_ReturnsNullIfStreamIsEmpty() { - MemoryStream stream = new MemoryStream(); - - WkbReader target = new WkbReader(stream); - Geometry read = target.Read(); - - Assert.Null(read); - } - - [Fact] - public void Read_ReadsGeometry() { - Point expected = (Point)this.ParseWKT("point zm (-10.1 15.5 100.5 1000.5)"); - - WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); - Point parsed = (Point)target.Read(); - - this.ComparePoints(parsed, expected); - } - - [Fact] - public void Read_ReadsMultipleGeometries() { - Point expected1 = (Point)this.ParseWKT("point zm (-10.1 15.5 100.5 1000.5)"); - Point expected2 = (Point)this.ParseWKT("point zm (-10.2 15.6 100.6 1000.6)"); - - WkbReader target = new WkbReader(TestDataReader.Open("two-points-3DM.wkb")); - - Point parsed1 = (Point)target.Read(); - this.ComparePoints(parsed1, expected1); - - Point parsed2 = (Point)target.Read(); - this.ComparePoints(parsed2, expected2); - } - - [Fact] - public void Read_ReturnsNullIfNoMoreGeometriesAreAvailable() { - WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); - - target.Read(); - Geometry parsed = target.Read(); - - Assert.Null(parsed); - } - - [Fact] - public void Read_ThrowsExceptionIfWKBDoesNotRepresentGeometry() { - byte[] wkb = new byte[] { 12, 0, 0, 45, 78, 124, 36, 0 }; - using (MemoryStream ms = new MemoryStream(wkb)) { - WkbReader target = new WkbReader(ms); - - Assert.Throws(() => target.Read()); - } - } - - [Fact] - public void ReadT_ReturnsNullIfStreamIsEmpty() { - MemoryStream stream = new MemoryStream(); - - WkbReader target = new WkbReader(stream); - Geometry read = target.Read(); - - Assert.Null(read); - } - - [Fact] - public void ReadT_ReadsGeometry() { - Point expected = (Point)this.ParseWKT("point zm (-10.1 15.5 100.5 1000.5)"); - - WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); - Point parsed = target.Read(); - - this.ComparePoints(parsed, expected); - } - - [Fact] - public void ReadT_ReturnsNullIfNoMoreGeometriesAreAvailable() { - WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); - - target.Read(); - Geometry parsed = target.Read(); - - Assert.Null(parsed); - } - - [Fact] - public void ReadT_ThrowsExceptionIfWKBDoesNotRepresentGeometry() { - byte[] wkb = new byte[] { 12, 0, 0, 45, 78, 124, 36, 0 }; - using (MemoryStream ms = new MemoryStream(wkb)) { - WkbReader target = new WkbReader(ms); - - Assert.Throws(() => target.Read()); - } - } - - [Fact] - public void ReadT_ThrowsExceptionIfWKBDoesNotRepresentSpecifiecGeometryType() { - WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Parse_ThrowsExceptionIfWKBDoesNotRepresentGeometry() { - byte[] wkb = new byte[] { 12, 0, 0, 45, 78, 124, 36, 0 }; - - Assert.Throws(() => WkbReader.Parse(wkb)); - } - - [Fact] - public void Parse_ReturnsNullForEmptyInput() { - byte[] wkb = new byte[0]; - - Assert.Null(WkbReader.Parse(wkb)); - } - - [Fact] - public void Parse_ThrowsArgumentNullExceptionIfDataIsNull() { - Assert.Throws(() => WkbReader.Parse(null)); - } - - [Fact] - public void Parse_ReturnsParsedGeometry() { - string wkt = "point m (-10.1 15.5 1000.5)"; - Point expected = (Point)this.ParseWKT(wkt); - Point parsed = (Point)WkbReader.Parse(TestDataReader.Read("point-2DM.wkb")); - - this.ComparePoints(parsed, expected); - } - - [Fact] - public void ParseT_ThrowsExceptionIfWKBDoesNotRepresentSpecifiedType() { - byte[] wkb = TestDataReader.Read("linestring-2D.wkb"); - - Assert.Throws(() => WkbReader.Parse(wkb)); - } - - [Fact] - public void ParseT_ReturnsNullForEmptyInput() { - byte[] wkb = new byte[0]; - - Assert.Null(WkbReader.Parse(wkb)); - } - - [Fact] - public void ParseT_ThrowsArgumentNullExceptionIfDataIsNull() { - Assert.Throws(() => WkbReader.Parse(null)); - } - - [Fact] - public void ParsePoint_Parses2DPoint() { - string wkt = "point (-10.1 15.5)"; - byte[] wkb = TestDataReader.Read("point-2D.wkb"); - - this.TestParsePoint(wkb, wkt); - } - - [Fact] - public void ParsePoint_Parses2DMeasuredPoint() { - string wkt = "point m (-10.1 15.5 1000.5)"; - byte[] wkb = TestDataReader.Read("point-2DM.wkb"); - - this.TestParsePoint(wkb, wkt); - } - - [Fact] - public void ParsePoint_Parses3DPoint() { - string wkt = "point z (-10.1 15.5 100.5)"; - byte[] wkb = TestDataReader.Read("point-3D.wkb"); - - this.TestParsePoint(wkb, wkt); - } - - [Fact] - public void ParsePoint_Parses3DMeasuredPoint() { - string wkt = "point zm (-10.1 15.5 100.5 1000.5)"; - byte[] wkb = TestDataReader.Read("point-3DM.wkb"); - - this.TestParsePoint(wkb, wkt); - } - - [Fact] - public void Parse_ParsesEmptyLineString() { - string wkt = "linestring empty"; - byte[] wkb = TestDataReader.Read("linestring-empty.wkb"); - - this.TestParseLineString(wkb, wkt); - } - - [Fact] - public void Parse_Parses2DLineString() { - string wkt = "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)"; - byte[] wkb = TestDataReader.Read("linestring-2D.wkb"); - - this.TestParseLineString(wkb, wkt); - } - - [Fact] - public void Parse_Parses2DMeasuredLineString() { - string wkt = "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)"; - byte[] wkb = TestDataReader.Read("linestring-2DM.wkb"); - - this.TestParseLineString(wkb, wkt); - } - - [Fact] - public void Parse_Parses3DLineString() { - string wkt = "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)"; - byte[] wkb = TestDataReader.Read("linestring-3D.wkb"); - this.TestParseLineString(wkb, wkt); - } - - [Fact] - public void Parse_Parses3DMeasuredLineString() { - string wkt = "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)"; - byte[] wkb = TestDataReader.Read("linestring-3DM.wkb"); - - this.TestParseLineString(wkb, wkt); - } - - [Fact] - public void Parse_ParsesEmptyPolygon() { - string wkt = "polygon empty"; - byte[] wkb = TestDataReader.Read("polygon-empty.wkb"); - - this.TestParsePolygon(wkb, wkt); - } - - [Fact] - public void Parse_Parses2DPolygonOnlyExteriorRing() { - string wkt = "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; - byte[] wkb = TestDataReader.Read("polygon-ext-2D.wkb"); - - this.TestParsePolygon(wkb, wkt); - } - - [Fact] - public void Parse_Parses2DMeasuredPolygonOnlyExteriorRing() { - string wkt = "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; - byte[] wkb = TestDataReader.Read("polygon-ext-2DM.wkb"); - - this.TestParsePolygon(wkb, wkt); - } - - [Fact] - public void Parse_Parses3DPolygonOnlyExteriorRing() { - string wkt = "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; - byte[] wkb = TestDataReader.Read("polygon-ext-3D.wkb"); - - this.TestParsePolygon(wkb, wkt); - } - - [Fact] - public void Parse_Parses3DMeasuredPolygonOnlyExteriorRing() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; - byte[] wkb = TestDataReader.Read("polygon-ext-3DM.wkb"); - - this.TestParsePolygon(wkb, wkt); - } - - [Fact] - public void Parse_Parses3DMeasuredPolygon() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; - byte[] wkb = TestDataReader.Read("polygon-3DM.wkb"); - - this.TestParsePolygon(wkb, wkt); - } - - [Fact] - public void ParseMultiPoint_ParsesEmptyMultipoint() { - string wkt = "multipoint empty"; - byte[] wkb = TestDataReader.Read("multipoint-empty.wkb"); - - this.TestParseMultiPoint(wkb, wkt); - } - - [Fact] - public void ParseMultiPoint_Parses2DMultiPoint() { - string wkt = "multipoint ((-10.1 15.5),(20.2 -25.5))"; - byte[] wkb = TestDataReader.Read("multipoint-2D.wkb"); - - this.TestParseMultiPoint(wkb, wkt); - } - - [Fact] - public void ParseMultiPoint_Parses2DMeasuredMultiPoint() { - string wkt = "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))"; - byte[] wkb = TestDataReader.Read("multipoint-2DM.wkb"); - - this.TestParseMultiPoint(wkb, wkt); - } - - [Fact] - public void ParseMultiPoint_Parses3DMultiPoint() { - string wkt = "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))"; - byte[] wkb = TestDataReader.Read("multipoint-3D.wkb"); - - this.TestParseMultiPoint(wkb, wkt); - } - - [Fact] - public void ParseMultiPoint_Parses3DMeasuredMultiPoint() { - string wkt = "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))"; - byte[] wkb = TestDataReader.Read("multipoint-3DM.wkb"); - - this.TestParseMultiPoint(wkb, wkt); - } - - [Fact] - public void ParseMultiLineString_ParsesEmptyMultiLineString() { - string wkt = "multilinestring empty"; - byte[] wkb = TestDataReader.Read("multilinestring-empty.wkb"); - - this.TestParseMultiLineString(wkb, wkt); - } - - [Fact] - public void ParseMultiLineString_Parses2DMultiLineString() { - string wkt = "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; - byte[] wkb = TestDataReader.Read("multilinestring-2D.wkb"); - - this.TestParseMultiLineString(wkb, wkt); - } - - [Fact] - public void ParseMultiLineString_Parses2DMeasuredMultiLineString() { - string wkt = "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; - byte[] wkb = TestDataReader.Read("multilinestring-2DM.wkb"); - - this.TestParseMultiLineString(wkb, wkt); - } - - [Fact] - public void ParseMultiLineString_Parses3DMultiLineString() { - string wkt = "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; - byte[] wkb = TestDataReader.Read("multilinestring-3D.wkb"); - - this.TestParseMultiLineString(wkb, wkt); - } - - [Fact] - public void ParseMultiLineString_Parses3DMeasuredMultiLineString() { - string wkt = "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; - byte[] wkb = TestDataReader.Read("multilinestring-3DM.wkb"); - - this.TestParseMultiLineString(wkb, wkt); - } - - [Fact] - public void ParseMultiPolygon_ParsesEmptyMultiPolygon() { - string wkt = "multipolygon empty"; - byte[] wkb = TestDataReader.Read("multipolygon-empty.wkb"); - - this.TestParseMultiPolygon(wkb, wkt); - } - - [Fact] - public void ParseMultiPolygon_Parses2DMultiPolygon() { - string wkt = "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; - byte[] wkb = TestDataReader.Read("multipolygon-2D.wkb"); - - this.TestParseMultiPolygon(wkb, wkt); - } - - [Fact] - public void ParseMultiPolygon_Parses2DMeasuredMultiPolygon() { - string wkt = "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))"; - byte[] wkb = TestDataReader.Read("multipolygon-2DM.wkb"); - - this.TestParseMultiPolygon(wkb, wkt); - } - - [Fact] - public void ParseMultiPolygon_Parses3DMultiPolygon() { - string wkt = "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))"; - byte[] wkb = TestDataReader.Read("multipolygon-3D.wkb"); - - this.TestParseMultiPolygon(wkb, wkt); - } - - [Fact] - public void ParseMultiPolygon_Parses3DMeasuredMultiPolygon() { - string wkt = "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))"; - byte[] wkb = TestDataReader.Read("multipolygon-3DM.wkb"); - - this.TestParseMultiPolygon(wkb, wkt); - } - - [Fact] - public void ParseGeometryCollection_ParsesEmptyGeometryCollection() { - string wkt = "geometrycollection empty"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-empty.wkb")); - - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void ParseGeometryCollection_Parses2DGeometryCollection() { - string wkt = "geometrycollection (point (-10.1 15.5))"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-2D.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - this.ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); - } - - [Fact] - public void ParseGeometryCollection_Parses2DMeasuredGeometryCollection() { - string wkt = "geometrycollection m (point m (-10.1 15.5 1000.5))"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-2DM.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - this.ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); - } - - [Fact] - public void ParseGeometryCollection_Parses3DGeometryCollection() { - string wkt = "geometrycollection z (point z (-10.1 15.5 100.5))"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-3D.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - this.ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); - } - - [Fact] - public void ParseGeometryCollection_Parses3DMeasuredGeometryCollection() { - string wkt = "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-3DM.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - this.ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); - } - - [Fact] - public void ParseGeometryCollection_ParsesCollectionWithPointLineStringAndPolygon() { - string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-pt-ls-poly.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - this.ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); - this.CompareLineStrings((LineString)parsed.Geometries[1], (LineString)expected.Geometries[1]); - this.ComparePolygons((Polygon)parsed.Geometries[2], (Polygon)expected.Geometries[2]); - } - - [Fact] - public void ParseGeometryCollection_ParsesCollectionWithMultiGeometries() { - string wkt = "geometrycollection (multipoint empty,multilinestring empty,multipolygon empty)"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-multi.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - this.CompareMultiPoints((MultiPoint)parsed.Geometries[0], (MultiPoint)expected.Geometries[0]); - this.CompareMultiLineStrings((MultiLineString)parsed.Geometries[1], (MultiLineString)expected.Geometries[1]); - this.CompareMultiPolygons((MultiPolygon)parsed.Geometries[2], (MultiPolygon)expected.Geometries[2]); - } - - [Fact] - public void ParseGeometryCollection_ParsesNestedCollection() { - string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; - GeometryCollection expected = (GeometryCollection)this.ParseWKT(wkt); - GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-nested.wkb")); - - Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); - Assert.Equal(((GeometryCollection)expected.Geometries[0]).Geometries.Count, ((GeometryCollection)parsed.Geometries[0]).Geometries.Count); - this.ComparePoints((Point)((GeometryCollection)parsed.Geometries[0]).Geometries[0], (Point)((GeometryCollection)expected.Geometries[0]).Geometries[0]); - } - - private void TestParsePoint(byte[] wkb, string expectedAsWkt) { - Point expected = (Point)this.ParseWKT(expectedAsWkt); - Point parsed = WkbReader.Parse(wkb); - - this.ComparePoints(parsed, expected); - } - - private void TestParseLineString(byte[] wkb, string expectedAsWkt) { - LineString expected = (LineString)this.ParseWKT(expectedAsWkt); - LineString parsed = WkbReader.Parse(wkb); - - this.CompareLineStrings(parsed, expected); - } - - private void TestParsePolygon(byte[] wkb, string expectedAsWkt) { - Polygon expected = (Polygon)this.ParseWKT(expectedAsWkt); - Polygon parsed = WkbReader.Parse(wkb); - - this.ComparePolygons(parsed, expected); - } - - private void TestParseMultiPoint(byte[] wkb, string expectedAsWkt) { - MultiPoint expected = (MultiPoint)this.ParseWKT(expectedAsWkt); - MultiPoint parsed = WkbReader.Parse(wkb); - - this.CompareMultiPoints(parsed, expected); - } - - private void TestParseMultiLineString(byte[] wkb, string expectedAsWkt) { - MultiLineString expected = (MultiLineString)this.ParseWKT(expectedAsWkt); - MultiLineString parsed = WkbReader.Parse(wkb); - - this.CompareMultiLineStrings(parsed, expected); - } - - private void TestParseMultiPolygon(byte[] wkb, string expectedAsWkt) { - MultiPolygon expected = (MultiPolygon)this.ParseWKT(expectedAsWkt); - MultiPolygon parsed = WkbReader.Parse(wkb); - - this.CompareMultiPolygons(parsed, expected); - } - - private void ComparePoints(Point point, Point expected) { - Assert.Equal(expected.Position, point.Position); - } - - private void CompareCoordinateLists(ICoordinateList list, ICoordinateList expected) { - Assert.Equal(expected.Count, list.Count); - for (int i = 0; i < expected.Count; i++) { - Assert.Equal(expected[i], list[i]); - } - } - - private void CompareLineStrings(LineString linestring, LineString expected) { - this.CompareCoordinateLists(linestring.Coordinates, expected.Coordinates); - } - - private void ComparePolygons(Polygon polygon, Polygon expected) { - this.CompareCoordinateLists(polygon.ExteriorRing, expected.ExteriorRing); - - Assert.Equal(expected.InteriorRings.Count, polygon.InteriorRings.Count); - for (int i = 0; i < expected.InteriorRings.Count; i++) { - this.CompareCoordinateLists(polygon.InteriorRings[i], expected.InteriorRings[i]); - } - } - - private void CompareMultiPoints(MultiPoint multipoint, MultiPoint expected) { - Assert.Equal(expected.Geometries.Count, multipoint.Geometries.Count); - - for (int i = 0; i < expected.Geometries.Count; i++) { - this.ComparePoints(multipoint.Geometries[i], expected.Geometries[i]); - } - } - - private void CompareMultiLineStrings(MultiLineString multilinestring, MultiLineString expected) { - Assert.Equal(expected.Geometries.Count, multilinestring.Geometries.Count); - - for (int i = 0; i < expected.Geometries.Count; i++) { - this.CompareLineStrings(multilinestring.Geometries[i], expected.Geometries[i]); - } - } - - private void CompareMultiPolygons(MultiPolygon multipolygon, MultiPolygon expected) { - Assert.Equal(expected.Geometries.Count, multipolygon.Geometries.Count); - - for (int i = 0; i < expected.Geometries.Count; i++) { - this.ComparePolygons(multipolygon.Geometries[i], expected.Geometries[i]); - } - } - - - private Geometry ParseWKT(string wkt) { - return WktReader.Parse(wkt); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using SpatialLite.Core.IO; +using System; +using System.IO; +using Tests.SpatialLite.Core.Data; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + +public class WkbReaderTests +{ + [Fact] + public void Constructor_Stream_ThrowsAgrumentNullExceptioIfStreamIsNull() + { + Stream stream = null; + Assert.Throws(() => new WkbReader(stream)); + } + + [Fact] + public void Constructor_Path_ThrowsFileNotFoundExceptioIfFileDoesNotExists() + { + Assert.Throws(() => new WkbReader("non-existing-file.wkb")); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = "../../../Data/IO/point-3DM.wkb"; + + WkbReader target = new WkbReader(filename); + target.Dispose(); + FileStream testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToStream() + { + var stream = TestDataReader.Open("point-3DM.wkb"); + + WkbReader target = new WkbReader(stream); + target.Dispose(); + + Assert.False(stream.CanRead); + } + + [Fact] + public void Read_ReturnsNullIfStreamIsEmpty() + { + MemoryStream stream = new MemoryStream(); + + WkbReader target = new WkbReader(stream); + Geometry read = target.Read(); + + Assert.Null(read); + } + + [Fact] + public void Read_ReadsGeometry() + { + Point expected = (Point)ParseWKT("point zm (-10.1 15.5 100.5 1000.5)"); + + WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); + Point parsed = (Point)target.Read(); + + ComparePoints(parsed, expected); + } + + [Fact] + public void Read_ReadsMultipleGeometries() + { + Point expected1 = (Point)ParseWKT("point zm (-10.1 15.5 100.5 1000.5)"); + Point expected2 = (Point)ParseWKT("point zm (-10.2 15.6 100.6 1000.6)"); + + WkbReader target = new WkbReader(TestDataReader.Open("two-points-3DM.wkb")); + + Point parsed1 = (Point)target.Read(); + ComparePoints(parsed1, expected1); + + Point parsed2 = (Point)target.Read(); + ComparePoints(parsed2, expected2); + } + + [Fact] + public void Read_ReturnsNullIfNoMoreGeometriesAreAvailable() + { + WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); + + target.Read(); + Geometry parsed = target.Read(); + + Assert.Null(parsed); + } + + [Fact] + public void Read_ThrowsExceptionIfWKBDoesNotRepresentGeometry() + { + byte[] wkb = new byte[] { 12, 0, 0, 45, 78, 124, 36, 0 }; + using (MemoryStream ms = new MemoryStream(wkb)) + { + WkbReader target = new WkbReader(ms); + + Assert.Throws(target.Read); + } + } + + [Fact] + public void ReadT_ReturnsNullIfStreamIsEmpty() + { + MemoryStream stream = new MemoryStream(); + + WkbReader target = new WkbReader(stream); + Geometry read = target.Read(); + + Assert.Null(read); + } + + [Fact] + public void ReadT_ReadsGeometry() + { + Point expected = (Point)ParseWKT("point zm (-10.1 15.5 100.5 1000.5)"); + + WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); + Point parsed = target.Read(); + + ComparePoints(parsed, expected); + } + + [Fact] + public void ReadT_ReturnsNullIfNoMoreGeometriesAreAvailable() + { + WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); + + target.Read(); + Geometry parsed = target.Read(); + + Assert.Null(parsed); + } + + [Fact] + public void ReadT_ThrowsExceptionIfWKBDoesNotRepresentGeometry() + { + byte[] wkb = new byte[] { 12, 0, 0, 45, 78, 124, 36, 0 }; + using (MemoryStream ms = new MemoryStream(wkb)) + { + WkbReader target = new WkbReader(ms); + + Assert.Throws(target.Read); + } + } + + [Fact] + public void ReadT_ThrowsExceptionIfWKBDoesNotRepresentSpecifiecGeometryType() + { + WkbReader target = new WkbReader(TestDataReader.Open("point-3DM.wkb")); + Assert.Throws(target.Read); + } + + [Fact] + public void Parse_ThrowsExceptionIfWKBDoesNotRepresentGeometry() + { + byte[] wkb = new byte[] { 12, 0, 0, 45, 78, 124, 36, 0 }; + + Assert.Throws(() => WkbReader.Parse(wkb)); + } + + [Fact] + public void Parse_ReturnsNullForEmptyInput() + { + byte[] wkb = new byte[0]; + + Assert.Null(WkbReader.Parse(wkb)); + } + + [Fact] + public void Parse_ThrowsArgumentNullExceptionIfDataIsNull() + { + Assert.Throws(() => WkbReader.Parse(null)); + } + + [Fact] + public void Parse_ReturnsParsedGeometry() + { + string wkt = "point m (-10.1 15.5 1000.5)"; + Point expected = (Point)ParseWKT(wkt); + Point parsed = (Point)WkbReader.Parse(TestDataReader.Read("point-2DM.wkb")); + + ComparePoints(parsed, expected); + } + + [Fact] + public void ParseT_ThrowsExceptionIfWKBDoesNotRepresentSpecifiedType() + { + byte[] wkb = TestDataReader.Read("linestring-2D.wkb"); + + Assert.Throws(() => WkbReader.Parse(wkb)); + } + + [Fact] + public void ParseT_ReturnsNullForEmptyInput() + { + byte[] wkb = new byte[0]; + + Assert.Null(WkbReader.Parse(wkb)); + } + + [Fact] + public void ParseT_ThrowsArgumentNullExceptionIfDataIsNull() + { + Assert.Throws(() => WkbReader.Parse(null)); + } + + [Fact] + public void ParsePoint_Parses2DPoint() + { + string wkt = "point (-10.1 15.5)"; + byte[] wkb = TestDataReader.Read("point-2D.wkb"); + + TestParsePoint(wkb, wkt); + } + + [Fact] + public void ParsePoint_Parses2DMeasuredPoint() + { + string wkt = "point m (-10.1 15.5 1000.5)"; + byte[] wkb = TestDataReader.Read("point-2DM.wkb"); + + TestParsePoint(wkb, wkt); + } + + [Fact] + public void ParsePoint_Parses3DPoint() + { + string wkt = "point z (-10.1 15.5 100.5)"; + byte[] wkb = TestDataReader.Read("point-3D.wkb"); + + TestParsePoint(wkb, wkt); + } + + [Fact] + public void ParsePoint_Parses3DMeasuredPoint() + { + string wkt = "point zm (-10.1 15.5 100.5 1000.5)"; + byte[] wkb = TestDataReader.Read("point-3DM.wkb"); + + TestParsePoint(wkb, wkt); + } + + [Fact] + public void Parse_ParsesEmptyLineString() + { + string wkt = "linestring empty"; + byte[] wkb = TestDataReader.Read("linestring-empty.wkb"); + + TestParseLineString(wkb, wkt); + } + + [Fact] + public void Parse_Parses2DLineString() + { + string wkt = "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)"; + byte[] wkb = TestDataReader.Read("linestring-2D.wkb"); + + TestParseLineString(wkb, wkt); + } + + [Fact] + public void Parse_Parses2DMeasuredLineString() + { + string wkt = "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)"; + byte[] wkb = TestDataReader.Read("linestring-2DM.wkb"); + + TestParseLineString(wkb, wkt); + } + + [Fact] + public void Parse_Parses3DLineString() + { + string wkt = "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)"; + byte[] wkb = TestDataReader.Read("linestring-3D.wkb"); + TestParseLineString(wkb, wkt); + } + + [Fact] + public void Parse_Parses3DMeasuredLineString() + { + string wkt = "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)"; + byte[] wkb = TestDataReader.Read("linestring-3DM.wkb"); + + TestParseLineString(wkb, wkt); + } + + [Fact] + public void Parse_ParsesEmptyPolygon() + { + string wkt = "polygon empty"; + byte[] wkb = TestDataReader.Read("polygon-empty.wkb"); + + TestParsePolygon(wkb, wkt); + } + + [Fact] + public void Parse_Parses2DPolygonOnlyExteriorRing() + { + string wkt = "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; + byte[] wkb = TestDataReader.Read("polygon-ext-2D.wkb"); + + TestParsePolygon(wkb, wkt); + } + + [Fact] + public void Parse_Parses2DMeasuredPolygonOnlyExteriorRing() + { + string wkt = "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; + byte[] wkb = TestDataReader.Read("polygon-ext-2DM.wkb"); + + TestParsePolygon(wkb, wkt); + } + + [Fact] + public void Parse_Parses3DPolygonOnlyExteriorRing() + { + string wkt = "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; + byte[] wkb = TestDataReader.Read("polygon-ext-3D.wkb"); + + TestParsePolygon(wkb, wkt); + } + + [Fact] + public void Parse_Parses3DMeasuredPolygonOnlyExteriorRing() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; + byte[] wkb = TestDataReader.Read("polygon-ext-3DM.wkb"); + + TestParsePolygon(wkb, wkt); + } + + [Fact] + public void Parse_Parses3DMeasuredPolygon() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; + byte[] wkb = TestDataReader.Read("polygon-3DM.wkb"); + + TestParsePolygon(wkb, wkt); + } + + [Fact] + public void ParseMultiPoint_ParsesEmptyMultipoint() + { + string wkt = "multipoint empty"; + byte[] wkb = TestDataReader.Read("multipoint-empty.wkb"); + + TestParseMultiPoint(wkb, wkt); + } + + [Fact] + public void ParseMultiPoint_Parses2DMultiPoint() + { + string wkt = "multipoint ((-10.1 15.5),(20.2 -25.5))"; + byte[] wkb = TestDataReader.Read("multipoint-2D.wkb"); + + TestParseMultiPoint(wkb, wkt); + } + + [Fact] + public void ParseMultiPoint_Parses2DMeasuredMultiPoint() + { + string wkt = "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))"; + byte[] wkb = TestDataReader.Read("multipoint-2DM.wkb"); + + TestParseMultiPoint(wkb, wkt); + } + + [Fact] + public void ParseMultiPoint_Parses3DMultiPoint() + { + string wkt = "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))"; + byte[] wkb = TestDataReader.Read("multipoint-3D.wkb"); + + TestParseMultiPoint(wkb, wkt); + } + + [Fact] + public void ParseMultiPoint_Parses3DMeasuredMultiPoint() + { + string wkt = "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))"; + byte[] wkb = TestDataReader.Read("multipoint-3DM.wkb"); + + TestParseMultiPoint(wkb, wkt); + } + + [Fact] + public void ParseMultiLineString_ParsesEmptyMultiLineString() + { + string wkt = "multilinestring empty"; + byte[] wkb = TestDataReader.Read("multilinestring-empty.wkb"); + + TestParseMultiLineString(wkb, wkt); + } + + [Fact] + public void ParseMultiLineString_Parses2DMultiLineString() + { + string wkt = "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; + byte[] wkb = TestDataReader.Read("multilinestring-2D.wkb"); + + TestParseMultiLineString(wkb, wkt); + } + + [Fact] + public void ParseMultiLineString_Parses2DMeasuredMultiLineString() + { + string wkt = "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; + byte[] wkb = TestDataReader.Read("multilinestring-2DM.wkb"); + + TestParseMultiLineString(wkb, wkt); + } + + [Fact] + public void ParseMultiLineString_Parses3DMultiLineString() + { + string wkt = "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; + byte[] wkb = TestDataReader.Read("multilinestring-3D.wkb"); + + TestParseMultiLineString(wkb, wkt); + } + + [Fact] + public void ParseMultiLineString_Parses3DMeasuredMultiLineString() + { + string wkt = "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; + byte[] wkb = TestDataReader.Read("multilinestring-3DM.wkb"); + + TestParseMultiLineString(wkb, wkt); + } + + [Fact] + public void ParseMultiPolygon_ParsesEmptyMultiPolygon() + { + string wkt = "multipolygon empty"; + byte[] wkb = TestDataReader.Read("multipolygon-empty.wkb"); + + TestParseMultiPolygon(wkb, wkt); + } + + [Fact] + public void ParseMultiPolygon_Parses2DMultiPolygon() + { + string wkt = "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; + byte[] wkb = TestDataReader.Read("multipolygon-2D.wkb"); + + TestParseMultiPolygon(wkb, wkt); + } + + [Fact] + public void ParseMultiPolygon_Parses2DMeasuredMultiPolygon() + { + string wkt = "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))"; + byte[] wkb = TestDataReader.Read("multipolygon-2DM.wkb"); + + TestParseMultiPolygon(wkb, wkt); + } + + [Fact] + public void ParseMultiPolygon_Parses3DMultiPolygon() + { + string wkt = "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))"; + byte[] wkb = TestDataReader.Read("multipolygon-3D.wkb"); + + TestParseMultiPolygon(wkb, wkt); + } + + [Fact] + public void ParseMultiPolygon_Parses3DMeasuredMultiPolygon() + { + string wkt = "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))"; + byte[] wkb = TestDataReader.Read("multipolygon-3DM.wkb"); + + TestParseMultiPolygon(wkb, wkt); + } + + [Fact] + public void ParseGeometryCollection_ParsesEmptyGeometryCollection() + { + string wkt = "geometrycollection empty"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-empty.wkb")); + + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void ParseGeometryCollection_Parses2DGeometryCollection() + { + string wkt = "geometrycollection (point (-10.1 15.5))"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-2D.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); + } + + [Fact] + public void ParseGeometryCollection_Parses2DMeasuredGeometryCollection() + { + string wkt = "geometrycollection m (point m (-10.1 15.5 1000.5))"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-2DM.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); + } + + [Fact] + public void ParseGeometryCollection_Parses3DGeometryCollection() + { + string wkt = "geometrycollection z (point z (-10.1 15.5 100.5))"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-3D.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); + } + + [Fact] + public void ParseGeometryCollection_Parses3DMeasuredGeometryCollection() + { + string wkt = "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-3DM.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); + } + + [Fact] + public void ParseGeometryCollection_ParsesCollectionWithPointLineStringAndPolygon() + { + string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-pt-ls-poly.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + ComparePoints((Point)parsed.Geometries[0], (Point)expected.Geometries[0]); + CompareLineStrings((LineString)parsed.Geometries[1], (LineString)expected.Geometries[1]); + ComparePolygons((Polygon)parsed.Geometries[2], (Polygon)expected.Geometries[2]); + } + + [Fact] + public void ParseGeometryCollection_ParsesCollectionWithMultiGeometries() + { + string wkt = "geometrycollection (multipoint empty,multilinestring empty,multipolygon empty)"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-multi.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + CompareMultiPoints((MultiPoint)parsed.Geometries[0], (MultiPoint)expected.Geometries[0]); + CompareMultiLineStrings((MultiLineString)parsed.Geometries[1], (MultiLineString)expected.Geometries[1]); + CompareMultiPolygons((MultiPolygon)parsed.Geometries[2], (MultiPolygon)expected.Geometries[2]); + } + + [Fact] + public void ParseGeometryCollection_ParsesNestedCollection() + { + string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; + GeometryCollection expected = (GeometryCollection)ParseWKT(wkt); + GeometryCollection parsed = WkbReader.Parse>(TestDataReader.Read("collection-nested.wkb")); + + Assert.Equal(expected.Geometries.Count, parsed.Geometries.Count); + Assert.Equal(((GeometryCollection)expected.Geometries[0]).Geometries.Count, ((GeometryCollection)parsed.Geometries[0]).Geometries.Count); + ComparePoints((Point)((GeometryCollection)parsed.Geometries[0]).Geometries[0], (Point)((GeometryCollection)expected.Geometries[0]).Geometries[0]); + } + + private void TestParsePoint(byte[] wkb, string expectedAsWkt) + { + Point expected = (Point)ParseWKT(expectedAsWkt); + Point parsed = WkbReader.Parse(wkb); + + ComparePoints(parsed, expected); + } + + private void TestParseLineString(byte[] wkb, string expectedAsWkt) + { + LineString expected = (LineString)ParseWKT(expectedAsWkt); + LineString parsed = WkbReader.Parse(wkb); + + CompareLineStrings(parsed, expected); + } + + private void TestParsePolygon(byte[] wkb, string expectedAsWkt) + { + Polygon expected = (Polygon)ParseWKT(expectedAsWkt); + Polygon parsed = WkbReader.Parse(wkb); + + ComparePolygons(parsed, expected); + } + + private void TestParseMultiPoint(byte[] wkb, string expectedAsWkt) + { + MultiPoint expected = (MultiPoint)ParseWKT(expectedAsWkt); + MultiPoint parsed = WkbReader.Parse(wkb); + + CompareMultiPoints(parsed, expected); + } + + private void TestParseMultiLineString(byte[] wkb, string expectedAsWkt) + { + MultiLineString expected = (MultiLineString)ParseWKT(expectedAsWkt); + MultiLineString parsed = WkbReader.Parse(wkb); + + CompareMultiLineStrings(parsed, expected); + } + + private void TestParseMultiPolygon(byte[] wkb, string expectedAsWkt) + { + MultiPolygon expected = (MultiPolygon)ParseWKT(expectedAsWkt); + MultiPolygon parsed = WkbReader.Parse(wkb); + + CompareMultiPolygons(parsed, expected); + } + + private void ComparePoints(Point point, Point expected) + { + Assert.Equal(expected.Position, point.Position); + } + + private void CompareCoordinateLists(ICoordinateList list, ICoordinateList expected) + { + Assert.Equal(expected.Count, list.Count); + for (int i = 0; i < expected.Count; i++) + { + Assert.Equal(expected[i], list[i]); + } + } + + private void CompareLineStrings(LineString linestring, LineString expected) + { + CompareCoordinateLists(linestring.Coordinates, expected.Coordinates); + } + + private void ComparePolygons(Polygon polygon, Polygon expected) + { + CompareCoordinateLists(polygon.ExteriorRing, expected.ExteriorRing); + + Assert.Equal(expected.InteriorRings.Count, polygon.InteriorRings.Count); + for (int i = 0; i < expected.InteriorRings.Count; i++) + { + CompareCoordinateLists(polygon.InteriorRings[i], expected.InteriorRings[i]); + } + } + + private void CompareMultiPoints(MultiPoint multipoint, MultiPoint expected) + { + Assert.Equal(expected.Geometries.Count, multipoint.Geometries.Count); + + for (int i = 0; i < expected.Geometries.Count; i++) + { + ComparePoints(multipoint.Geometries[i], expected.Geometries[i]); + } + } + + private void CompareMultiLineStrings(MultiLineString multilinestring, MultiLineString expected) + { + Assert.Equal(expected.Geometries.Count, multilinestring.Geometries.Count); + + for (int i = 0; i < expected.Geometries.Count; i++) + { + CompareLineStrings(multilinestring.Geometries[i], expected.Geometries[i]); + } + } + + private void CompareMultiPolygons(MultiPolygon multipolygon, MultiPolygon expected) + { + Assert.Equal(expected.Geometries.Count, multipolygon.Geometries.Count); + + for (int i = 0; i < expected.Geometries.Count; i++) + { + ComparePolygons(multipolygon.Geometries[i], expected.Geometries[i]); + } + } + + + private Geometry ParseWKT(string wkt) + { + return WktReader.Parse(wkt); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WkbWriterSettingsTests.cs b/src/Tests.SpatialLite.Core/IO/WkbWriterSettingsTests.cs index d248108..8268aaf 100644 --- a/src/Tests.SpatialLite.Core/IO/WkbWriterSettingsTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WkbWriterSettingsTests.cs @@ -1,28 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core.IO; - -namespace Tests.SpatialLite.Core.IO { - public class WkbWriterSettingsTests { - - [Fact] - public void Constructor__SetsDefaultValues() { - WkbWriterSettings target = new WkbWriterSettings(); - - Assert.Equal(BinaryEncoding.LittleEndian, target.Encoding); - } - - [Fact] - public void UseDenseFormatSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - WkbWriterSettings target = new WkbWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.Encoding = BinaryEncoding.BigEndian); - } - } -} +using SpatialLite.Core.IO; +using System; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + +public class WkbWriterSettingsTests +{ + + [Fact] + public void Constructor__SetsDefaultValues() + { + WkbWriterSettings target = new WkbWriterSettings(); + + Assert.Equal(BinaryEncoding.LittleEndian, target.Encoding); + } + + [Fact] + public void UseDenseFormatSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + WkbWriterSettings target = new WkbWriterSettings(); + target.IsReadOnly = true; + + Assert.Throws(() => target.Encoding = BinaryEncoding.BigEndian); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs b/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs index bb582d5..c679924 100644 --- a/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WkbWriterTests.cs @@ -1,659 +1,753 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -using Xunit; -using Xunit.Extensions; - -using Tests.SpatialLite.Core.Data; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; -using SpatialLite.Core.IO; - - -namespace Tests.SpatialLite.Core.IO { - public class WkbWriterTests { - - [Fact] - public void Construcotor_StreamSettings_SetsSettingsAndMakeThemReadOnly() { - WkbWriterSettings settings = new WkbWriterSettings(); - using (WkbWriter target = new WkbWriter(new MemoryStream(), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfStreamIsNull() { - Stream stream = null; - Assert.Throws(() => new WkbWriter(stream, new WkbWriterSettings())); - } - - [Fact] - public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() { - Assert.Throws(() => new WkbWriter(new MemoryStream(), null)); - } - - [Fact] - public void Construcotor_PathSettings_SetsSettingsAndMakeThemReadOnly() { - WkbWriterSettings settings = new WkbWriterSettings(); - using (WkbWriter target = new WkbWriter(new MemoryStream(), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_PathSettings_CreatesOutputFile() { - string filename = PathHelper.GetTempFilePath("wkbwriter-constructor-creates-output-test.bin"); - - WkbWriterSettings settings = new WkbWriterSettings(); - using (WkbWriter target = new WkbWriter(filename, settings)) { - ; - } - - Assert.True(File.Exists(filename)); - } - - [Fact] - public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfStreamIsNull() { - string path = null; - Assert.Throws(() => new WkbWriter(path, new WkbWriterSettings())); - } - - [Fact] - public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() { - string path = PathHelper.GetTempFilePath("wkbwriter-constructor-test.bin"); - - Assert.Throws(() => new WkbWriter(path, null)); - } - - [Fact] - public void Constructor_ThrowsExceptionIfEncodingIsSetToBingEndian() { - MemoryStream stream = new MemoryStream(); - Assert.Throws(() => new WkbWriter(stream, new WkbWriterSettings() { Encoding = BinaryEncoding.BigEndian })); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = PathHelper.GetTempFilePath("wkbwriter-closes-output-filestream-test.bin"); - - WkbWriterSettings settings = new WkbWriterSettings(); - WkbWriter target = new WkbWriter(filename, settings); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToStream() { - MemoryStream stream = new MemoryStream(); - - WkbWriter target = new WkbWriter(stream, new WkbWriterSettings()); - target.Dispose(); - - Assert.False(stream.CanRead); - } - - [Fact] - public void WkbWriter_Write_WritesLittleEndianEncodingByte() { - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings() { Encoding = BinaryEncoding.LittleEndian })) { - target.Write(new Point()); - - CompareBytes(stream.ToArray(), 0, new byte[] { (byte)BinaryEncoding.LittleEndian }); - } - } - - [Fact] - public void Write_WritesEmptyPointAsEmptyGeoemtryCollection() { - string wkt = "point empty"; - Point point = (Point)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(point); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DPoint() { - string wkt = "point (-10.1 15.5)"; - Point point = (Point)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(point); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("point-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredPoint() { - string wkt = "point m (-10.1 15.5 1000.5)"; - Point point = (Point)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(point); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("point-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DPoint() { - string wkt = "point z (-10.1 15.5 100.5)"; - Point point = (Point)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(point); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("point-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredPoint() { - string wkt = "point zm (-10.1 15.5 100.5 1000.5)"; - Point point = (Point)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(point); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("point-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesEmptyLineString() { - string wkt = "linestring empty"; - LineString linestring = (LineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(linestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DLineString() { - string wkt = "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)"; - LineString linestring = (LineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(linestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredLineString() { - string wkt = "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)"; - LineString linestring = (LineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(linestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DLineString() { - string wkt = "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)"; - LineString linestring = (LineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(linestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredLineString() { - string wkt = "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)"; - LineString linestring = (LineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(linestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesEmptyPolygon() { - string wkt = "polygon empty"; - Polygon polygon = (Polygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(polygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DPolygonOnlyExteriorRing() { - string wkt = "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; - Polygon polygon = (Polygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(polygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredPolygonOnlyExteriorRing() { - string wkt = "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; - Polygon polygon = (Polygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(polygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DPolygonOnlyExteriorRing() { - string wkt = "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; - Polygon polygon = (Polygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(polygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredPolygonOnlyExteriorRing() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; - Polygon polygon = (Polygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(polygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-3DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredPolygon() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; - Polygon polygon = (Polygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(polygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesEmptyMultipoint() { - string wkt = "multipoint empty"; - MultiPoint multipoint = (MultiPoint)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipoint); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DMultiPoint() { - string wkt = "multipoint ((-10.1 15.5),(20.2 -25.5))"; - MultiPoint multipoint = (MultiPoint)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipoint); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredMultiPoint() { - string wkt = "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))"; - MultiPoint multipoint = (MultiPoint)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipoint); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DMultiPoint() { - string wkt = "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))"; - MultiPoint multipoint = (MultiPoint)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipoint); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredMultiPoint() { - string wkt = "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))"; - MultiPoint multipoint = (MultiPoint)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipoint); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesEmptyMultiLineString() { - string wkt = "multilinestring empty"; - MultiLineString multilinestring = (MultiLineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multilinestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DMultiLineString() { - string wkt = "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; - MultiLineString multilinestring = (MultiLineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multilinestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredMultiLineString() { - string wkt = "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; - MultiLineString multilinestring = (MultiLineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multilinestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DMultiLineString() { - string wkt = "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; - MultiLineString multilinestring = (MultiLineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multilinestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredMultiLineString() { - string wkt = "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; - MultiLineString multilinestring = (MultiLineString)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multilinestring); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesEmptyMultiPolygon() { - string wkt = "multipolygon empty"; - MultiPolygon multipolygon = (MultiPolygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipolygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DMultiPolygon() { - string wkt = "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; - MultiPolygon multipolygon = (MultiPolygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipolygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredMultiPolygon() { - string wkt = "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))"; - MultiPolygon multipolygon = (MultiPolygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipolygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DMultiPolygon() { - string wkt = "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))"; - MultiPolygon multipolygon = (MultiPolygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipolygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredMultiPolygon() { - string wkt = "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))"; - MultiPolygon multipolygon = (MultiPolygon)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(multipolygon); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesEmptyGeometryCollection() { - string wkt = "geometrycollection empty"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-empty.wkb")); - } - } - - [Fact] - public void Write_Writes2DGeometryCollection() { - string wkt = "geometrycollection (point (-10.1 15.5))"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-2D.wkb")); - } - } - - [Fact] - public void Write_Writes2DMeasuredGeometryCollection() { - string wkt = "geometrycollection m (point m (-10.1 15.5 1000.5))"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-2DM.wkb")); - } - } - - [Fact] - public void Write_Writes3DGeometryCollection() { - string wkt = "geometrycollection z (point z (-10.1 15.5 100.5))"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-3D.wkb")); - } - } - - [Fact] - public void Write_Writes3DMeasuredGeometryCollection() { - string wkt = "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-3DM.wkb")); - } - } - - [Fact] - public void Write_WritesCollectionWithPointLineStringAndPolygon() { - string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-pt-ls-poly.wkb")); - } - } - - [Fact] - public void Write_WritesCollectionWithMultiGeometries() { - string wkt = "geometrycollection (multipoint empty,multilinestring empty,multipolygon empty)"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-multi.wkb")); - } - } - - [Fact] - public void Write_WritesNestedCollection() { - string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; - GeometryCollection collection = (GeometryCollection)this.ParseWKT(wkt); - - MemoryStream stream = new MemoryStream(); - using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) { - target.Write(collection); - - this.CompareBytes(stream.ToArray(), TestDataReader.Read("collection-nested.wkb")); - } - } - - public static IEnumerable WriteToArrayTestData { - get { - yield return new object[] { "point zm (-10.1 15.5 100.5 1000.5)", TestDataReader.Read("point-3DM.wkb") }; - yield return new object[] { "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)", TestDataReader.Read("linestring-3DM.wkb") }; - yield return new object[] { "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))", TestDataReader.Read("polygon-3DM.wkb") }; - yield return new object[] { "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))", TestDataReader.Read("multipoint-3DM.wkb") }; - yield return new object[] { "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))", TestDataReader.Read("multilinestring-3DM.wkb") }; - yield return new object[] { "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))", TestDataReader.Read("multipolygon-3DM.wkb") }; - yield return new object[] { "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))", TestDataReader.Read("collection-3DM.wkb") }; - - } - } - - [Theory] - [MemberData(nameof(WriteToArrayTestData))] - public void WriteToArray_WritesAllGeometryTypes(string wkt, byte[] expectedWkb) { - IGeometry geometry = this.ParseWKT(wkt); - - byte[] wkb = WkbWriter.WriteToArray(geometry); - this.CompareBytes(wkb, expectedWkb); - } - - private void CompareBytes(byte[] array, byte[] expected) { - Assert.Equal(array.Length, expected.Length); - - for (int i = 0; i < expected.Length; i++) { - Assert.Equal(expected[i], array[i]); - } - } - - private void CompareBytes(byte[] array, int offset, byte[] expected) { - for (int i = 0; i < expected.Length; i++) { - Assert.Equal(expected[i], array[i + offset]); - } - } - - private Geometry ParseWKT(string wkt) { - return WktReader.Parse(wkt); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using SpatialLite.Core.IO; +using System; +using System.Collections.Generic; +using System.IO; +using Tests.SpatialLite.Core.Data; +using Xunit; + + +namespace Tests.SpatialLite.Core.IO; + +public class WkbWriterTests +{ + + [Fact] + public void Construcotor_StreamSettings_SetsSettingsAndMakeThemReadOnly() + { + WkbWriterSettings settings = new WkbWriterSettings(); + using (WkbWriter target = new WkbWriter(new MemoryStream(), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfStreamIsNull() + { + Stream stream = null; + Assert.Throws(() => new WkbWriter(stream, new WkbWriterSettings())); + } + + [Fact] + public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() + { + Assert.Throws(() => new WkbWriter(new MemoryStream(), null)); + } + + [Fact] + public void Construcotor_PathSettings_SetsSettingsAndMakeThemReadOnly() + { + WkbWriterSettings settings = new WkbWriterSettings(); + using (WkbWriter target = new WkbWriter(new MemoryStream(), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_PathSettings_CreatesOutputFile() + { + string filename = PathHelper.GetTempFilePath("wkbwriter-constructor-creates-output-test.bin"); + + WkbWriterSettings settings = new WkbWriterSettings(); + using (WkbWriter target = new WkbWriter(filename, settings)) + { + ; + } + + Assert.True(File.Exists(filename)); + } + + [Fact] + public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfStreamIsNull() + { + string path = null; + Assert.Throws(() => new WkbWriter(path, new WkbWriterSettings())); + } + + [Fact] + public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() + { + string path = PathHelper.GetTempFilePath("wkbwriter-constructor-test.bin"); + + Assert.Throws(() => new WkbWriter(path, null)); + } + + [Fact] + public void Constructor_ThrowsExceptionIfEncodingIsSetToBingEndian() + { + MemoryStream stream = new MemoryStream(); + Assert.Throws(() => new WkbWriter(stream, new WkbWriterSettings() { Encoding = BinaryEncoding.BigEndian })); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = PathHelper.GetTempFilePath("wkbwriter-closes-output-filestream-test.bin"); + + WkbWriterSettings settings = new WkbWriterSettings(); + WkbWriter target = new WkbWriter(filename, settings); + target.Dispose(); + FileStream testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToStream() + { + MemoryStream stream = new MemoryStream(); + + WkbWriter target = new WkbWriter(stream, new WkbWriterSettings()); + target.Dispose(); + + Assert.False(stream.CanRead); + } + + [Fact] + public void WkbWriter_Write_WritesLittleEndianEncodingByte() + { + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings() { Encoding = BinaryEncoding.LittleEndian })) + { + target.Write(new Point()); + + CompareBytes(stream.ToArray(), 0, new byte[] { (byte)BinaryEncoding.LittleEndian }); + } + } + + [Fact] + public void Write_WritesEmptyPointAsEmptyGeoemtryCollection() + { + string wkt = "point empty"; + Point point = (Point)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(point); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DPoint() + { + string wkt = "point (-10.1 15.5)"; + Point point = (Point)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(point); + + CompareBytes(stream.ToArray(), TestDataReader.Read("point-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredPoint() + { + string wkt = "point m (-10.1 15.5 1000.5)"; + Point point = (Point)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(point); + + CompareBytes(stream.ToArray(), TestDataReader.Read("point-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DPoint() + { + string wkt = "point z (-10.1 15.5 100.5)"; + Point point = (Point)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(point); + + CompareBytes(stream.ToArray(), TestDataReader.Read("point-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredPoint() + { + string wkt = "point zm (-10.1 15.5 100.5 1000.5)"; + Point point = (Point)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(point); + + CompareBytes(stream.ToArray(), TestDataReader.Read("point-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesEmptyLineString() + { + string wkt = "linestring empty"; + LineString linestring = (LineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(linestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DLineString() + { + string wkt = "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)"; + LineString linestring = (LineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(linestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredLineString() + { + string wkt = "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)"; + LineString linestring = (LineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(linestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DLineString() + { + string wkt = "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)"; + LineString linestring = (LineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(linestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredLineString() + { + string wkt = "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)"; + LineString linestring = (LineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(linestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("linestring-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesEmptyPolygon() + { + string wkt = "polygon empty"; + Polygon polygon = (Polygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(polygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DPolygonOnlyExteriorRing() + { + string wkt = "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; + Polygon polygon = (Polygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(polygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredPolygonOnlyExteriorRing() + { + string wkt = "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; + Polygon polygon = (Polygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(polygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DPolygonOnlyExteriorRing() + { + string wkt = "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; + Polygon polygon = (Polygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(polygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredPolygonOnlyExteriorRing() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; + Polygon polygon = (Polygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(polygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-ext-3DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredPolygon() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; + Polygon polygon = (Polygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(polygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("polygon-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesEmptyMultipoint() + { + string wkt = "multipoint empty"; + MultiPoint multipoint = (MultiPoint)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipoint); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DMultiPoint() + { + string wkt = "multipoint ((-10.1 15.5),(20.2 -25.5))"; + MultiPoint multipoint = (MultiPoint)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipoint); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredMultiPoint() + { + string wkt = "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))"; + MultiPoint multipoint = (MultiPoint)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipoint); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DMultiPoint() + { + string wkt = "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))"; + MultiPoint multipoint = (MultiPoint)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipoint); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredMultiPoint() + { + string wkt = "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))"; + MultiPoint multipoint = (MultiPoint)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipoint); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipoint-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesEmptyMultiLineString() + { + string wkt = "multilinestring empty"; + MultiLineString multilinestring = (MultiLineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multilinestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DMultiLineString() + { + string wkt = "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; + MultiLineString multilinestring = (MultiLineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multilinestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredMultiLineString() + { + string wkt = "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; + MultiLineString multilinestring = (MultiLineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multilinestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DMultiLineString() + { + string wkt = "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; + MultiLineString multilinestring = (MultiLineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multilinestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredMultiLineString() + { + string wkt = "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; + MultiLineString multilinestring = (MultiLineString)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multilinestring); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multilinestring-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesEmptyMultiPolygon() + { + string wkt = "multipolygon empty"; + MultiPolygon multipolygon = (MultiPolygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipolygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DMultiPolygon() + { + string wkt = "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; + MultiPolygon multipolygon = (MultiPolygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipolygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredMultiPolygon() + { + string wkt = "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))"; + MultiPolygon multipolygon = (MultiPolygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipolygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DMultiPolygon() + { + string wkt = "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))"; + MultiPolygon multipolygon = (MultiPolygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipolygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredMultiPolygon() + { + string wkt = "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))"; + MultiPolygon multipolygon = (MultiPolygon)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(multipolygon); + + CompareBytes(stream.ToArray(), TestDataReader.Read("multipolygon-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesEmptyGeometryCollection() + { + string wkt = "geometrycollection empty"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-empty.wkb")); + } + } + + [Fact] + public void Write_Writes2DGeometryCollection() + { + string wkt = "geometrycollection (point (-10.1 15.5))"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-2D.wkb")); + } + } + + [Fact] + public void Write_Writes2DMeasuredGeometryCollection() + { + string wkt = "geometrycollection m (point m (-10.1 15.5 1000.5))"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-2DM.wkb")); + } + } + + [Fact] + public void Write_Writes3DGeometryCollection() + { + string wkt = "geometrycollection z (point z (-10.1 15.5 100.5))"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-3D.wkb")); + } + } + + [Fact] + public void Write_Writes3DMeasuredGeometryCollection() + { + string wkt = "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-3DM.wkb")); + } + } + + [Fact] + public void Write_WritesCollectionWithPointLineStringAndPolygon() + { + string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-pt-ls-poly.wkb")); + } + } + + [Fact] + public void Write_WritesCollectionWithMultiGeometries() + { + string wkt = "geometrycollection (multipoint empty,multilinestring empty,multipolygon empty)"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-multi.wkb")); + } + } + + [Fact] + public void Write_WritesNestedCollection() + { + string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; + GeometryCollection collection = (GeometryCollection)ParseWKT(wkt); + + MemoryStream stream = new MemoryStream(); + using (WkbWriter target = new WkbWriter(stream, new WkbWriterSettings())) + { + target.Write(collection); + + CompareBytes(stream.ToArray(), TestDataReader.Read("collection-nested.wkb")); + } + } + + public static IEnumerable WriteToArrayTestData + { + get + { + yield return new object[] { "point zm (-10.1 15.5 100.5 1000.5)", TestDataReader.Read("point-3DM.wkb") }; + yield return new object[] { "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)", TestDataReader.Read("linestring-3DM.wkb") }; + yield return new object[] { "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))", TestDataReader.Read("polygon-3DM.wkb") }; + yield return new object[] { "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))", TestDataReader.Read("multipoint-3DM.wkb") }; + yield return new object[] { "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))", TestDataReader.Read("multilinestring-3DM.wkb") }; + yield return new object[] { "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))", TestDataReader.Read("multipolygon-3DM.wkb") }; + yield return new object[] { "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))", TestDataReader.Read("collection-3DM.wkb") }; + + } + } + + [Theory] + [MemberData(nameof(WriteToArrayTestData))] + public void WriteToArray_WritesAllGeometryTypes(string wkt, byte[] expectedWkb) + { + IGeometry geometry = ParseWKT(wkt); + + byte[] wkb = WkbWriter.WriteToArray(geometry); + CompareBytes(wkb, expectedWkb); + } + + private void CompareBytes(byte[] array, byte[] expected) + { + Assert.Equal(array.Length, expected.Length); + + for (int i = 0; i < expected.Length; i++) + { + Assert.Equal(expected[i], array[i]); + } + } + + private void CompareBytes(byte[] array, int offset, byte[] expected) + { + for (int i = 0; i < expected.Length; i++) + { + Assert.Equal(expected[i], array[i + offset]); + } + } + + private Geometry ParseWKT(string wkt) + { + return WktReader.Parse(wkt); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs b/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs index 6e140f9..01307ef 100644 --- a/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WktReaderTests.cs @@ -1,729 +1,801 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -using Xunit; -using Xunit.Extensions; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; -using SpatialLite.Core.IO; -using Tests.SpatialLite.Core.Data; - -namespace Tests.SpatialLite.Core.IO { - - public class WktReaderTests { - - private Coordinate[] _coordinatesXY = new Coordinate[] { - new Coordinate(-10.1, 15.5), new Coordinate(20.2, -25.5), new Coordinate(30.3, 35.5) - }; - - private Coordinate[] _coordinatesXYZ = new Coordinate[] { - new Coordinate(-10.1, 15.5, 100.5), new Coordinate(20.2, -25.5, 200.5), new Coordinate(30.3, 35.5, -300.5) - }; - - private Coordinate[] _coordinatesXYM = new Coordinate[] { - new Coordinate(-10.1, 15.5, double.NaN, 1000.5), new Coordinate(20.2, -25.5, double.NaN, 2000.5), new Coordinate(30.3, 35.5, double.NaN, -3000.5) - }; - - private Coordinate[] _coordinatesXYZM = new Coordinate[] { - new Coordinate(-10.1, 15.5, 100.5, 1000.5), new Coordinate(20.2, -25.5, 200.5, 2000.5), new Coordinate(30.3, 35.5, -300.5, -3000.5) - }; - - private Coordinate[] _coordinates2XYZM = new Coordinate[] { - new Coordinate(-1.1, 1.5, 10.5, 100.5), new Coordinate(2.2, -2.5, 20.5, 200.5), new Coordinate(3.3, 3.5, -30.5, -300.5) - }; - - [Fact] - public void Constructor_Stream_ThrowsAgrumentNullExceptioIfStreamIsNull() { - Stream stream = null; - Assert.Throws(() => new WktReader(stream)); - } - - [Fact] - public void Constructor_Path_ThrowsFileNotFoundExceptioIfFileDoesNotExists() { - Assert.Throws(() => new WktReader("non-existing-file.wkb")); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = "../../../Data/IO/wkt-point-3DM.wkt"; - - WktReader target = new WktReader(filename); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToStream() { - var stream = TestDataReader.Open("wkt-point-3DM.wkt"); - - WktReader target = new WktReader(stream); - target.Dispose(); - - Assert.False(stream.CanRead); - } - public static IEnumerable Read_ReadsAllGeometryTypesTestData { - get { - yield return new object[] { TestDataReader.Read("wkt-point-3DM.wkt") }; - yield return new object[] { TestDataReader.Read("wkt-linestring-3DM.wkt") }; - yield return new object[] { TestDataReader.Read("wkt-polygon-3DM.wkt") }; - yield return new object[] { TestDataReader.Read("wkt-multipoint-3DM.wkt") }; - yield return new object[] { TestDataReader.Read("wkt-multilinestring-3DM.wkt") }; - yield return new object[] { TestDataReader.Read("wkt-multipolygon-3DM.wkt") }; - yield return new object[] { TestDataReader.Read("wkt-geometry-collection-3DM.wkt") }; - } - } - - [Theory] - [MemberData(nameof(Read_ReadsAllGeometryTypesTestData))] - public void Read_ReadsAllGeometryTypes(byte[] data) { - using (WktReader target = new WktReader(new MemoryStream(data))) { - IGeometry readGeometry = target.Read(); - Assert.NotNull(readGeometry); - } - } - - [Fact] - public void Read_ReturnsNullIfStreamIsEmpty() { - using (WktReader target = new WktReader(new MemoryStream())) { - IGeometry readGeometry = target.Read(); - - Assert.Null(readGeometry); - } - } - - [Fact] - public void Read_ReturnsNullIfNoMoreGeometriesAreAvailableInInputStream() { - using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-3DM.wkt"))) { - target.Read(); - IGeometry readGeometry = target.Read(); - - Assert.Null(readGeometry); - } - } - - [Fact] - public void Read_ReadsMultipleGeometries() { - using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-and-linestring-3DM.wkt"))) { - IGeometry readGeometry = target.Read(); - Assert.True(readGeometry is Point); - - readGeometry = target.Read(); - Assert.True(readGeometry is LineString); - } - } - - [Fact] - public void ReadT_ReadsGeometry() { - using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-3DM.wkt"))) { - Point read = target.Read(); - Assert.NotNull(read); - } - } - - [Fact] - public void ReadT_ReturnsNullIfStreamIsEmpty() { - using (WktReader target = new WktReader(new MemoryStream())) { - IGeometry readGeometry = target.Read(); - - Assert.Null(readGeometry); - } - } - - [Fact] - public void ReadT_ThrowsExceptionIfWKTDoesNotRepresentGeometryOfSpecificType() { - using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-3DM.wkt"))) { - Assert.Throws(() => target.Read()); - } - } - - [Fact] - public void Parse_ParsesPoint() { - string wkt = "point empty"; - - Point parsed = (Point)WktReader.Parse(wkt); - this.CompareCoordinate(Coordinate.Empty, parsed.Position); - } - - [Fact] - public void Parse_ParsesLineString() { - string wkt = "linestring empty"; - - LineString parsed = (LineString)WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Coordinates); - } - - [Fact] - public void Parse_ParsesPolygon() { - string wkt = "polygon empty"; - - Polygon parsed = (Polygon)WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.ExteriorRing); - } - - [Fact] - public void Parse_ParsesGeometryCollection() { - string wkt = "geometrycollection empty"; - - GeometryCollection parsed = (GeometryCollection)WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_ParsesMultiPoint() { - string wkt = "multipoint empty"; - - MultiPoint parsed = (MultiPoint)WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_ParsesMultiLineString() { - string wkt = "multilinestring empty"; - - MultiLineString parsed = (MultiLineString)WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_ParsesMultiPolygon() { - string wkt = "multipolygon empty"; - - MultiPolygon parsed = (MultiPolygon)WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentGeometry() { - string wkt = "invalid string"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Theory] - [InlineData("point zm \t(-10.1 15.5 100.5 \n1000.5)")] - [InlineData("\n\rlinestring (-10.1 15.5, 20.2 -25.5, \t30.3 35.5)")] - [InlineData("polygon\n\r m\t ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))")] - [InlineData("multipoint\t\r z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))")] - [InlineData("\nmultilinestring \tempty")] - [InlineData("multipolygon\n\r (((-10.1\t 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))")] - [InlineData("geometrycollection \t\n\r(point (-10.1 15.5))")] - public void Parse_ParsesGeometriesWithMultipleWhitespacesInsteadOneSpace(string wkt) { - WktReader.Parse(wkt); - } - - [Theory] - [InlineData("point zm ( -10.1 15.5 100.5 1000.5 )")] - [InlineData("linestring ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 )")] - [InlineData("polygon m ( ( -10.1 15.5 1000.5 , 20.2 -25.5 2000.5, 30.3 35.5 -3000.5 ) )")] - [InlineData("multipoint z ( ( -10.1 15.5 100.5 ) , ( 20.2 -25.5 200.5 ) )")] - [InlineData("multilinestring ( ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 ) , ( -10.1 15.5, 20.2 -25.5, 30.3 35.5 ) ) ")] - [InlineData("multipolygon ( ( ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 ) ) , ( ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 ) ) )")] - [InlineData("geometrycollection ( point ( -10.1 15.5 ) )")] - public void Parse_ParsesGeometriesWithWhitespacesAtPlacesWhereTheyAreNotExpected(string wkt) { - WktReader.Parse(wkt); - } - - [Fact] - public void Parse_ParsesEmptyPoint() { - string wkt = "point empty"; - - Point parsed = WktReader.Parse(wkt); - - this.CompareCoordinate(Coordinate.Empty, parsed.Position); - } - - [Fact] - public void Parse_Parses2DPoint() { - string wkt = "point (-10.1 15.5)"; - - Point parsed = WktReader.Parse(wkt); - - Assert.False(parsed.Is3D); - Assert.False(parsed.IsMeasured); - this.CompareCoordinate(_coordinatesXY[0], parsed.Position); - } - - [Fact] - public void Parse_Parses2DMeasuredPoint() { - string wkt = "point m (-10.1 15.5 1000.5)"; - - Point parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.False(parsed.Is3D); - this.CompareCoordinate(_coordinatesXYM[0], parsed.Position); - } - - [Fact] - public void Parse_Parses3DPoint() { - string wkt = "point z (-10.1 15.5 100.5)"; - - Point parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.False(parsed.IsMeasured); - this.CompareCoordinate(_coordinatesXYZ[0], parsed.Position); - } - - [Fact] - public void Parse_Parses3DMeasuredPoint() { - string wkt = "point zm (-10.1 15.5 100.5 1000.5)"; - - Point parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinate(_coordinatesXYZM[0], parsed.Position); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentPoint() { - string wkt = "linestring empty"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Fact] - public void Parse_ParsesEmptyLineString() { - string wkt = "linestring empty"; - - LineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Coordinates); - } - - [Fact] - public void Parse_Parses2DLineString() { - string wkt = "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)"; - - LineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXY, parsed.Coordinates); - } - - [Fact] - public void Parse_Parses2DMeasuredLineString() { - string wkt = "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)"; - - LineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYM, parsed.Coordinates); - } - - [Fact] - public void Parse_Parses3DLineString() { - string wkt = "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)"; - - LineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYZ, parsed.Coordinates); - } - - [Fact] - public void Parse_Parses3DMeasuredLineString() { - string wkt = "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)"; - - LineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYZM, parsed.Coordinates); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentLineString() { - string wkt = "point empty"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Fact] - public void ParsePolygon_ParsesEmptyPolygon() { - string wkt = "polygon empty"; - - Polygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.ExteriorRing); - Assert.Empty(parsed.InteriorRings); - } - - [Fact] - public void ParsePolygon_Parses2DPolygonOnlyExteriorRing() { - string wkt = "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; - - Polygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXY, parsed.ExteriorRing); - Assert.Empty(parsed.InteriorRings); - } - - [Fact] - public void ParsePolygon_Parses3DPolygonOnlyExteriorRing() { - string wkt = "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; - - Polygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYZ, parsed.ExteriorRing); - Assert.Empty(parsed.InteriorRings); - } - - [Fact] - public void ParsePolygon_Parses2DMeauredPolygonOnlyExteriorRing() { - string wkt = "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; - - Polygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYM, parsed.ExteriorRing); - Assert.Empty(parsed.InteriorRings); - } - - [Fact] - public void ParsePolygon_Parses3DMeasuredPolygonOnlyExteriorRing() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; - - Polygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYZM, parsed.ExteriorRing); - Assert.Empty(parsed.InteriorRings); - } - - [Fact] - public void ParsePolygon_Parses3DMeasuredPolygonWithInteriorRings() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; - - Polygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - this.CompareCoordinates(_coordinatesXYZM, parsed.ExteriorRing); - Assert.Equal(2, parsed.InteriorRings.Count); - this.CompareCoordinates(_coordinates2XYZM, parsed.InteriorRings[0]); - this.CompareCoordinates(_coordinates2XYZM, parsed.InteriorRings[1]); - } - - [Fact] - public void ParsePolygong_ThrowsExceptionIfWktDoNotRepresentPolygon() { - string wkt = "point empty"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Fact] - public void Parse_ParsesEmptyMultiPoint() { - string wkt = "multipoint empty"; - - MultiPoint parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_Parses2DMultiPoint() { - string wkt = "multipoint ((-10.1 15.5),(20.2 -25.5))"; - - MultiPoint parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinate(_coordinatesXY[0], parsed.Geometries[0].Position); - this.CompareCoordinate(_coordinatesXY[1], parsed.Geometries[1].Position); - } - - [Fact] - public void Parse_Parses2DMeasuredMultiPoint() { - string wkt = "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))"; - - MultiPoint parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinate(_coordinatesXYM[0], parsed.Geometries[0].Position); - this.CompareCoordinate(_coordinatesXYM[1], parsed.Geometries[1].Position); - } - - [Fact] - public void Parse_Parses3DMultiPoint() { - string wkt = "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))"; - - MultiPoint parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinate(_coordinatesXYZ[0], parsed.Geometries[0].Position); - this.CompareCoordinate(_coordinatesXYZ[1], parsed.Geometries[1].Position); - } - - [Fact] - public void Parse_Parses3DMeasuredMultiPoint() { - string wkt = "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))"; - - MultiPoint parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinate(_coordinatesXYZM[0], parsed.Geometries[0].Position); - this.CompareCoordinate(_coordinatesXYZM[1], parsed.Geometries[1].Position); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentMultiPoint() { - string wkt = "point empty"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Fact] - public void Parse_ParsesEmptyMultiLineString() { - string wkt = "multilinestring empty"; - - MultiLineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_Parses2DMultiLineString() { - string wkt = "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; - - MultiLineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXY, parsed.Geometries[0].Coordinates); - this.CompareCoordinates(_coordinatesXY, parsed.Geometries[1].Coordinates); - } - - [Fact] - public void Parse_Parses2DMeasuredMultiLineString() { - string wkt = "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; - - MultiLineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXYM, parsed.Geometries[0].Coordinates); - this.CompareCoordinates(_coordinatesXYM, parsed.Geometries[1].Coordinates); - } - - [Fact] - public void Parse_Parses3DMultiLineString() { - string wkt = "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; - - MultiLineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXYZ, parsed.Geometries[0].Coordinates); - this.CompareCoordinates(_coordinatesXYZ, parsed.Geometries[1].Coordinates); - } - - [Fact] - public void Parse_Parses3DMeasuredMultiLineString() { - string wkt = "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; - - MultiLineString parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXYZM, parsed.Geometries[0].Coordinates); - this.CompareCoordinates(_coordinatesXYZM, parsed.Geometries[1].Coordinates); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentMultiLineString() { - string wkt = "point empty"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Fact] - public void Parse_ParsesEmptyMultiPolygon() { - string wkt = "multipolygon empty"; - - MultiPolygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_Parses2DMultiPolygon() { - string wkt = "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; - - MultiPolygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXY, parsed.Geometries[0].ExteriorRing); - this.CompareCoordinates(_coordinatesXY, parsed.Geometries[1].ExteriorRing); - } - - [Fact] - public void Parse_Parses2DMeasuredMultiPolygon() { - string wkt = "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))"; - - MultiPolygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXYM, parsed.Geometries[0].ExteriorRing); - this.CompareCoordinates(_coordinatesXYM, parsed.Geometries[1].ExteriorRing); - } - - [Fact] - public void Parse_Parses3DMultiPolygon() { - string wkt = "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))"; - - MultiPolygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXYZ, parsed.Geometries[0].ExteriorRing); - this.CompareCoordinates(_coordinatesXYZ, parsed.Geometries[1].ExteriorRing); - } - - [Fact] - public void Parse_Parses3DMeasuredMultiPolygon() { - string wkt = "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))"; - - MultiPolygon parsed = WktReader.Parse(wkt); - - Assert.NotNull(parsed); - Assert.Equal(2, parsed.Geometries.Count); - this.CompareCoordinates(_coordinatesXYZM, parsed.Geometries[0].ExteriorRing); - this.CompareCoordinates(_coordinatesXYZM, parsed.Geometries[1].ExteriorRing); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentMultiPolygon() { - string wkt = "point empty"; - - Assert.Throws(() => WktReader.Parse(wkt)); - } - - [Fact] - public void Parse_ParsesEmptyGeometryCollection() { - string wkt = "geometrycollection empty"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Empty(parsed.Geometries); - } - - [Fact] - public void Parse_Parses2DGeometryCollectionWithPoint() { - string wkt = "geometrycollection (point (-10.1 15.5))"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Single(parsed.Geometries); - this.CompareCoordinate(_coordinatesXY[0], ((Point)parsed.Geometries[0]).Position); - } - - [Fact] - public void Parse_Parses2DMeasuredGeometryCollectionWithPoint() { - string wkt = "geometrycollection m (point m (-10.1 15.5 1000.5))"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Single(parsed.Geometries); - this.CompareCoordinate(_coordinatesXYM[0], ((Point)parsed.Geometries[0]).Position); - } - - [Fact] - public void Parse_Parses3DGeometryCollectionWithPoint() { - string wkt = "geometrycollection z (point z (-10.1 15.5 100.5))"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Single(parsed.Geometries); - this.CompareCoordinate(_coordinatesXYZ[0], ((Point)parsed.Geometries[0]).Position); - } - - [Fact] - public void Parse_Parses3DMeasuredGeometryCollectionWithPoint() { - string wkt = "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Single(parsed.Geometries); - this.CompareCoordinate(_coordinatesXYZM[0], ((Point)parsed.Geometries[0]).Position); - } - - [Fact] - public void Parse_ParsesCollectionWithPointLineStringAndPolygon() { - string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Equal(3, parsed.Geometries.Count); - this.CompareCoordinate(_coordinatesXY[0], ((Point)parsed.Geometries[0]).Position); - this.CompareCoordinates(_coordinatesXY, ((LineString)parsed.Geometries[1]).Coordinates); - this.CompareCoordinates(_coordinatesXY, ((Polygon)parsed.Geometries[2]).ExteriorRing); - } - - [Fact] - public void Parse_ParsesNestedCollections() { - string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; - - GeometryCollection parsed = WktReader.Parse>(wkt); - - Assert.NotNull(parsed); - Assert.Single(parsed.Geometries); - GeometryCollection nested = (GeometryCollection)parsed.Geometries[0]; - this.CompareCoordinate(_coordinatesXY[0], ((Point)nested.Geometries[0]).Position); - } - - [Fact] - public void Parse_ThrowsExceptionIfWktDoNotRepresentGeometryCollection() { - string wkt = "point empty"; - - Assert.Throws(() => WktReader.Parse>(wkt)); - } - - private void CompareCoordinate(Coordinate expected, Coordinate actual) { - Assert.Equal(expected, actual); - } - - private void CompareCoordinates(Coordinate[] expected, ICoordinateList actual) { - Assert.Equal(expected.Length, actual.Count); - - for (int i = 0; i < expected.Length; i++) { - Assert.Equal(expected[i], actual[i]); - } - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using SpatialLite.Core.IO; +using System; +using System.Collections.Generic; +using System.IO; +using Tests.SpatialLite.Core.Data; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + + +public class WktReaderTests +{ + + private readonly Coordinate[] _coordinatesXY = new Coordinate[] { + new Coordinate(-10.1, 15.5), new Coordinate(20.2, -25.5), new Coordinate(30.3, 35.5) + }; + + private readonly Coordinate[] _coordinatesXYZ = new Coordinate[] { + new Coordinate(-10.1, 15.5, 100.5), new Coordinate(20.2, -25.5, 200.5), new Coordinate(30.3, 35.5, -300.5) + }; + + private readonly Coordinate[] _coordinatesXYM = new Coordinate[] { + new Coordinate(-10.1, 15.5, double.NaN, 1000.5), new Coordinate(20.2, -25.5, double.NaN, 2000.5), new Coordinate(30.3, 35.5, double.NaN, -3000.5) + }; + + private readonly Coordinate[] _coordinatesXYZM = new Coordinate[] { + new Coordinate(-10.1, 15.5, 100.5, 1000.5), new Coordinate(20.2, -25.5, 200.5, 2000.5), new Coordinate(30.3, 35.5, -300.5, -3000.5) + }; + + private readonly Coordinate[] _coordinates2XYZM = new Coordinate[] { + new Coordinate(-1.1, 1.5, 10.5, 100.5), new Coordinate(2.2, -2.5, 20.5, 200.5), new Coordinate(3.3, 3.5, -30.5, -300.5) + }; + + [Fact] + public void Constructor_Stream_ThrowsAgrumentNullExceptioIfStreamIsNull() + { + Stream stream = null; + Assert.Throws(() => new WktReader(stream)); + } + + [Fact] + public void Constructor_Path_ThrowsFileNotFoundExceptioIfFileDoesNotExists() + { + Assert.Throws(() => new WktReader("non-existing-file.wkb")); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = "../../../Data/IO/wkt-point-3DM.wkt"; + + WktReader target = new WktReader(filename); + target.Dispose(); + FileStream testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToStream() + { + var stream = TestDataReader.Open("wkt-point-3DM.wkt"); + + WktReader target = new WktReader(stream); + target.Dispose(); + + Assert.False(stream.CanRead); + } + public static IEnumerable Read_ReadsAllGeometryTypesTestData + { + get + { + yield return new object[] { TestDataReader.Read("wkt-point-3DM.wkt") }; + yield return new object[] { TestDataReader.Read("wkt-linestring-3DM.wkt") }; + yield return new object[] { TestDataReader.Read("wkt-polygon-3DM.wkt") }; + yield return new object[] { TestDataReader.Read("wkt-multipoint-3DM.wkt") }; + yield return new object[] { TestDataReader.Read("wkt-multilinestring-3DM.wkt") }; + yield return new object[] { TestDataReader.Read("wkt-multipolygon-3DM.wkt") }; + yield return new object[] { TestDataReader.Read("wkt-geometry-collection-3DM.wkt") }; + } + } + + [Theory] + [MemberData(nameof(Read_ReadsAllGeometryTypesTestData))] + public void Read_ReadsAllGeometryTypes(byte[] data) + { + using (WktReader target = new WktReader(new MemoryStream(data))) + { + IGeometry readGeometry = target.Read(); + Assert.NotNull(readGeometry); + } + } + + [Fact] + public void Read_ReturnsNullIfStreamIsEmpty() + { + using (WktReader target = new WktReader(new MemoryStream())) + { + IGeometry readGeometry = target.Read(); + + Assert.Null(readGeometry); + } + } + + [Fact] + public void Read_ReturnsNullIfNoMoreGeometriesAreAvailableInInputStream() + { + using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-3DM.wkt"))) + { + target.Read(); + IGeometry readGeometry = target.Read(); + + Assert.Null(readGeometry); + } + } + + [Fact] + public void Read_ReadsMultipleGeometries() + { + using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-and-linestring-3DM.wkt"))) + { + IGeometry readGeometry = target.Read(); + Assert.True(readGeometry is Point); + + readGeometry = target.Read(); + Assert.True(readGeometry is LineString); + } + } + + [Fact] + public void ReadT_ReadsGeometry() + { + using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-3DM.wkt"))) + { + Point read = target.Read(); + Assert.NotNull(read); + } + } + + [Fact] + public void ReadT_ReturnsNullIfStreamIsEmpty() + { + using (WktReader target = new WktReader(new MemoryStream())) + { + IGeometry readGeometry = target.Read(); + + Assert.Null(readGeometry); + } + } + + [Fact] + public void ReadT_ThrowsExceptionIfWKTDoesNotRepresentGeometryOfSpecificType() + { + using (WktReader target = new WktReader(TestDataReader.Open("wkt-point-3DM.wkt"))) + { + Assert.Throws(target.Read); + } + } + + [Fact] + public void Parse_ParsesPoint() + { + string wkt = "point empty"; + + Point parsed = (Point)WktReader.Parse(wkt); + CompareCoordinate(Coordinate.Empty, parsed.Position); + } + + [Fact] + public void Parse_ParsesLineString() + { + string wkt = "linestring empty"; + + LineString parsed = (LineString)WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Coordinates); + } + + [Fact] + public void Parse_ParsesPolygon() + { + string wkt = "polygon empty"; + + Polygon parsed = (Polygon)WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.ExteriorRing); + } + + [Fact] + public void Parse_ParsesGeometryCollection() + { + string wkt = "geometrycollection empty"; + + GeometryCollection parsed = (GeometryCollection)WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_ParsesMultiPoint() + { + string wkt = "multipoint empty"; + + MultiPoint parsed = (MultiPoint)WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_ParsesMultiLineString() + { + string wkt = "multilinestring empty"; + + MultiLineString parsed = (MultiLineString)WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_ParsesMultiPolygon() + { + string wkt = "multipolygon empty"; + + MultiPolygon parsed = (MultiPolygon)WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentGeometry() + { + string wkt = "invalid string"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Theory] + [InlineData("point zm \t(-10.1 15.5 100.5 \n1000.5)")] + [InlineData("\n\rlinestring (-10.1 15.5, 20.2 -25.5, \t30.3 35.5)")] + [InlineData("polygon\n\r m\t ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))")] + [InlineData("multipoint\t\r z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))")] + [InlineData("\nmultilinestring \tempty")] + [InlineData("multipolygon\n\r (((-10.1\t 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))")] + [InlineData("geometrycollection \t\n\r(point (-10.1 15.5))")] + public void Parse_ParsesGeometriesWithMultipleWhitespacesInsteadOneSpace(string wkt) + { + WktReader.Parse(wkt); + } + + [Theory] + [InlineData("point zm ( -10.1 15.5 100.5 1000.5 )")] + [InlineData("linestring ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 )")] + [InlineData("polygon m ( ( -10.1 15.5 1000.5 , 20.2 -25.5 2000.5, 30.3 35.5 -3000.5 ) )")] + [InlineData("multipoint z ( ( -10.1 15.5 100.5 ) , ( 20.2 -25.5 200.5 ) )")] + [InlineData("multilinestring ( ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 ) , ( -10.1 15.5, 20.2 -25.5, 30.3 35.5 ) ) ")] + [InlineData("multipolygon ( ( ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 ) ) , ( ( -10.1 15.5 , 20.2 -25.5 , 30.3 35.5 ) ) )")] + [InlineData("geometrycollection ( point ( -10.1 15.5 ) )")] + public void Parse_ParsesGeometriesWithWhitespacesAtPlacesWhereTheyAreNotExpected(string wkt) + { + WktReader.Parse(wkt); + } + + [Fact] + public void Parse_ParsesEmptyPoint() + { + string wkt = "point empty"; + + Point parsed = WktReader.Parse(wkt); + + CompareCoordinate(Coordinate.Empty, parsed.Position); + } + + [Fact] + public void Parse_Parses2DPoint() + { + string wkt = "point (-10.1 15.5)"; + + Point parsed = WktReader.Parse(wkt); + + Assert.False(parsed.Is3D); + Assert.False(parsed.IsMeasured); + CompareCoordinate(_coordinatesXY[0], parsed.Position); + } + + [Fact] + public void Parse_Parses2DMeasuredPoint() + { + string wkt = "point m (-10.1 15.5 1000.5)"; + + Point parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.False(parsed.Is3D); + CompareCoordinate(_coordinatesXYM[0], parsed.Position); + } + + [Fact] + public void Parse_Parses3DPoint() + { + string wkt = "point z (-10.1 15.5 100.5)"; + + Point parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.False(parsed.IsMeasured); + CompareCoordinate(_coordinatesXYZ[0], parsed.Position); + } + + [Fact] + public void Parse_Parses3DMeasuredPoint() + { + string wkt = "point zm (-10.1 15.5 100.5 1000.5)"; + + Point parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinate(_coordinatesXYZM[0], parsed.Position); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentPoint() + { + string wkt = "linestring empty"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Fact] + public void Parse_ParsesEmptyLineString() + { + string wkt = "linestring empty"; + + LineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Coordinates); + } + + [Fact] + public void Parse_Parses2DLineString() + { + string wkt = "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)"; + + LineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXY, parsed.Coordinates); + } + + [Fact] + public void Parse_Parses2DMeasuredLineString() + { + string wkt = "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)"; + + LineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYM, parsed.Coordinates); + } + + [Fact] + public void Parse_Parses3DLineString() + { + string wkt = "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)"; + + LineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYZ, parsed.Coordinates); + } + + [Fact] + public void Parse_Parses3DMeasuredLineString() + { + string wkt = "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)"; + + LineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYZM, parsed.Coordinates); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentLineString() + { + string wkt = "point empty"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Fact] + public void ParsePolygon_ParsesEmptyPolygon() + { + string wkt = "polygon empty"; + + Polygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.ExteriorRing); + Assert.Empty(parsed.InteriorRings); + } + + [Fact] + public void ParsePolygon_Parses2DPolygonOnlyExteriorRing() + { + string wkt = "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; + + Polygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXY, parsed.ExteriorRing); + Assert.Empty(parsed.InteriorRings); + } + + [Fact] + public void ParsePolygon_Parses3DPolygonOnlyExteriorRing() + { + string wkt = "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; + + Polygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYZ, parsed.ExteriorRing); + Assert.Empty(parsed.InteriorRings); + } + + [Fact] + public void ParsePolygon_Parses2DMeauredPolygonOnlyExteriorRing() + { + string wkt = "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; + + Polygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYM, parsed.ExteriorRing); + Assert.Empty(parsed.InteriorRings); + } + + [Fact] + public void ParsePolygon_Parses3DMeasuredPolygonOnlyExteriorRing() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; + + Polygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYZM, parsed.ExteriorRing); + Assert.Empty(parsed.InteriorRings); + } + + [Fact] + public void ParsePolygon_Parses3DMeasuredPolygonWithInteriorRings() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; + + Polygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + CompareCoordinates(_coordinatesXYZM, parsed.ExteriorRing); + Assert.Equal(2, parsed.InteriorRings.Count); + CompareCoordinates(_coordinates2XYZM, parsed.InteriorRings[0]); + CompareCoordinates(_coordinates2XYZM, parsed.InteriorRings[1]); + } + + [Fact] + public void ParsePolygong_ThrowsExceptionIfWktDoNotRepresentPolygon() + { + string wkt = "point empty"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Fact] + public void Parse_ParsesEmptyMultiPoint() + { + string wkt = "multipoint empty"; + + MultiPoint parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_Parses2DMultiPoint() + { + string wkt = "multipoint ((-10.1 15.5),(20.2 -25.5))"; + + MultiPoint parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinate(_coordinatesXY[0], parsed.Geometries[0].Position); + CompareCoordinate(_coordinatesXY[1], parsed.Geometries[1].Position); + } + + [Fact] + public void Parse_Parses2DMeasuredMultiPoint() + { + string wkt = "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))"; + + MultiPoint parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinate(_coordinatesXYM[0], parsed.Geometries[0].Position); + CompareCoordinate(_coordinatesXYM[1], parsed.Geometries[1].Position); + } + + [Fact] + public void Parse_Parses3DMultiPoint() + { + string wkt = "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))"; + + MultiPoint parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinate(_coordinatesXYZ[0], parsed.Geometries[0].Position); + CompareCoordinate(_coordinatesXYZ[1], parsed.Geometries[1].Position); + } + + [Fact] + public void Parse_Parses3DMeasuredMultiPoint() + { + string wkt = "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))"; + + MultiPoint parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinate(_coordinatesXYZM[0], parsed.Geometries[0].Position); + CompareCoordinate(_coordinatesXYZM[1], parsed.Geometries[1].Position); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentMultiPoint() + { + string wkt = "point empty"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Fact] + public void Parse_ParsesEmptyMultiLineString() + { + string wkt = "multilinestring empty"; + + MultiLineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_Parses2DMultiLineString() + { + string wkt = "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))"; + + MultiLineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXY, parsed.Geometries[0].Coordinates); + CompareCoordinates(_coordinatesXY, parsed.Geometries[1].Coordinates); + } + + [Fact] + public void Parse_Parses2DMeasuredMultiLineString() + { + string wkt = "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))"; + + MultiLineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXYM, parsed.Geometries[0].Coordinates); + CompareCoordinates(_coordinatesXYM, parsed.Geometries[1].Coordinates); + } + + [Fact] + public void Parse_Parses3DMultiLineString() + { + string wkt = "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))"; + + MultiLineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXYZ, parsed.Geometries[0].Coordinates); + CompareCoordinates(_coordinatesXYZ, parsed.Geometries[1].Coordinates); + } + + [Fact] + public void Parse_Parses3DMeasuredMultiLineString() + { + string wkt = "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))"; + + MultiLineString parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXYZM, parsed.Geometries[0].Coordinates); + CompareCoordinates(_coordinatesXYZM, parsed.Geometries[1].Coordinates); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentMultiLineString() + { + string wkt = "point empty"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Fact] + public void Parse_ParsesEmptyMultiPolygon() + { + string wkt = "multipolygon empty"; + + MultiPolygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_Parses2DMultiPolygon() + { + string wkt = "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; + + MultiPolygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXY, parsed.Geometries[0].ExteriorRing); + CompareCoordinates(_coordinatesXY, parsed.Geometries[1].ExteriorRing); + } + + [Fact] + public void Parse_Parses2DMeasuredMultiPolygon() + { + string wkt = "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))"; + + MultiPolygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXYM, parsed.Geometries[0].ExteriorRing); + CompareCoordinates(_coordinatesXYM, parsed.Geometries[1].ExteriorRing); + } + + [Fact] + public void Parse_Parses3DMultiPolygon() + { + string wkt = "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))"; + + MultiPolygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXYZ, parsed.Geometries[0].ExteriorRing); + CompareCoordinates(_coordinatesXYZ, parsed.Geometries[1].ExteriorRing); + } + + [Fact] + public void Parse_Parses3DMeasuredMultiPolygon() + { + string wkt = "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))"; + + MultiPolygon parsed = WktReader.Parse(wkt); + + Assert.NotNull(parsed); + Assert.Equal(2, parsed.Geometries.Count); + CompareCoordinates(_coordinatesXYZM, parsed.Geometries[0].ExteriorRing); + CompareCoordinates(_coordinatesXYZM, parsed.Geometries[1].ExteriorRing); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentMultiPolygon() + { + string wkt = "point empty"; + + Assert.Throws(() => WktReader.Parse(wkt)); + } + + [Fact] + public void Parse_ParsesEmptyGeometryCollection() + { + string wkt = "geometrycollection empty"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Empty(parsed.Geometries); + } + + [Fact] + public void Parse_Parses2DGeometryCollectionWithPoint() + { + string wkt = "geometrycollection (point (-10.1 15.5))"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Single(parsed.Geometries); + CompareCoordinate(_coordinatesXY[0], ((Point)parsed.Geometries[0]).Position); + } + + [Fact] + public void Parse_Parses2DMeasuredGeometryCollectionWithPoint() + { + string wkt = "geometrycollection m (point m (-10.1 15.5 1000.5))"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Single(parsed.Geometries); + CompareCoordinate(_coordinatesXYM[0], ((Point)parsed.Geometries[0]).Position); + } + + [Fact] + public void Parse_Parses3DGeometryCollectionWithPoint() + { + string wkt = "geometrycollection z (point z (-10.1 15.5 100.5))"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Single(parsed.Geometries); + CompareCoordinate(_coordinatesXYZ[0], ((Point)parsed.Geometries[0]).Position); + } + + [Fact] + public void Parse_Parses3DMeasuredGeometryCollectionWithPoint() + { + string wkt = "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Single(parsed.Geometries); + CompareCoordinate(_coordinatesXYZM[0], ((Point)parsed.Geometries[0]).Position); + } + + [Fact] + public void Parse_ParsesCollectionWithPointLineStringAndPolygon() + { + string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Equal(3, parsed.Geometries.Count); + CompareCoordinate(_coordinatesXY[0], ((Point)parsed.Geometries[0]).Position); + CompareCoordinates(_coordinatesXY, ((LineString)parsed.Geometries[1]).Coordinates); + CompareCoordinates(_coordinatesXY, ((Polygon)parsed.Geometries[2]).ExteriorRing); + } + + [Fact] + public void Parse_ParsesNestedCollections() + { + string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; + + GeometryCollection parsed = WktReader.Parse>(wkt); + + Assert.NotNull(parsed); + Assert.Single(parsed.Geometries); + GeometryCollection nested = (GeometryCollection)parsed.Geometries[0]; + CompareCoordinate(_coordinatesXY[0], ((Point)nested.Geometries[0]).Position); + } + + [Fact] + public void Parse_ThrowsExceptionIfWktDoNotRepresentGeometryCollection() + { + string wkt = "point empty"; + + Assert.Throws(() => WktReader.Parse>(wkt)); + } + + private void CompareCoordinate(Coordinate expected, Coordinate actual) + { + Assert.Equal(expected, actual); + } + + private void CompareCoordinates(Coordinate[] expected, ICoordinateList actual) + { + Assert.Equal(expected.Length, actual.Count); + + for (int i = 0; i < expected.Length; i++) + { + Assert.Equal(expected[i], actual[i]); + } + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs b/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs index 6852962..1b99267 100644 --- a/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WktTokenizerTests.cs @@ -1,136 +1,135 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; -using Xunit.Extensions; - -using SpatialLite.Core.IO; -using System.IO; - -namespace Tests.SpatialLite.Core.IO { - public class WktTokenizerTests { - - [Fact] - void Tokenize_String_ReturnsEmptyTokenForEmptyString() { - string data = string.Empty; - var tokens = WktTokenizer.Tokenize(data); - - Assert.Empty(tokens); - } - - [Theory] - [InlineData("stringTOOKEN", TokenType.STRING)] - [InlineData(" ", TokenType.WHITESPACE)] - [InlineData("\t", TokenType.WHITESPACE)] - [InlineData("\n", TokenType.WHITESPACE)] - [InlineData("\r", TokenType.WHITESPACE)] - [InlineData("(", TokenType.LEFT_PARENTHESIS)] - [InlineData(")", TokenType.RIGHT_PARENTHESIS)] - [InlineData(",", TokenType.COMMA)] - [InlineData("-123456780.9", TokenType.NUMBER)] - void Tokenize_String_CorrectlyRecognizesTokenTypes(string str, TokenType expectedType) { - var tokens = WktTokenizer.Tokenize(str).ToArray(); - - Assert.Single(tokens); - - WktToken t = tokens.First(); - Assert.Equal(expectedType, t.Type); - Assert.Equal(str, t.Value); - } - - [Fact] - void Tokenize_String_ProcessesComplexText() { - string data = "point z (-10 -15 -100.1)"; - var tokens =WktTokenizer.Tokenize(data).ToArray(); - - Assert.Equal(11, tokens.Length); - - WktToken t = tokens[0]; - Assert.Equal(TokenType.STRING, t.Type); - Assert.Equal("point", t.Value); - - t = tokens[1]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[2]; - Assert.Equal(TokenType.STRING, t.Type); - Assert.Equal("z", t.Value); - - t = tokens[3]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[4]; - Assert.Equal(TokenType.LEFT_PARENTHESIS, t.Type); - - t = tokens[5]; - Assert.Equal(TokenType.NUMBER, t.Type); - Assert.Equal("-10", t.Value); - - t = tokens[6]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[7]; - Assert.Equal(TokenType.NUMBER, t.Type); - Assert.Equal("-15", t.Value); - - t = tokens[8]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[9]; - Assert.Equal(TokenType.NUMBER, t.Type); - Assert.Equal("-100.1", t.Value); - - t = tokens[10]; - Assert.Equal(TokenType.RIGHT_PARENTHESIS, t.Type); - } - - [Fact] - void Tokenize_TextReader_ProcessesComplexText() { - StringReader reader = new StringReader("point z (-10 -15 -100.1)"); - - var tokens = WktTokenizer.Tokenize(reader).ToArray(); - - Assert.Equal(11, tokens.Length); - - WktToken t = tokens[0]; - Assert.Equal(TokenType.STRING, t.Type); - Assert.Equal("point", t.Value); - - t = tokens[1]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[2]; - Assert.Equal(TokenType.STRING, t.Type); - Assert.Equal("z", t.Value); - - t = tokens[3]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[4]; - Assert.Equal(TokenType.LEFT_PARENTHESIS, t.Type); - - t = tokens[5]; - Assert.Equal(TokenType.NUMBER, t.Type); - Assert.Equal("-10", t.Value); - - t = tokens[6]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[7]; - Assert.Equal(TokenType.NUMBER, t.Type); - Assert.Equal("-15", t.Value); - - t = tokens[8]; - Assert.Equal(TokenType.WHITESPACE, t.Type); - - t = tokens[9]; - Assert.Equal(TokenType.NUMBER, t.Type); - Assert.Equal("-100.1", t.Value); - - t = tokens[10]; - Assert.Equal(TokenType.RIGHT_PARENTHESIS, t.Type); - } - } -} +using SpatialLite.Core.IO; +using System.IO; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + +public class WktTokenizerTests +{ + + [Fact] + private void Tokenize_String_ReturnsEmptyTokenForEmptyString() + { + string data = string.Empty; + var tokens = WktTokenizer.Tokenize(data); + + Assert.Empty(tokens); + } + + [Theory] + [InlineData("stringTOOKEN", TokenType.STRING)] + [InlineData(" ", TokenType.WHITESPACE)] + [InlineData("\t", TokenType.WHITESPACE)] + [InlineData("\n", TokenType.WHITESPACE)] + [InlineData("\r", TokenType.WHITESPACE)] + [InlineData("(", TokenType.LEFT_PARENTHESIS)] + [InlineData(")", TokenType.RIGHT_PARENTHESIS)] + [InlineData(",", TokenType.COMMA)] + [InlineData("-123456780.9", TokenType.NUMBER)] + private void Tokenize_String_CorrectlyRecognizesTokenTypes(string str, TokenType expectedType) + { + var tokens = WktTokenizer.Tokenize(str).ToArray(); + + Assert.Single(tokens); + + WktToken t = tokens.First(); + Assert.Equal(expectedType, t.Type); + Assert.Equal(str, t.Value); + } + + [Fact] + private void Tokenize_String_ProcessesComplexText() + { + string data = "point z (-10 -15 -100.1)"; + var tokens = WktTokenizer.Tokenize(data).ToArray(); + + Assert.Equal(11, tokens.Length); + + WktToken t = tokens[0]; + Assert.Equal(TokenType.STRING, t.Type); + Assert.Equal("point", t.Value); + + t = tokens[1]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[2]; + Assert.Equal(TokenType.STRING, t.Type); + Assert.Equal("z", t.Value); + + t = tokens[3]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[4]; + Assert.Equal(TokenType.LEFT_PARENTHESIS, t.Type); + + t = tokens[5]; + Assert.Equal(TokenType.NUMBER, t.Type); + Assert.Equal("-10", t.Value); + + t = tokens[6]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[7]; + Assert.Equal(TokenType.NUMBER, t.Type); + Assert.Equal("-15", t.Value); + + t = tokens[8]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[9]; + Assert.Equal(TokenType.NUMBER, t.Type); + Assert.Equal("-100.1", t.Value); + + t = tokens[10]; + Assert.Equal(TokenType.RIGHT_PARENTHESIS, t.Type); + } + + [Fact] + private void Tokenize_TextReader_ProcessesComplexText() + { + StringReader reader = new StringReader("point z (-10 -15 -100.1)"); + + var tokens = WktTokenizer.Tokenize(reader).ToArray(); + + Assert.Equal(11, tokens.Length); + + WktToken t = tokens[0]; + Assert.Equal(TokenType.STRING, t.Type); + Assert.Equal("point", t.Value); + + t = tokens[1]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[2]; + Assert.Equal(TokenType.STRING, t.Type); + Assert.Equal("z", t.Value); + + t = tokens[3]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[4]; + Assert.Equal(TokenType.LEFT_PARENTHESIS, t.Type); + + t = tokens[5]; + Assert.Equal(TokenType.NUMBER, t.Type); + Assert.Equal("-10", t.Value); + + t = tokens[6]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[7]; + Assert.Equal(TokenType.NUMBER, t.Type); + Assert.Equal("-15", t.Value); + + t = tokens[8]; + Assert.Equal(TokenType.WHITESPACE, t.Type); + + t = tokens[9]; + Assert.Equal(TokenType.NUMBER, t.Type); + Assert.Equal("-100.1", t.Value); + + t = tokens[10]; + Assert.Equal(TokenType.RIGHT_PARENTHESIS, t.Type); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs b/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs index 0692dbd..1f71711 100644 --- a/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WktTokensBufferTests.cs @@ -1,185 +1,200 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core.IO; - -namespace Tests.SpatialLite.Core.IO { - public class WktTokensBufferTests { - WktToken[] _testData = new WktToken[] {new WktToken() {Type = TokenType.STRING, Value = "point"}, new WktToken() {Type = TokenType.WHITESPACE, Value=" "}, - new WktToken() {Type = TokenType.LEFT_PARENTHESIS, Value = "("}}; - - [Fact] - public void Constructor__CreatesEmptyBuffer() { - WktTokensBuffer target = new WktTokensBuffer(); - - Assert.Empty(target); - } - - [Fact] - public void Constructor_TextReader_CreatesBufferWithSpecificTokens() { - WktTokensBuffer target = new WktTokensBuffer(_testData); - - Assert.Equal(_testData.Length, target.Count()); - for (int i = 0; i < _testData.Length; i++) { - Assert.Equal(_testData[i], target.ToArray()[i]); - } - } - - [Fact] - public void Count_GetsNumberOfItemsInBufffer() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(_testData); - - Assert.Equal(_testData.Length, target.Count); - } - - [Fact] - public void Add_WktToken_AddsItemToTheCollection() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(_testData[0]); - - Assert.Single(target); - Assert.Contains(_testData[0], target); - } - - [Fact] - public void Add_IEnumerable_AddsItemsToTheCollection() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(_testData); - - Assert.Equal(_testData.Length, target.Count()); - for (int i = 0; i < _testData.Length; i++) { - Assert.Equal(_testData[i], target.ToArray()[i]); - } - } - - [Fact] - public void Clear_RemovesAllItemsFromCollection() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(_testData); - - target.Clear(); - - Assert.Empty(target); - } - - [Fact] - public void Peek_IgnoreWhitespace_GetsNextTokenFromBufferAndLeavesItThere() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(_testData[0]); - - var result = target.Peek(false); - - Assert.Equal(_testData[0], result); - Assert.Contains(_testData[0], target); - } - - [Fact] - public void Peek_IgnoreWhitespace_IgnoresWhitespacesBeforeTokenIfIgnoreTokenIsTrue() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); - target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); - target.Add(_testData[0]); - - var result = target.Peek(true); - - Assert.Equal(_testData[0], result); - Assert.Equal(3, target.Count); - } - - [Fact] - public void Peek_IgnoreWhitespace_ReturnsWhitespaceIfIgnoreWhitespaceIsFalseAndNextTokenIsWhitespace() { - WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(whitespaceToken); - target.Add(_testData[0]); - - var result = target.Peek(false); - - Assert.Equal(whitespaceToken, result); - Assert.Equal(2, target.Count); - } - - [Fact] - public void Peek_IgnoreWhitespace_ReturnsEndOfDataTokenIfNoMoreTokensAreAvailable() { - WktTokensBuffer target = new WktTokensBuffer(); - - var result = target.Peek(false); - - Assert.Equal(WktToken.EndOfDataToken, result); - } - - [Fact] - public void Peek_IgnoreWhitespace_ReturnsEndOfDataTokenIfOnlyWhitespaceTokensAreAvailalbleAndIgnoreWhitespaceIsTrue() { - WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(whitespaceToken); - - var result = target.Peek(true); - - Assert.Equal(WktToken.EndOfDataToken, result); - } - - [Fact] - public void GetToken_IgnoreWhitespace_GetsNextTokenFromBufferAndRemoveIt() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(_testData[0]); - - var result = target.GetToken(false); - - Assert.Equal(_testData[0], result); - Assert.DoesNotContain(_testData[0], target); - } - - [Fact] - public void GetToken_IgnoreWhitespace_IgnoresWhitespacesBeforeTokenIfIgnoreTokenIsTrue() { - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); - target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); - target.Add(_testData[0]); - - var result = target.GetToken(true); - - Assert.Equal(_testData[0], result); - Assert.Equal(0, target.Count); - } - - [Fact] - public void GetToken_IgnoreWhitespace_ReturnsWhitespaceIfIgnoreWhitespaceIsFalseAndNextTokenIsWhitespace() { - WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(whitespaceToken); - target.Add(_testData[0]); - - var result = target.GetToken(false); - - Assert.Equal(whitespaceToken, result); - Assert.Equal(1, target.Count); - } - - [Fact] - public void GetToken_IgnoreWhitespace_ReturnsEndOfDataTokenIfNoMoreTokensAreAvailable() { - WktTokensBuffer target = new WktTokensBuffer(); - - var result = target.GetToken(false); - - Assert.Equal(WktToken.EndOfDataToken, result); - } - - [Fact] - public void GetToken_IgnoreWhitespace_ReturnsEndOfDataTokenIfOnlyWhitespaceTokensAreAvailalbleAndIgnoreWhitespaceIsTrue() { - WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; - WktTokensBuffer target = new WktTokensBuffer(); - target.Add(whitespaceToken); - - var result = target.GetToken(true); - - Assert.Equal(WktToken.EndOfDataToken, result); - Assert.Empty(target); - } - } -} +using SpatialLite.Core.IO; +using System; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + +public class WktTokensBufferTests +{ + private readonly WktToken[] _testData = new WktToken[] {new WktToken() {Type = TokenType.STRING, Value = "point"}, new WktToken() {Type = TokenType.WHITESPACE, Value=" "}, + new WktToken() {Type = TokenType.LEFT_PARENTHESIS, Value = "("}}; + + [Fact] + public void Constructor__CreatesEmptyBuffer() + { + WktTokensBuffer target = new WktTokensBuffer(); + + Assert.Empty(target); + } + + [Fact] + public void Constructor_TextReader_CreatesBufferWithSpecificTokens() + { + WktTokensBuffer target = new WktTokensBuffer(_testData); + + Assert.Equal(_testData.Length, target.Count()); + for (int i = 0; i < _testData.Length; i++) + { + Assert.Equal(_testData[i], target.ToArray()[i]); + } + } + + [Fact] + public void Count_GetsNumberOfItemsInBufffer() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(_testData); + + Assert.Equal(_testData.Length, target.Count); + } + + [Fact] + public void Add_WktToken_AddsItemToTheCollection() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(_testData[0]); + + Assert.Single(target); + Assert.Contains(_testData[0], target); + } + + [Fact] + public void Add_IEnumerable_AddsItemsToTheCollection() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(_testData); + + Assert.Equal(_testData.Length, target.Count()); + for (int i = 0; i < _testData.Length; i++) + { + Assert.Equal(_testData[i], target.ToArray()[i]); + } + } + + [Fact] + public void Clear_RemovesAllItemsFromCollection() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(_testData); + + target.Clear(); + + Assert.Empty(target); + } + + [Fact] + public void Peek_IgnoreWhitespace_GetsNextTokenFromBufferAndLeavesItThere() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(_testData[0]); + + var result = target.Peek(false); + + Assert.Equal(_testData[0], result); + Assert.Contains(_testData[0], target); + } + + [Fact] + public void Peek_IgnoreWhitespace_IgnoresWhitespacesBeforeTokenIfIgnoreTokenIsTrue() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); + target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); + target.Add(_testData[0]); + + var result = target.Peek(true); + + Assert.Equal(_testData[0], result); + Assert.Equal(3, target.Count); + } + + [Fact] + public void Peek_IgnoreWhitespace_ReturnsWhitespaceIfIgnoreWhitespaceIsFalseAndNextTokenIsWhitespace() + { + WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(whitespaceToken); + target.Add(_testData[0]); + + var result = target.Peek(false); + + Assert.Equal(whitespaceToken, result); + Assert.Equal(2, target.Count); + } + + [Fact] + public void Peek_IgnoreWhitespace_ReturnsEndOfDataTokenIfNoMoreTokensAreAvailable() + { + WktTokensBuffer target = new WktTokensBuffer(); + + var result = target.Peek(false); + + Assert.Equal(WktToken.EndOfDataToken, result); + } + + [Fact] + public void Peek_IgnoreWhitespace_ReturnsEndOfDataTokenIfOnlyWhitespaceTokensAreAvailalbleAndIgnoreWhitespaceIsTrue() + { + WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(whitespaceToken); + + var result = target.Peek(true); + + Assert.Equal(WktToken.EndOfDataToken, result); + } + + [Fact] + public void GetToken_IgnoreWhitespace_GetsNextTokenFromBufferAndRemoveIt() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(_testData[0]); + + var result = target.GetToken(false); + + Assert.Equal(_testData[0], result); + Assert.DoesNotContain(_testData[0], target); + } + + [Fact] + public void GetToken_IgnoreWhitespace_IgnoresWhitespacesBeforeTokenIfIgnoreTokenIsTrue() + { + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); + target.Add(new WktToken() { Type = TokenType.WHITESPACE, Value = " " }); + target.Add(_testData[0]); + + var result = target.GetToken(true); + + Assert.Equal(_testData[0], result); + Assert.Equal(0, target.Count); + } + + [Fact] + public void GetToken_IgnoreWhitespace_ReturnsWhitespaceIfIgnoreWhitespaceIsFalseAndNextTokenIsWhitespace() + { + WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(whitespaceToken); + target.Add(_testData[0]); + + var result = target.GetToken(false); + + Assert.Equal(whitespaceToken, result); + Assert.Equal(1, target.Count); + } + + [Fact] + public void GetToken_IgnoreWhitespace_ReturnsEndOfDataTokenIfNoMoreTokensAreAvailable() + { + WktTokensBuffer target = new WktTokensBuffer(); + + var result = target.GetToken(false); + + Assert.Equal(WktToken.EndOfDataToken, result); + } + + [Fact] + public void GetToken_IgnoreWhitespace_ReturnsEndOfDataTokenIfOnlyWhitespaceTokensAreAvailalbleAndIgnoreWhitespaceIsTrue() + { + WktToken whitespaceToken = new WktToken() { Type = TokenType.WHITESPACE, Value = " " }; + WktTokensBuffer target = new WktTokensBuffer(); + target.Add(whitespaceToken); + + var result = target.GetToken(true); + + Assert.Equal(WktToken.EndOfDataToken, result); + Assert.Empty(target); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs b/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs index f6c7841..91c5f84 100644 --- a/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WktWriterSettingsTests.cs @@ -1,21 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; - -using SpatialLite.Core.IO; - -namespace Tests.SpatialLite.Core.IO { - public class WktWriterSettingsTests { - - [Fact] - public void Constructor__SetsDefaultValues() { - WktWriterSettings target = new WktWriterSettings(); - - Assert.False(target.IsReadOnly); - } - - } -} +using SpatialLite.Core.IO; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + +public class WktWriterSettingsTests +{ + + [Fact] + public void Constructor__SetsDefaultValues() + { + WktWriterSettings target = new WktWriterSettings(); + + Assert.False(target.IsReadOnly); + } +} diff --git a/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs b/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs index 81aa6ab..f00f4e1 100644 --- a/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs +++ b/src/Tests.SpatialLite.Core/IO/WktWriterTests.cs @@ -1,302 +1,338 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -using Xunit; -using Xunit.Extensions; - -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; -using SpatialLite.Core.IO; - -namespace Tests.SpatialLite.Core.IO { - public class WktWriterTests { - - - private static Coordinate[] _coordinatesXY = new Coordinate[] { - new Coordinate(-10.1, 15.5), new Coordinate(20.2, -25.5), new Coordinate(30.3, 35.5) - }; - - private static Coordinate[] _coordinatesXYZ = new Coordinate[] { - new Coordinate(-10.1, 15.5, 100.5), new Coordinate(20.2, -25.5, 200.5), new Coordinate(30.3, 35.5, -300.5) - }; - - private static Coordinate[] _coordinatesXYM = new Coordinate[] { - new Coordinate(-10.1, 15.5, double.NaN, 1000.5), new Coordinate(20.2, -25.5, double.NaN, 2000.5), new Coordinate(30.3, 35.5, double.NaN, -3000.5) - }; - - private static Coordinate[] _coordinatesXYZM = new Coordinate[] { - new Coordinate(-10.1, 15.5, 100.5, 1000.5), new Coordinate(20.2, -25.5, 200.5, 2000.5), new Coordinate(30.3, 35.5, -300.5, -3000.5) - }; - - private static Coordinate[] _coordinates2XYZM = new Coordinate[] { - new Coordinate(-1.1, 1.5, 10.5, 100.5), new Coordinate(2.2, -2.5, 20.5, 200.5), new Coordinate(3.3, 3.5, -30.5, -300.5) - }; - - [Fact] - public void Construcotor_StreamSettings_SetsSettingsAndMakeThemReadOnly() { - WktWriterSettings settings = new WktWriterSettings(); - using (WktWriter target = new WktWriter(new MemoryStream(), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfStreamIsNull() { - Stream stream = null; - Assert.Throws(() => new WktWriter(stream, new WktWriterSettings())); - } - - [Fact] - public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() { - Assert.Throws(() => new WktWriter(new MemoryStream(), null)); - } - - [Fact] - public void Construcotor_PathSettings_SetsSettingsAndMakeThemReadOnly() { - WktWriterSettings settings = new WktWriterSettings(); - using (WktWriter target = new WktWriter(new MemoryStream(), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_PathSettings_CreatesOutputFile() { - string filename = PathHelper.GetTempFilePath("wktwriter-constructor-creates-output-test.wkt"); - File.Delete(filename); - - WktWriterSettings settings = new WktWriterSettings(); - using (WktWriter target = new WktWriter(filename, settings)) { - ; - } - - Assert.True(File.Exists(filename)); - } - - [Fact] - public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfStreamIsNull() { - string path = null; - Assert.Throws(() => new WktWriter(path, new WktWriterSettings())); - } - - [Fact] - public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() { - string path = PathHelper.GetTempFilePath("WktWriter-constructor-test.bin"); - - Assert.Throws(() => new WktWriter(path, null)); - } - - public static IEnumerable WriteToStringTestData { - get { - yield return new object[] { new Point(), "point empty" }; - yield return new object[] { new LineString(), "linestring empty" }; - yield return new object[] { new Polygon(), "polygon empty" }; - yield return new object[] { new MultiPoint(), "multipoint empty" }; - yield return new object[] { new MultiLineString(), "multilinestring empty" }; - yield return new object[] { new MultiPolygon(), "multipolygon empty" }; - yield return new object[] { new GeometryCollection(), "geometrycollection empty" }; - - } - } - - [Theory] - [MemberData(nameof(WriteToStringTestData))] - public void WriteToString_WritesAllGeometryTypes(Geometry toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = PathHelper.GetTempFilePath("wktwriter-closes-output-filestream-test.wkt"); - - WktWriterSettings settings = new WktWriterSettings(); - WktWriter target = new WktWriter(filename, settings); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToStream() { - MemoryStream stream = new MemoryStream(); - - WktWriter target = new WktWriter(stream, new WktWriterSettings()); - target.Dispose(); - - Assert.False(stream.CanRead); - } - - public static IEnumerable Write_WritesPointsOfAllDimensionsTestData { - get { - yield return new object[] { new Point(), "point empty" }; - yield return new object[] { new Point(_coordinatesXY[0]), "point (-10.1 15.5)" }; - yield return new object[] { new Point(_coordinatesXYM[0]), "point m (-10.1 15.5 1000.5)" }; - yield return new object[] { new Point(_coordinatesXYZ[0]), "point z (-10.1 15.5 100.5)" }; - yield return new object[] { new Point(_coordinatesXYZM[0]), "point zm (-10.1 15.5 100.5 1000.5)" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesPointsOfAllDimensionsTestData))] - public void Write_WritesPointsOfAllDimensions(Point toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - public static IEnumerable Write_WritesLinestringOfAllDimensionsTestData { - get { - yield return new object[] { new LineString(), "linestring empty" }; - yield return new object[] { new LineString(_coordinatesXY), "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)" }; - yield return new object[] { new LineString(_coordinatesXYM), "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)" }; - yield return new object[] { new LineString(_coordinatesXYZ), "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)" }; - yield return new object[] { new LineString(_coordinatesXYZM), "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesLinestringOfAllDimensionsTestData))] - public void Write_WritesLinestringsOfAllDimensions(LineString toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - public static IEnumerable Write_WritesPolygonsOfAllDimensionsTestData { - get { - yield return new object[] { new Polygon(), "polygon empty" }; - yield return new object[] { new Polygon(new CoordinateList(_coordinatesXY)), "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))" }; - yield return new object[] { new Polygon(new CoordinateList(_coordinatesXYM)), "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))" }; - yield return new object[] { new Polygon(new CoordinateList(_coordinatesXYZ)), "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))" }; - yield return new object[] { new Polygon(new CoordinateList(_coordinatesXYZM)), "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesPolygonsOfAllDimensionsTestData))] - public void Write_WritesPolygonsOfAllDimensions(Polygon toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - [Fact] - public void Write_WritesComplexPolygonWitOuterAndInnerRings() { - string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; - Polygon polygon = new Polygon(new CoordinateList(_coordinatesXYZM)); - polygon.InteriorRings.Add(new CoordinateList(_coordinates2XYZM)); - polygon.InteriorRings.Add(new CoordinateList(_coordinates2XYZM)); - - this.TestWriteGeometry(polygon, wkt); - } - - public static IEnumerable Write_WritesMultiPoinsOfAllDimensionsTestData { - get { - yield return new object[] { new MultiPoint(), "multipoint empty" }; - yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXY[0]), new Point(_coordinatesXY[1]) }), "multipoint ((-10.1 15.5),(20.2 -25.5))" }; - yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXYM[0]), new Point(_coordinatesXYM[1]) }), "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))" }; - yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXYZ[0]), new Point(_coordinatesXYZ[1]) }), "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))" }; - yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXYZM[0]), new Point(_coordinatesXYZM[1]) }), "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesMultiPoinsOfAllDimensionsTestData))] - public void Write_WritesMultiPointsOfAllDimensions(MultiPoint toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - public static IEnumerable Write_WritesMultiLineStringsOfAllDimensionsTestData { - get { - yield return new object[] { new MultiLineString(), "multilinestring empty" }; - yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXY), new LineString(_coordinatesXY) }), - "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))" }; - yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXYM), new LineString(_coordinatesXYM) }), - "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))" }; - yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXYZ), new LineString(_coordinatesXYZ) }), - "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))" }; - yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXYZM), new LineString(_coordinatesXYZM) }), - "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesMultiLineStringsOfAllDimensionsTestData))] - public void Write_WritesMultiLineStringsOfAllDimensions(MultiLineString toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - public static IEnumerable Write_WritesMultiPolygonsOfAllDimensionsTestData { - get { - yield return new object[] { new MultiPolygon(), "multipolygon empty" }; - yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXY)), new Polygon(new CoordinateList(_coordinatesXY)) }), - "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))" }; - yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXYM)), new Polygon(new CoordinateList(_coordinatesXYM)) }), - "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))" }; - yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXYZ)), new Polygon(new CoordinateList(_coordinatesXYZ)) }), - "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))" }; - yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXYZM)), new Polygon(new CoordinateList(_coordinatesXYZM)) }), - "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesMultiPolygonsOfAllDimensionsTestData))] - public void Write_WritesMultiPolygonsOfAllDimensions(MultiPolygon toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - public static IEnumerable Write_WritesGeometryCollectionOfAllDimensionsTestData { - get { - yield return new object[] { new GeometryCollection(), "geometrycollection empty" }; - yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXY[0]) }), "geometrycollection (point (-10.1 15.5))" }; - yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXYM[0]) }), "geometrycollection m (point m (-10.1 15.5 1000.5))" }; - yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXYZ[0]) }), "geometrycollection z (point z (-10.1 15.5 100.5))" }; - yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXYZM[0]) }), "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))" }; - } - } - - [Theory] - [MemberData(nameof(Write_WritesGeometryCollectionOfAllDimensionsTestData))] - public void Write_WritesGeometryCollectionOfAllDimensions(GeometryCollection toWrite, string expectedWkt) { - this.TestWriteGeometry(toWrite, expectedWkt); - } - - [Fact] - public void Write_WritesCollectionWithAllGeometryTypes() { - string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),multipoint empty,multilinestring empty,multipolygon empty)"; - GeometryCollection collection = new GeometryCollection(); - collection.Geometries.Add(new Point(_coordinatesXY[0])); - collection.Geometries.Add(new LineString(_coordinatesXY)); - collection.Geometries.Add(new Polygon(new CoordinateList(_coordinatesXY))); - collection.Geometries.Add(new MultiPoint()); - collection.Geometries.Add(new MultiLineString()); - collection.Geometries.Add(new MultiPolygon()); - - this.TestWriteGeometry(collection, wkt); - } - - [Fact] - public void Write_WritesNestedCollection() { - string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; - GeometryCollection collection = new GeometryCollection(); - GeometryCollection nested = new GeometryCollection(); - nested.Geometries.Add(new Point(_coordinatesXY[0])); - collection.Geometries.Add(nested); - - this.TestWriteGeometry(collection, wkt); - } - - private void TestWriteGeometry(IGeometry geometry, string expectedWkt) { - MemoryStream stream = new MemoryStream(); - using (WktWriter writer = new WktWriter(stream, new WktWriterSettings())) { - writer.Write(geometry); - } - - using (TextReader tr = new StreamReader(new MemoryStream(stream.ToArray()))) { - string wkt = tr.ReadToEnd(); - Assert.Equal(expectedWkt, wkt, StringComparer.OrdinalIgnoreCase); - } - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using SpatialLite.Core.IO; +using System; +using System.Collections.Generic; +using System.IO; +using Xunit; + +namespace Tests.SpatialLite.Core.IO; + +public class WktWriterTests +{ + + + private static readonly Coordinate[] _coordinatesXY = new Coordinate[] { + new Coordinate(-10.1, 15.5), new Coordinate(20.2, -25.5), new Coordinate(30.3, 35.5) + }; + + private static readonly Coordinate[] _coordinatesXYZ = new Coordinate[] { + new Coordinate(-10.1, 15.5, 100.5), new Coordinate(20.2, -25.5, 200.5), new Coordinate(30.3, 35.5, -300.5) + }; + + private static readonly Coordinate[] _coordinatesXYM = new Coordinate[] { + new Coordinate(-10.1, 15.5, double.NaN, 1000.5), new Coordinate(20.2, -25.5, double.NaN, 2000.5), new Coordinate(30.3, 35.5, double.NaN, -3000.5) + }; + + private static readonly Coordinate[] _coordinatesXYZM = new Coordinate[] { + new Coordinate(-10.1, 15.5, 100.5, 1000.5), new Coordinate(20.2, -25.5, 200.5, 2000.5), new Coordinate(30.3, 35.5, -300.5, -3000.5) + }; + + private static readonly Coordinate[] _coordinates2XYZM = new Coordinate[] { + new Coordinate(-1.1, 1.5, 10.5, 100.5), new Coordinate(2.2, -2.5, 20.5, 200.5), new Coordinate(3.3, 3.5, -30.5, -300.5) + }; + + [Fact] + public void Construcotor_StreamSettings_SetsSettingsAndMakeThemReadOnly() + { + WktWriterSettings settings = new WktWriterSettings(); + using (WktWriter target = new WktWriter(new MemoryStream(), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfStreamIsNull() + { + Stream stream = null; + Assert.Throws(() => new WktWriter(stream, new WktWriterSettings())); + } + + [Fact] + public void Constructor_StreamSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() + { + Assert.Throws(() => new WktWriter(new MemoryStream(), null)); + } + + [Fact] + public void Construcotor_PathSettings_SetsSettingsAndMakeThemReadOnly() + { + WktWriterSettings settings = new WktWriterSettings(); + using (WktWriter target = new WktWriter(new MemoryStream(), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_PathSettings_CreatesOutputFile() + { + string filename = PathHelper.GetTempFilePath("wktwriter-constructor-creates-output-test.wkt"); + File.Delete(filename); + + WktWriterSettings settings = new WktWriterSettings(); + using (WktWriter target = new WktWriter(filename, settings)) + { + ; + } + + Assert.True(File.Exists(filename)); + } + + [Fact] + public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfStreamIsNull() + { + string path = null; + Assert.Throws(() => new WktWriter(path, new WktWriterSettings())); + } + + [Fact] + public void Constructor_PathSettings_ThrowsArgumentNullExceptionIfSettingsIsNull() + { + string path = PathHelper.GetTempFilePath("WktWriter-constructor-test.bin"); + + Assert.Throws(() => new WktWriter(path, null)); + } + + public static IEnumerable WriteToStringTestData + { + get + { + yield return new object[] { new Point(), "point empty" }; + yield return new object[] { new LineString(), "linestring empty" }; + yield return new object[] { new Polygon(), "polygon empty" }; + yield return new object[] { new MultiPoint(), "multipoint empty" }; + yield return new object[] { new MultiLineString(), "multilinestring empty" }; + yield return new object[] { new MultiPolygon(), "multipolygon empty" }; + yield return new object[] { new GeometryCollection(), "geometrycollection empty" }; + + } + } + + [Theory] + [MemberData(nameof(WriteToStringTestData))] + public void WriteToString_WritesAllGeometryTypes(Geometry toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = PathHelper.GetTempFilePath("wktwriter-closes-output-filestream-test.wkt"); + + WktWriterSettings settings = new WktWriterSettings(); + WktWriter target = new WktWriter(filename, settings); + target.Dispose(); + FileStream testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToStream() + { + MemoryStream stream = new MemoryStream(); + + WktWriter target = new WktWriter(stream, new WktWriterSettings()); + target.Dispose(); + + Assert.False(stream.CanRead); + } + + public static IEnumerable Write_WritesPointsOfAllDimensionsTestData + { + get + { + yield return new object[] { new Point(), "point empty" }; + yield return new object[] { new Point(_coordinatesXY[0]), "point (-10.1 15.5)" }; + yield return new object[] { new Point(_coordinatesXYM[0]), "point m (-10.1 15.5 1000.5)" }; + yield return new object[] { new Point(_coordinatesXYZ[0]), "point z (-10.1 15.5 100.5)" }; + yield return new object[] { new Point(_coordinatesXYZM[0]), "point zm (-10.1 15.5 100.5 1000.5)" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesPointsOfAllDimensionsTestData))] + public void Write_WritesPointsOfAllDimensions(Point toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + public static IEnumerable Write_WritesLinestringOfAllDimensionsTestData + { + get + { + yield return new object[] { new LineString(), "linestring empty" }; + yield return new object[] { new LineString(_coordinatesXY), "linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5)" }; + yield return new object[] { new LineString(_coordinatesXYM), "linestring m (-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)" }; + yield return new object[] { new LineString(_coordinatesXYZ), "linestring z (-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)" }; + yield return new object[] { new LineString(_coordinatesXYZM), "linestring zm (-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesLinestringOfAllDimensionsTestData))] + public void Write_WritesLinestringsOfAllDimensions(LineString toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + public static IEnumerable Write_WritesPolygonsOfAllDimensionsTestData + { + get + { + yield return new object[] { new Polygon(), "polygon empty" }; + yield return new object[] { new Polygon(new CoordinateList(_coordinatesXY)), "polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5))" }; + yield return new object[] { new Polygon(new CoordinateList(_coordinatesXYM)), "polygon m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))" }; + yield return new object[] { new Polygon(new CoordinateList(_coordinatesXYZ)), "polygon z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))" }; + yield return new object[] { new Polygon(new CoordinateList(_coordinatesXYZM)), "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesPolygonsOfAllDimensionsTestData))] + public void Write_WritesPolygonsOfAllDimensions(Polygon toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + [Fact] + public void Write_WritesComplexPolygonWitOuterAndInnerRings() + { + string wkt = "polygon zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5),(-1.1 1.5 10.5 100.5, 2.2 -2.5 20.5 200.5, 3.3 3.5 -30.5 -300.5))"; + Polygon polygon = new Polygon(new CoordinateList(_coordinatesXYZM)); + polygon.InteriorRings.Add(new CoordinateList(_coordinates2XYZM)); + polygon.InteriorRings.Add(new CoordinateList(_coordinates2XYZM)); + + TestWriteGeometry(polygon, wkt); + } + + public static IEnumerable Write_WritesMultiPoinsOfAllDimensionsTestData + { + get + { + yield return new object[] { new MultiPoint(), "multipoint empty" }; + yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXY[0]), new Point(_coordinatesXY[1]) }), "multipoint ((-10.1 15.5),(20.2 -25.5))" }; + yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXYM[0]), new Point(_coordinatesXYM[1]) }), "multipoint m ((-10.1 15.5 1000.5),(20.2 -25.5 2000.5))" }; + yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXYZ[0]), new Point(_coordinatesXYZ[1]) }), "multipoint z ((-10.1 15.5 100.5),(20.2 -25.5 200.5))" }; + yield return new object[] { new MultiPoint(new Point[] { new Point(_coordinatesXYZM[0]), new Point(_coordinatesXYZM[1]) }), "multipoint zm ((-10.1 15.5 100.5 1000.5),(20.2 -25.5 200.5 2000.5))" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesMultiPoinsOfAllDimensionsTestData))] + public void Write_WritesMultiPointsOfAllDimensions(MultiPoint toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + public static IEnumerable Write_WritesMultiLineStringsOfAllDimensionsTestData + { + get + { + yield return new object[] { new MultiLineString(), "multilinestring empty" }; + yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXY), new LineString(_coordinatesXY) }), + "multilinestring ((-10.1 15.5, 20.2 -25.5, 30.3 35.5),(-10.1 15.5, 20.2 -25.5, 30.3 35.5))" }; + yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXYM), new LineString(_coordinatesXYM) }), + "multilinestring m ((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5),(-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5))" }; + yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXYZ), new LineString(_coordinatesXYZ) }), + "multilinestring z ((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5),(-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5))" }; + yield return new object[] { new MultiLineString(new LineString[] { new LineString(_coordinatesXYZM), new LineString(_coordinatesXYZM) }), + "multilinestring zm ((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5),(-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5))" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesMultiLineStringsOfAllDimensionsTestData))] + public void Write_WritesMultiLineStringsOfAllDimensions(MultiLineString toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + public static IEnumerable Write_WritesMultiPolygonsOfAllDimensionsTestData + { + get + { + yield return new object[] { new MultiPolygon(), "multipolygon empty" }; + yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXY)), new Polygon(new CoordinateList(_coordinatesXY)) }), + "multipolygon (((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),((-10.1 15.5, 20.2 -25.5, 30.3 35.5)))" }; + yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXYM)), new Polygon(new CoordinateList(_coordinatesXYM)) }), + "multipolygon m (((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)),((-10.1 15.5 1000.5, 20.2 -25.5 2000.5, 30.3 35.5 -3000.5)))" }; + yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXYZ)), new Polygon(new CoordinateList(_coordinatesXYZ)) }), + "multipolygon z (((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)),((-10.1 15.5 100.5, 20.2 -25.5 200.5, 30.3 35.5 -300.5)))" }; + yield return new object[] { new MultiPolygon(new Polygon[] { new Polygon(new CoordinateList(_coordinatesXYZM)), new Polygon(new CoordinateList(_coordinatesXYZM)) }), + "multipolygon zm (((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)),((-10.1 15.5 100.5 1000.5, 20.2 -25.5 200.5 2000.5, 30.3 35.5 -300.5 -3000.5)))" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesMultiPolygonsOfAllDimensionsTestData))] + public void Write_WritesMultiPolygonsOfAllDimensions(MultiPolygon toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + public static IEnumerable Write_WritesGeometryCollectionOfAllDimensionsTestData + { + get + { + yield return new object[] { new GeometryCollection(), "geometrycollection empty" }; + yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXY[0]) }), "geometrycollection (point (-10.1 15.5))" }; + yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXYM[0]) }), "geometrycollection m (point m (-10.1 15.5 1000.5))" }; + yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXYZ[0]) }), "geometrycollection z (point z (-10.1 15.5 100.5))" }; + yield return new object[] { new GeometryCollection(new Geometry[] { new Point(_coordinatesXYZM[0]) }), "geometrycollection zm (point zm (-10.1 15.5 100.5 1000.5))" }; + } + } + + [Theory] + [MemberData(nameof(Write_WritesGeometryCollectionOfAllDimensionsTestData))] + public void Write_WritesGeometryCollectionOfAllDimensions(GeometryCollection toWrite, string expectedWkt) + { + TestWriteGeometry(toWrite, expectedWkt); + } + + [Fact] + public void Write_WritesCollectionWithAllGeometryTypes() + { + string wkt = "geometrycollection (point (-10.1 15.5),linestring (-10.1 15.5, 20.2 -25.5, 30.3 35.5),polygon ((-10.1 15.5, 20.2 -25.5, 30.3 35.5)),multipoint empty,multilinestring empty,multipolygon empty)"; + GeometryCollection collection = new GeometryCollection(); + collection.Geometries.Add(new Point(_coordinatesXY[0])); + collection.Geometries.Add(new LineString(_coordinatesXY)); + collection.Geometries.Add(new Polygon(new CoordinateList(_coordinatesXY))); + collection.Geometries.Add(new MultiPoint()); + collection.Geometries.Add(new MultiLineString()); + collection.Geometries.Add(new MultiPolygon()); + + TestWriteGeometry(collection, wkt); + } + + [Fact] + public void Write_WritesNestedCollection() + { + string wkt = "geometrycollection (geometrycollection (point (-10.1 15.5)))"; + GeometryCollection collection = new GeometryCollection(); + GeometryCollection nested = new GeometryCollection(); + nested.Geometries.Add(new Point(_coordinatesXY[0])); + collection.Geometries.Add(nested); + + TestWriteGeometry(collection, wkt); + } + + private void TestWriteGeometry(IGeometry geometry, string expectedWkt) + { + MemoryStream stream = new MemoryStream(); + using (WktWriter writer = new WktWriter(stream, new WktWriterSettings())) + { + writer.Write(geometry); + } + + using (TextReader tr = new StreamReader(new MemoryStream(stream.ToArray()))) + { + string wkt = tr.ReadToEnd(); + Assert.Equal(expectedWkt, wkt, StringComparer.OrdinalIgnoreCase); + } + } +} diff --git a/src/Tests.SpatialLite.Core/MeasurementsTests.cs b/src/Tests.SpatialLite.Core/MeasurementsTests.cs index 424dd01..f1a9178 100644 --- a/src/Tests.SpatialLite.Core/MeasurementsTests.cs +++ b/src/Tests.SpatialLite.Core/MeasurementsTests.cs @@ -1,274 +1,290 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Xunit; -using Moq; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Core.Geometries; -using SpatialLite.Core.Algorithms; - -namespace Tests.SpatialLite.Core { - public class MeasurementsTests { - - [Fact] - public void Euclidean2D_GetsInstanceOfMeasuremntsWithTheEuclidean2DCalculator() { - Assert.IsType(Measurements.Euclidean2D.DimensionsCalculator); - } - - [Fact] - public void Sphere2D_GetsInstanceOfMeasuremntsWithTheSphere2DCalculator() { - Assert.IsType(Measurements.Sphere2D.DimensionsCalculator); - } - - [Fact] - public void Constructor_SetsCalculatorObject() { - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - - Assert.Same(calculatorM.Object, target.DimensionsCalculator); - } - - [Fact] - public void ComputeDistance_CoordinateCoordinate_CallsIDistanceCalculatorWithCorrectParameters() { - Coordinate c1 = new Coordinate(10.1, 20.1); - Coordinate c2 = new Coordinate(10.2, 20.2); - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(c1, c2); - - calculatorM.Verify(calc => calc.CalculateDistance(c1, c2), Times.Once()); - } - - [Fact] - public void ComputeDistance_PointPoint_ReturnsNaNIfPoint1IsEmpty() { - Point p1 = new Point(Coordinate.Empty); - Point p2 = new Point(new Coordinate(10.2, 20.2)); - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(p1, p2); - - Assert.True(double.IsNaN(distance)); - } - - [Fact] - public void ComputeDistance_PointPoint_ReturnsNaNIfPoint2IsEmpty() { - Point p1 = new Point(new Coordinate(10.1, 20.1)); - Point p2 = new Point(Coordinate.Empty); - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(p1, p2); - - Assert.True(double.IsNaN(distance)); - } - - [Fact] - public void ComputeDistance_PointPoint_CallsIDistanceCalculatorWithCorrectParameters() { - Point p1 = new Point(new Coordinate(10.1, 20.1)); - Point p2 = new Point(new Coordinate(10.2, 20.2)); - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(p1, p2); - - calculatorM.Verify(calc => calc.CalculateDistance(p1.Position, p2.Position), Times.Once()); - } - - [Fact] - public void ComputeDistance_PointLineString_ReturnsNaNIfLineStringIsEmpty() { - Point point = new Point(new Coordinate(10.1, 20.1)); - LineString linestring = new LineString(); - - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(point, linestring); - - Assert.True(double.IsNaN(distance)); - } - - [Fact] - public void ComputeDistance_PointLineString_ReturnsNaNIfPointIsEmpty() { - Point point = new Point(Coordinate.Empty); - LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); - - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(point, linestring); - - Assert.True(double.IsNaN(distance)); - } - - [Fact] - public void ComputeDistance_PointMultiLineString_ReturnsNaNIfMultiLineStringIsEmpty() { - Point point = new Point(new Coordinate(10.1, 20.1)); - MultiLineString multilinestring = new MultiLineString(); - - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(point, multilinestring); - - Assert.True(double.IsNaN(distance)); - } - - [Fact] - public void ComputeDistance_PointMultiLineString_ReturnsNaNIfPointIsEmpty() { - Point point = new Point(Coordinate.Empty); - LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); - MultiLineString multilinestring = new MultiLineString(new LineString[] { linestring, linestring }); - - Mock calculatorM = new Mock(); - - Measurements target = new Measurements(calculatorM.Object); - double distance = target.ComputeDistance(point, multilinestring); - - Assert.True(double.IsNaN(distance)); - } - - [Fact] - public void ComputeLength_LineString_RetursZeroForLineStringWithoutPoints() { - LineString linestring = new LineString(); - - Mock calculatorM = new Mock(); - Measurements target = new Measurements(calculatorM.Object); - - double length = target.ComputeLength(linestring); - - Assert.Equal(0, length); - } - - [Fact] - public void ComputeLength_LineString_RetursZeroForLineStringWithoutOne() { - LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1) }); - - Mock calculatorM = new Mock(); - Measurements target = new Measurements(calculatorM.Object); - - double length = target.ComputeLength(linestring); - - Assert.Equal(0, length); - } - - [Fact] - public void ComputeLength_LineString_RetursSumOfSegmentsLengths() { - Random generator = new Random(); - double segment1Length = generator.Next(100); - double segment2Length = generator.Next(100); - double sum = segment1Length + segment2Length; - - LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); - Mock calculatorM = new Mock(); - calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[0], linestring.Coordinates[1])).Returns(segment1Length); - calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[1], linestring.Coordinates[2])).Returns(segment2Length); - - Measurements target = new Measurements(calculatorM.Object); - double length = target.ComputeLength(linestring); - - Assert.Equal(sum, length); - } - - [Fact] - public void ComputeLength_MultiLineString_RetursZeroForMultiLineStringWithoutMembers() { - MultiLineString multilinestring = new MultiLineString(); - - Mock calculatorM = new Mock(); - Measurements target = new Measurements(calculatorM.Object); - - double length = target.ComputeLength(multilinestring); - - Assert.Equal(0, length); - } - - [Fact] - public void ComputeLength_MultiLineString_RetursSumOfLineStringsLengths() { - Random generator = new Random(); - double segment1Length = generator.Next(100); - double segment2Length = generator.Next(100); - double sum = 2 * (segment1Length + segment2Length); - - LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); - MultiLineString multilinestring = new MultiLineString(new LineString[] { linestring, linestring }); - - Mock calculatorM = new Mock(); - calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[0], linestring.Coordinates[1])).Returns(segment1Length); - calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[1], linestring.Coordinates[2])).Returns(segment2Length); - - Measurements target = new Measurements(calculatorM.Object); - double length = target.ComputeLength(multilinestring); - - Assert.Equal(sum, length); - } - - [Fact] - public void ComputeArea_IPolygon_ReturnsAreaOfSimplePolygonCalculatedByIDimensionsCalculator() { - Polygon polygon = new Polygon(new CoordinateList()); - Random generator = new Random(); - double expectedArea = generator.Next(100); - - Mock calculatorM = new Mock(); - calculatorM.Setup(calc => calc.CalculateArea(polygon.ExteriorRing)).Returns(expectedArea); - Measurements target = new Measurements(calculatorM.Object); - - double area = target.ComputeArea(polygon); - - Assert.Equal(expectedArea, area); - } - - [Fact] - public void ComputeArea_IPolygon_ReturnsAreaOfPolygonWithoutHolesCalculatedByIDimensionsCalculator() { - // Create polygon with interior ring - Polygon polygon = new Polygon(new CoordinateList()); - polygon.InteriorRings.Add(new CoordinateList()); - - // Fixed test values - double exteriorArea = 50; - double interiorArea = 10; - double expectedArea = exteriorArea - interiorArea; - - // Setup mock - Mock calculatorM = new Mock(); - calculatorM.Setup(calc => calc.CalculateArea(It.IsAny())) - .Returns(coords => { - if (coords == polygon.ExteriorRing) return exteriorArea; - if (coords == polygon.InteriorRings[0]) return interiorArea; - return 0; - }); - - // Create the object being tested - Measurements target = new Measurements(calculatorM.Object); - - // Execute the method being tested - double area = target.ComputeArea(polygon); - - // Verify the result - Assert.Equal(expectedArea, area); - } - - [Fact] - public void ComputeArea_IMultiPolygon_ReturnsSumOfPolygonAreas() { - Random generator = new Random(); - - Polygon polygon = new Polygon(new CoordinateList()); - double polygonArea = generator.Next(100); - MultiPolygon multipolygon = new MultiPolygon(new Polygon[] { polygon, polygon }); - - Mock calculatorM = new Mock(); - calculatorM.Setup(calc => calc.CalculateArea(polygon.ExteriorRing)).Returns(() => polygonArea); - - Measurements target = new Measurements(calculatorM.Object); - - double area = target.ComputeArea(multipolygon); - - Assert.Equal(2 * polygonArea, area); - } - } -} \ No newline at end of file +using Moq; +using SpatialLite.Core; +using SpatialLite.Core.Algorithms; +using SpatialLite.Core.API; +using SpatialLite.Core.Geometries; +using System; +using Xunit; + +namespace Tests.SpatialLite.Core; + +public class MeasurementsTests +{ + + [Fact] + public void Euclidean2D_GetsInstanceOfMeasuremntsWithTheEuclidean2DCalculator() + { + Assert.IsType(Measurements.Euclidean2D.DimensionsCalculator); + } + + [Fact] + public void Sphere2D_GetsInstanceOfMeasuremntsWithTheSphere2DCalculator() + { + Assert.IsType(Measurements.Sphere2D.DimensionsCalculator); + } + + [Fact] + public void Constructor_SetsCalculatorObject() + { + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + + Assert.Same(calculatorM.Object, target.DimensionsCalculator); + } + + [Fact] + public void ComputeDistance_CoordinateCoordinate_CallsIDistanceCalculatorWithCorrectParameters() + { + Coordinate c1 = new Coordinate(10.1, 20.1); + Coordinate c2 = new Coordinate(10.2, 20.2); + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(c1, c2); + + calculatorM.Verify(calc => calc.CalculateDistance(c1, c2), Times.Once()); + } + + [Fact] + public void ComputeDistance_PointPoint_ReturnsNaNIfPoint1IsEmpty() + { + Point p1 = new Point(Coordinate.Empty); + Point p2 = new Point(new Coordinate(10.2, 20.2)); + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(p1, p2); + + Assert.True(double.IsNaN(distance)); + } + + [Fact] + public void ComputeDistance_PointPoint_ReturnsNaNIfPoint2IsEmpty() + { + Point p1 = new Point(new Coordinate(10.1, 20.1)); + Point p2 = new Point(Coordinate.Empty); + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(p1, p2); + + Assert.True(double.IsNaN(distance)); + } + + [Fact] + public void ComputeDistance_PointPoint_CallsIDistanceCalculatorWithCorrectParameters() + { + Point p1 = new Point(new Coordinate(10.1, 20.1)); + Point p2 = new Point(new Coordinate(10.2, 20.2)); + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(p1, p2); + + calculatorM.Verify(calc => calc.CalculateDistance(p1.Position, p2.Position), Times.Once()); + } + + [Fact] + public void ComputeDistance_PointLineString_ReturnsNaNIfLineStringIsEmpty() + { + Point point = new Point(new Coordinate(10.1, 20.1)); + LineString linestring = new LineString(); + + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(point, linestring); + + Assert.True(double.IsNaN(distance)); + } + + [Fact] + public void ComputeDistance_PointLineString_ReturnsNaNIfPointIsEmpty() + { + Point point = new Point(Coordinate.Empty); + LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); + + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(point, linestring); + + Assert.True(double.IsNaN(distance)); + } + + [Fact] + public void ComputeDistance_PointMultiLineString_ReturnsNaNIfMultiLineStringIsEmpty() + { + Point point = new Point(new Coordinate(10.1, 20.1)); + MultiLineString multilinestring = new MultiLineString(); + + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(point, multilinestring); + + Assert.True(double.IsNaN(distance)); + } + + [Fact] + public void ComputeDistance_PointMultiLineString_ReturnsNaNIfPointIsEmpty() + { + Point point = new Point(Coordinate.Empty); + LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); + MultiLineString multilinestring = new MultiLineString(new LineString[] { linestring, linestring }); + + Mock calculatorM = new Mock(); + + Measurements target = new Measurements(calculatorM.Object); + double distance = target.ComputeDistance(point, multilinestring); + + Assert.True(double.IsNaN(distance)); + } + + [Fact] + public void ComputeLength_LineString_RetursZeroForLineStringWithoutPoints() + { + LineString linestring = new LineString(); + + Mock calculatorM = new Mock(); + Measurements target = new Measurements(calculatorM.Object); + + double length = target.ComputeLength(linestring); + + Assert.Equal(0, length); + } + + [Fact] + public void ComputeLength_LineString_RetursZeroForLineStringWithoutOne() + { + LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1) }); + + Mock calculatorM = new Mock(); + Measurements target = new Measurements(calculatorM.Object); + + double length = target.ComputeLength(linestring); + + Assert.Equal(0, length); + } + + [Fact] + public void ComputeLength_LineString_RetursSumOfSegmentsLengths() + { + Random generator = new Random(); + double segment1Length = generator.Next(100); + double segment2Length = generator.Next(100); + double sum = segment1Length + segment2Length; + + LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); + Mock calculatorM = new Mock(); + calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[0], linestring.Coordinates[1])).Returns(segment1Length); + calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[1], linestring.Coordinates[2])).Returns(segment2Length); + + Measurements target = new Measurements(calculatorM.Object); + double length = target.ComputeLength(linestring); + + Assert.Equal(sum, length); + } + + [Fact] + public void ComputeLength_MultiLineString_RetursZeroForMultiLineStringWithoutMembers() + { + MultiLineString multilinestring = new MultiLineString(); + + Mock calculatorM = new Mock(); + Measurements target = new Measurements(calculatorM.Object); + + double length = target.ComputeLength(multilinestring); + + Assert.Equal(0, length); + } + + [Fact] + public void ComputeLength_MultiLineString_RetursSumOfLineStringsLengths() + { + Random generator = new Random(); + double segment1Length = generator.Next(100); + double segment2Length = generator.Next(100); + double sum = 2 * (segment1Length + segment2Length); + + LineString linestring = new LineString(new Coordinate[] { new Coordinate(10.1, 20.1), new Coordinate(10.2, 20.2), new Coordinate(10.3, 20.3) }); + MultiLineString multilinestring = new MultiLineString(new LineString[] { linestring, linestring }); + + Mock calculatorM = new Mock(); + calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[0], linestring.Coordinates[1])).Returns(segment1Length); + calculatorM.Setup(calc => calc.CalculateDistance(linestring.Coordinates[1], linestring.Coordinates[2])).Returns(segment2Length); + + Measurements target = new Measurements(calculatorM.Object); + double length = target.ComputeLength(multilinestring); + + Assert.Equal(sum, length); + } + + [Fact] + public void ComputeArea_IPolygon_ReturnsAreaOfSimplePolygonCalculatedByIDimensionsCalculator() + { + Polygon polygon = new Polygon(new CoordinateList()); + Random generator = new Random(); + double expectedArea = generator.Next(100); + + Mock calculatorM = new Mock(); + calculatorM.Setup(calc => calc.CalculateArea(polygon.ExteriorRing)).Returns(expectedArea); + Measurements target = new Measurements(calculatorM.Object); + + double area = target.ComputeArea(polygon); + + Assert.Equal(expectedArea, area); + } + + [Fact] + public void ComputeArea_IPolygon_ReturnsAreaOfPolygonWithoutHolesCalculatedByIDimensionsCalculator() + { + // Create polygon with interior ring + Polygon polygon = new Polygon(new CoordinateList()); + polygon.InteriorRings.Add(new CoordinateList()); + + // Fixed test values + double exteriorArea = 50; + double interiorArea = 10; + double expectedArea = exteriorArea - interiorArea; + + // Setup mock + Mock calculatorM = new Mock(); + calculatorM.Setup(calc => calc.CalculateArea(It.IsAny())) + .Returns(coords => + { + if (coords == polygon.ExteriorRing) return exteriorArea; + if (coords == polygon.InteriorRings[0]) return interiorArea; + return 0; + }); + + // Create the object being tested + Measurements target = new Measurements(calculatorM.Object); + + // Execute the method being tested + double area = target.ComputeArea(polygon); + + // Verify the result + Assert.Equal(expectedArea, area); + } + + [Fact] + public void ComputeArea_IMultiPolygon_ReturnsSumOfPolygonAreas() + { + Random generator = new Random(); + + Polygon polygon = new Polygon(new CoordinateList()); + double polygonArea = generator.Next(100); + MultiPolygon multipolygon = new MultiPolygon(new Polygon[] { polygon, polygon }); + + Mock calculatorM = new Mock(); + calculatorM.Setup(calc => calc.CalculateArea(polygon.ExteriorRing)).Returns(() => polygonArea); + + Measurements target = new Measurements(calculatorM.Object); + + double area = target.ComputeArea(multipolygon); + + Assert.Equal(2 * polygonArea, area); + } +} diff --git a/src/Tests.SpatialLite.Core/PathHelper.cs b/src/Tests.SpatialLite.Core/PathHelper.cs index ae77de6..1589e87 100644 --- a/src/Tests.SpatialLite.Core/PathHelper.cs +++ b/src/Tests.SpatialLite.Core/PathHelper.cs @@ -1,23 +1,27 @@ -using System.IO; - -namespace Tests.SpatialLite.Core { - static class PathHelper { - private const string TempDirectoryName = "Temp"; - - private static string _realGpxFilePath = Path.GetFullPath(Path.Combine("Data", "Gpx", "gpx-real-file.gpx")); - public static string RealGpxFilePath => _realGpxFilePath; - - public static string GetTempFilePath(string filename) { - if (!Directory.Exists(TempDirectoryName)) { - Directory.CreateDirectory(TempDirectoryName); - } - - string pbfFile = Path.GetFullPath(Path.Combine(TempDirectoryName, filename)); - if (File.Exists(pbfFile)) { - File.Delete(pbfFile); - } - - return pbfFile; - } - } -} +using System.IO; + +namespace Tests.SpatialLite.Core; + +internal static class PathHelper +{ + private const string TempDirectoryName = "Temp"; + + private static readonly string _realGpxFilePath = Path.GetFullPath(Path.Combine("Data", "Gpx", "gpx-real-file.gpx")); + public static string RealGpxFilePath => _realGpxFilePath; + + public static string GetTempFilePath(string filename) + { + if (!Directory.Exists(TempDirectoryName)) + { + Directory.CreateDirectory(TempDirectoryName); + } + + string pbfFile = Path.GetFullPath(Path.Combine(TempDirectoryName, filename)); + if (File.Exists(pbfFile)) + { + File.Delete(pbfFile); + } + + return pbfFile; + } +} diff --git a/src/Tests.SpatialLite.Core/Properties/AssemblyInfo.cs b/src/Tests.SpatialLite.Core/Properties/AssemblyInfo.cs index dea17a6..05a42b6 100644 --- a/src/Tests.SpatialLite.Core/Properties/AssemblyInfo.cs +++ b/src/Tests.SpatialLite.Core/Properties/AssemblyInfo.cs @@ -1,19 +1,18 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Tests.SpatialLite.Core")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f22d4fd4-c5de-4e97-87aa-fa5b85507ee6")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tests.SpatialLite.Core")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f22d4fd4-c5de-4e97-87aa-fa5b85507ee6")] diff --git a/src/Tests.SpatialLite.Core/TopologyTests.cs b/src/Tests.SpatialLite.Core/TopologyTests.cs index 83cde37..eb68a40 100644 --- a/src/Tests.SpatialLite.Core/TopologyTests.cs +++ b/src/Tests.SpatialLite.Core/TopologyTests.cs @@ -1,22 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Core.Algorithms; - -using Xunit; -using Moq; - -namespace Tests.SpatialLite.Core { - public class TopologyTests { - - [Fact] - public void Euclidean2D_GetTopologyInstanceWithEuclidean2DLocator() { - Assert.IsType(Topology.Euclidean2D.GeometryLocator); - } - - } -} +using SpatialLite.Core; +using SpatialLite.Core.Algorithms; +using Xunit; + +namespace Tests.SpatialLite.Core; + +public class TopologyTests +{ + + [Fact] + public void Euclidean2D_GetTopologyInstanceWithEuclidean2DLocator() + { + Assert.IsType(Topology.Euclidean2D.GeometryLocator); + } +} diff --git a/src/Tests.SpatialLite.Gps/Data/TestDataReader.cs b/src/Tests.SpatialLite.Gps/Data/TestDataReader.cs index 33c3022..d60da25 100644 --- a/src/Tests.SpatialLite.Gps/Data/TestDataReader.cs +++ b/src/Tests.SpatialLite.Gps/Data/TestDataReader.cs @@ -1,20 +1,23 @@ -using System.IO; -using System.Reflection; - -namespace Tests.SpatialLite.Gps.Data { - public static class TestDataReader { - public static Stream Open(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream("Tests.SpatialLite.Gps.Data.Gpx." + name); - } - - public static byte[] Read(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - - var stream = new MemoryStream(); - assembly.GetManifestResourceStream("Tests.SpatialLite.Gps.Data.Gpx." + name).CopyTo(stream); - - return stream.ToArray(); - } - } -} +using System.IO; +using System.Reflection; + +namespace Tests.SpatialLite.Gps.Data; + +public static class TestDataReader +{ + public static Stream Open(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + return assembly.GetManifestResourceStream("Tests.SpatialLite.Gps.Data.Gpx." + name); + } + + public static byte[] Read(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + + var stream = new MemoryStream(); + assembly.GetManifestResourceStream("Tests.SpatialLite.Gps.Data.Gpx." + name).CopyTo(stream); + + return stream.ToArray(); + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs index 2e29553..fc0a512 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpsPointTests.cs @@ -1,55 +1,57 @@ -using System; - -using Xunit; - -using SpatialLite.Gps.Geometries; -using SpatialLite.Core.API; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpsPointTests { - - double _xOrdinate = 3.5; - double _yOrdinate = 4.2; - double _zOrdinate = 10.5; - - Coordinate _coordinate; - - public GpsPointTests() { - _coordinate = new Coordinate(_xOrdinate, _yOrdinate, _zOrdinate); - } - - [Fact] - public void Constructor__CreatesPointWithEmptyPositionAndNullTimestamp() { - var target = new GpsPoint(); - - Assert.Equal(Coordinate.Empty, target.Position); - Assert.Null(target.Timestamp); - } - - [Fact] - public void Constructor_Coordinate_CreatesPointWithPositionAndNullTimestamp() { - var target = new GpsPoint(_coordinate); - - Assert.Equal(_coordinate, target.Position); - Assert.Null(target.Timestamp); - } - - [Fact] - public void Constructor_Coordinate_CreatesPointWithPositionAndTimestamp() { - var timestamp = DateTime.Now; - var target = new GpsPoint(_coordinate, timestamp); - - Assert.Equal(_coordinate, target.Position); - Assert.Equal(timestamp, target.Timestamp); - } - - [Fact] - public void Constructor_LonLatElevationTimestamp_CreatesPointWithPositionAndTimestamp() { - var timestamp = DateTime.Now; - var target = new GpsPoint(_xOrdinate, _yOrdinate, _zOrdinate, timestamp); - - Assert.Equal(_coordinate, target.Position); - Assert.Equal(timestamp, target.Timestamp); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Gps.Geometries; +using System; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpsPointTests +{ + private readonly double _xOrdinate = 3.5; + private readonly double _yOrdinate = 4.2; + private readonly double _zOrdinate = 10.5; + private Coordinate _coordinate; + + public GpsPointTests() + { + _coordinate = new Coordinate(_xOrdinate, _yOrdinate, _zOrdinate); + } + + [Fact] + public void Constructor__CreatesPointWithEmptyPositionAndNullTimestamp() + { + var target = new GpsPoint(); + + Assert.Equal(Coordinate.Empty, target.Position); + Assert.Null(target.Timestamp); + } + + [Fact] + public void Constructor_Coordinate_CreatesPointWithPositionAndNullTimestamp() + { + var target = new GpsPoint(_coordinate); + + Assert.Equal(_coordinate, target.Position); + Assert.Null(target.Timestamp); + } + + [Fact] + public void Constructor_Coordinate_CreatesPointWithPositionAndTimestamp() + { + var timestamp = DateTime.Now; + var target = new GpsPoint(_coordinate, timestamp); + + Assert.Equal(_coordinate, target.Position); + Assert.Equal(timestamp, target.Timestamp); + } + + [Fact] + public void Constructor_LonLatElevationTimestamp_CreatesPointWithPositionAndTimestamp() + { + var timestamp = DateTime.Now; + var target = new GpsPoint(_xOrdinate, _yOrdinate, _zOrdinate, timestamp); + + Assert.Equal(_coordinate, target.Position); + Assert.Equal(timestamp, target.Timestamp); + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs index 3fc778d..be3f4e5 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpsTrackBaseTests.cs @@ -1,59 +1,67 @@ -using System; -using System.Collections.Generic; - -using Xunit; -using SpatialLite.Gps.Geometries; -using SpatialLite.Core.Geometries; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpsTrackBaseTests { - List _points; - - public GpsTrackBaseTests() { - _points = new List { - new GpsPoint(16.5, 45.9, 100, new DateTime(2011, 2, 24, 20, 00, 00)), - new GpsPoint(16.6, 46.0, 110, new DateTime(2011, 2, 24, 20, 00, 10)), - new GpsPoint(16.5, 46.1, 200, new DateTime(2011, 2, 24, 20, 00, 20))}; - - } - - [Fact] - public void Constructor__CreatesEmptyGpsTrack() { - GpsTrackBase target = new GpsTrackBase(); - - Assert.Equal(0 ,target.Coordinates.Count); - } - - [Fact] - public void Constructor_IEnumerablePoints_CreatesGpsTrackWithPoints() { - - GpsTrackBase target = new GpsTrackBase(_points); - - Assert.Equal(_points.Count, target.Points.Count); - for (int i = 0; i < target.Points.Count; i++) { - Assert.Same(_points[i], target.Points[i]); - } - } - - [Fact] - public void Coordinates_GetsPositionOfPoints() { - GpsTrackBase target = new GpsTrackBase(_points); - - Assert.Equal(_points.Count, target.Coordinates.Count); - for (int i = 0; i < _points.Count; i++) { - Assert.Equal(_points[i].Position, target.Coordinates[i]); - } - } - - [Fact] - public void Coordinates_GetsPositionOfPointsIfWayCastedToLineString() { - GpsTrackBase line = new GpsTrackBase(_points); - LineString target = (LineString)line; - - Assert.Equal(_points.Count, target.Coordinates.Count); - for (int i = 0; i < _points.Count; i++) { - Assert.Equal(_points[i].Position, target.Coordinates[i]); - } - } - } -} +using SpatialLite.Core.Geometries; +using SpatialLite.Gps.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpsTrackBaseTests +{ + private readonly List _points; + + public GpsTrackBaseTests() + { + _points = new List { + new(16.5, 45.9, 100, new DateTime(2011, 2, 24, 20, 00, 00)), + new(16.6, 46.0, 110, new DateTime(2011, 2, 24, 20, 00, 10)), + new(16.5, 46.1, 200, new DateTime(2011, 2, 24, 20, 00, 20))}; + + } + + [Fact] + public void Constructor__CreatesEmptyGpsTrack() + { + GpsTrackBase target = new(); + + Assert.Equal(0, target.Coordinates.Count); + } + + [Fact] + public void Constructor_IEnumerablePoints_CreatesGpsTrackWithPoints() + { + + GpsTrackBase target = new(_points); + + Assert.Equal(_points.Count, target.Points.Count); + for (int i = 0; i < target.Points.Count; i++) + { + Assert.Same(_points[i], target.Points[i]); + } + } + + [Fact] + public void Coordinates_GetsPositionOfPoints() + { + GpsTrackBase target = new(_points); + + Assert.Equal(_points.Count, target.Coordinates.Count); + for (int i = 0; i < _points.Count; i++) + { + Assert.Equal(_points[i].Position, target.Coordinates[i]); + } + } + + [Fact] + public void Coordinates_GetsPositionOfPointsIfWayCastedToLineString() + { + GpsTrackBase line = new(_points); + LineString target = line; + + Assert.Equal(_points.Count, target.Coordinates.Count); + for (int i = 0; i < _points.Count; i++) + { + Assert.Equal(_points[i].Position, target.Coordinates[i]); + } + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxFixHelperTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxFixHelperTests.cs index 0119d04..0c6c700 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxFixHelperTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxFixHelperTests.cs @@ -1,41 +1,47 @@ -using System.Collections.Generic; -using SpatialLite.Gps.Geometries; -using Xunit; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxFixHelperTests { - public static IEnumerable GpsFixes { - get { - yield return new object[] { GpsFix.Dgps, "dgps" }; - yield return new object[] { GpsFix.Fix2D, "2d" }; - yield return new object[] { GpsFix.Fix3D, "3d" }; - yield return new object[] { GpsFix.None, "none" }; - yield return new object[] { GpsFix.Pps, "pps" }; - } - } - - [Theory] - [MemberData(nameof(GpsFixes))] - public void ParseGpsFix_ValidGpsFixes_ParsesStringValue(GpsFix expectedValue, string s) { - GpsFix? parsedValue = GpxFixHelper.ParseGpsFix(s); - - Assert.Equal(expectedValue, parsedValue); - } - - [Fact] - public void ParseGpsFix_InvalidValue_ReturnsNull() { - string invalidValue = "some other string"; - GpsFix? parsedValue = GpxFixHelper.ParseGpsFix(invalidValue); - - Assert.Null(parsedValue); - } - - [Theory] - [MemberData(nameof(GpsFixes))] - public void GpsFixToString_GpsFixes_ConvertsToStringEquivalents(GpsFix fix, string expectedValue) { - string strValue = GpxFixHelper.GpsFixToString(fix); - - Assert.Equal(expectedValue, strValue); - } - } -} +using SpatialLite.Gps.Geometries; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxFixHelperTests +{ + public static IEnumerable GpsFixes + { + get + { + yield return new object[] { GpsFix.Dgps, "dgps" }; + yield return new object[] { GpsFix.Fix2D, "2d" }; + yield return new object[] { GpsFix.Fix3D, "3d" }; + yield return new object[] { GpsFix.None, "none" }; + yield return new object[] { GpsFix.Pps, "pps" }; + } + } + + [Theory] + [MemberData(nameof(GpsFixes))] + public void ParseGpsFix_ValidGpsFixes_ParsesStringValue(GpsFix expectedValue, string s) + { + GpsFix? parsedValue = GpxFixHelper.ParseGpsFix(s); + + Assert.Equal(expectedValue, parsedValue); + } + + [Fact] + public void ParseGpsFix_InvalidValue_ReturnsNull() + { + string invalidValue = "some other string"; + GpsFix? parsedValue = GpxFixHelper.ParseGpsFix(invalidValue); + + Assert.Null(parsedValue); + } + + [Theory] + [MemberData(nameof(GpsFixes))] + public void GpsFixToString_GpsFixes_ConvertsToStringEquivalents(GpsFix fix, string expectedValue) + { + string strValue = GpxFixHelper.GpsFixToString(fix); + + Assert.Equal(expectedValue, strValue); + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxLinkTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxLinkTests.cs index 9c59ed3..ff3d5ea 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxLinkTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxLinkTests.cs @@ -1,17 +1,19 @@ -using System; -using Xunit; -using SpatialLite.Gps.Geometries; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxLinkTests { - - [Fact] - public void Constructor_Url_SetsUrl() { - Uri url = new Uri("http://spatial.litesolutions.net"); - - GpxLink target = new GpxLink(url); - - Assert.Same(url, target.Url); - } - } -} +using SpatialLite.Gps.Geometries; +using System; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxLinkTests +{ + + [Fact] + public void Constructor_Url_SetsUrl() + { + Uri url = new("http://spatial.litesolutions.net"); + + GpxLink target = new(url); + + Assert.Same(url, target.Url); + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxMetadataTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxMetadataTests.cs index a17b544..f4cc858 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxMetadataTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxMetadataTests.cs @@ -1,18 +1,20 @@ -using Xunit; - -using SpatialLite.Gps.Geometries; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxMetadataTests { - - [Fact] - public void Constructor_CreatesMetadataWithEmptyCollectionOfLinks() { - GpxMetadata target = new GpxMetadataWrapper(); - - Assert.Empty(target.Links); - } - } - - public class GpxMetadataWrapper : GpxMetadata { - } -} +using SpatialLite.Gps.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxMetadataTests +{ + + [Fact] + public void Constructor_CreatesMetadataWithEmptyCollectionOfLinks() + { + GpxMetadata target = new GpxMetadataWrapper(); + + Assert.Empty(target.Links); + } +} + +public class GpxMetadataWrapper : GpxMetadata +{ +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs index ea8035f..c068d7d 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxPointTests.cs @@ -1,62 +1,65 @@ -using System; - -using Xunit; - -using SpatialLite.Gps.Geometries; -using SpatialLite.Core.API; -using SpatialLite.Gps; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxPointTests { - - double _xOrdinate = 3.5; - double _yOrdinate = 4.2; - double _zOrdinate = 10.5; - - Coordinate _coordinate; - public GpxPointTests() { - _coordinate = new Coordinate(_xOrdinate, _yOrdinate, _zOrdinate); - } - - [Fact] - public void Constructor__CreatesPointWithEmptyPositionAndNullTimestamp() { - var target = new GpsPoint(); - - Assert.Equal(Coordinate.Empty, target.Position); - Assert.Null(target.Timestamp); - } - - [Fact] - public void Constructor_Coordinate_CreatesPointWithPositionAndNullTimestamp() { - var target = new GpxPoint(_coordinate); - - Assert.Equal(_coordinate, target.Position); - Assert.Null(target.Timestamp); - } - - [Fact] - public void Constructor_Coordinate_CreatesPointWithPositionAndTimestamp() { - var timestamp = DateTime.Now; - var target = new GpxPoint(_coordinate, timestamp); - - Assert.Equal(_coordinate, target.Position); - Assert.Equal(timestamp, target.Timestamp); - } - - [Fact] - public void Constructor_LonLatElevationTimestamp_CreatesPointWithPositionAndTimestamp() { - var timestamp = DateTime.Now; - var target = new GpxPoint(_xOrdinate, _yOrdinate, _zOrdinate, timestamp); - - Assert.Equal(_coordinate, target.Position); - Assert.Equal(timestamp, target.Timestamp); - } - - [Fact] - public void GeometryType_ReturnsWaypoint() { - GpxPoint target = new GpxPoint(); - - Assert.Equal(GpxGeometryType.Waypoint, target.GeometryType); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Gps; +using SpatialLite.Gps.Geometries; +using System; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxPointTests +{ + private readonly double _xOrdinate = 3.5; + private readonly double _yOrdinate = 4.2; + private readonly double _zOrdinate = 10.5; + private Coordinate _coordinate; + public GpxPointTests() + { + _coordinate = new Coordinate(_xOrdinate, _yOrdinate, _zOrdinate); + } + + [Fact] + public void Constructor__CreatesPointWithEmptyPositionAndNullTimestamp() + { + var target = new GpsPoint(); + + Assert.Equal(Coordinate.Empty, target.Position); + Assert.Null(target.Timestamp); + } + + [Fact] + public void Constructor_Coordinate_CreatesPointWithPositionAndNullTimestamp() + { + var target = new GpxPoint(_coordinate); + + Assert.Equal(_coordinate, target.Position); + Assert.Null(target.Timestamp); + } + + [Fact] + public void Constructor_Coordinate_CreatesPointWithPositionAndTimestamp() + { + var timestamp = DateTime.Now; + var target = new GpxPoint(_coordinate, timestamp); + + Assert.Equal(_coordinate, target.Position); + Assert.Equal(timestamp, target.Timestamp); + } + + [Fact] + public void Constructor_LonLatElevationTimestamp_CreatesPointWithPositionAndTimestamp() + { + var timestamp = DateTime.Now; + var target = new GpxPoint(_xOrdinate, _yOrdinate, _zOrdinate, timestamp); + + Assert.Equal(_coordinate, target.Position); + Assert.Equal(timestamp, target.Timestamp); + } + + [Fact] + public void GeometryType_ReturnsWaypoint() + { + GpxPoint target = new(); + + Assert.Equal(GpxGeometryType.Waypoint, target.GeometryType); + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxRouteTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxRouteTests.cs index 2a26294..2c5770b 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxRouteTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxRouteTests.cs @@ -1,38 +1,44 @@ -using System; -using System.Collections.Generic; -using SpatialLite.Gps; -using SpatialLite.Gps.Geometries; -using Xunit; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxRouteTests { - [Fact] - public void Constructor_Parameterless_CreatesEmptyRoute() { - GpxRoute target = new GpxRoute(); - - Assert.Empty(target.Points); - } - - [Fact] - public void Constructor_IEnumerablePoints_CreatesRouteWithPoints() { - List points = new List { - new GpxPoint(16.5, 45.9, 100, new DateTime(2011, 2, 24, 20, 00, 00)), - new GpxPoint(16.6, 46.0, 110, new DateTime(2011, 2, 24, 20, 00, 10)), - new GpxPoint(16.5, 46.1, 200, new DateTime(2011, 2, 24, 20, 00, 20))}; - - GpxRoute target = new GpxRoute(points); - - Assert.Equal(points.Count, target.Points.Count); - for (int i = 0; i < target.Points.Count; i++) { - Assert.Same(points[i], target.Points[i]); - } - } - - [Fact] - public void GeometryType_ReturnsRoute() { - GpxRoute target = new GpxRoute(); - - Assert.Equal(GpxGeometryType.Route, target.GeometryType); - } - } -} +using SpatialLite.Gps; +using SpatialLite.Gps.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxRouteTests +{ + [Fact] + public void Constructor_Parameterless_CreatesEmptyRoute() + { + GpxRoute target = new(); + + Assert.Empty(target.Points); + } + + [Fact] + public void Constructor_IEnumerablePoints_CreatesRouteWithPoints() + { + List points = new() + { + new GpxPoint(16.5, 45.9, 100, new DateTime(2011, 2, 24, 20, 00, 00)), + new GpxPoint(16.6, 46.0, 110, new DateTime(2011, 2, 24, 20, 00, 10)), + new GpxPoint(16.5, 46.1, 200, new DateTime(2011, 2, 24, 20, 00, 20))}; + + GpxRoute target = new(points); + + Assert.Equal(points.Count, target.Points.Count); + for (int i = 0; i < target.Points.Count; i++) + { + Assert.Same(points[i], target.Points[i]); + } + } + + [Fact] + public void GeometryType_ReturnsRoute() + { + GpxRoute target = new(); + + Assert.Equal(GpxGeometryType.Route, target.GeometryType); + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxTrackSegmentTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxTrackSegmentTests.cs index a1413f0..0eca607 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxTrackSegmentTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxTrackSegmentTests.cs @@ -1,30 +1,35 @@ -using System; -using System.Collections.Generic; -using SpatialLite.Gps.Geometries; -using Xunit; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxTrackSegmentTests { - [Fact] - public void Constructor_CreatesEmptyGpsTrack() { - GpxTrackSegment target = new GpxTrackSegment(); - - Assert.Empty(target.Points); - } - - [Fact] - public void Constructor_IEnumerablePoints_CreatesGpsTrackWithPoints() { - List points = new List { - new GpxPoint(16.5, 45.9, 100, new DateTime(2011, 2, 24, 20, 00, 00)), - new GpxPoint(16.6, 46.0, 110, new DateTime(2011, 2, 24, 20, 00, 10)), - new GpxPoint(16.5, 46.1, 200, new DateTime(2011, 2, 24, 20, 00, 20))}; - - GpxTrackSegment target = new GpxTrackSegment(points); - - Assert.Equal(points.Count, target.Points.Count); - for (int i = 0; i < target.Points.Count; i++) { - Assert.Same(points[i], target.Points[i]); - } - } - } -} +using SpatialLite.Gps.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxTrackSegmentTests +{ + [Fact] + public void Constructor_CreatesEmptyGpsTrack() + { + GpxTrackSegment target = new(); + + Assert.Empty(target.Points); + } + + [Fact] + public void Constructor_IEnumerablePoints_CreatesGpsTrackWithPoints() + { + List points = new() + { + new GpxPoint(16.5, 45.9, 100, new DateTime(2011, 2, 24, 20, 00, 00)), + new GpxPoint(16.6, 46.0, 110, new DateTime(2011, 2, 24, 20, 00, 10)), + new GpxPoint(16.5, 46.1, 200, new DateTime(2011, 2, 24, 20, 00, 20))}; + + GpxTrackSegment target = new(points); + + Assert.Equal(points.Count, target.Points.Count); + for (int i = 0; i < target.Points.Count; i++) + { + Assert.Same(points[i], target.Points[i]); + } + } +} diff --git a/src/Tests.SpatialLite.Gps/Geometries/GpxTrackTests.cs b/src/Tests.SpatialLite.Gps/Geometries/GpxTrackTests.cs index 47d9cf3..182c110 100644 --- a/src/Tests.SpatialLite.Gps/Geometries/GpxTrackTests.cs +++ b/src/Tests.SpatialLite.Gps/Geometries/GpxTrackTests.cs @@ -1,33 +1,38 @@ -using SpatialLite.Gps; -using SpatialLite.Gps.Geometries; -using Xunit; - -namespace Tests.SpatialLite.Gps.Geometries { - public class GpxTrackTests { - [Fact] - public void Constructor_Parameterless_CreateEmptyGpxTrack() { - GpxTrack target = new GpxTrack(); - - Assert.Empty(target.Geometries); - } - - [Fact] - public void Constructor_Segments_CreateGpxTrackWithSegments() { - GpxTrackSegment[] segments = new GpxTrackSegment[] { new GpxTrackSegment(), new GpxTrackSegment(), new GpxTrackSegment() }; - - GpxTrack target = new GpxTrack(segments); - - Assert.Equal(segments.Length, target.Geometries.Count); - for (int i = 0; i < target.Geometries.Count; i++) { - Assert.Same(segments[i], target.Geometries[i]); - } - } - - [Fact] - public void GeometryType_ReturnsTrack() { - GpxTrack target = new GpxTrack(); - - Assert.Equal(GpxGeometryType.Track, target.GeometryType); - } - } -} +using SpatialLite.Gps; +using SpatialLite.Gps.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Gps.Geometries; + +public class GpxTrackTests +{ + [Fact] + public void Constructor_Parameterless_CreateEmptyGpxTrack() + { + GpxTrack target = new(); + + Assert.Empty(target.Geometries); + } + + [Fact] + public void Constructor_Segments_CreateGpxTrackWithSegments() + { + GpxTrackSegment[] segments = new GpxTrackSegment[] { new(), new(), new() }; + + GpxTrack target = new(segments); + + Assert.Equal(segments.Length, target.Geometries.Count); + for (int i = 0; i < target.Geometries.Count; i++) + { + Assert.Same(segments[i], target.Geometries[i]); + } + } + + [Fact] + public void GeometryType_ReturnsTrack() + { + GpxTrack target = new(); + + Assert.Equal(GpxGeometryType.Track, target.GeometryType); + } +} diff --git a/src/Tests.SpatialLite.Gps/GpxDocumentTests.cs b/src/Tests.SpatialLite.Gps/GpxDocumentTests.cs index 9760fd8..a64729e 100644 --- a/src/Tests.SpatialLite.Gps/GpxDocumentTests.cs +++ b/src/Tests.SpatialLite.Gps/GpxDocumentTests.cs @@ -1,153 +1,167 @@ -using System; -using System.Collections.Generic; - -using Xunit; - -using SpatialLite.Gps.IO; -using SpatialLite.Gps; -using SpatialLite.Gps.Geometries; -using System.IO; -using System.Xml.Linq; -using Moq; -using Tests.SpatialLite.Gps.Data; - -namespace Tests.SpatialLite.Gps { - public class GpxDocumentTests { - [Fact] - public void Constructor_CreatesEmptyDocument() { - var target = new GpxDocument(); - - Assert.Empty(target.Waypoints); - Assert.Empty(target.Routes); - Assert.Empty(target.Tracks); - } - - [Fact] - public void Constructor_WaypointsRoutesTracks_CreatesDocumentWithGpxEntities() { - IEnumerable waypoints = new[] { new GpxPoint() }; - IEnumerable routes = new[] { new GpxRoute() }; - IEnumerable tracks = new[] { new GpxTrack() }; - - var target = new GpxDocument(waypoints, routes, tracks); - - Assert.Equal(waypoints, target.Waypoints); - Assert.Equal(routes, target.Routes); - Assert.Equal(tracks, target.Tracks); - } - - [Fact] - public void Constructor_WaypointsRoutesTracks_ThrowsArgumentNullExceptionIfWaypointsIsNull() { - IEnumerable routes = new[] { new GpxRoute() }; - IEnumerable tracks = new[] { new GpxTrack() }; - - Assert.Throws(() => new GpxDocument(null, routes, tracks)); - } - - [Fact] - public void Constructor_WaypointsRoutesTracks_ThrowsArgumentNullExceptionIfRoutesIsNull() { - IEnumerable waypoints = new[] { new GpxPoint() }; - IEnumerable tracks = new[] { new GpxTrack() }; - - Assert.Throws(() => new GpxDocument(waypoints, null, tracks)); - } - - [Fact] - public void Constructor_WaypointsRoutesTracks_ThrowsArgumentNullExceptionIfTracksIsNull() { - IEnumerable waypoints = new[] { new GpxPoint() }; - IEnumerable routes = new[] { new GpxRoute() }; - - Assert.Throws(() => new GpxDocument(waypoints, routes, null)); - } - - [Fact] - public void Load_IGpxReader_ThrowsExceptionIfReaderIsNull() { - IGpxReader reader = null; - - Assert.Throws(() => GpxDocument.Load(reader)); - } - - [Fact] - public void Load_IGpxReader_LoadsEntitiesFromReader() { - using (var reader = new GpxReader(TestDataReader.Open("gpx-real-file.gpx"), new GpxReaderSettings() { ReadMetadata = true })) { - var target = GpxDocument.Load(reader); - - Assert.Equal(3, target.Waypoints.Count); - Assert.Equal(2, target.Routes.Count); - Assert.Single(target.Tracks); - } - } - - [Fact] - public void Load_string_ThrowsExceptionIfPathIsNull() { - string path = null; - - Assert.Throws(() => GpxDocument.Load(path)); - } - - [Fact] - public void Load_string_ThrowsExceptionIfFileDoesntExists() { - string path = "non-existing-file.gpx"; - - Assert.Throws(() => GpxDocument.Load(path)); - } - - [Fact] - public void Load_LoadsGpxEntitiesFromFile() { - string path = "../../../Data/Gpx/gpx-real-file.gpx"; - - var target = GpxDocument.Load(path); - - Assert.Equal(3, target.Waypoints.Count); - Assert.Equal(2, target.Routes.Count); - Assert.Single(target.Tracks); - } - - [Fact] - public void Save_IGpxWriter_ThrowsExceptionIfWriterIsNull() { - IGpxWriter writer = null; - - var target = new GpxDocument(); - Assert.Throws(() => target.Save(writer)); - } - - [Fact] - public void Save_IGpxWriter_WritesDataToWriter() { - var waypoint = new GpxPoint(); - var route = new GpxRoute(); - var track = new GpxTrack(); - - Mock writerM = new Mock(); - writerM.Setup(w => w.Write(waypoint)).Verifiable(); - writerM.Setup(w => w.Write(route)).Verifiable(); - writerM.Setup(w => w.Write(track)).Verifiable(); - - var target = new GpxDocument(new[] { waypoint }, new[] { route }, new[] { track }); - target.Save(writerM.Object); - - writerM.Verify(w => w.Write(waypoint), Times.Once()); - writerM.Verify(w => w.Write(route), Times.Once()); - writerM.Verify(w => w.Write(track), Times.Once()); - } - - [Fact] - public void Save_ThrowsExceptionIfPathIsNull() { - string path = null; - var target = new GpxDocument(); - - Assert.Throws(() => target.Save(path)); - } - - [Fact] - public void Save_SavesDataToFile() { - string path = PathHelper.GetTempFilePath("gpxdocument-save-test.gpx"); - - var target = GpxDocument.Load(PathHelper.RealGpxFilePath); - target.Save(path); - - var original = XDocument.Load(PathHelper.RealGpxFilePath); - var saved = XDocument.Load(path); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(original, saved)); - } - } -} +using Moq; +using SpatialLite.Gps; +using SpatialLite.Gps.Geometries; +using SpatialLite.Gps.IO; +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml.Linq; +using Tests.SpatialLite.Gps.Data; +using Xunit; + +namespace Tests.SpatialLite.Gps; + +public class GpxDocumentTests +{ + [Fact] + public void Constructor_CreatesEmptyDocument() + { + var target = new GpxDocument(); + + Assert.Empty(target.Waypoints); + Assert.Empty(target.Routes); + Assert.Empty(target.Tracks); + } + + [Fact] + public void Constructor_WaypointsRoutesTracks_CreatesDocumentWithGpxEntities() + { + IEnumerable waypoints = new[] { new GpxPoint() }; + IEnumerable routes = new[] { new GpxRoute() }; + IEnumerable tracks = new[] { new GpxTrack() }; + + var target = new GpxDocument(waypoints, routes, tracks); + + Assert.Equal(waypoints, target.Waypoints); + Assert.Equal(routes, target.Routes); + Assert.Equal(tracks, target.Tracks); + } + + [Fact] + public void Constructor_WaypointsRoutesTracks_ThrowsArgumentNullExceptionIfWaypointsIsNull() + { + IEnumerable routes = new[] { new GpxRoute() }; + IEnumerable tracks = new[] { new GpxTrack() }; + + Assert.Throws(() => new GpxDocument(null, routes, tracks)); + } + + [Fact] + public void Constructor_WaypointsRoutesTracks_ThrowsArgumentNullExceptionIfRoutesIsNull() + { + IEnumerable waypoints = new[] { new GpxPoint() }; + IEnumerable tracks = new[] { new GpxTrack() }; + + Assert.Throws(() => new GpxDocument(waypoints, null, tracks)); + } + + [Fact] + public void Constructor_WaypointsRoutesTracks_ThrowsArgumentNullExceptionIfTracksIsNull() + { + IEnumerable waypoints = new[] { new GpxPoint() }; + IEnumerable routes = new[] { new GpxRoute() }; + + Assert.Throws(() => new GpxDocument(waypoints, routes, null)); + } + + [Fact] + public void Load_IGpxReader_ThrowsExceptionIfReaderIsNull() + { + IGpxReader reader = null; + + Assert.Throws(() => GpxDocument.Load(reader)); + } + + [Fact] + public void Load_IGpxReader_LoadsEntitiesFromReader() + { + using (var reader = new GpxReader(TestDataReader.Open("gpx-real-file.gpx"), new GpxReaderSettings() { ReadMetadata = true })) + { + var target = GpxDocument.Load(reader); + + Assert.Equal(3, target.Waypoints.Count); + Assert.Equal(2, target.Routes.Count); + Assert.Single(target.Tracks); + } + } + + [Fact] + public void Load_string_ThrowsExceptionIfPathIsNull() + { + string path = null; + + Assert.Throws(() => GpxDocument.Load(path)); + } + + [Fact] + public void Load_string_ThrowsExceptionIfFileDoesntExists() + { + string path = "non-existing-file.gpx"; + + Assert.Throws(() => GpxDocument.Load(path)); + } + + [Fact] + public void Load_LoadsGpxEntitiesFromFile() + { + string path = "../../../Data/Gpx/gpx-real-file.gpx"; + + var target = GpxDocument.Load(path); + + Assert.Equal(3, target.Waypoints.Count); + Assert.Equal(2, target.Routes.Count); + Assert.Single(target.Tracks); + } + + [Fact] + public void Save_IGpxWriter_ThrowsExceptionIfWriterIsNull() + { + IGpxWriter writer = null; + + var target = new GpxDocument(); + Assert.Throws(() => target.Save(writer)); + } + + [Fact] + public void Save_IGpxWriter_WritesDataToWriter() + { + var waypoint = new GpxPoint(); + var route = new GpxRoute(); + var track = new GpxTrack(); + + Mock writerM = new(); + writerM.Setup(w => w.Write(waypoint)).Verifiable(); + writerM.Setup(w => w.Write(route)).Verifiable(); + writerM.Setup(w => w.Write(track)).Verifiable(); + + var target = new GpxDocument(new[] { waypoint }, new[] { route }, new[] { track }); + target.Save(writerM.Object); + + writerM.Verify(w => w.Write(waypoint), Times.Once()); + writerM.Verify(w => w.Write(route), Times.Once()); + writerM.Verify(w => w.Write(track), Times.Once()); + } + + [Fact] + public void Save_ThrowsExceptionIfPathIsNull() + { + string path = null; + var target = new GpxDocument(); + + Assert.Throws(() => target.Save(path)); + } + + [Fact] + public void Save_SavesDataToFile() + { + string path = PathHelper.GetTempFilePath("gpxdocument-save-test.gpx"); + + var target = GpxDocument.Load(PathHelper.RealGpxFilePath); + target.Save(path); + + var original = XDocument.Load(PathHelper.RealGpxFilePath); + var saved = XDocument.Load(path); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(original, saved)); + } +} diff --git a/src/Tests.SpatialLite.Gps/IO/GpxReaderSettingsTests.cs b/src/Tests.SpatialLite.Gps/IO/GpxReaderSettingsTests.cs index 67065ea..4fc78fc 100644 --- a/src/Tests.SpatialLite.Gps/IO/GpxReaderSettingsTests.cs +++ b/src/Tests.SpatialLite.Gps/IO/GpxReaderSettingsTests.cs @@ -1,23 +1,26 @@ -using System; -using SpatialLite.Gps.IO; -using Xunit; - -namespace Tests.SpatialLite.Gps.IO { - public class GpxReaderSettingsTests { - - [Fact] - public void Constructor__CreatesSettingsWithDefaultValues() { - var target = new GpxReaderSettings(); - - Assert.True(target.ReadMetadata); - } - - [Fact] - public void ReadMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - var target = new GpxReaderSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.ReadMetadata = true); - } - } -} +using SpatialLite.Gps.IO; +using System; +using Xunit; + +namespace Tests.SpatialLite.Gps.IO; + +public class GpxReaderSettingsTests +{ + + [Fact] + public void Constructor__CreatesSettingsWithDefaultValues() + { + var target = new GpxReaderSettings(); + + Assert.True(target.ReadMetadata); + } + + [Fact] + public void ReadMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + var target = new GpxReaderSettings(); + target.IsReadOnly = true; + + Assert.Throws(() => target.ReadMetadata = true); + } +} diff --git a/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs b/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs index 50e6717..6220ca8 100644 --- a/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs +++ b/src/Tests.SpatialLite.Gps/IO/GpxReaderTests.cs @@ -1,409 +1,441 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using SpatialLite.Core.API; -using SpatialLite.Gps; -using SpatialLite.Gps.Geometries; -using SpatialLite.Gps.IO; -using Xunit; -using Tests.SpatialLite.Gps.Data; - -namespace Tests.SpatialLite.Gps.IO { - public class GpxReaderTests { - - [Fact] - public void Constructor_StringSettings_ThrowsExceptionIfFileDoesnotExist() { - Assert.Throws(delegate { new GpxReader("non-existing-file.gpx", new GpxReaderSettings() { ReadMetadata = false }); }); - } - - [Fact] - public void Constructor_StringSettings_SetsSettingsAndMakesItReadOnly() { - string path = "../../../Data/Gpx/gpx-real-file.gpx"; - var settings = new GpxReaderSettings() { ReadMetadata = false }; - using (var target = new GpxReader(path, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_SetsSettingsAndMakesItReadOnly() { - var settings = new GpxReaderSettings() { ReadMetadata = false }; - using (var target = new GpxReader(TestDataReader.Open("gpx-real-file.gpx"), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_ThrowsExceptionIfVersionIsnt10or11() { - Assert.Throws(delegate { new GpxReader(TestDataReader.Open("gpx-version-2_0.gpx"), new GpxReaderSettings() { ReadMetadata = false }); }); - } - - [Fact] - public void Constructor_StreamSettings_ThrowsExceptionXmlContainsInvalidRootElement() { - Assert.Throws(delegate { new GpxReader(TestDataReader.Open("gpx-invalid-root-element.gpx"), new GpxReaderSettings() { ReadMetadata = false }); }); - } - - [Fact] - public void Read_ThrowsExceptionIfWaypointHasntLat() { - GpxReader target = new GpxReader(TestDataReader.Open("gpx-waypoint-without-lat.gpx"), new GpxReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIfWaypointHasntLon() { - GpxReader target = new GpxReader(TestDataReader.Open("gpx-waypoint-without-lon.gpx"), new GpxReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_SetsMetadataIfReadMetadataIsTrue() { - var data = TestDataReader.Open("gpx-waypoint-simple.gpx"); - var expectedCoordinate = new Coordinate(-71.119277, 42.438878); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = true }); - var result = target.Read() as GpxPoint; - - Assert.NotNull(result.Metadata); - } - - [Fact] - public void Read_DoesntSetMetadataIfReadMetadataIsFalse() { - var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); - var expectedCoordinate = new Coordinate(-71.119277, 42.438878); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxPoint; - - Assert.Null(result.Metadata); - } - - [Fact] - public void Read_ParsesWaypointWithLatLonElevationAndTime() { - var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); - Coordinate expectedCoordinate = new Coordinate(-71.119277, 42.438878, 44.586548); - DateTime expectedTime = new DateTime(2001, 11, 28, 21, 5, 28, DateTimeKind.Utc); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxPoint; - - Assert.Equal(result.Position, expectedCoordinate); - Assert.Equal(result.Timestamp, expectedTime); - } - - [Fact] - public void Read_ParsesWaypointWithExtensions() { - var data = TestDataReader.Open("gpx-waypoint-extensions.gpx"); - Coordinate expectedCoordinate = new Coordinate(-71.119277, 42.438878, 44.586548); - DateTime expectedTime = new DateTime(2001, 11, 28, 21, 5, 28, DateTimeKind.Utc); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxPoint; - - Assert.Equal(result.Position, expectedCoordinate); - Assert.Equal(result.Timestamp, expectedTime); - } - - [Fact] - public void Read_ParsesMultipleWaypoints() { - var data = TestDataReader.Open("gpx-waypoint-multiple.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - GpxPoint result = null; - - int count = 0; - while ((result = target.Read() as GpxPoint) != null) { - count++; - } - - Assert.Equal(3, count); - } - - [Fact] - public void Read_ReadsWaypointMetadata() { - var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = true }); - var result = target.Read() as GpxPoint; - - Assert.Equal(0.98, result.Metadata.MagVar); - Assert.Equal(12.5, result.Metadata.GeoidHeight); - Assert.Equal(GpsFix.Fix3D, result.Metadata.Fix); - Assert.Equal(8, result.Metadata.SatellitesCount); - Assert.Equal(5.1, result.Metadata.Hdop); - Assert.Equal(8.1, result.Metadata.Vdop); - Assert.Equal(10.8, result.Metadata.Pdop); - Assert.Equal(45, result.Metadata.AgeOfDgpsData); - Assert.Equal(124, result.Metadata.DgpsId); - - Assert.Equal("WPT Comment", result.Metadata.Comment); - Assert.Equal("WPT Description", result.Metadata.Description); - Assert.Equal("WPT Name", result.Metadata.Name); - Assert.Equal("WPT Source", result.Metadata.Source); - - Assert.Equal(1, result.Metadata.Links.Count); - GpxLink link = result.Metadata.Links.Single(); - Assert.Equal("http://www.topografix.com", link.Url.OriginalString); - Assert.Equal("Link text", link.Text); - Assert.Equal("plain/text", link.Type); - } - - [Fact] - public void Read_ReadsWaypointUnsortedMetadataAndExtension() { - var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = true }); - var result = target.Read() as GpxPoint; - - Assert.Equal(0.98, result.Metadata.MagVar); - Assert.Equal(12.5, result.Metadata.GeoidHeight); - Assert.Equal(GpsFix.Fix3D, result.Metadata.Fix); - Assert.Equal(8, result.Metadata.SatellitesCount); - Assert.Equal(5.1, result.Metadata.Hdop); - Assert.Equal(8.1, result.Metadata.Vdop); - Assert.Equal(10.8, result.Metadata.Pdop); - Assert.Equal(45, result.Metadata.AgeOfDgpsData); - Assert.Equal(124, result.Metadata.DgpsId); - - Assert.Equal("WPT Comment", result.Metadata.Comment); - Assert.Equal("WPT Description", result.Metadata.Description); - Assert.Equal("WPT Name", result.Metadata.Name); - Assert.Equal("WPT Source", result.Metadata.Source); - - Assert.Equal(1, result.Metadata.Links.Count); - GpxLink link = result.Metadata.Links.Single(); - Assert.Equal("http://www.topografix.com", link.Url.OriginalString); - Assert.Equal("Link text", link.Text); - Assert.Equal("plain/text", link.Type); - } - - [Fact] - public void Read_ParsesTrackWithSingleSegment() { - var data = TestDataReader.Open("gpx-track-single-track-segment.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxTrack; - - Assert.Single(result.Geometries); - - GpxTrackSegment segment = result.Geometries[0]; - Assert.Equal(new Coordinate(-76.638178825, 39.449270368), segment.Points[0].Position); - Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc), segment.Points[0].Timestamp); - Assert.Equal(new Coordinate(-76.638012528, 39.449130893), segment.Points[1].Position); - Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc), segment.Points[1].Timestamp); - Assert.Equal(new Coordinate(-76.637980342, 39.449098706), segment.Points[2].Position); - Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc), segment.Points[2].Timestamp); - } - - [Fact] - public void Read_ParsesTrackWithSingleSegmentAndExtensions() { - var data = TestDataReader.Open("gpx-track-single-track-segment.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxTrack; - - Assert.Single(result.Geometries); - - GpxTrackSegment segment = result.Geometries[0]; - } - - [Fact] - public void Read_ParsesTrackWithMultipleSegments() { - var data = TestDataReader.Open("gpx-track-2-track-segments.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxTrack; - - //segments - Assert.Equal(2, result.Geometries.Count); - //points in segments - Assert.Equal(3, result.Geometries[0].Points.Count); - Assert.Equal(2, result.Geometries[1].Points.Count); - } - - [Fact] - public void Read_ParsesMultipleTracks() { - var data = TestDataReader.Open("gpx-track-multiple-tracks.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result1 = target.Read() as GpxTrack; - var result2 = target.Read() as GpxTrack; - - //segments - first track - Assert.Equal(2, result1.Geometries.Count); - //points in segments - first track - Assert.Equal(3, result1.Geometries[0].Points.Count); - Assert.Equal(2, result1.Geometries[1].Points.Count); - - //segments - second track - Assert.Single(result2.Geometries); - //points in segments - second track - Assert.Equal(2, result2.Geometries[0].Points.Count); - } - - [Fact] - public void Read_ParsesEmptyTrack() { - var data = TestDataReader.Open("gpx-track-empty.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxTrack; - - Assert.Empty(result.Geometries); - } - - [Fact] - public void Read_ParsesTrackWithEmptySegment() { - var data = TestDataReader.Open("gpx-track-empty-track-segment.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxTrack; - - Assert.Single(result.Geometries); - Assert.Empty(result.Geometries[0].Points); - } - - [Fact] - public void Read_ParsesTrackMetadata() { - var data = TestDataReader.Open("gpx-track-with-metadata.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = true }); - var result = target.Read() as GpxTrack; - - Assert.Equal("TRK Comment", result.Metadata.Comment); - Assert.Equal("TRK Description", result.Metadata.Description); - Assert.Equal("TRK Name", result.Metadata.Name); - Assert.Equal("TRK Source", result.Metadata.Source); - Assert.Equal("TRK Type", result.Metadata.Type); - - GpxLink link = result.Metadata.Links.Single(); - Assert.Equal("http://www.topografix.com", link.Url.OriginalString); - Assert.Equal("Link text", link.Text); - Assert.Equal("plain/text", link.Type); - } - - [Fact] - public void Read_SetsTrackMetadataToNullIfReadMetadataIsFalse() { - var data = TestDataReader.Open("gpx-track-with-metadata.gpx"); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - var result = target.Read() as GpxTrack; - - Assert.Null(result.Metadata); - } - - [Fact] - public void Read_ParsesEmptyRoute() { - var data = TestDataReader.Open("gpx-route-empty.gpx"); - GpxReader target = new GpxReader(data, new GpxReaderSettings() {ReadMetadata = false}); - - var result = target.Read() as GpxRoute; - - Assert.Empty(result.Points); - } - - [Fact] - public void Read_ParsesSingleRoute() { - var data = TestDataReader.Open("gpx-route-single-route.gpx"); - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - - var result = target.Read() as GpxRoute; - - Assert.Equal(new Coordinate(-76.638178825, 39.449270368), result.Points[0].Position); - Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc), result.Points[0].Timestamp); - Assert.Equal(new Coordinate(-76.638012528, 39.449130893), result.Points[1].Position); - Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc), result.Points[1].Timestamp); - Assert.Equal(new Coordinate(-76.637980342, 39.449098706), result.Points[2].Position); - Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc), result.Points[2].Timestamp); - } - - [Fact] - public void Read_ParsesSingleRouteWithExtensions() { - var data = TestDataReader.Open("gpx-route-with-metadata-and-extensions.gpx"); - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - - var result = target.Read() as GpxRoute; - - Assert.Equal(3, result.Points.Count); - } - - [Fact] - public void Read_ParsesMultipleRoutes() { - var data = TestDataReader.Open("gpx-route-multiple-routes.gpx"); - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - - var result1 = target.Read() as GpxRoute; - var result2 = target.Read() as GpxRoute; - - Assert.Equal(3, result1.Points.Count); - Assert.Equal(2, result2.Points.Count); - } - - [Fact] - public void Read_ParsesRouteWithMetadata() { - var data = TestDataReader.Open("gpx-route-with-metadata.gpx"); - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = true }); - - var result = target.Read() as GpxRoute; - - Assert.Equal("RTE Comment", result.Metadata.Comment); - Assert.Equal("RTE Description", result.Metadata.Description); - Assert.Equal("RTE Name", result.Metadata.Name); - Assert.Equal("RTE Source", result.Metadata.Source); - Assert.Equal("RTE Type", result.Metadata.Type); - - Assert.Equal(1, result.Metadata.Links.Count); - GpxLink link = result.Metadata.Links.Single(); - Assert.Equal("http://www.topografix.com", link.Url.OriginalString); - Assert.Equal("Link text", link.Text); - Assert.Equal("plain/text", link.Type); - } - - [Fact] - public void Read_SetsRouteMetadataToNullIfReadMetadataIsFalse() { - var data = TestDataReader.Open("gpx-route-with-metadata.gpx"); - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = false }); - - var result = target.Read() as GpxRoute; - - Assert.Null(result.Metadata); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = "../../../Data/Gpx/gpx-real-file.gpx"; - - var target = new GpxReader(filename, new GpxReaderSettings() { ReadMetadata = false }); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - [Fact] - public void Read_ReadsAllEntitiesFromRealGpxFile() { - var data = TestDataReader.Open("gpx-real-file.gpx"); - List parsed = new List(); - - GpxReader target = new GpxReader(data, new GpxReaderSettings() { ReadMetadata = true }); - - IGpxGeometry geometry = null; - while ((geometry = target.Read()) != null) { - parsed.Add(geometry); - } - - // waypoints - Assert.Equal(3, parsed.Where(g => g.GeometryType == GpxGeometryType.Waypoint).Count()); - - // routes - Assert.Equal(2, parsed.Where(g => g.GeometryType == GpxGeometryType.Route).Count()); - - // tracks - Assert.Single(parsed.Where(g => g.GeometryType == GpxGeometryType.Track)); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Gps; +using SpatialLite.Gps.Geometries; +using SpatialLite.Gps.IO; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Tests.SpatialLite.Gps.Data; +using Xunit; + +namespace Tests.SpatialLite.Gps.IO; + +public class GpxReaderTests +{ + + [Fact] + public void Constructor_StringSettings_ThrowsExceptionIfFileDoesnotExist() + { + Assert.Throws(delegate { new GpxReader("non-existing-file.gpx", new GpxReaderSettings() { ReadMetadata = false }); }); + } + + [Fact] + public void Constructor_StringSettings_SetsSettingsAndMakesItReadOnly() + { + string path = "../../../Data/Gpx/gpx-real-file.gpx"; + var settings = new GpxReaderSettings() { ReadMetadata = false }; + using (var target = new GpxReader(path, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_SetsSettingsAndMakesItReadOnly() + { + var settings = new GpxReaderSettings() { ReadMetadata = false }; + using (var target = new GpxReader(TestDataReader.Open("gpx-real-file.gpx"), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_ThrowsExceptionIfVersionIsnt10or11() + { + Assert.Throws(delegate { new GpxReader(TestDataReader.Open("gpx-version-2_0.gpx"), new GpxReaderSettings() { ReadMetadata = false }); }); + } + + [Fact] + public void Constructor_StreamSettings_ThrowsExceptionXmlContainsInvalidRootElement() + { + Assert.Throws(delegate { new GpxReader(TestDataReader.Open("gpx-invalid-root-element.gpx"), new GpxReaderSettings() { ReadMetadata = false }); }); + } + + [Fact] + public void Read_ThrowsExceptionIfWaypointHasntLat() + { + GpxReader target = new(TestDataReader.Open("gpx-waypoint-without-lat.gpx"), new GpxReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIfWaypointHasntLon() + { + GpxReader target = new(TestDataReader.Open("gpx-waypoint-without-lon.gpx"), new GpxReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_SetsMetadataIfReadMetadataIsTrue() + { + var data = TestDataReader.Open("gpx-waypoint-simple.gpx"); + _ = new Coordinate(-71.119277, 42.438878); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = true }); + var result = target.Read() as GpxPoint; + + Assert.NotNull(result.Metadata); + } + + [Fact] + public void Read_DoesntSetMetadataIfReadMetadataIsFalse() + { + var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); + _ = new Coordinate(-71.119277, 42.438878); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxPoint; + + Assert.Null(result.Metadata); + } + + [Fact] + public void Read_ParsesWaypointWithLatLonElevationAndTime() + { + var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); + Coordinate expectedCoordinate = new(-71.119277, 42.438878, 44.586548); + DateTime expectedTime = new(2001, 11, 28, 21, 5, 28, DateTimeKind.Utc); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxPoint; + + Assert.Equal(result.Position, expectedCoordinate); + Assert.Equal(result.Timestamp, expectedTime); + } + + [Fact] + public void Read_ParsesWaypointWithExtensions() + { + var data = TestDataReader.Open("gpx-waypoint-extensions.gpx"); + Coordinate expectedCoordinate = new(-71.119277, 42.438878, 44.586548); + DateTime expectedTime = new(2001, 11, 28, 21, 5, 28, DateTimeKind.Utc); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxPoint; + + Assert.Equal(result.Position, expectedCoordinate); + Assert.Equal(result.Timestamp, expectedTime); + } + + [Fact] + public void Read_ParsesMultipleWaypoints() + { + var data = TestDataReader.Open("gpx-waypoint-multiple.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + + int count = 0; + while ((_ = target.Read() as GpxPoint) != null) + { + count++; + } + + Assert.Equal(3, count); + } + + [Fact] + public void Read_ReadsWaypointMetadata() + { + var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = true }); + var result = target.Read() as GpxPoint; + + Assert.Equal(0.98, result.Metadata.MagVar); + Assert.Equal(12.5, result.Metadata.GeoidHeight); + Assert.Equal(GpsFix.Fix3D, result.Metadata.Fix); + Assert.Equal(8, result.Metadata.SatellitesCount); + Assert.Equal(5.1, result.Metadata.Hdop); + Assert.Equal(8.1, result.Metadata.Vdop); + Assert.Equal(10.8, result.Metadata.Pdop); + Assert.Equal(45, result.Metadata.AgeOfDgpsData); + Assert.Equal(124, result.Metadata.DgpsId); + + Assert.Equal("WPT Comment", result.Metadata.Comment); + Assert.Equal("WPT Description", result.Metadata.Description); + Assert.Equal("WPT Name", result.Metadata.Name); + Assert.Equal("WPT Source", result.Metadata.Source); + + Assert.Single(result.Metadata.Links); + GpxLink link = result.Metadata.Links.Single(); + Assert.Equal("http://www.topografix.com", link.Url.OriginalString); + Assert.Equal("Link text", link.Text); + Assert.Equal("plain/text", link.Type); + } + + [Fact] + public void Read_ReadsWaypointUnsortedMetadataAndExtension() + { + var data = TestDataReader.Open("gpx-waypoint-with-metadata.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = true }); + var result = target.Read() as GpxPoint; + + Assert.Equal(0.98, result.Metadata.MagVar); + Assert.Equal(12.5, result.Metadata.GeoidHeight); + Assert.Equal(GpsFix.Fix3D, result.Metadata.Fix); + Assert.Equal(8, result.Metadata.SatellitesCount); + Assert.Equal(5.1, result.Metadata.Hdop); + Assert.Equal(8.1, result.Metadata.Vdop); + Assert.Equal(10.8, result.Metadata.Pdop); + Assert.Equal(45, result.Metadata.AgeOfDgpsData); + Assert.Equal(124, result.Metadata.DgpsId); + + Assert.Equal("WPT Comment", result.Metadata.Comment); + Assert.Equal("WPT Description", result.Metadata.Description); + Assert.Equal("WPT Name", result.Metadata.Name); + Assert.Equal("WPT Source", result.Metadata.Source); + + Assert.Single(result.Metadata.Links); + GpxLink link = result.Metadata.Links.Single(); + Assert.Equal("http://www.topografix.com", link.Url.OriginalString); + Assert.Equal("Link text", link.Text); + Assert.Equal("plain/text", link.Type); + } + + [Fact] + public void Read_ParsesTrackWithSingleSegment() + { + var data = TestDataReader.Open("gpx-track-single-track-segment.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxTrack; + + Assert.Single(result.Geometries); + + GpxTrackSegment segment = result.Geometries[0]; + Assert.Equal(new Coordinate(-76.638178825, 39.449270368), segment.Points[0].Position); + Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc), segment.Points[0].Timestamp); + Assert.Equal(new Coordinate(-76.638012528, 39.449130893), segment.Points[1].Position); + Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc), segment.Points[1].Timestamp); + Assert.Equal(new Coordinate(-76.637980342, 39.449098706), segment.Points[2].Position); + Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc), segment.Points[2].Timestamp); + } + + [Fact] + public void Read_ParsesTrackWithSingleSegmentAndExtensions() + { + var data = TestDataReader.Open("gpx-track-single-track-segment.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxTrack; + + Assert.Single(result.Geometries); + _ = result.Geometries[0]; + } + + [Fact] + public void Read_ParsesTrackWithMultipleSegments() + { + var data = TestDataReader.Open("gpx-track-2-track-segments.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxTrack; + + //segments + Assert.Equal(2, result.Geometries.Count); + //points in segments + Assert.Equal(3, result.Geometries[0].Points.Count); + Assert.Equal(2, result.Geometries[1].Points.Count); + } + + [Fact] + public void Read_ParsesMultipleTracks() + { + var data = TestDataReader.Open("gpx-track-multiple-tracks.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result1 = target.Read() as GpxTrack; + var result2 = target.Read() as GpxTrack; + + //segments - first track + Assert.Equal(2, result1.Geometries.Count); + //points in segments - first track + Assert.Equal(3, result1.Geometries[0].Points.Count); + Assert.Equal(2, result1.Geometries[1].Points.Count); + + //segments - second track + Assert.Single(result2.Geometries); + //points in segments - second track + Assert.Equal(2, result2.Geometries[0].Points.Count); + } + + [Fact] + public void Read_ParsesEmptyTrack() + { + var data = TestDataReader.Open("gpx-track-empty.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxTrack; + + Assert.Empty(result.Geometries); + } + + [Fact] + public void Read_ParsesTrackWithEmptySegment() + { + var data = TestDataReader.Open("gpx-track-empty-track-segment.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxTrack; + + Assert.Single(result.Geometries); + Assert.Empty(result.Geometries[0].Points); + } + + [Fact] + public void Read_ParsesTrackMetadata() + { + var data = TestDataReader.Open("gpx-track-with-metadata.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = true }); + var result = target.Read() as GpxTrack; + + Assert.Equal("TRK Comment", result.Metadata.Comment); + Assert.Equal("TRK Description", result.Metadata.Description); + Assert.Equal("TRK Name", result.Metadata.Name); + Assert.Equal("TRK Source", result.Metadata.Source); + Assert.Equal("TRK Type", result.Metadata.Type); + + GpxLink link = result.Metadata.Links.Single(); + Assert.Equal("http://www.topografix.com", link.Url.OriginalString); + Assert.Equal("Link text", link.Text); + Assert.Equal("plain/text", link.Type); + } + + [Fact] + public void Read_SetsTrackMetadataToNullIfReadMetadataIsFalse() + { + var data = TestDataReader.Open("gpx-track-with-metadata.gpx"); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + var result = target.Read() as GpxTrack; + + Assert.Null(result.Metadata); + } + + [Fact] + public void Read_ParsesEmptyRoute() + { + var data = TestDataReader.Open("gpx-route-empty.gpx"); + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + + var result = target.Read() as GpxRoute; + + Assert.Empty(result.Points); + } + + [Fact] + public void Read_ParsesSingleRoute() + { + var data = TestDataReader.Open("gpx-route-single-route.gpx"); + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + + var result = target.Read() as GpxRoute; + + Assert.Equal(new Coordinate(-76.638178825, 39.449270368), result.Points[0].Position); + Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc), result.Points[0].Timestamp); + Assert.Equal(new Coordinate(-76.638012528, 39.449130893), result.Points[1].Position); + Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc), result.Points[1].Timestamp); + Assert.Equal(new Coordinate(-76.637980342, 39.449098706), result.Points[2].Position); + Assert.Equal(new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc), result.Points[2].Timestamp); + } + + [Fact] + public void Read_ParsesSingleRouteWithExtensions() + { + var data = TestDataReader.Open("gpx-route-with-metadata-and-extensions.gpx"); + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + + var result = target.Read() as GpxRoute; + + Assert.Equal(3, result.Points.Count); + } + + [Fact] + public void Read_ParsesMultipleRoutes() + { + var data = TestDataReader.Open("gpx-route-multiple-routes.gpx"); + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + + var result1 = target.Read() as GpxRoute; + var result2 = target.Read() as GpxRoute; + + Assert.Equal(3, result1.Points.Count); + Assert.Equal(2, result2.Points.Count); + } + + [Fact] + public void Read_ParsesRouteWithMetadata() + { + var data = TestDataReader.Open("gpx-route-with-metadata.gpx"); + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = true }); + + var result = target.Read() as GpxRoute; + + Assert.Equal("RTE Comment", result.Metadata.Comment); + Assert.Equal("RTE Description", result.Metadata.Description); + Assert.Equal("RTE Name", result.Metadata.Name); + Assert.Equal("RTE Source", result.Metadata.Source); + Assert.Equal("RTE Type", result.Metadata.Type); + + Assert.Single(result.Metadata.Links); + GpxLink link = result.Metadata.Links.Single(); + Assert.Equal("http://www.topografix.com", link.Url.OriginalString); + Assert.Equal("Link text", link.Text); + Assert.Equal("plain/text", link.Type); + } + + [Fact] + public void Read_SetsRouteMetadataToNullIfReadMetadataIsFalse() + { + var data = TestDataReader.Open("gpx-route-with-metadata.gpx"); + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = false }); + + var result = target.Read() as GpxRoute; + + Assert.Null(result.Metadata); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = "../../../Data/Gpx/gpx-real-file.gpx"; + + var target = new GpxReader(filename, new GpxReaderSettings() { ReadMetadata = false }); + target.Dispose(); + + FileStream testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Read_ReadsAllEntitiesFromRealGpxFile() + { + var data = TestDataReader.Open("gpx-real-file.gpx"); + List parsed = new(); + + GpxReader target = new(data, new GpxReaderSettings() { ReadMetadata = true }); + + IGpxGeometry geometry = null; + while ((geometry = target.Read()) != null) + { + parsed.Add(geometry); + } + + // waypoints + Assert.Equal(3, parsed.Count(g => g.GeometryType == GpxGeometryType.Waypoint)); + + // routes + Assert.Equal(2, parsed.Count(g => g.GeometryType == GpxGeometryType.Route)); + + // tracks + Assert.Single(parsed.Where(g => g.GeometryType == GpxGeometryType.Track)); + } +} diff --git a/src/Tests.SpatialLite.Gps/IO/GpxWriterSettingsTests.cs b/src/Tests.SpatialLite.Gps/IO/GpxWriterSettingsTests.cs index 614ebcf..86ed69b 100644 --- a/src/Tests.SpatialLite.Gps/IO/GpxWriterSettingsTests.cs +++ b/src/Tests.SpatialLite.Gps/IO/GpxWriterSettingsTests.cs @@ -1,31 +1,35 @@ -using System; -using SpatialLite.Gps.IO; -using Xunit; - -namespace Tests.SpatialLite.Gps.IO { - public class GpxWriterSettingsTests { - - [Fact] - public void Constructor__CreatesSettingsWithDefaultValues() { - var target = new GpxWriterSettings(); - - Assert.True(target.WriteMetadata); - } - - [Fact] - public void WriteMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - var target = new GpxWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.WriteMetadata = true); - } - - [Fact] - public void GeneratorNameSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - var target = new GpxWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.GeneratorName = "TEST"); - } - } -} +using SpatialLite.Gps.IO; +using System; +using Xunit; + +namespace Tests.SpatialLite.Gps.IO; + +public class GpxWriterSettingsTests +{ + + [Fact] + public void Constructor__CreatesSettingsWithDefaultValues() + { + var target = new GpxWriterSettings(); + + Assert.True(target.WriteMetadata); + } + + [Fact] + public void WriteMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + var target = new GpxWriterSettings(); + target.IsReadOnly = true; + + Assert.Throws(() => target.WriteMetadata = true); + } + + [Fact] + public void GeneratorNameSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + var target = new GpxWriterSettings(); + target.IsReadOnly = true; + + Assert.Throws(() => target.GeneratorName = "TEST"); + } +} diff --git a/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs b/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs index 2c07157..328d880 100644 --- a/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs +++ b/src/Tests.SpatialLite.Gps/IO/GpxWriterTests.cs @@ -1,335 +1,369 @@ -using System; - -using Xunit; - -using SpatialLite.Gps.Geometries; -using SpatialLite.Gps.IO; -using System.IO; -using System.Xml.Linq; -using SpatialLite.Core.API; -using Tests.SpatialLite.Gps.Data; - -namespace Tests.SpatialLite.Gps.IO { - public class GpxWriterTests { - GpxPoint _waypoint = new GpxPoint(-71.119277, 42.438878, 44.586548, new DateTime(2001, 11, 28, 21, 05, 28, DateTimeKind.Utc)); - GpxPoint _waypointWithMetadata = new GpxPoint(-71.119277, 42.438878, 44.586548, new DateTime(2001, 11, 28, 21, 05, 28, DateTimeKind.Utc)); - GpxPointMetadata _pointMetadata; - - GpxRoute _route = new GpxRoute(new GpxPoint[] { - new GpxPoint(new Coordinate(-76.638178825, 39.449270368), new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc)), - new GpxPoint(new Coordinate(-76.638012528, 39.449130893), new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc)), - new GpxPoint(new Coordinate(-76.637980342, 39.449098706), new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc)) - }); - GpxRoute _routeWithMetadata = new GpxRoute(new GpxPoint[] { - new GpxPoint(new Coordinate(-76.638178825, 39.449270368), new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc)), - new GpxPoint(new Coordinate(-76.638012528, 39.449130893), new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc)), - new GpxPoint(new Coordinate(-76.637980342, 39.449098706), new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc)) - }); - GpxTrackMetadata _routeMetadata; - - GpxTrackSegment _segment = new GpxTrackSegment(new GpxPoint[] { - new GpxPoint(new Coordinate(-76.638178825, 39.449270368), new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc)), - new GpxPoint(new Coordinate(-76.638012528, 39.449130893), new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc)), - new GpxPoint(new Coordinate(-76.637980342, 39.449098706), new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc)) - }); - GpxTrackMetadata _trackMetadata; - GpxTrack _track; - GpxTrack _trackWithMetadata; - public GpxWriterTests() { - _pointMetadata = new GpxPointMetadata(); - _pointMetadata.AgeOfDgpsData = 45; - _pointMetadata.DgpsId = 124; - _pointMetadata.Fix = GpsFix.Fix3D; - _pointMetadata.GeoidHeight = 12.5; - _pointMetadata.Hdop = 5.1; - _pointMetadata.MagVar = 0.98; - _pointMetadata.Pdop = 10.8; - _pointMetadata.SatellitesCount = 8; - _pointMetadata.Symbol = "WPT Symbol"; - _pointMetadata.Vdop = 8.1; - - _pointMetadata.Comment = "WPT Comment"; - _pointMetadata.Description = "WPT Description"; - _pointMetadata.Name = "WPT Name"; - _pointMetadata.Source = "WPT Source"; - _pointMetadata.Links.Add(new GpxLink(new Uri("http://www.topografix.com")) { Text = "Link text", Type = "plain/text" }); - _waypointWithMetadata.Metadata = _pointMetadata; - - _routeMetadata = new GpxTrackMetadata(); - _routeMetadata.Comment = "RTE Comment"; - _routeMetadata.Description = "RTE Description"; - _routeMetadata.Name = "RTE Name"; - _routeMetadata.Source = "RTE Source"; - _routeMetadata.Type = "RTE Type"; - _routeMetadata.Links.Add(new GpxLink(new Uri("http://www.topografix.com")) { Text = "Link text", Type = "plain/text" }); - _routeWithMetadata.Metadata = _routeMetadata; - - _trackMetadata = new GpxTrackMetadata(); - _trackMetadata.Comment = "TRK Comment"; - _trackMetadata.Description = "TRK Description"; - _trackMetadata.Name = "TRK Name"; - _trackMetadata.Source = "TRK Source"; - _trackMetadata.Type = "TRK Type"; - _trackMetadata.Links.Add(new GpxLink(new Uri("http://www.topografix.com")) { Text = "Link text", Type = "plain/text" }); - - _track = new GpxTrack(new GpxTrackSegment[] { _segment }); - _trackWithMetadata = new GpxTrack(new GpxTrackSegment[] { _segment }); - _trackWithMetadata.Metadata = _trackMetadata; - } - - [Fact] - public void Constructor_StreamSettings_SetsSettingsAndMarkSettingsAsReadOnly() { - var stream = new MemoryStream(); - var settings = new GpxWriterSettings(); - using (var target = new GpxWriter(stream, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(target.Settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_CreatesGpxFileWithRootElement() { - string generatorName = "SpatialLite"; - var stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false, GeneratorName = generatorName })) { - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-empty-file.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Constructor_PathSettings_SetsSettingsAndMakesThemReadOnly() { - string path = PathHelper.GetTempFilePath("gpxwriter-constructor-test-1.gpx"); - - var settings = new GpxWriterSettings(); - using (var target = new GpxWriter(path, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(target.Settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_PathSettings_CreatesOutputFile() { - string filename = PathHelper.GetTempFilePath("gpxwriter-constructor-creates-output-test.gpx"); - - var settings = new GpxWriterSettings(); - using (var target = new GpxWriter(filename, settings)) { - ; - } - - Assert.True(File.Exists(filename)); - } - - [Fact] - public void Constructor_PathSettings_CreatesGpxFileWithRootElement() { - string path = PathHelper.GetTempFilePath("gpxwriter-constructor-test-2.gpx"); - string generatorName = "SpatialLite"; - - using (GpxWriter target = new GpxWriter(path, new GpxWriterSettings() { WriteMetadata = false, GeneratorName = generatorName })) { - } - - XDocument written = XDocument.Load(path); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-empty-file.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesWaypointWithoutMetadataIfMetadataIsNull() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false })) { - target.Write(_waypoint); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-simple.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesWaypointWithoutMetadataIfWriteMetadataIsFalse() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false })) { - target.Write(_waypointWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-simple.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesWaypointWithMetadata() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = true })) { - target.Write(_waypointWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-with-metadata.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesWaypointWithoutUnnecessaryElements() { - _waypointWithMetadata.Metadata.SatellitesCount = null; - _waypointWithMetadata.Metadata.Name = null; - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = true })) { - target.Write(_waypointWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-with-metadata-selection.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesRouteWith3Points() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false })) { - target.Write(_route); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-single-route.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesRouteWithMetadata() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = true })) { - target.Write(_routeWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-with-metadata.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesRouteWithoutMetadataIfWriteMetadataIsFalse() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false })) { - target.Write(_routeWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-single-route.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesRouteWithoutUnnecessaryElements() { - _routeWithMetadata.Metadata.Source = null; - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = true })) { - target.Write(_routeWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-with-metadata-selection.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesTrack() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false })) { - target.Write(_track); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-single-track-segment.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_WritesTrackWithMetadata() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = true })) { - target.Write(_trackWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-with-metadata.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_DoesntWriteTrackMetadataIfWriteMetadataIsFalse() { - MemoryStream stream = new MemoryStream(); - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = false })) { - target.Write(_trackWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-single-track-segment.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Write_TrackWithEntityDetailsButNullValues_WritesTrackWithoutUnnecessaryElements() { - MemoryStream stream = new MemoryStream(); - _trackWithMetadata.Metadata.Source = null; - - using (GpxWriter target = new GpxWriter(stream, new GpxWriterSettings() { WriteMetadata = true })) { - target.Write(_trackWithMetadata); - } - - XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); - XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-with-metadata-selection.gpx")); - - Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string path = PathHelper.GetTempFilePath("gpxwriter-closes-output-filestream-test.osm"); - - var target = new GpxWriter(path, new GpxWriterSettings()); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(path, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToStream() { - MemoryStream stream = new MemoryStream(); - - var target = new GpxWriter(stream, new GpxWriterSettings()); - target.Dispose(); - - Assert.False(stream.CanRead); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Gps.Geometries; +using SpatialLite.Gps.IO; +using System; +using System.IO; +using System.Xml.Linq; +using Tests.SpatialLite.Gps.Data; +using Xunit; + +namespace Tests.SpatialLite.Gps.IO; + +public class GpxWriterTests +{ + private readonly GpxPoint _waypoint = new(-71.119277, 42.438878, 44.586548, new DateTime(2001, 11, 28, 21, 05, 28, DateTimeKind.Utc)); + private readonly GpxPoint _waypointWithMetadata = new(-71.119277, 42.438878, 44.586548, new DateTime(2001, 11, 28, 21, 05, 28, DateTimeKind.Utc)); + private readonly GpxPointMetadata _pointMetadata; + private readonly GpxRoute _route = new(new GpxPoint[] { + new(new Coordinate(-76.638178825, 39.449270368), new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc)), + new(new Coordinate(-76.638012528, 39.449130893), new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc)), + new(new Coordinate(-76.637980342, 39.449098706), new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc)) + }); + private readonly GpxRoute _routeWithMetadata = new(new GpxPoint[] { + new(new Coordinate(-76.638178825, 39.449270368), new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc)), + new(new Coordinate(-76.638012528, 39.449130893), new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc)), + new(new Coordinate(-76.637980342, 39.449098706), new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc)) + }); + private readonly GpxTrackMetadata _routeMetadata; + private readonly GpxTrackSegment _segment = new(new GpxPoint[] { + new(new Coordinate(-76.638178825, 39.449270368), new DateTime(1970, 1, 1, 7, 10, 23, DateTimeKind.Utc)), + new(new Coordinate(-76.638012528, 39.449130893), new DateTime(1970, 1, 1, 7, 10, 28, DateTimeKind.Utc)), + new(new Coordinate(-76.637980342, 39.449098706), new DateTime(1970, 1, 1, 7, 10, 33, DateTimeKind.Utc)) + }); + private readonly GpxTrackMetadata _trackMetadata; + private readonly GpxTrack _track; + private readonly GpxTrack _trackWithMetadata; + public GpxWriterTests() + { + _pointMetadata = new GpxPointMetadata(); + _pointMetadata.AgeOfDgpsData = 45; + _pointMetadata.DgpsId = 124; + _pointMetadata.Fix = GpsFix.Fix3D; + _pointMetadata.GeoidHeight = 12.5; + _pointMetadata.Hdop = 5.1; + _pointMetadata.MagVar = 0.98; + _pointMetadata.Pdop = 10.8; + _pointMetadata.SatellitesCount = 8; + _pointMetadata.Symbol = "WPT Symbol"; + _pointMetadata.Vdop = 8.1; + + _pointMetadata.Comment = "WPT Comment"; + _pointMetadata.Description = "WPT Description"; + _pointMetadata.Name = "WPT Name"; + _pointMetadata.Source = "WPT Source"; + _pointMetadata.Links.Add(new GpxLink(new Uri("http://www.topografix.com")) { Text = "Link text", Type = "plain/text" }); + _waypointWithMetadata.Metadata = _pointMetadata; + + _routeMetadata = new GpxTrackMetadata(); + _routeMetadata.Comment = "RTE Comment"; + _routeMetadata.Description = "RTE Description"; + _routeMetadata.Name = "RTE Name"; + _routeMetadata.Source = "RTE Source"; + _routeMetadata.Type = "RTE Type"; + _routeMetadata.Links.Add(new GpxLink(new Uri("http://www.topografix.com")) { Text = "Link text", Type = "plain/text" }); + _routeWithMetadata.Metadata = _routeMetadata; + + _trackMetadata = new GpxTrackMetadata(); + _trackMetadata.Comment = "TRK Comment"; + _trackMetadata.Description = "TRK Description"; + _trackMetadata.Name = "TRK Name"; + _trackMetadata.Source = "TRK Source"; + _trackMetadata.Type = "TRK Type"; + _trackMetadata.Links.Add(new GpxLink(new Uri("http://www.topografix.com")) { Text = "Link text", Type = "plain/text" }); + + _track = new GpxTrack(new GpxTrackSegment[] { _segment }); + _trackWithMetadata = new GpxTrack(new GpxTrackSegment[] { _segment }); + _trackWithMetadata.Metadata = _trackMetadata; + } + + [Fact] + public void Constructor_StreamSettings_SetsSettingsAndMarkSettingsAsReadOnly() + { + var stream = new MemoryStream(); + var settings = new GpxWriterSettings(); + using (var target = new GpxWriter(stream, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(target.Settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_CreatesGpxFileWithRootElement() + { + string generatorName = "SpatialLite"; + var stream = new MemoryStream(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false, GeneratorName = generatorName })) + { + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-empty-file.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Constructor_PathSettings_SetsSettingsAndMakesThemReadOnly() + { + string path = PathHelper.GetTempFilePath("gpxwriter-constructor-test-1.gpx"); + + var settings = new GpxWriterSettings(); + using (var target = new GpxWriter(path, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(target.Settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_PathSettings_CreatesOutputFile() + { + string filename = PathHelper.GetTempFilePath("gpxwriter-constructor-creates-output-test.gpx"); + + var settings = new GpxWriterSettings(); + using (var target = new GpxWriter(filename, settings)) + { + ; + } + + Assert.True(File.Exists(filename)); + } + + [Fact] + public void Constructor_PathSettings_CreatesGpxFileWithRootElement() + { + string path = PathHelper.GetTempFilePath("gpxwriter-constructor-test-2.gpx"); + string generatorName = "SpatialLite"; + + using (GpxWriter target = new(path, new GpxWriterSettings() { WriteMetadata = false, GeneratorName = generatorName })) + { + } + + XDocument written = XDocument.Load(path); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-empty-file.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesWaypointWithoutMetadataIfMetadataIsNull() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false })) + { + target.Write(_waypoint); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-simple.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesWaypointWithoutMetadataIfWriteMetadataIsFalse() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false })) + { + target.Write(_waypointWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-simple.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesWaypointWithMetadata() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = true })) + { + target.Write(_waypointWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-with-metadata.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesWaypointWithoutUnnecessaryElements() + { + _waypointWithMetadata.Metadata.SatellitesCount = null; + _waypointWithMetadata.Metadata.Name = null; + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = true })) + { + target.Write(_waypointWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-waypoint-with-metadata-selection.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesRouteWith3Points() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false })) + { + target.Write(_route); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-single-route.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesRouteWithMetadata() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = true })) + { + target.Write(_routeWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-with-metadata.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesRouteWithoutMetadataIfWriteMetadataIsFalse() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false })) + { + target.Write(_routeWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-single-route.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesRouteWithoutUnnecessaryElements() + { + _routeWithMetadata.Metadata.Source = null; + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = true })) + { + target.Write(_routeWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-route-with-metadata-selection.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesTrack() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false })) + { + target.Write(_track); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-single-track-segment.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_WritesTrackWithMetadata() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = true })) + { + target.Write(_trackWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-with-metadata.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_DoesntWriteTrackMetadataIfWriteMetadataIsFalse() + { + MemoryStream stream = new(); + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = false })) + { + target.Write(_trackWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-single-track-segment.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Write_TrackWithEntityDetailsButNullValues_WritesTrackWithoutUnnecessaryElements() + { + MemoryStream stream = new(); + _trackWithMetadata.Metadata.Source = null; + + using (GpxWriter target = new(stream, new GpxWriterSettings() { WriteMetadata = true })) + { + target.Write(_trackWithMetadata); + } + + XDocument written = XDocument.Load(new MemoryStream(stream.ToArray())); + XDocument expected = XDocument.Load(TestDataReader.Open("gpx-track-with-metadata-selection.gpx")); + + Assert.True(XDocumentExtensions.DeepEqualsWithNormalization(written, expected)); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string path = PathHelper.GetTempFilePath("gpxwriter-closes-output-filestream-test.osm"); + + var target = new GpxWriter(path, new GpxWriterSettings()); + target.Dispose(); + + FileStream testStream = null; + testStream = new FileStream(path, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToStream() + { + MemoryStream stream = new(); + + var target = new GpxWriter(stream, new GpxWriterSettings()); + target.Dispose(); + + Assert.False(stream.CanRead); + } +} diff --git a/src/Tests.SpatialLite.Gps/PathHelper.cs b/src/Tests.SpatialLite.Gps/PathHelper.cs index a903e6f..a52e9d1 100644 --- a/src/Tests.SpatialLite.Gps/PathHelper.cs +++ b/src/Tests.SpatialLite.Gps/PathHelper.cs @@ -1,23 +1,27 @@ -using System.IO; - -namespace Tests.SpatialLite.Gps { - static class PathHelper { - private const string TempDirectoryName = "Temp"; - - private static string _realGpxFilePath = Path.GetFullPath(Path.Combine("Data", "Gpx", "gpx-real-file.gpx")); - public static string RealGpxFilePath => _realGpxFilePath; - - public static string GetTempFilePath(string filename) { - if (!Directory.Exists(TempDirectoryName)) { - Directory.CreateDirectory(TempDirectoryName); - } - - string pbfFile = Path.GetFullPath(Path.Combine(TempDirectoryName, filename)); - if (File.Exists(pbfFile)) { - File.Delete(pbfFile); - } - - return pbfFile; - } - } -} +using System.IO; + +namespace Tests.SpatialLite.Gps; + +internal static class PathHelper +{ + private const string TempDirectoryName = "Temp"; + + private static readonly string RealGpxFilePathValue = Path.GetFullPath(Path.Combine("Data", "Gpx", "gpx-real-file.gpx")); + public static string RealGpxFilePath => RealGpxFilePathValue; + + public static string GetTempFilePath(string filename) + { + if (!Directory.Exists(TempDirectoryName)) + { + Directory.CreateDirectory(TempDirectoryName); + } + + string pbfFile = Path.GetFullPath(Path.Combine(TempDirectoryName, filename)); + if (File.Exists(pbfFile)) + { + File.Delete(pbfFile); + } + + return pbfFile; + } +} diff --git a/src/Tests.SpatialLite.Gps/Properties/AssemblyInfo.cs b/src/Tests.SpatialLite.Gps/Properties/AssemblyInfo.cs index ebbc34a..c1b957a 100644 --- a/src/Tests.SpatialLite.Gps/Properties/AssemblyInfo.cs +++ b/src/Tests.SpatialLite.Gps/Properties/AssemblyInfo.cs @@ -1,19 +1,18 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Tests.SpatialLite.Gps")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c4a5dbc7-deca-4b13-8fa9-c5f98fd4e666")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tests.SpatialLite.Gps")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c4a5dbc7-deca-4b13-8fa9-c5f98fd4e666")] diff --git a/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs b/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs index abfe039..0981452 100644 --- a/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs +++ b/src/Tests.SpatialLite.Gps/XDocumentExtensions.cs @@ -1,43 +1,55 @@ -using System.Linq; -using System.Xml.Linq; - -namespace Tests.SpatialLite.Gps { - /// - /// Extends XDocument with correct DeepEquals function - /// - public static class XDocumentExtensions { - public static bool DeepEqualsWithNormalization(XDocument doc1, XDocument doc2) { - return XMLCompare(doc1.Root, doc2.Root); - } - - public static bool XMLCompare(XElement ele1, XElement ele2) { - if (ele1.HasAttributes) { - if (ele1.Attributes().Count() != ele2.Attributes().Count()) { - return false; - } - - foreach (XAttribute attr in ele1.Attributes()) { - if (ele2.Attribute(attr.Name.LocalName) == null) { - return false; - } - if (attr.Value.ToLower() != ele2.Attribute(attr.Name.LocalName).Value.ToLower()) { - return false; - } - } - } - - if (ele1.HasElements) { - if (ele1.Elements().Count() != ele2.Elements().Count()) { - return false; - } - - for (var i = 0; i <= ele1.Elements().Count() - 1; i++) { - if (XMLCompare(ele1.Elements().ElementAt(i), ele2.Elements().ElementAt(i)) == false) - return false; - } - } - - return true; - } - } -} +using System.Globalization; +using System.Linq; +using System.Xml.Linq; + +namespace Tests.SpatialLite.Gps; + +/// +/// Extends XDocument with correct DeepEquals function +/// +public static class XDocumentExtensions +{ + public static bool DeepEqualsWithNormalization(XDocument doc1, XDocument doc2) + { + return XMLCompare(doc1.Root, doc2.Root); + } + + public static bool XMLCompare(XElement ele1, XElement ele2) + { + if (ele1.HasAttributes) + { + if (ele1.Attributes().Count() != ele2.Attributes().Count()) + { + return false; + } + + foreach (XAttribute attr in ele1.Attributes()) + { + if (ele2.Attribute(attr.Name.LocalName) == null) + { + return false; + } + if (attr.Value.ToLower(CultureInfo.InvariantCulture) != ele2.Attribute(attr.Name.LocalName).Value.ToLower(CultureInfo.InvariantCulture)) + { + return false; + } + } + } + + if (ele1.HasElements) + { + if (ele1.Elements().Count() != ele2.Elements().Count()) + { + return false; + } + + for (var i = 0; i <= ele1.Elements().Count() - 1; i++) + { + if (XMLCompare(ele1.Elements().ElementAt(i), ele2.Elements().ElementAt(i)) == false) + return false; + } + } + + return true; + } +} diff --git a/src/Tests.SpatialLite.Osm/Data/TestDataReader.cs b/src/Tests.SpatialLite.Osm/Data/TestDataReader.cs index 7091126..ef527f0 100644 --- a/src/Tests.SpatialLite.Osm/Data/TestDataReader.cs +++ b/src/Tests.SpatialLite.Osm/Data/TestDataReader.cs @@ -1,21 +1,25 @@ -using System.IO; -using System.Reflection; - -namespace Tests.SpatialLite.Osm.Data { - public static class TestDataReader { - public static Stream OpenXml(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream("Tests.SpatialLite.Osm.Data.Xml." + name); - } - - public static Stream OpenPbf(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream("Tests.SpatialLite.Osm.Data.Pbf." + name); - } - - public static Stream OpenOsmDB(string name) { - var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream("Tests.SpatialLite.Osm.Data.OsmDatabase." + name); - } - } -} +using System.IO; +using System.Reflection; + +namespace Tests.SpatialLite.Osm.Data; + +public static class TestDataReader +{ + public static Stream OpenXml(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + return assembly.GetManifestResourceStream("Tests.SpatialLite.Osm.Data.Xml." + name); + } + + public static Stream OpenPbf(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + return assembly.GetManifestResourceStream("Tests.SpatialLite.Osm.Data.Pbf." + name); + } + + public static Stream OpenOsmDB(string name) + { + var assembly = typeof(TestDataReader).GetTypeInfo().Assembly; + return assembly.GetManifestResourceStream("Tests.SpatialLite.Osm.Data.OsmDatabase." + name); + } +} diff --git a/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs b/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs index 03f5a47..b27ee2e 100644 --- a/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs +++ b/src/Tests.SpatialLite.Osm/EntityCollectionTests.cs @@ -1,201 +1,224 @@ -using System; -using System.Linq; - -using Xunit; -using Moq; - -using SpatialLite.Osm; -using SpatialLite.Osm.Geometries; - -namespace Tests.SpatialLite.Osm { - public class EntityCollectionTests { - IOsmGeometry[] _data; - - public EntityCollectionTests() { - _data = new IOsmGeometry[3]; - _data[0] = new Node(1); - _data[1] = new Node(2); - _data[2] = new Node(3); - } - - [Fact] - public void Constructor__CreatesEmptyCollection() { - EntityCollection target = new EntityCollection(); - - Assert.Empty(target); - } - - [Fact] - public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() { - EntityCollection target = new EntityCollection(_data); - - for (int i = 0; i < _data.Length; i++) { - Assert.Contains(_data[i], target); - } - } - - [Fact] - public void Count_ReturnsNumberOfElements() { - EntityCollection target = new EntityCollection(_data); - Mock entityM = new Mock(); - - Assert.Equal(_data.Length, target.Count); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseForEmptyCollection() { - EntityCollection target = new EntityCollection(); - - Assert.DoesNotContain(_data[0], target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseForNull() { - EntityCollection target = new EntityCollection(); - - Assert.DoesNotContain(null, target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainEntity() { - EntityCollection target = new EntityCollection(_data.Skip(1)); - - Assert.DoesNotContain(_data[0], target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsEntity() { - EntityCollection target = new EntityCollection(_data); - - Assert.Contains(_data[0], target); - } - - [Fact] - public void Contains_ID_ReturnsFalseForEmptyCollection() { - EntityCollection target = new EntityCollection(); - - Assert.False(target.Contains(_data[0].ID)); - } - - [Fact] - public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainEntity() { - EntityCollection target = new EntityCollection(_data.Skip(1)); - - Assert.False(target.Contains(_data[0].ID)); - } - - [Fact] - public void Contains_ID_ReturnsTrueIfCollectionContainsEntity() { - EntityCollection target = new EntityCollection(_data); - - Assert.True(target.Contains(_data[0].ID)); - } - - [Fact] - public void Clear_RemovesAllItemsFromCollection() { - EntityCollection target = new EntityCollection(_data); - target.Clear(); - - Assert.Empty(target); - } - - [Fact] - public void Add_AddsEntityToCollection() { - EntityCollection target = new EntityCollection(); - target.Add(_data[0]); - - Assert.Contains(_data[0], target); - } - - [Fact] - public void Add_ThrowsArgumentNullExceptionIfItemIsNull() { - EntityCollection target = new EntityCollection(); - - Assert.Throws(() => target.Add(null)); - } - - [Fact] - public void Add_ThrowsExceptionWhenAddingDuplicateID() { - EntityCollection target = new EntityCollection(_data); - - Assert.Throws(() => target.Add(_data[0])); - } - - [Fact] - public void IsReadOnly_ReturnsFalse() { - EntityCollection target = new EntityCollection(); - - Assert.False(target.IsReadOnly); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfItemIsNotPresent() { - EntityCollection target = new EntityCollection(_data.Skip(1)); - - bool callResult = target.Remove(_data[0]); - - Assert.False(callResult); - Assert.Contains(_data[1], target); - Assert.Contains(_data[2], target); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsFalseIfItemIsNull() { - EntityCollection target = new EntityCollection(_data); - - bool callResult = target.Remove(null); - - Assert.False(callResult); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsTrueAndRemovesItemFromCollection() { - EntityCollection target = new EntityCollection(_data); - - bool callResult = target.Remove(_data[0]); - - Assert.True(callResult); - Assert.DoesNotContain(_data[0], target); - Assert.Contains(_data[1], target); - Assert.Contains(_data[2], target); - } - - [Fact] - public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfItemIsNotPresent() { - EntityCollection target = new EntityCollection(_data.Skip(1)); - - bool callResult = target.Remove(_data[0].ID); - - Assert.False(callResult); - Assert.Contains(_data[1], target); - Assert.Contains(_data[2], target); - } - - [Fact] - public void Remove_ID_ReturnsTrueAndRemovesItemFromCollection() { - EntityCollection target = new EntityCollection(_data); - - bool callResult = target.Remove(_data[0].ID); - - Assert.True(callResult); - Assert.DoesNotContain(_data[0], target); - Assert.Contains(_data[1], target); - Assert.Contains(_data[2], target); - } - - [Fact] - public void Item_ReturnsNullIfIDIsNotpResentInCollection() { - EntityCollection target = new EntityCollection(_data); - - Assert.Null(target[1000]); - } - - [Fact] - public void Item_ReturnsEntityWitSpecificID() { - EntityCollection target = new EntityCollection(_data); - IOsmGeometry entity = target[1]; - - Assert.Equal(1, entity.ID); - } - } -} +using Moq; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class EntityCollectionTests +{ + private readonly IOsmGeometry[] _data; + + public EntityCollectionTests() + { + _data = new IOsmGeometry[3]; + _data[0] = new Node(1); + _data[1] = new Node(2); + _data[2] = new Node(3); + } + + [Fact] + public void Constructor__CreatesEmptyCollection() + { + EntityCollection target = new(); + + Assert.Empty(target); + } + + [Fact] + public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() + { + EntityCollection target = new(_data); + + for (int i = 0; i < _data.Length; i++) + { + Assert.Contains(_data[i], target); + } + } + + [Fact] + public void Count_ReturnsNumberOfElements() + { + EntityCollection target = new(_data); + Mock entityM = new(); + + Assert.Equal(_data.Length, target.Count); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseForEmptyCollection() + { + EntityCollection target = new(); + + Assert.DoesNotContain(_data[0], target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseForNull() + { + EntityCollection target = new(); + + Assert.DoesNotContain(null, target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainEntity() + { + EntityCollection target = new(_data.Skip(1)); + + Assert.DoesNotContain(_data[0], target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsEntity() + { + EntityCollection target = new(_data); + + Assert.Contains(_data[0], target); + } + + [Fact] + public void Contains_ID_ReturnsFalseForEmptyCollection() + { + EntityCollection target = new(); + + Assert.False(target.Contains(_data[0].ID)); + } + + [Fact] + public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainEntity() + { + EntityCollection target = new(_data.Skip(1)); + + Assert.False(target.Contains(_data[0].ID)); + } + + [Fact] + public void Contains_ID_ReturnsTrueIfCollectionContainsEntity() + { + EntityCollection target = new(_data); + + Assert.True(target.Contains(_data[0].ID)); + } + + [Fact] + public void Clear_RemovesAllItemsFromCollection() + { + EntityCollection target = new(_data); + target.Clear(); + + Assert.Empty(target); + } + + [Fact] + public void Add_AddsEntityToCollection() + { + EntityCollection target = new(); + target.Add(_data[0]); + + Assert.Contains(_data[0], target); + } + + [Fact] + public void Add_ThrowsArgumentNullExceptionIfItemIsNull() + { + EntityCollection target = new(); + + Assert.Throws(() => target.Add(null)); + } + + [Fact] + public void Add_ThrowsExceptionWhenAddingDuplicateID() + { + EntityCollection target = new(_data); + + Assert.Throws(() => target.Add(_data[0])); + } + + [Fact] + public void IsReadOnly_ReturnsFalse() + { + EntityCollection target = new(); + + Assert.False(target.IsReadOnly); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfItemIsNotPresent() + { + EntityCollection target = new(_data.Skip(1)); + + bool callResult = target.Remove(_data[0]); + + Assert.False(callResult); + Assert.Contains(_data[1], target); + Assert.Contains(_data[2], target); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsFalseIfItemIsNull() + { + EntityCollection target = new(_data); + + bool callResult = target.Remove(null); + + Assert.False(callResult); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsTrueAndRemovesItemFromCollection() + { + EntityCollection target = new(_data); + + bool callResult = target.Remove(_data[0]); + + Assert.True(callResult); + Assert.DoesNotContain(_data[0], target); + Assert.Contains(_data[1], target); + Assert.Contains(_data[2], target); + } + + [Fact] + public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfItemIsNotPresent() + { + EntityCollection target = new(_data.Skip(1)); + + bool callResult = target.Remove(_data[0].ID); + + Assert.False(callResult); + Assert.Contains(_data[1], target); + Assert.Contains(_data[2], target); + } + + [Fact] + public void Remove_ID_ReturnsTrueAndRemovesItemFromCollection() + { + EntityCollection target = new(_data); + + bool callResult = target.Remove(_data[0].ID); + + Assert.True(callResult); + Assert.DoesNotContain(_data[0], target); + Assert.Contains(_data[1], target); + Assert.Contains(_data[2], target); + } + + [Fact] + public void Item_ReturnsNullIfIDIsNotpResentInCollection() + { + EntityCollection target = new(_data); + + Assert.Null(target[1000]); + } + + [Fact] + public void Item_ReturnsEntityWitSpecificID() + { + EntityCollection target = new(_data); + IOsmGeometry entity = target[1]; + + Assert.Equal(1, entity.ID); + } +} diff --git a/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs b/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs index ab01fdc..5f75128 100644 --- a/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs +++ b/src/Tests.SpatialLite.Osm/Geometries/NodeTests.cs @@ -1,96 +1,104 @@ -using Xunit; - -using SpatialLite.Core; -using SpatialLite.Core.API; -using SpatialLite.Osm; -using SpatialLite.Osm.Geometries; - -namespace Tests.SpatialLite.Osm.Geometry { - public class NodeTests { - - [Fact] - public void Constructor_int_CreatesNodeAndInitializeProperties() { - int id = 11; - Node target = new Node(id); - - Assert.Equal(Coordinate.Empty, target.Position); - Assert.Equal(id, target.ID); - Assert.NotNull(target.Tags); - Assert.Null(target.Metadata); - } - - [Fact] - public void Constructor_int_double_double_CreatesNodeAndInitializeProperties() { - int id = 11; - Coordinate coord = new Coordinate(-15.6, 68.7); - Node target = new Node(id, coord.X, coord.Y); - - Assert.Equal(target.Position.X, coord.X); - Assert.Equal(target.Position.Y, coord.Y); - Assert.Equal(id, target.ID); - Assert.NotNull(target.Tags); - Assert.Null(target.Metadata); - } - - [Fact] - public void Constructor_int_double_double_Tags_CreatesNodeAndInitializesProperties() { - int id = 11; - Coordinate coord = new Coordinate(-15.6, 68.7); - TagsCollection tags = new TagsCollection(); - - Node target = new Node(id, coord.X, coord.Y, tags); - - Assert.Equal(target.Position.X, coord.X); - Assert.Equal(target.Position.Y, coord.Y); - Assert.Equal(id, target.ID); - Assert.Same(tags, target.Tags); - Assert.Null(target.Metadata); - } - - [Fact] - public void Constructor_int_Coordinate_CreatesNodeAndInitializeProperties() { - int id = 11; - Coordinate coord = new Coordinate(-15.6, 68.7); - Node target = new Node(id, coord); - - Assert.Equal(id, target.ID); - Assert.Equal(target.Position.X, coord.X); - Assert.Equal(target.Position.Y, coord.Y); - Assert.NotNull(target.Tags); - } - - [Fact] - public void Constructor_int_Coordinate_Tags_CreatesNodeAndInitializeProperties() { - int id = 11; - Coordinate coord = new Coordinate(-15.6, 68.7); - TagsCollection tags = new TagsCollection(); - - Node target = new Node(id, coord, tags); - - Assert.Equal(id, target.ID); - Assert.Equal(target.Position.X, coord.X); - Assert.Equal(target.Position.Y, coord.Y); - Assert.Same(tags, target.Tags); - } - - [Fact] - public void Constructor_NodeInfo_CreatesNodeFromNodeInfo() { - NodeInfo info = new NodeInfo(1, 15.6, 20.4, new TagsCollection(), new EntityMetadata()); - - Node target = Node.FromNodeInfo(info); - - Assert.Equal(info.ID, target.ID); - Assert.Equal(info.Longitude, target.Position.X); - Assert.Equal(info.Latitude, target.Position.Y); - Assert.Same(info.Tags, target.Tags); - Assert.Same(info.Metadata, target.Metadata); - } - - [Fact] - public void EntityType_Returns_Node() { - Node target = new Node(1); - - Assert.Equal(EntityType.Node, target.EntityType); - } - } -} + + +using SpatialLite.Core.API; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Osm.Geometries; + +public class NodeTests +{ + + [Fact] + public void Constructor_int_CreatesNodeAndInitializeProperties() + { + int id = 11; + Node target = new(id); + + Assert.Equal(Coordinate.Empty, target.Position); + Assert.Equal(id, target.ID); + Assert.NotNull(target.Tags); + Assert.Null(target.Metadata); + } + + [Fact] + public void Constructor_int_double_double_CreatesNodeAndInitializeProperties() + { + int id = 11; + Coordinate coord = new(-15.6, 68.7); + Node target = new(id, coord.X, coord.Y); + + Assert.Equal(target.Position.X, coord.X); + Assert.Equal(target.Position.Y, coord.Y); + Assert.Equal(id, target.ID); + Assert.NotNull(target.Tags); + Assert.Null(target.Metadata); + } + + [Fact] + public void Constructor_int_double_double_Tags_CreatesNodeAndInitializesProperties() + { + int id = 11; + Coordinate coord = new(-15.6, 68.7); + TagsCollection tags = new(); + + Node target = new(id, coord.X, coord.Y, tags); + + Assert.Equal(target.Position.X, coord.X); + Assert.Equal(target.Position.Y, coord.Y); + Assert.Equal(id, target.ID); + Assert.Same(tags, target.Tags); + Assert.Null(target.Metadata); + } + + [Fact] + public void Constructor_int_Coordinate_CreatesNodeAndInitializeProperties() + { + int id = 11; + Coordinate coord = new(-15.6, 68.7); + Node target = new(id, coord); + + Assert.Equal(id, target.ID); + Assert.Equal(target.Position.X, coord.X); + Assert.Equal(target.Position.Y, coord.Y); + Assert.NotNull(target.Tags); + } + + [Fact] + public void Constructor_int_Coordinate_Tags_CreatesNodeAndInitializeProperties() + { + int id = 11; + Coordinate coord = new(-15.6, 68.7); + TagsCollection tags = new(); + + Node target = new(id, coord, tags); + + Assert.Equal(id, target.ID); + Assert.Equal(target.Position.X, coord.X); + Assert.Equal(target.Position.Y, coord.Y); + Assert.Same(tags, target.Tags); + } + + [Fact] + public void Constructor_NodeInfo_CreatesNodeFromNodeInfo() + { + NodeInfo info = new(1, 15.6, 20.4, new TagsCollection(), new EntityMetadata()); + + Node target = Node.FromNodeInfo(info); + + Assert.Equal(info.ID, target.ID); + Assert.Equal(info.Longitude, target.Position.X); + Assert.Equal(info.Latitude, target.Position.Y); + Assert.Same(info.Tags, target.Tags); + Assert.Same(info.Metadata, target.Metadata); + } + + [Fact] + public void EntityType_Returns_Node() + { + Node target = new(1); + + Assert.Equal(EntityType.Node, target.EntityType); + } +} diff --git a/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs b/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs index 561df3a..80dd312 100644 --- a/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs +++ b/src/Tests.SpatialLite.Osm/Geometries/OsmGeometryDatabaseTests.cs @@ -1,161 +1,178 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.IO; - -using Xunit; -using Moq; -using SpatialLite.Osm.IO; -using SpatialLite.Osm.Geometries; -using Tests.SpatialLite.Osm.Data; - -namespace Tests.SpatialLite.Osm.Geometries { - public class OsmGeometryDatabaseTests { - Node[] _nodeData; - Way[] _wayData; - Relation[] _relationData; - IOsmGeometry[] _data; - public OsmGeometryDatabaseTests() { - _nodeData = new Node[3]; - _nodeData[0] = new Node(1); - _nodeData[1] = new Node(2); - _nodeData[2] = new Node(3); - - _wayData = new Way[2]; - _wayData[0] = new Way(10, _nodeData); - _wayData[1] = new Way(11, _nodeData.Skip(1)); - - _relationData = new Relation[2]; - _relationData[0] = new Relation(100, new RelationMember[] { new RelationMember(_wayData[0], "way"), new RelationMember(_nodeData[0], "node") }); - _relationData[1] = new Relation(101, new RelationMember[] { new RelationMember(_relationData[0], "relation"), new RelationMember(_nodeData[0], "node") }); - - _data = _nodeData.Concat(_wayData).Concat(_relationData).ToArray(); - } - - [Fact] - public void Constructor__CreatesEmptyDatabase() { - OsmGeometryDatabase target = new OsmGeometryDatabase(); - - Assert.Empty(target); - Assert.Empty(target.Nodes); - Assert.Empty(target.Ways); - Assert.Empty(target.Relations); - } - - [Fact] - public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() { - OsmGeometryDatabase target = new OsmGeometryDatabase(_data); - - for (int i = 0; i < _data.Length; i++) { - Assert.Contains(_data[i], target); - } - } - - [Fact] - public void Constructor_IEnumerable_AddEnittiesToCorrextCollections() { - OsmGeometryDatabase target = new OsmGeometryDatabase(_data); - - for (int i = 0; i < _nodeData.Length; i++) { - Assert.Contains(_nodeData[i], target.Nodes); - } - - for (int i = 0; i < _wayData.Length; i++) { - Assert.Contains(_wayData[i], target.Ways); - } - - for (int i = 0; i < _relationData.Length; i++) { - Assert.Contains(_relationData[i], target.Relations); - } - } - - [Fact] - public void Load_LoadsNodes() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-nodes.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(3, target.Nodes.Count); - Assert.True(target.Nodes.Contains(1)); - Assert.True(target.Nodes.Contains(2)); - Assert.True(target.Nodes.Contains(3)); - } - - [Fact] - public void Load_LoadsWay() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(3, target.Nodes.Count); - Assert.True(target.Nodes.Contains(1)); - Assert.True(target.Nodes.Contains(2)); - Assert.True(target.Nodes.Contains(3)); - - Assert.Equal(1, target.Ways.Count); - Assert.True(target.Ways.Contains(10)); - } - - [Fact] - public void Load_LoadsRelation() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(1, target.Nodes.Count); - Assert.True(target.Nodes.Contains(1)); - - Assert.Equal(1, target.Relations.Count); - Assert.True(target.Relations.Contains(100)); - } - - [Fact] - public void Load_CanLoadRelationsWithReferenceToRelationsNotYetCreated() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation-ref-other-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(2, target.Relations.Count); - Assert.True(target.Relations.Contains(100)); - Assert.True(target.Relations.Contains(101)); - - Assert.Equal(101, target.Relations[100].Geometries[0].Member.ID); - } - - [Fact] - public void Load_ThrowsExceptionIfAllRelationReferencesAreNotResolvedAtTheEndOfLoadingAndIgnoreMissingIsFalse() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation-invalid-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - Assert.Throws(() => OsmGeometryDatabase.Load(reader, false)); - } - - [Fact] - public void Load_DoesNotThrowExceptionIfIgnoreMissingIsTrueAndWaysNodeIsMissing() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-way-invalid-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = null; - target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(2, target.Nodes.Count); - Assert.Equal(0, target.Ways.Count); - } - - [Fact] - public void Load_DoesNotThrowExceptionIfIgnoreMissingIsTrueAndRelationMemberIsMissing() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation-invalid-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = null; - target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(1, target.Relations.Count); - } - - [Fact] - public void Save_CallsIOsmWriterWriteForAllEntities() { - List written = new List(); - Mock writerM = new Mock(); - - writerM.Setup(w => w.Write(It.IsAny())).Callback((e) => written.Add(e)); - - OsmGeometryDatabase target = new OsmGeometryDatabase(_data); - target.Save(writerM.Object); - - Assert.Equal(target.Count, written.Count); - foreach (var entity in target) { - Assert.Contains(entity, written); - } - } - } -} +using Moq; +using SpatialLite.Osm.Geometries; +using SpatialLite.Osm.IO; +using System; +using System.Collections.Generic; +using System.Linq; +using Tests.SpatialLite.Osm.Data; +using Xunit; + +namespace Tests.SpatialLite.Osm.Geometries; + +public class OsmGeometryDatabaseTests +{ + private readonly Node[] _nodeData; + private readonly Way[] _wayData; + private readonly Relation[] _relationData; + private readonly IOsmGeometry[] _data; + + public OsmGeometryDatabaseTests() + { + _nodeData = new Node[3]; + _nodeData[0] = new Node(1); + _nodeData[1] = new Node(2); + _nodeData[2] = new Node(3); + + _wayData = new Way[2]; + _wayData[0] = new Way(10, _nodeData); + _wayData[1] = new Way(11, _nodeData.Skip(1)); + + _relationData = new Relation[2]; + _relationData[0] = new Relation(100, new RelationMember[] { new(_wayData[0], "way"), new(_nodeData[0], "node") }); + _relationData[1] = new Relation(101, new RelationMember[] { new(_relationData[0], "relation"), new(_nodeData[0], "node") }); + + _data = _nodeData.Concat(_wayData).Concat(_relationData).ToArray(); + } + + [Fact] + public void Constructor__CreatesEmptyDatabase() + { + OsmGeometryDatabase target = new(); + + Assert.Empty(target); + Assert.Empty(target.Nodes); + Assert.Empty(target.Ways); + Assert.Empty(target.Relations); + } + + [Fact] + public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() + { + OsmGeometryDatabase target = new(_data); + + for (int i = 0; i < _data.Length; i++) + { + Assert.Contains(_data[i], target); + } + } + + [Fact] + public void Constructor_IEnumerable_AddEnittiesToCorrextCollections() + { + OsmGeometryDatabase target = new(_data); + + for (int i = 0; i < _nodeData.Length; i++) + { + Assert.Contains(_nodeData[i], target.Nodes); + } + + for (int i = 0; i < _wayData.Length; i++) + { + Assert.Contains(_wayData[i], target.Ways); + } + + for (int i = 0; i < _relationData.Length; i++) + { + Assert.Contains(_relationData[i], target.Relations); + } + } + + [Fact] + public void Load_LoadsNodes() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-nodes.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); + + Assert.Equal(3, target.Nodes.Count); + Assert.True(target.Nodes.Contains(1)); + Assert.True(target.Nodes.Contains(2)); + Assert.True(target.Nodes.Contains(3)); + } + + [Fact] + public void Load_LoadsWay() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); + + Assert.Equal(3, target.Nodes.Count); + Assert.True(target.Nodes.Contains(1)); + Assert.True(target.Nodes.Contains(2)); + Assert.True(target.Nodes.Contains(3)); + + Assert.Single(target.Ways); + Assert.True(target.Ways.Contains(10)); + } + + [Fact] + public void Load_LoadsRelation() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); + + Assert.Single(target.Nodes); + Assert.True(target.Nodes.Contains(1)); + + Assert.Single(target.Relations); + Assert.True(target.Relations.Contains(100)); + } + + [Fact] + public void Load_CanLoadRelationsWithReferenceToRelationsNotYetCreated() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation-ref-other-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); + + Assert.Equal(2, target.Relations.Count); + Assert.True(target.Relations.Contains(100)); + Assert.True(target.Relations.Contains(101)); + + Assert.Equal(101, target.Relations[100].Geometries[0].Member.ID); + } + + [Fact] + public void Load_ThrowsExceptionIfAllRelationReferencesAreNotResolvedAtTheEndOfLoadingAndIgnoreMissingIsFalse() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation-invalid-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + Assert.Throws(() => OsmGeometryDatabase.Load(reader, false)); + } + + [Fact] + public void Load_DoesNotThrowExceptionIfIgnoreMissingIsTrueAndWaysNodeIsMissing() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-way-invalid-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = null; + target = OsmGeometryDatabase.Load(reader, true); + + Assert.Equal(2, target.Nodes.Count); + Assert.Empty(target.Ways); + } + + [Fact] + public void Load_DoesNotThrowExceptionIfIgnoreMissingIsTrueAndRelationMemberIsMissing() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation-invalid-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = null; + target = OsmGeometryDatabase.Load(reader, true); + + Assert.Single(target.Relations); + } + + [Fact] + public void Save_CallsIOsmWriterWriteForAllEntities() + { + List written = new(); + Mock writerM = new(); + + writerM.Setup(w => w.Write(It.IsAny())).Callback(written.Add); + + OsmGeometryDatabase target = new(_data); + target.Save(writerM.Object); + + Assert.Equal(target.Count, written.Count); + foreach (var entity in target) + { + Assert.Contains(entity, written); + } + } +} diff --git a/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs b/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs index 6f2bec5..ae2c7ee 100644 --- a/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs +++ b/src/Tests.SpatialLite.Osm/Geometries/RelationMemberTests.cs @@ -1,160 +1,177 @@ -using System; - -using Xunit; -using Moq; - -using SpatialLite.Osm.Geometries; -using SpatialLite.Core.API; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm.Geometries { - public class RelationMemberTests { - IEntityCollection _nodesEntityCollection; - - public RelationMemberTests() { - Mock> _nodesCollectionM = new Mock>(); - _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(new Node(1, 1.1, 2.2)); - _nodesCollectionM.Setup(c => c.Contains(1, EntityType.Node)).Returns(true); - _nodesEntityCollection = _nodesCollectionM.Object; - } - - [Fact] - public void Constructor_Member_CreatesNewRelationMembeAndSetsMember() { - Node member = new Node(11); - RelationMember target = new RelationMember(member); - - Assert.Same(member, target.Member); - Assert.True(string.IsNullOrEmpty(target.Role)); - } - - [Fact] - public void Constructor_Member_ThrowsExceptionIfMemberIsNull() { - Assert.Throws(() => new RelationMember(null)); - } - - [Fact] - public void Constructor_Member_Role_CreatesRelationMemberAndSetsMemberAndRole() { - Node member = new Node(11); - string role = "role"; - RelationMember target = new RelationMember(member, role); - - Assert.Same(member, target.Member); - Assert.Equal(role, target.Role); - } - - [Fact] - public void Constructor_Member_Role_ThrowsExceptionIfMemberIsNull() { - Assert.Throws(() => new RelationMember(null)); - } - - [Fact] - public void FromRelationMemberInfo_ThrowExceptionIfTypeIsUnknown() { - RelationMemberInfo info = new RelationMemberInfo() { Reference = 1, MemberType = EntityType.Unknown, Role = "role" }; - - Assert.Throws(() => RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true)); - } - - [Fact] - public void FromRelationMemberInfo_CreatesRelationMember() { - RelationMemberInfo info = new RelationMemberInfo() { Reference = 1, MemberType = EntityType.Node, Role = "role" }; - RelationMember target = RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true); - - Assert.Equal(info.Reference, target.Member.ID); - Assert.Equal(info.Role, target.Role); - Assert.Equal(info.MemberType, target.MemberType); - } - - [Fact] - public void FromRelationMemberInfo_ThrowExceptionIfReferencedEntityIsNotAvailable() { - RelationMemberInfo info = new RelationMemberInfo() { Reference = 10000, MemberType = EntityType.Node, Role = "role" }; - - Assert.Throws(() => RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true)); - } - - [Fact] - public void FromRelationMemberInfo_ReturnsNullIfReferencedEntityIsNotAvailableAndThrowOnMissingIsFalse() { - RelationMemberInfo info = new RelationMemberInfo() { Reference = 10000, MemberType = EntityType.Node, Role = "role" }; - - Assert.Null(RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, false)); - } - - [Fact] - public void FromRelationMemberInfo_ThrowExceptionIfReferencedEntityTypeDoesntMatchMemberType() { - RelationMemberInfo info = new RelationMemberInfo() { Reference = 1, MemberType = EntityType.Way, Role = "role" }; - - Assert.Throws(() => RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true)); - } - - [Fact] - public void Is3D_GetsTrueFor3DMember() { - Mock memberM = new Mock(11); - memberM.SetupGet(property => property.Is3D).Returns(true); - - RelationMember target = new RelationMember(memberM.Object); - - Assert.Equal(memberM.Object.Is3D, target.Is3D); - } - - [Fact] - public void Is3D_GetsFalseFor2DMember() { - Mock memberM = new Mock(11); - memberM.SetupGet(property => property.Is3D).Returns(false); - - RelationMember target = new RelationMember(memberM.Object); - - Assert.Equal(memberM.Object.Is3D, target.Is3D); - } - - [Fact] - public void IsMeasured_GetsTrueForMeasuredMember() { - Mock memberM = new Mock(11); - memberM.SetupGet(property => property.IsMeasured).Returns(true); - - RelationMember target = new RelationMember(memberM.Object); - - Assert.Equal(memberM.Object.IsMeasured, target.IsMeasured); - } - - [Fact] - public void IsMeasured_GetFalseForNonMeasuredMember() { - Mock memberM = new Mock(11); - memberM.SetupGet(property => property.IsMeasured).Returns(false); - - RelationMember target = new RelationMember(memberM.Object); - - Assert.Equal(memberM.Object.IsMeasured, target.IsMeasured); - } - - [Fact] - public void MemberType_ReturnsCorrectValueForNode() { - RelationMember target = new RelationMember(new Node(11)); - - Assert.Equal(EntityType.Node, target.MemberType); - } - - [Fact] - public void MemberType_ReturnsCorrectValueForWay() { - RelationMember target = new RelationMember(new Way(11)); - - Assert.Equal(EntityType.Way, target.MemberType); - } - - [Fact] - public void MemberType_ReturnsCorrectValueForRelation() { - RelationMember target = new RelationMember(new Relation(11)); - - Assert.Equal(EntityType.Relation, target.MemberType); - } - - [Fact] - public void GetEnvelopeReturnsMembersEnvelope() { - Envelope expectedEnvelope = new Envelope(new Coordinate(1.1, 2.2)); - Mock member = new Mock(11); - member.Setup(function => function.GetEnvelope()).Returns(expectedEnvelope); - - RelationMember target = new RelationMember(member.Object); - - Assert.Same(expectedEnvelope, target.GetEnvelope()); - } - } -} +using Moq; +using SpatialLite.Core.API; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using Xunit; + +namespace Tests.SpatialLite.Osm.Geometries; + +public class RelationMemberTests +{ + private readonly IEntityCollection _nodesEntityCollection; + + public RelationMemberTests() + { + Mock> _nodesCollectionM = new(); + _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(new Node(1, 1.1, 2.2)); + _nodesCollectionM.Setup(c => c.Contains(1, EntityType.Node)).Returns(true); + _nodesEntityCollection = _nodesCollectionM.Object; + } + + [Fact] + public void Constructor_Member_CreatesNewRelationMembeAndSetsMember() + { + Node member = new(11); + RelationMember target = new(member); + + Assert.Same(member, target.Member); + Assert.True(string.IsNullOrEmpty(target.Role)); + } + + [Fact] + public void Constructor_Member_ThrowsExceptionIfMemberIsNull() + { + Assert.Throws(() => new RelationMember(null)); + } + + [Fact] + public void Constructor_Member_Role_CreatesRelationMemberAndSetsMemberAndRole() + { + Node member = new(11); + string role = "role"; + RelationMember target = new(member, role); + + Assert.Same(member, target.Member); + Assert.Equal(role, target.Role); + } + + [Fact] + public void Constructor_Member_Role_ThrowsExceptionIfMemberIsNull() + { + Assert.Throws(() => new RelationMember(null)); + } + + [Fact] + public void FromRelationMemberInfo_ThrowExceptionIfTypeIsUnknown() + { + RelationMemberInfo info = new() { Reference = 1, MemberType = EntityType.Unknown, Role = "role" }; + + Assert.Throws(() => RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true)); + } + + [Fact] + public void FromRelationMemberInfo_CreatesRelationMember() + { + RelationMemberInfo info = new() { Reference = 1, MemberType = EntityType.Node, Role = "role" }; + RelationMember target = RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true); + + Assert.Equal(info.Reference, target.Member.ID); + Assert.Equal(info.Role, target.Role); + Assert.Equal(info.MemberType, target.MemberType); + } + + [Fact] + public void FromRelationMemberInfo_ThrowExceptionIfReferencedEntityIsNotAvailable() + { + RelationMemberInfo info = new() { Reference = 10000, MemberType = EntityType.Node, Role = "role" }; + + Assert.Throws(() => RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true)); + } + + [Fact] + public void FromRelationMemberInfo_ReturnsNullIfReferencedEntityIsNotAvailableAndThrowOnMissingIsFalse() + { + RelationMemberInfo info = new() { Reference = 10000, MemberType = EntityType.Node, Role = "role" }; + + Assert.Null(RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, false)); + } + + [Fact] + public void FromRelationMemberInfo_ThrowExceptionIfReferencedEntityTypeDoesntMatchMemberType() + { + RelationMemberInfo info = new() { Reference = 1, MemberType = EntityType.Way, Role = "role" }; + + Assert.Throws(() => RelationMember.FromRelationMemberInfo(info, _nodesEntityCollection, true)); + } + + [Fact] + public void Is3D_GetsTrueFor3DMember() + { + Mock memberM = new(11); + memberM.SetupGet(property => property.Is3D).Returns(true); + + RelationMember target = new(memberM.Object); + + Assert.Equal(memberM.Object.Is3D, target.Is3D); + } + + [Fact] + public void Is3D_GetsFalseFor2DMember() + { + Mock memberM = new(11); + memberM.SetupGet(property => property.Is3D).Returns(false); + + RelationMember target = new(memberM.Object); + + Assert.Equal(memberM.Object.Is3D, target.Is3D); + } + + [Fact] + public void IsMeasured_GetsTrueForMeasuredMember() + { + Mock memberM = new(11); + memberM.SetupGet(property => property.IsMeasured).Returns(true); + + RelationMember target = new(memberM.Object); + + Assert.Equal(memberM.Object.IsMeasured, target.IsMeasured); + } + + [Fact] + public void IsMeasured_GetFalseForNonMeasuredMember() + { + Mock memberM = new(11); + memberM.SetupGet(property => property.IsMeasured).Returns(false); + + RelationMember target = new(memberM.Object); + + Assert.Equal(memberM.Object.IsMeasured, target.IsMeasured); + } + + [Fact] + public void MemberType_ReturnsCorrectValueForNode() + { + RelationMember target = new(new Node(11)); + + Assert.Equal(EntityType.Node, target.MemberType); + } + + [Fact] + public void MemberType_ReturnsCorrectValueForWay() + { + RelationMember target = new(new Way(11)); + + Assert.Equal(EntityType.Way, target.MemberType); + } + + [Fact] + public void MemberType_ReturnsCorrectValueForRelation() + { + RelationMember target = new(new Relation(11)); + + Assert.Equal(EntityType.Relation, target.MemberType); + } + + [Fact] + public void GetEnvelopeReturnsMembersEnvelope() + { + Envelope expectedEnvelope = new(new Coordinate(1.1, 2.2)); + Mock member = new(11); + member.Setup(function => function.GetEnvelope()).Returns(expectedEnvelope); + + RelationMember target = new(member.Object); + + Assert.Same(expectedEnvelope, target.GetEnvelope()); + } +} diff --git a/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs b/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs index a14cfd4..b0ef8eb 100644 --- a/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs +++ b/src/Tests.SpatialLite.Osm/Geometries/RelationTests.cs @@ -1,105 +1,114 @@ -using System; -using System.Collections.Generic; - -using Xunit; -using Moq; - -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm.Geometries { - public class RelationTests { - RelationInfo _relationEmptyInfo = new RelationInfo(100, new TagsCollection(), new List(), new EntityMetadata()); - RelationInfo _relationInfo = new RelationInfo(100, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { Reference = 1, MemberType = EntityType.Node } }, new EntityMetadata()); - - IEntityCollection _nodesEntityCollection; - - public RelationTests() { - Mock> _nodesCollectionM = new Mock>(); - _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(new Node(1, 1.1, 2.2)); - _nodesCollectionM.Setup(c => c.Contains(1, EntityType.Node)).Returns(true); - - _nodesEntityCollection = _nodesCollectionM.Object; - } - - [Fact] - public void Constructor_int_CreatesNewRelationAndInitializesProperties() { - int id = 11; - Relation target = new Relation(id); - - Assert.Equal(id, target.ID); - Assert.Empty(target.Tags); - Assert.Empty(target.Geometries); - } - - [Fact] - public void Constructor_int_IEnumerable_CreatesRelationWithMembersAndInitializesProperties() { - int id = 11; - var members = new RelationMember[] { new RelationMember(new Node(1)), new RelationMember(new Node(2)), new RelationMember(new Node(3)) }; - Relation target = new Relation(id, members); - - Assert.Equal(id, target.ID); - Assert.Equal(members.Length, target.Geometries.Count); - for (int i = 0; i < members.Length; i++) { - Assert.Same(members[i], target.Geometries[i]); - } - - Assert.Empty(target.Tags); - } - - [Fact] - public void Constructor_int_tags_CreatesRelationAndIntializesProperties() { - int id = 11; - var members = new RelationMember[] { new RelationMember(new Node(1)), new RelationMember(new Node(2)), new RelationMember(new Node(3)) }; - TagsCollection tags = new TagsCollection(); - Relation target = new Relation(id, members, tags); - - Assert.Equal(id, target.ID); - Assert.Equal(members.Length, target.Geometries.Count); - for (int i = 0; i < members.Length; i++) { - Assert.Same(members[i], target.Geometries[i]); - } - - Assert.Same(tags, target.Tags); - } - - [Fact] - public void FromRelationInfo_SetsRelationProperties() { - Relation target = Relation.FromRelationInfo(_relationEmptyInfo, _nodesEntityCollection ,true); - - Assert.Equal(_relationEmptyInfo.ID, target.ID); - Assert.Same(_relationEmptyInfo.Tags, target.Tags); - Assert.Same(_relationEmptyInfo.Metadata, target.Metadata); - } - - [Fact] - public void FromRelationInfo_SetsRelationMembers() { - Relation target = Relation.FromRelationInfo(_relationInfo, _nodesEntityCollection, true); - - Assert.Single(target.Geometries); - Assert.Equal(_relationInfo.Members[0].Reference, target.Geometries[0].Member.ID); - } - - [Fact] - public void FromRelationInfo_ThrowExceptionIfCollectionDoesntContainReferencedEntityAndThrowOnMissingIsTrue() { - _relationInfo.Members[0] = new RelationMemberInfo() { Reference = 10000, MemberType = EntityType.Node }; - - Assert.Throws(() => Relation.FromRelationInfo(_relationInfo, _nodesEntityCollection, true)); - } - - [Fact] - public void FromRelationInfo_ReturnsNullIfCollectionDoesntContainReferencedEntityAndThrowOnMissingIsFalse() { - _relationInfo.Members[0] = new RelationMemberInfo() { Reference = 10000, MemberType = EntityType.Node }; - - Assert.Null(Relation.FromRelationInfo(_relationInfo, _nodesEntityCollection, false)); - } - - [Fact] - public void EntityType_Returns_Relation() { - Relation target = new Relation(100); - - Assert.Equal(EntityType.Relation, target.EntityType); - } - - } -} +using Moq; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Osm.Geometries; + +public class RelationTests +{ + private readonly RelationInfo _relationEmptyInfo = new(100, new TagsCollection(), new List(), new EntityMetadata()); + private readonly RelationInfo _relationInfo = new(100, new TagsCollection(), new RelationMemberInfo[] { new() { Reference = 1, MemberType = EntityType.Node } }, new EntityMetadata()); + + private readonly IEntityCollection _nodesEntityCollection; + + public RelationTests() + { + Mock> _nodesCollectionM = new(); + _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(new Node(1, 1.1, 2.2)); + _nodesCollectionM.Setup(c => c.Contains(1, EntityType.Node)).Returns(true); + + _nodesEntityCollection = _nodesCollectionM.Object; + } + + [Fact] + public void Constructor_int_CreatesNewRelationAndInitializesProperties() + { + int id = 11; + Relation target = new(id); + + Assert.Equal(id, target.ID); + Assert.Empty(target.Tags); + Assert.Empty(target.Geometries); + } + + [Fact] + public void Constructor_int_IEnumerable_CreatesRelationWithMembersAndInitializesProperties() + { + int id = 11; + var members = new RelationMember[] { new(new Node(1)), new(new Node(2)), new(new Node(3)) }; + Relation target = new(id, members); + + Assert.Equal(id, target.ID); + Assert.Equal(members.Length, target.Geometries.Count); + for (int i = 0; i < members.Length; i++) + { + Assert.Same(members[i], target.Geometries[i]); + } + + Assert.Empty(target.Tags); + } + + [Fact] + public void Constructor_int_tags_CreatesRelationAndIntializesProperties() + { + int id = 11; + var members = new RelationMember[] { new(new Node(1)), new(new Node(2)), new(new Node(3)) }; + TagsCollection tags = new(); + Relation target = new(id, members, tags); + + Assert.Equal(id, target.ID); + Assert.Equal(members.Length, target.Geometries.Count); + for (int i = 0; i < members.Length; i++) + { + Assert.Same(members[i], target.Geometries[i]); + } + + Assert.Same(tags, target.Tags); + } + + [Fact] + public void FromRelationInfo_SetsRelationProperties() + { + Relation target = Relation.FromRelationInfo(_relationEmptyInfo, _nodesEntityCollection, true); + + Assert.Equal(_relationEmptyInfo.ID, target.ID); + Assert.Same(_relationEmptyInfo.Tags, target.Tags); + Assert.Same(_relationEmptyInfo.Metadata, target.Metadata); + } + + [Fact] + public void FromRelationInfo_SetsRelationMembers() + { + Relation target = Relation.FromRelationInfo(_relationInfo, _nodesEntityCollection, true); + + Assert.Single(target.Geometries); + Assert.Equal(_relationInfo.Members[0].Reference, target.Geometries[0].Member.ID); + } + + [Fact] + public void FromRelationInfo_ThrowExceptionIfCollectionDoesntContainReferencedEntityAndThrowOnMissingIsTrue() + { + _relationInfo.Members[0] = new RelationMemberInfo() { Reference = 10000, MemberType = EntityType.Node }; + + Assert.Throws(() => Relation.FromRelationInfo(_relationInfo, _nodesEntityCollection, true)); + } + + [Fact] + public void FromRelationInfo_ReturnsNullIfCollectionDoesntContainReferencedEntityAndThrowOnMissingIsFalse() + { + _relationInfo.Members[0] = new RelationMemberInfo() { Reference = 10000, MemberType = EntityType.Node }; + + Assert.Null(Relation.FromRelationInfo(_relationInfo, _nodesEntityCollection, false)); + } + + [Fact] + public void EntityType_Returns_Relation() + { + Relation target = new(100); + + Assert.Equal(EntityType.Relation, target.EntityType); + } +} diff --git a/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs b/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs index 973d609..03c4ce2 100644 --- a/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs +++ b/src/Tests.SpatialLite.Osm/Geometries/WayCoordinateListTests.cs @@ -1,83 +1,91 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Xunit; - -using SpatialLite.Core.API; -using SpatialLite.Osm.Geometries; - -namespace Tests.SpatialLite.Osm.Geometries { - public class WayCoordinateListTests { - List _nodes = new List(new Node[] { - new Node(5, 1.1, 2.2), - new Node(6, 10.1, -20.2), - new Node(7, -30.1, 40.2) }); - - - [Fact] - public void Constructor_Source_SetsSource() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Same(_nodes, target.Source); - } - - [Fact] - public void Indexer_Get_ReturnsCoordinatesFromSourceList() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - for (int i = 0; i < _nodes.Count; i++) { - Assert.Equal(_nodes[i].Position, target[i]); - } - } - - [Fact] - public void Indexer_Set_ThrowsNotSupportedException() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Throws(() => target[0] = new Coordinate(10.1, 11.2)); - } - - [Fact] - public void Count_GetsNumberOfItemsInSourceCollection() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Equal(_nodes.Count, target.Count); - } - - [Fact] - public void Add_Coordinate_ThowsNotSupportedException() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Throws(() => target.Add(Coordinate.Empty)); - } - - [Fact] - public void Add_Coordinates_ThowsNotSupportedException() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Throws(() => target.Add(new Coordinate[] { Coordinate.Empty })); - } - - [Fact] - public void Insert_Index_Coordinate_ThowsNotSupportedException() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Throws(() => target.Insert(0, Coordinate.Empty)); - } - - [Fact] - public void RemoveAt_Index_ThowsNotSupportedException() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Throws(() => target.RemoveAt(0)); - } - - [Fact] - public void Clear_ThowsNotSupportedException() { - WayCoordinateList target = new WayCoordinateList(_nodes); - - Assert.Throws(() => target.Clear()); - } - } -} +using SpatialLite.Core.API; +using SpatialLite.Osm.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Osm.Geometries; + +public class WayCoordinateListTests +{ + private readonly List _nodes = new(new Node[] { + new(5, 1.1, 2.2), + new(6, 10.1, -20.2), + new(7, -30.1, 40.2) }); + + + [Fact] + public void Constructor_Source_SetsSource() + { + WayCoordinateList target = new(_nodes); + + Assert.Same(_nodes, target.Source); + } + + [Fact] + public void Indexer_Get_ReturnsCoordinatesFromSourceList() + { + WayCoordinateList target = new(_nodes); + + for (int i = 0; i < _nodes.Count; i++) + { + Assert.Equal(_nodes[i].Position, target[i]); + } + } + + [Fact] + public void Indexer_Set_ThrowsNotSupportedException() + { + WayCoordinateList target = new(_nodes); + + Assert.Throws(() => target[0] = new Coordinate(10.1, 11.2)); + } + + [Fact] + public void Count_GetsNumberOfItemsInSourceCollection() + { + WayCoordinateList target = new(_nodes); + + Assert.Equal(_nodes.Count, target.Count); + } + + [Fact] + public void Add_Coordinate_ThowsNotSupportedException() + { + WayCoordinateList target = new(_nodes); + + Assert.Throws(() => target.Add(Coordinate.Empty)); + } + + [Fact] + public void Add_Coordinates_ThowsNotSupportedException() + { + WayCoordinateList target = new(_nodes); + + Assert.Throws(() => target.Add(new Coordinate[] { Coordinate.Empty })); + } + + [Fact] + public void Insert_Index_Coordinate_ThowsNotSupportedException() + { + WayCoordinateList target = new(_nodes); + + Assert.Throws(() => target.Insert(0, Coordinate.Empty)); + } + + [Fact] + public void RemoveAt_Index_ThowsNotSupportedException() + { + WayCoordinateList target = new(_nodes); + + Assert.Throws(() => target.RemoveAt(0)); + } + + [Fact] + public void Clear_ThowsNotSupportedException() + { + WayCoordinateList target = new(_nodes); + + Assert.Throws(target.Clear); + } +} diff --git a/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs b/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs index 491cf72..587327d 100644 --- a/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs +++ b/src/Tests.SpatialLite.Osm/Geometries/WayTests.cs @@ -1,151 +1,166 @@ -using System; -using System.Collections.Generic; - -using Xunit; -using Moq; - -using SpatialLite.Core; +using Moq; using SpatialLite.Core.Geometries; -using SpatialLite.Osm.Geometries; using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using System.Collections.Generic; +using Xunit; -namespace Tests.SpatialLite.Osm.Geometries { - public class WayTests { - List _nodes = new List(new Node[] { - new Node(1, 1.1, 2.2), - new Node(2, 10.1, -20.2), - new Node(3, -30.1, 40.2) }); - - WayInfo _wayEmptyInfo = new WayInfo(10, new TagsCollection(), new List(), new EntityMetadata()); - WayInfo _wayInfo = new WayInfo(10, new TagsCollection(), new long[] { 1, 2, 3 }, new EntityMetadata()); +namespace Tests.SpatialLite.Osm.Geometries; - IEntityCollection _nodesEntityCollection; +public class WayTests +{ + private readonly List _nodes = new(new Node[] { + new(1, 1.1, 2.2), + new(2, 10.1, -20.2), + new(3, -30.1, 40.2) }); - public WayTests() { - Mock> _nodesCollectionM = new Mock>(); - _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(_nodes[0]); - _nodesCollectionM.SetupGet(c => c[2, EntityType.Node]).Returns(_nodes[1]); - _nodesCollectionM.SetupGet(c => c[3, EntityType.Node]).Returns(_nodes[2]); - _nodesEntityCollection = _nodesCollectionM.Object; - } + private readonly WayInfo _wayEmptyInfo = new(10, new TagsCollection(), new List(), new EntityMetadata()); + private readonly WayInfo _wayInfo = new(10, new TagsCollection(), new long[] { 1, 2, 3 }, new EntityMetadata()); - [Fact] - public void Constructor_ID_CreatesNewEmptyWayAndInitializesProperties() { - int id = 11; + private readonly IEntityCollection _nodesEntityCollection; - Way target = new Way(id); + public WayTests() + { + Mock> _nodesCollectionM = new(); + _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(_nodes[0]); + _nodesCollectionM.SetupGet(c => c[2, EntityType.Node]).Returns(_nodes[1]); + _nodesCollectionM.SetupGet(c => c[3, EntityType.Node]).Returns(_nodes[2]); + _nodesEntityCollection = _nodesCollectionM.Object; + } - Assert.Equal(id, target.ID); - Assert.Empty(target.Nodes); - Assert.Empty(target.Tags); - Assert.Null(target.Metadata); - } + [Fact] + public void Constructor_ID_CreatesNewEmptyWayAndInitializesProperties() + { + int id = 11; - [Fact] - public void Constructor_ID_Nodes_CreatesWayAddsNodesAndInitializesProperties() { - int id = 11; - Way target = new Way(id, _nodes); + Way target = new(id); - Assert.Equal(id, target.ID); - Assert.Equal(_nodes.Count, target.Nodes.Count); - for (int i = 0; i < _nodes.Count; i++) { - Assert.Same(_nodes[i], target.Nodes[i]); - } + Assert.Equal(id, target.ID); + Assert.Empty(target.Nodes); + Assert.Empty(target.Tags); + Assert.Null(target.Metadata); + } - Assert.Empty(target.Tags); - Assert.Null(target.Metadata); + [Fact] + public void Constructor_ID_Nodes_CreatesWayAddsNodesAndInitializesProperties() + { + int id = 11; + Way target = new(id, _nodes); + + Assert.Equal(id, target.ID); + Assert.Equal(_nodes.Count, target.Nodes.Count); + for (int i = 0; i < _nodes.Count; i++) + { + Assert.Same(_nodes[i], target.Nodes[i]); } - [Fact] - public void Constructor_ID_Nodes_Tags_CreatesWayAddsNodesAndInitializesProperties() { - int id = 11; - TagsCollection tags = new TagsCollection(); + Assert.Empty(target.Tags); + Assert.Null(target.Metadata); + } - Way target = new Way(id, _nodes, tags); + [Fact] + public void Constructor_ID_Nodes_Tags_CreatesWayAddsNodesAndInitializesProperties() + { + int id = 11; + TagsCollection tags = new(); - Assert.Equal(id, target.ID); - Assert.Equal(_nodes.Count, target.Nodes.Count); - for (int i = 0; i < _nodes.Count; i++) { - Assert.Same(_nodes[i], target.Nodes[i]); - } + Way target = new(id, _nodes, tags); - Assert.Same(tags, target.Tags); - Assert.Null(target.Metadata); + Assert.Equal(id, target.ID); + Assert.Equal(_nodes.Count, target.Nodes.Count); + for (int i = 0; i < _nodes.Count; i++) + { + Assert.Same(_nodes[i], target.Nodes[i]); } - [Fact] - public void FromWayInfo_SetsProperties() { - Way target = Way.FromWayInfo(_wayEmptyInfo, _nodesEntityCollection, true); + Assert.Same(tags, target.Tags); + Assert.Null(target.Metadata); + } - Assert.Equal(_wayEmptyInfo.ID, target.ID); - Assert.Same(_wayEmptyInfo.Tags, target.Tags); - Assert.Same(_wayEmptyInfo.Metadata, target.Metadata); - Assert.Empty(target.Nodes); - } + [Fact] + public void FromWayInfo_SetsProperties() + { + Way target = Way.FromWayInfo(_wayEmptyInfo, _nodesEntityCollection, true); + + Assert.Equal(_wayEmptyInfo.ID, target.ID); + Assert.Same(_wayEmptyInfo.Tags, target.Tags); + Assert.Same(_wayEmptyInfo.Metadata, target.Metadata); + Assert.Empty(target.Nodes); + } - [Fact] - public void FromWayInfo_SetsNodes() { - Way target = Way.FromWayInfo(_wayInfo, _nodesEntityCollection, true); + [Fact] + public void FromWayInfo_SetsNodes() + { + Way target = Way.FromWayInfo(_wayInfo, _nodesEntityCollection, true); - Assert.Equal(_wayInfo.Nodes.Count, target.Nodes.Count); - for (int i = 0; i < _wayInfo.Nodes.Count; i++) { - Assert.Equal(_wayInfo.Nodes[i], target.Nodes[i].ID); - } + Assert.Equal(_wayInfo.Nodes.Count, target.Nodes.Count); + for (int i = 0; i < _wayInfo.Nodes.Count; i++) + { + Assert.Equal(_wayInfo.Nodes[i], target.Nodes[i].ID); } + } - [Fact] - public void FromWayInfo_ThrowsArgumentExceptionIfReferencedNodeIsNotInCollectionAndMissingNodesAsErrorsIsTrue() { - _wayInfo.Nodes[0] = 10000; + [Fact] + public void FromWayInfo_ThrowsArgumentExceptionIfReferencedNodeIsNotInCollectionAndMissingNodesAsErrorsIsTrue() + { + _wayInfo.Nodes[0] = 10000; - Assert.Throws(() => Way.FromWayInfo(_wayInfo, _nodesEntityCollection, true)); - } + Assert.Throws(() => Way.FromWayInfo(_wayInfo, _nodesEntityCollection, true)); + } - [Fact] - public void FromWayInfo_ReturnsNullIfReferencedNodeIsNotInCollectionAndMissingNodesAsErrorsIsFalse() { - _wayInfo.Nodes[0] = 10000; + [Fact] + public void FromWayInfo_ReturnsNullIfReferencedNodeIsNotInCollectionAndMissingNodesAsErrorsIsFalse() + { + _wayInfo.Nodes[0] = 10000; - Assert.Null(Way.FromWayInfo(_wayInfo, _nodesEntityCollection, false)); - } + Assert.Null(Way.FromWayInfo(_wayInfo, _nodesEntityCollection, false)); + } - [Fact] - public void WhenWayIsInitializedFromWayInfo_CoordinatesReturnsNodesCoordinates() { - Way target = Way.FromWayInfo(_wayInfo, _nodesEntityCollection, true); + [Fact] + public void WhenWayIsInitializedFromWayInfo_CoordinatesReturnsNodesCoordinates() + { + Way target = Way.FromWayInfo(_wayInfo, _nodesEntityCollection, true); - Assert.Equal(_wayInfo.Nodes.Count, target.Nodes.Count); + Assert.Equal(_wayInfo.Nodes.Count, target.Nodes.Count); - Assert.Equal(_nodes[0].Position, target.Coordinates[0]); - Assert.Equal(_nodes[0].Position, target.Coordinates[0]); - Assert.Equal(_nodes[0].Position, target.Coordinates[0]); - } + Assert.Equal(_nodes[0].Position, target.Coordinates[0]); + Assert.Equal(_nodes[0].Position, target.Coordinates[0]); + Assert.Equal(_nodes[0].Position, target.Coordinates[0]); + } - [Fact] - public void Coordinates_GetsPositionOfNodes() { - int id = 11; - Way target = new Way(id, _nodes); + [Fact] + public void Coordinates_GetsPositionOfNodes() + { + int id = 11; + Way target = new(id, _nodes); - Assert.Equal(_nodes.Count, target.Coordinates.Count); - for (int i = 0; i < _nodes.Count; i++) { - Assert.Equal(_nodes[i].Position, target.Coordinates[i]); - } + Assert.Equal(_nodes.Count, target.Coordinates.Count); + for (int i = 0; i < _nodes.Count; i++) + { + Assert.Equal(_nodes[i].Position, target.Coordinates[i]); } + } - [Fact] - public void Coordinates_GetsPositionOfNodesIfWayCastedToLineString() { - int id = 11; - Way way = new Way(id, _nodes); - LineString target = (LineString)way; - - Assert.Equal(_nodes.Count, target.Coordinates.Count); - for (int i = 0; i < _nodes.Count; i++) { - Assert.Equal(_nodes[i].Position, target.Coordinates[i]); - } + [Fact] + public void Coordinates_GetsPositionOfNodesIfWayCastedToLineString() + { + int id = 11; + Way way = new(id, _nodes); + LineString target = way; + + Assert.Equal(_nodes.Count, target.Coordinates.Count); + for (int i = 0; i < _nodes.Count; i++) + { + Assert.Equal(_nodes[i].Position, target.Coordinates[i]); } + } - [Fact] - public void EntityType_Returns_Way() { - Way target = new Way(10); + [Fact] + public void EntityType_Returns_Way() + { + Way target = new(10); - Assert.Equal(EntityType.Way, target.EntityType); - } + Assert.Equal(EntityType.Way, target.EntityType); } } diff --git a/src/Tests.SpatialLite.Osm/IO/OsmReaderSettingsTests.cs b/src/Tests.SpatialLite.Osm/IO/OsmReaderSettingsTests.cs index bc5296b..a9af74f 100644 --- a/src/Tests.SpatialLite.Osm/IO/OsmReaderSettingsTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/OsmReaderSettingsTests.cs @@ -1,24 +1,25 @@ -using System; - -using Xunit; - -using SpatialLite.Osm.IO; - -namespace Tests.SpatialLite.Osm.IO { - public class OsmReaderSettingsTests { - [Fact] - public void Constructor__CreatesSettingsWithDefaultValues() { - OsmReaderSettings target = new OsmReaderSettings(); - - Assert.True(target.ReadMetadata); - } - - [Fact] - public void ReadMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - OsmReaderSettings target = new OsmReaderSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.ReadMetadata = true); - } - } -} +using SpatialLite.Osm.IO; +using System; +using Xunit; + +namespace Tests.SpatialLite.Osm.IO; + +public class OsmReaderSettingsTests +{ + [Fact] + public void Constructor__CreatesSettingsWithDefaultValues() + { + OsmReaderSettings target = new(); + + Assert.True(target.ReadMetadata); + } + + [Fact] + public void ReadMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + OsmReaderSettings target = new(); + target.IsReadOnly = true; + + Assert.Throws(() => target.ReadMetadata = true); + } +} diff --git a/src/Tests.SpatialLite.Osm/IO/OsmWriterSettingsTests.cs b/src/Tests.SpatialLite.Osm/IO/OsmWriterSettingsTests.cs index 0c31851..eba0dfe 100644 --- a/src/Tests.SpatialLite.Osm/IO/OsmWriterSettingsTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/OsmWriterSettingsTests.cs @@ -1,32 +1,34 @@ -using System; - -using Xunit; - -using SpatialLite.Osm.IO; - -namespace Tests.SpatialLite.Osm.IO { - public class OsmWriterSettingsTests { - [Fact] - public void Constructor__CreatesSettingsWithDefaultValues() { - OsmWriterSettings target = new OsmWriterSettings(); - - Assert.True(target.WriteMetadata); - } - - [Fact] - public void WriteMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - OsmWriterSettings target = new OsmWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.WriteMetadata = true); - } - - [Fact] - public void ProgramNameSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - OsmWriterSettings target = new OsmWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.ProgramName = "TEST"); - } - } -} +using SpatialLite.Osm.IO; +using System; +using Xunit; + +namespace Tests.SpatialLite.Osm.IO; + +public class OsmWriterSettingsTests +{ + [Fact] + public void Constructor__CreatesSettingsWithDefaultValues() + { + OsmWriterSettings target = new(); + + Assert.True(target.WriteMetadata); + } + + [Fact] + public void WriteMetadataSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + OsmWriterSettings target = new(); + target.IsReadOnly = true; + + Assert.Throws(() => target.WriteMetadata = true); + } + + [Fact] + public void ProgramNameSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + OsmWriterSettings target = new(); + target.IsReadOnly = true; + + Assert.Throws(() => target.ProgramName = "TEST"); + } +} diff --git a/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs b/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs index 47568a3..7e97abf 100644 --- a/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/OsmXmlReaderTests.cs @@ -1,360 +1,406 @@ -using System; -using System.Linq; +using SpatialLite.Osm; +using SpatialLite.Osm.IO; +using System; using System.IO; +using System.Linq; using System.Xml; - -using Xunit; -using SpatialLite.Osm.IO; -using SpatialLite.Osm; using Tests.SpatialLite.Osm.Data; +using Xunit; -namespace Tests.SpatialLite.Osm.IO { - public class OsmXmlReaderTests { - private EntityMetadata _details; - private NodeInfo _node, _nodeTags, _nodeProperties; - private WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; - private RelationInfo _relationNode, _relationWay, _relationRelation, _relationTags, _relationProperties, _relationWithoutMembers; - - public OsmXmlReaderTests() { - _details = new EntityMetadata() { - Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), - Uid = 127998, - User = "Luk@s", - Visible = true, - Version = 2, - Changeset = 6410629 - }; - - _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); - _nodeTags = new NodeInfo(2, 50.4, 16.2, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") })); - _nodeProperties = new NodeInfo(3, 50.4, 16.2, new TagsCollection(), _details); - - _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); - _wayTags = new WayInfo(2, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), new long[] { 10, 11, 12 }); - _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); - _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); - - _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); - _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); - _relationTags = new RelationInfo( - 2, - new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), - new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); - _relationWithoutMembers = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { }); - } - - [Fact] - public void Constructor_StringSettings_ThrowsExceptionIfFileDoesnotExist() { - Assert.Throws(delegate { new OsmXmlReader("non-existing-file.osm", new OsmXmlReaderSettings() { ReadMetadata = false }); }); - } - - [Fact] - public void Constructor_StringSettings_SetsSettingsAndMakesItReadOnly() { - string path = "../../../Data/Xml/osm-real-file.osm"; - OsmXmlReaderSettings settings = new OsmXmlReaderSettings() { ReadMetadata = false }; - using (OsmXmlReader target = new OsmXmlReader(path, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_SetsSettingsAndMakesItReadOnly() { - OsmXmlReaderSettings settings = new OsmXmlReaderSettings() { ReadMetadata = false }; - using (OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-simple-node.osm"), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Read_SkipsUnknownElements() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-unknown-inner-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - IEntityInfo result = target.Read(); - - Assert.NotNull(result as NodeInfo); - } - - //Tested only on Nodes - code for parsing Tags is shared among functions parsing Node, Way and Relation - [Fact] - public void Read_ThrowsExceptionIfTagHasNotKey() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-tag-without-key.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - //Tested only on Nodes - code for parsing Tags is shared among functions parsing Node, Way and Relation - [Fact] - public void Read_ThrowsExceptionIfTagHasNotValue() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-tag-without-value.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIPieceOffMetadataIsMissingAndStrictModeIsTrue() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-missing-timestamp.osm"), new OsmXmlReaderSettings() { ReadMetadata = true, StrictMode = true }); - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_DoesNotThrowExceptionIPieceOffMetadataIsMissingAndStrictModeIsFalse() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-missing-timestamp.osm"), new OsmXmlReaderSettings() { ReadMetadata = true, StrictMode = false }); - target.Read(); - } - - [Fact] - public void Read_ThrowsExceptionIfNodeHasNotID() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-without-id.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIfNodeHasNotLat() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-without-lat.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIfNodeHasNotLon() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-without-lon.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ReadsSimpleNode() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-simple-node.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; - - this.CompareNodes(_node, readNode); - } - - [Fact] - public void Read_ReadsNodeWithUnknownElement() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-with-tag-and-unknown-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; - - this.CompareNodes(_node, readNode); - - // nothing more left to read in the file - Assert.Null(target.Read()); - } - - [Fact] - public void Read_ReadsNodeWithTags() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-with-tags.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; - - this.CompareNodes(_nodeTags, readNode); - } - - [Fact] - public void Read_ReadsNodeWithAllAttributes() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-node-all-properties.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - NodeInfo readNode = target.Read() as NodeInfo; - - this.CompareNodes(_nodeProperties, readNode); - } - - [Fact] - public void Read_ThrowsExceptionIfWayHasNotID() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-way-nd-without-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIfWayNDHasNotRef() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-way-nd-without-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ReadsWayWithoutNodes() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-way-without-nodes.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; - - this.CompareWays(_wayWithoutNodes, readWay); - } - - [Fact] - public void Read_ReadsSimpleWay() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-simple-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; - - this.CompareWays(_way, readWay); - } - - [Fact] - public void Read_ReadsWayWithTags() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-way-with-tags.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; - - this.CompareWays(_wayTags, readWay); - } - - [Fact] - public void Read_ReadsWayWithUnknownElement() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-way-with-tags-and-unknown-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; - - this.CompareWays(_wayTags, readWay); - } - - [Fact] - public void Read_ReadsWayWithAllAttributes() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-way-all-properties.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - WayInfo readWay = target.Read() as WayInfo; - - this.CompareWays(_wayProperties, readWay); - } - - [Fact] - public void Read_ThrowsExceptionIfRelationHasNotID() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-without-id.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIfRelationMemberHasNotRef() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-member-without-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ThrowsExceptionIfRelationMemberHasNotType() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-member-without-type.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - - Assert.Throws(() => target.Read()); - } - - [Fact] - public void Read_ReadsRelationWithoutMembers() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-without-members.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationWithoutMembers, readRelation); - } - - [Fact] - public void Read_ReadsRelationWithNodeMember() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-node.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationNode, readRelation); - } - - [Fact] - public void Read_ReadsRelationWithWayMember() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationWay, readRelation); - } - - [Fact] - public void Read_ReadsRelationWithRelationMember() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationRelation, readRelation); - } - - [Fact] - public void Read_ReadsRelationWithTags() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-with-tags.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationTags, readRelation); - } - - [Fact] - public void Read_ReadsRelationWithTagsAndUnknownElement() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-with-tags-and-unknown-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationTags, readRelation); - } - - [Fact] - public void Read_ReadsRelationWithAllProperties() { - OsmXmlReader target = new OsmXmlReader(TestDataReader.OpenXml("osm-relation-all-properties.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - RelationInfo readRelation = target.Read() as RelationInfo; - - this.CompareRelation(_relationProperties, readRelation); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = "../../../Data/Xml/osm-real-file.osm"; - - OsmXmlReader target = new OsmXmlReader(filename, new OsmXmlReaderSettings() { ReadMetadata = false }); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } - - private void CompareNodes(NodeInfo expected, NodeInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Longitude, actual.Longitude); - Assert.Equal(expected.Latitude, actual.Latitude); - - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); - } - - private void CompareWays(WayInfo expected, WayInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); - for (int i = 0; i < expected.Nodes.Count; i++) { - Assert.Equal(expected.Nodes[i], actual.Nodes[i]); - } - - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); - } - - private void CompareRelation(RelationInfo expected, RelationInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Members.Count, actual.Members.Count); - for (int i = 0; i < expected.Members.Count; i++) { - Assert.Equal(expected.Members[i], actual.Members[i]); - } - - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); - } - - private void CompareTags(TagsCollection expected, TagsCollection actual) { - if (expected == null && actual == null) { - return; - } - - Assert.Equal(expected.Count, actual.Count); - Assert.True(expected.All(tag => actual.Contains(tag))); - } - - private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) { - if (expected == null && actual == null) { - return; - } - - Assert.Equal(expected.Timestamp, actual.Timestamp); - Assert.Equal(expected.Uid, actual.Uid); - Assert.Equal(expected.User, actual.User); - Assert.Equal(expected.Visible, actual.Visible); - Assert.Equal(expected.Version, actual.Version); - Assert.Equal(expected.Changeset, actual.Changeset); - } - } +namespace Tests.SpatialLite.Osm.IO; + +public class OsmXmlReaderTests +{ + private readonly EntityMetadata _details; + private readonly NodeInfo _node, _nodeTags, _nodeProperties; + private readonly WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; + private readonly RelationInfo _relationNode, _relationWay, _relationRelation, _relationTags, _relationProperties, _relationWithoutMembers; + + public OsmXmlReaderTests() + { + _details = new EntityMetadata() + { + Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), + Uid = 127998, + User = "Luk@s", + Visible = true, + Version = 2, + Changeset = 6410629 + }; + + _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); + _nodeTags = new NodeInfo(2, 50.4, 16.2, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") })); + _nodeProperties = new NodeInfo(3, 50.4, 16.2, new TagsCollection(), _details); + + _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); + _wayTags = new WayInfo(2, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), new long[] { 10, 11, 12 }); + _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); + _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); + + _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); + _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); + _relationTags = new RelationInfo( + 2, + new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), + new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); + _relationWithoutMembers = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { }); + } + + [Fact] + public void Constructor_StringSettings_ThrowsExceptionIfFileDoesnotExist() + { + Assert.Throws(delegate { new OsmXmlReader("non-existing-file.osm", new OsmXmlReaderSettings() { ReadMetadata = false }); }); + } + + [Fact] + public void Constructor_StringSettings_SetsSettingsAndMakesItReadOnly() + { + string path = "../../../Data/Xml/osm-real-file.osm"; + OsmXmlReaderSettings settings = new() { ReadMetadata = false }; + using (OsmXmlReader target = new(path, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_SetsSettingsAndMakesItReadOnly() + { + OsmXmlReaderSettings settings = new() { ReadMetadata = false }; + using (OsmXmlReader target = new(TestDataReader.OpenXml("osm-simple-node.osm"), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Read_SkipsUnknownElements() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-unknown-inner-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + IEntityInfo result = target.Read(); + + Assert.NotNull(result as NodeInfo); + } + + //Tested only on Nodes - code for parsing Tags is shared among functions parsing Node, Way and Relation + [Fact] + public void Read_ThrowsExceptionIfTagHasNotKey() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-tag-without-key.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + //Tested only on Nodes - code for parsing Tags is shared among functions parsing Node, Way and Relation + [Fact] + public void Read_ThrowsExceptionIfTagHasNotValue() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-tag-without-value.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIPieceOffMetadataIsMissingAndStrictModeIsTrue() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-missing-timestamp.osm"), new OsmXmlReaderSettings() { ReadMetadata = true, StrictMode = true }); + Assert.Throws(target.Read); + } + + [Fact] + public void Read_DoesNotThrowExceptionIPieceOffMetadataIsMissingAndStrictModeIsFalse() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-missing-timestamp.osm"), new OsmXmlReaderSettings() { ReadMetadata = true, StrictMode = false }); + target.Read(); + } + + [Fact] + public void Read_ThrowsExceptionIfNodeHasNotID() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-without-id.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIfNodeHasNotLat() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-without-lat.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIfNodeHasNotLon() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-without-lon.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ReadsSimpleNode() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-simple-node.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; + + CompareNodes(_node, readNode); + } + + [Fact] + public void Read_ReadsNodeWithUnknownElement() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-with-tag-and-unknown-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; + + CompareNodes(_node, readNode); + + // nothing more left to read in the file + Assert.Null(target.Read()); + } + + [Fact] + public void Read_ReadsNodeWithTags() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-with-tags.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; + + CompareNodes(_nodeTags, readNode); + } + + [Fact] + public void Read_ReadsNodeWithAllAttributes() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-node-all-properties.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + NodeInfo readNode = target.Read() as NodeInfo; + + CompareNodes(_nodeProperties, readNode); + } + + [Fact] + public void Read_ThrowsExceptionIfWayHasNotID() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-way-nd-without-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIfWayNDHasNotRef() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-way-nd-without-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ReadsWayWithoutNodes() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-way-without-nodes.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; + + CompareWays(_wayWithoutNodes, readWay); + } + + [Fact] + public void Read_ReadsSimpleWay() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-simple-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; + + CompareWays(_way, readWay); + } + + [Fact] + public void Read_ReadsWayWithTags() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-way-with-tags.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; + + CompareWays(_wayTags, readWay); + } + + [Fact] + public void Read_ReadsWayWithUnknownElement() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-way-with-tags-and-unknown-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; + + CompareWays(_wayTags, readWay); + } + + [Fact] + public void Read_ReadsWayWithAllAttributes() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-way-all-properties.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + WayInfo readWay = target.Read() as WayInfo; + + CompareWays(_wayProperties, readWay); + } + + [Fact] + public void Read_ThrowsExceptionIfRelationHasNotID() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-without-id.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIfRelationMemberHasNotRef() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-member-without-ref.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ThrowsExceptionIfRelationMemberHasNotType() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-member-without-type.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + + Assert.Throws(target.Read); + } + + [Fact] + public void Read_ReadsRelationWithoutMembers() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-without-members.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationWithoutMembers, readRelation); + } + + [Fact] + public void Read_ReadsRelationWithNodeMember() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-node.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationNode, readRelation); + } + + [Fact] + public void Read_ReadsRelationWithWayMember() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationWay, readRelation); + } + + [Fact] + public void Read_ReadsRelationWithRelationMember() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationRelation, readRelation); + } + + [Fact] + public void Read_ReadsRelationWithTags() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-with-tags.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationTags, readRelation); + } + + [Fact] + public void Read_ReadsRelationWithTagsAndUnknownElement() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-with-tags-and-unknown-element.osm"), new OsmXmlReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationTags, readRelation); + } + + [Fact] + public void Read_ReadsRelationWithAllProperties() + { + OsmXmlReader target = new(TestDataReader.OpenXml("osm-relation-all-properties.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + RelationInfo readRelation = target.Read() as RelationInfo; + + CompareRelation(_relationProperties, readRelation); + } + + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = "../../../Data/Xml/osm-real-file.osm"; + + OsmXmlReader target = new(filename, new OsmXmlReaderSettings() { ReadMetadata = false }); + target.Dispose(); + + FileStream testStream = null; + testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + private void CompareNodes(NodeInfo expected, NodeInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Longitude, actual.Longitude); + Assert.Equal(expected.Latitude, actual.Latitude); + + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareWays(WayInfo expected, WayInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); + for (int i = 0; i < expected.Nodes.Count; i++) + { + Assert.Equal(expected.Nodes[i], actual.Nodes[i]); + } + + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareRelation(RelationInfo expected, RelationInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Members.Count, actual.Members.Count); + for (int i = 0; i < expected.Members.Count; i++) + { + Assert.Equal(expected.Members[i], actual.Members[i]); + } + + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareTags(TagsCollection expected, TagsCollection actual) + { + if (expected == null && actual == null) + { + return; + } + + Assert.Equal(expected.Count, actual.Count); + Assert.True(expected.All(actual.Contains)); + } + + private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) + { + if (expected == null && actual == null) + { + return; + } + + Assert.Equal(expected.Timestamp, actual.Timestamp); + Assert.Equal(expected.Uid, actual.Uid); + Assert.Equal(expected.User, actual.User); + Assert.Equal(expected.Visible, actual.Visible); + Assert.Equal(expected.Version, actual.Version); + Assert.Equal(expected.Changeset, actual.Changeset); + } } diff --git a/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs b/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs index 461de99..f23ce4b 100644 --- a/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/OsmXmlWriterTests.cs @@ -1,461 +1,536 @@ -using System; -using System.Linq; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using SpatialLite.Osm.IO; +using System; using System.IO; - +using System.Linq; +using System.Xml.Linq; using Xunit; -using SpatialLite.Osm.Geometries; -using System.Xml.Linq; -using SpatialLite.Osm.IO; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm.IO { - public class OsmXmlWriterTests { - //resolution for default granularity - private const double _resolution = 1E-07; - - private EntityMetadata _details; - private NodeInfo _node, _nodeTags, _nodeProperties; - private WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; - private RelationInfo _relationNode, _relationWay, _relationRelation, _relationNodeProperties, _relationTags; - - public OsmXmlWriterTests() { - _details = new EntityMetadata() { - Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), - Uid = 127998, - User = "Luk@s", - Visible = true, - Version = 2, - Changeset = 6410629 - }; - - _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); - _nodeTags = new NodeInfo(1, 50.4, 16.2, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") })); - _nodeProperties = new NodeInfo(1, 50.4, 16.2, new TagsCollection(), _details); - - _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); - _wayTags = new WayInfo(1, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), new long[] { 10, 11, 12 }); - _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); - _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); - - _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); - _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); - _relationTags = new RelationInfo( - 1, - new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), - new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationNodeProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); - } - - [Fact] - public void Constructor_StreamSettings_SetsSettingsAndMakesThemReadOnly() { - MemoryStream stream = new MemoryStream(); - OsmWriterSettings settings = new OsmWriterSettings(); - using (OsmXmlWriter target = new OsmXmlWriter(stream, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(target.Settings.IsReadOnly); - } +namespace Tests.SpatialLite.Osm.IO; + +public class OsmXmlWriterTests +{ + //resolution for default granularity + private const double _resolution = 1E-07; + + private readonly EntityMetadata _details; + private readonly NodeInfo _node, _nodeTags, _nodeProperties; + private readonly WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; + private readonly RelationInfo _relationNode, _relationWay, _relationRelation, _relationNodeProperties, _relationTags; + + public OsmXmlWriterTests() + { + _details = new EntityMetadata() + { + Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), + Uid = 127998, + User = "Luk@s", + Visible = true, + Version = 2, + Changeset = 6410629 + }; + + _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); + _nodeTags = new NodeInfo(1, 50.4, 16.2, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") })); + _nodeProperties = new NodeInfo(1, 50.4, 16.2, new TagsCollection(), _details); + + _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); + _wayTags = new WayInfo(1, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), new long[] { 10, 11, 12 }); + _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); + _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); + + _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); + _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); + _relationTags = new RelationInfo( + 1, + new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), + new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationNodeProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); + } + + [Fact] + public void Constructor_StreamSettings_SetsSettingsAndMakesThemReadOnly() + { + MemoryStream stream = new(); + OsmWriterSettings settings = new(); + using (OsmXmlWriter target = new(stream, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(target.Settings.IsReadOnly); } + } - [Fact] - public void Constructor_PathSettings_SetsSettingsAndMakesThemReadOnly() { - string path = PathHelper.GetTempFilePath("xmlwriter-constructor-test.osm"); + [Fact] + public void Constructor_PathSettings_SetsSettingsAndMakesThemReadOnly() + { + string path = PathHelper.GetTempFilePath("xmlwriter-constructor-test.osm"); - OsmWriterSettings settings = new OsmWriterSettings(); - using (OsmXmlWriter target = new OsmXmlWriter(path, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(target.Settings.IsReadOnly); - } + OsmWriterSettings settings = new(); + using (OsmXmlWriter target = new(path, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(target.Settings.IsReadOnly); } + } - [Fact] - public void Constructor_PathSettings_CreatesOutputFile() { - string filename = PathHelper.GetTempFilePath("osmwriter-constructor-creates-output-test.pbf"); - - OsmWriterSettings settings = new OsmWriterSettings(); - using (OsmXmlWriter target = new OsmXmlWriter(filename, settings)) { - ; - } + [Fact] + public void Constructor_PathSettings_CreatesOutputFile() + { + string filename = PathHelper.GetTempFilePath("osmwriter-constructor-creates-output-test.pbf"); - Assert.True(File.Exists(filename)); + OsmWriterSettings settings = new(); + using (OsmXmlWriter target = new(filename, settings)) + { + ; } - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string path = PathHelper.GetTempFilePath("xmlwriter-closes-output-filestream-test.osm"); + Assert.True(File.Exists(filename)); + } - OsmXmlWriter target = new OsmXmlWriter(path, new OsmWriterSettings()); - target.Dispose(); + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string path = PathHelper.GetTempFilePath("xmlwriter-closes-output-filestream-test.osm"); - FileStream testStream = null; - testStream = new FileStream(path, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); + OsmXmlWriter target = new(path, new OsmWriterSettings()); + target.Dispose(); + + FileStream testStream = null; + testStream = new FileStream(path, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } + + [Fact] + public void Write_ThrowsArgumentExceptionIfWriteMetadataIsTrueButEntityDoesntHaveMetadata() + { + MemoryStream stream = new(); + + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = true })) + { + Assert.Throws(() => target.Write(_node)); } + } - [Fact] - public void Write_ThrowsArgumentExceptionIfWriteMetadataIsTrueButEntityDoesntHaveMetadata() { - MemoryStream stream = new MemoryStream(); + [Fact] + public void Write_DoesNotThrowsExceptionIfMetadataContainsNullInsteadUsername() + { + MemoryStream stream = new(); + _nodeProperties.Metadata.User = null; - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = true })) { - Assert.Throws(() => target.Write(_node)); - } + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = true })) + { + target.Write(_nodeProperties); } + } - [Fact] - public void Write_DoesNotThrowsExceptionIfMetadataContainsNullInsteadUsername() { - MemoryStream stream = new MemoryStream(); - _nodeProperties.Metadata.User = null; + [Fact] + public void Write_IEntityInfo_WritesNode() + { + MemoryStream stream = new(); - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = true })) { - target.Write(_nodeProperties); - } + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_node); } - [Fact] - public void Write_IEntityInfo_WritesNode() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _node, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_node); - } + [Fact] + public void Write_IEntityInfo_WritesNodeWithTags() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _node, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_nodeTags); } - [Fact] - public void Write_IEntityInfo_WritesNodeWithTags() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _nodeTags, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_nodeTags); - } + [Fact] + public void Write_IEntityInfo_WritesNodeWithMetadata() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _nodeTags, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = true })) + { + target.Write(_nodeProperties); } - [Fact] - public void Write_IEntityInfo_WritesNodeWithMetadata() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _nodeProperties, true); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = true })) { - target.Write(_nodeProperties); - } + [Fact] + public void Write_IEntityInfo_DoesntWriteNodeMetadataIfWriteMedataIsFalse() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _nodeProperties, true); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_nodeProperties); } - [Fact] - public void Write_IEntityInfo_DoesntWriteNodeMetadataIfWriteMedataIsFalse() { - MemoryStream stream = new MemoryStream(); + stream = new MemoryStream(stream.ToArray()); - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_nodeProperties); + using (TextReader reader = new StreamReader(stream)) + { + string line = null; + while ((line = reader.ReadLine()) != null) + { + Assert.DoesNotContain("timestamp", line); } + } + } - stream = new MemoryStream(stream.ToArray()); + [Fact] + public void Write_IEntityInfo_WritesWay() + { + MemoryStream stream = new(); - using (TextReader reader = new StreamReader(stream)) { - string line = null; - while ((line = reader.ReadLine()) != null) { - Assert.DoesNotContain("timestamp", line); - } - } + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_way); } - [Fact] - public void Write_IEntityInfo_WritesWay() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _way, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_way); - } + [Fact] + public void Write_IEntityInfo_WritesWayWithTags() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _way, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_wayTags); } - [Fact] - public void Write_IEntityInfo_WritesWayWithTags() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _wayTags, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_wayTags); - } + [Fact] + public void Write_IEntityInfo_WritesWayWithMetadata() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _wayTags, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = true })) + { + target.Write(_wayProperties); } - [Fact] - public void Write_IEntityInfo_WritesWayWithMetadata() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _wayProperties, true); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = true })) { - target.Write(_wayProperties); - } + [Fact] + public void Write_IEntityInfo_DoesntWriteWayMetadataIfWriteMedataIsFalse() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _wayProperties, true); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_wayProperties); } - [Fact] - public void Write_IEntityInfo_DoesntWriteWayMetadataIfWriteMedataIsFalse() { - MemoryStream stream = new MemoryStream(); + stream = new MemoryStream(stream.ToArray()); - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_wayProperties); + using (TextReader reader = new StreamReader(stream)) + { + string line = null; + while ((line = reader.ReadLine()) != null) + { + Assert.DoesNotContain("timestamp", line); } + } + } - stream = new MemoryStream(stream.ToArray()); + [Fact] + public void Write_IEntityInfo_WritesRelationWithNode() + { + MemoryStream stream = new(); - using (TextReader reader = new StreamReader(stream)) { - string line = null; - while ((line = reader.ReadLine()) != null) { - Assert.DoesNotContain("timestamp", line); - } - } + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_relationNode); } - [Fact] - public void Write_IEntityInfo_WritesRelationWithNode() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _relationNode, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_relationNode); - } + [Fact] + public void Write_IEntityInfo_WritesRelationWithWay() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _relationNode, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_relationWay); } - [Fact] - public void Write_IEntityInfo_WritesRelationWithWay() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _relationWay, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_relationWay); - } + [Fact] + public void Write_IEntityInfo_WritesRelationWithRelation() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _relationWay, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_relationRelation); } - [Fact] - public void Write_IEntityInfo_WritesRelationWithRelation() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _relationRelation, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_relationRelation); - } + [Fact] + public void Write_IEntityInfo_WritesRelationWithTags() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _relationRelation, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_relationTags); } - [Fact] - public void Write_IEntityInfo_WritesRelationWithTags() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _relationTags, false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_relationTags); - } + [Fact] + public void Write_IEntityInfo_WritesRelationWithMetadata() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _relationTags, false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = true })) + { + target.Write(_relationNodeProperties); } - [Fact] - public void Write_IEntityInfo_WritesRelationWithMetadata() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, _relationNodeProperties, true); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = true })) { - target.Write(_relationNodeProperties); - } + [Fact] + public void Write_IEntityInfo_DoesntWriteRelationMetadataIfWriteMedataIsFalse() + { + MemoryStream stream = new(); - this.TestXmlOutput(stream, _relationNodeProperties, true); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(_relationNodeProperties); } - [Fact] - public void Write_IEntityInfo_DoesntWriteRelationMetadataIfWriteMedataIsFalse() { - MemoryStream stream = new MemoryStream(); - - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(_relationNodeProperties); - } - - stream = new MemoryStream(stream.ToArray()); + stream = new MemoryStream(stream.ToArray()); - using (TextReader reader = new StreamReader(stream)) { - string line = null; - while ((line = reader.ReadLine()) != null) { - Assert.DoesNotContain("timestamp", line); - } + using (TextReader reader = new StreamReader(stream)) + { + string line = null; + while ((line = reader.ReadLine()) != null) + { + Assert.DoesNotContain("timestamp", line); } } + } - [Fact] - public void Write_IOsmGeometry_WritesNode() { - Node node = new Node(1, 11.1, 12.1); - - MemoryStream stream = new MemoryStream(); + [Fact] + public void Write_IOsmGeometry_WritesNode() + { + Node node = new(1, 11.1, 12.1); - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(node); - } + MemoryStream stream = new(); - this.TestXmlOutput(stream, new NodeInfo(node), false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(node); } - [Fact] - public void Write_IOsmGeometry_WritesWay() { - Way way = new Way(10, new Node[] { new Node(1), new Node(2), new Node(3) }); + TestXmlOutput(stream, new NodeInfo(node), false); + } - MemoryStream stream = new MemoryStream(); + [Fact] + public void Write_IOsmGeometry_WritesWay() + { + Way way = new(10, new Node[] { new(1), new(2), new(3) }); - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(way); - } + MemoryStream stream = new(); - this.TestXmlOutput(stream, new WayInfo(way), false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(way); } - [Fact] - public void Write_IOsmGeometry_WritesRelation() { - Relation relation = new Relation(100, new RelationMember[] { new RelationMember(new Node(1), "test-role") }); + TestXmlOutput(stream, new WayInfo(way), false); + } - MemoryStream stream = new MemoryStream(); + [Fact] + public void Write_IOsmGeometry_WritesRelation() + { + Relation relation = new(100, new RelationMember[] { new(new Node(1), "test-role") }); - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - target.Write(relation); - } + MemoryStream stream = new(); - this.TestXmlOutput(stream, new RelationInfo(relation), false); + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + target.Write(relation); } - [Fact] - public void Write_IOsmGeometry_ThrowsExceptionIfEntityIsNull() { - MemoryStream stream = new MemoryStream(); + TestXmlOutput(stream, new RelationInfo(relation), false); + } - using (OsmXmlWriter target = new OsmXmlWriter(stream, new OsmWriterSettings() { WriteMetadata = false })) { - IOsmGeometry entity = null; - Assert.Throws(() => target.Write(entity)); - } + [Fact] + public void Write_IOsmGeometry_ThrowsExceptionIfEntityIsNull() + { + MemoryStream stream = new(); + + using (OsmXmlWriter target = new(stream, new OsmWriterSettings() { WriteMetadata = false })) + { + IOsmGeometry entity = null; + Assert.Throws(() => target.Write(entity)); } + } - private void TestXmlOutput(MemoryStream xmlStream, IEntityInfo expected, bool readMetadata) { - if (xmlStream.CanSeek) { - xmlStream.Seek(0, SeekOrigin.Begin); - } else { - xmlStream = new MemoryStream(xmlStream.ToArray()); - } + private void TestXmlOutput(MemoryStream xmlStream, IEntityInfo expected, bool readMetadata) + { + if (xmlStream.CanSeek) + { + xmlStream.Seek(0, SeekOrigin.Begin); + } + else + { + xmlStream = new MemoryStream(xmlStream.ToArray()); + } - OsmXmlReader reader = new OsmXmlReader(xmlStream, new OsmXmlReaderSettings() { ReadMetadata = readMetadata }); - IEntityInfo read = reader.Read(); + OsmXmlReader reader = new(xmlStream, new OsmXmlReaderSettings() { ReadMetadata = readMetadata }); + IEntityInfo read = reader.Read(); - switch (expected.EntityType) { - case EntityType.Node: this.CompareNodes(expected as NodeInfo, read as NodeInfo); break; - case EntityType.Way: this.CompareWays(expected as WayInfo, read as WayInfo); break; - case EntityType.Relation: this.CompareRelation(expected as RelationInfo, read as RelationInfo); break; - } + switch (expected.EntityType) + { + case EntityType.Node: CompareNodes(expected as NodeInfo, read as NodeInfo); break; + case EntityType.Way: CompareWays(expected as WayInfo, read as WayInfo); break; + case EntityType.Relation: CompareRelation(expected as RelationInfo, read as RelationInfo); break; } + } + + private void CompareNodes(NodeInfo expected, NodeInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.InRange(actual.Longitude, expected.Longitude - _resolution, expected.Longitude + _resolution); + Assert.InRange(actual.Latitude, expected.Latitude - _resolution, expected.Latitude + _resolution); - private void CompareNodes(NodeInfo expected, NodeInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.InRange(actual.Longitude, expected.Longitude - _resolution, expected.Longitude + _resolution); - Assert.InRange(actual.Latitude, expected.Latitude - _resolution, expected.Latitude + _resolution); + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); + private void CompareWays(WayInfo expected, WayInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); + for (int i = 0; i < expected.Nodes.Count; i++) + { + Assert.Equal(expected.Nodes[i], actual.Nodes[i]); } - private void CompareWays(WayInfo expected, WayInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); - for (int i = 0; i < expected.Nodes.Count; i++) { - Assert.Equal(expected.Nodes[i], actual.Nodes[i]); - } + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); + private void CompareRelation(RelationInfo expected, RelationInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Members.Count, actual.Members.Count); + for (int i = 0; i < expected.Members.Count; i++) + { + Assert.Equal(expected.Members[i], actual.Members[i]); } - private void CompareRelation(RelationInfo expected, RelationInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Members.Count, actual.Members.Count); - for (int i = 0; i < expected.Members.Count; i++) { - Assert.Equal(expected.Members[i], actual.Members[i]); - } + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); + private void CompareTags(TagsCollection expected, TagsCollection actual) + { + if (expected == null && actual == null) + { + return; } - private void CompareTags(TagsCollection expected, TagsCollection actual) { - if (expected == null && actual == null) { - return; - } + Assert.Equal(expected.Count, actual.Count); + Assert.True(expected.All(actual.Contains)); + } - Assert.Equal(expected.Count, actual.Count); - Assert.True(expected.All(tag => actual.Contains(tag))); + private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) + { + if (expected == null && actual == null) + { + return; } - private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) { - if (expected == null && actual == null) { - return; - } - - Assert.NotNull(actual); + Assert.NotNull(actual); - Assert.Equal(expected.Timestamp, actual.Timestamp); - Assert.Equal(expected.Uid, actual.Uid); - Assert.Equal(expected.User, actual.User); - Assert.Equal(expected.Visible, actual.Visible); - Assert.Equal(expected.Version, actual.Version); - Assert.Equal(expected.Changeset, actual.Changeset); - } + Assert.Equal(expected.Timestamp, actual.Timestamp); + Assert.Equal(expected.Uid, actual.Uid); + Assert.Equal(expected.User, actual.User); + Assert.Equal(expected.Visible, actual.Visible); + Assert.Equal(expected.Version, actual.Version); + Assert.Equal(expected.Changeset, actual.Changeset); + } - private void CheckNode(XElement element) { - Assert.Equal("15", element.Attribute("id").Value); - Assert.Equal("46.8", element.Attribute("lon").Value); - Assert.Equal("-15.6", element.Attribute("lat").Value); + private void CheckNode(XElement element) + { + Assert.Equal("15", element.Attribute("id").Value); + Assert.Equal("46.8", element.Attribute("lon").Value); + Assert.Equal("-15.6", element.Attribute("lat").Value); - XElement tagE = element.Elements("tag").Single(); - Assert.Equal("source", tagE.Attribute("k").Value); - Assert.Equal("survey", tagE.Attribute("v").Value); - } + XElement tagE = element.Elements("tag").Single(); + Assert.Equal("source", tagE.Attribute("k").Value); + Assert.Equal("survey", tagE.Attribute("v").Value); + } - private void CheckWay(XElement element) { - Assert.Equal("25", element.Attribute("id").Value); + private void CheckWay(XElement element) + { + Assert.Equal("25", element.Attribute("id").Value); - var nodesElement = element.Elements("nd"); - Assert.Equal(3, nodesElement.Count()); - Assert.Equal("11", nodesElement.ToList()[0].Attribute("ref").Value); - Assert.Equal("12", nodesElement.ToList()[1].Attribute("ref").Value); - Assert.Equal("13", nodesElement.ToList()[2].Attribute("ref").Value); + var nodesElement = element.Elements("nd"); + Assert.Equal(3, nodesElement.Count()); + Assert.Equal("11", nodesElement.ToList()[0].Attribute("ref").Value); + Assert.Equal("12", nodesElement.ToList()[1].Attribute("ref").Value); + Assert.Equal("13", nodesElement.ToList()[2].Attribute("ref").Value); - XElement tagE = element.Elements("tag").Single(); - Assert.Equal("source", tagE.Attribute("k").Value); - Assert.Equal("survey", tagE.Attribute("v").Value); - } + XElement tagE = element.Elements("tag").Single(); + Assert.Equal("source", tagE.Attribute("k").Value); + Assert.Equal("survey", tagE.Attribute("v").Value); + } - private void CheckRelation(XElement element) { - Assert.Equal("25", element.Attribute("id").Value); + private void CheckRelation(XElement element) + { + Assert.Equal("25", element.Attribute("id").Value); - XElement tagE = element.Elements("tag").Single(); - Assert.Equal("source", tagE.Attribute("k").Value); - Assert.Equal("survey", tagE.Attribute("v").Value); - } + XElement tagE = element.Elements("tag").Single(); + Assert.Equal("source", tagE.Attribute("k").Value); + Assert.Equal("survey", tagE.Attribute("v").Value); + } - private void CheckOsmDetails(EntityMetadata details, XElement element) { - if (details == null) { - Assert.Null(element.Attribute("version")); - Assert.Null(element.Attribute("changeset")); - Assert.Null(element.Attribute("uid")); - Assert.Null(element.Attribute("user")); - Assert.Null(element.Attribute("visible")); - Assert.Null(element.Attribute("timestamp")); - } else { - Assert.Equal("2", element.Attribute("version").Value); - Assert.Equal("123", element.Attribute("changeset").Value); - Assert.Equal("4587", element.Attribute("uid").Value); - Assert.Equal("username", element.Attribute("user").Value); - Assert.Equal("true", element.Attribute("visible").Value); - Assert.Equal("2011-01-20T14:00:04Z", element.Attribute("timestamp").Value); - } + private void CheckOsmDetails(EntityMetadata details, XElement element) + { + if (details == null) + { + Assert.Null(element.Attribute("version")); + Assert.Null(element.Attribute("changeset")); + Assert.Null(element.Attribute("uid")); + Assert.Null(element.Attribute("user")); + Assert.Null(element.Attribute("visible")); + Assert.Null(element.Attribute("timestamp")); + } + else + { + Assert.Equal("2", element.Attribute("version").Value); + Assert.Equal("123", element.Attribute("changeset").Value); + Assert.Equal("4587", element.Attribute("uid").Value); + Assert.Equal("username", element.Attribute("user").Value); + Assert.Equal("true", element.Attribute("visible").Value); + Assert.Equal("2011-01-20T14:00:04Z", element.Attribute("timestamp").Value); } } } diff --git a/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs b/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs index 5128540..9588d16 100644 --- a/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/PbfReaderTests.cs @@ -1,354 +1,397 @@ -using System; -using System.Linq; +using SpatialLite.Osm; +using SpatialLite.Osm.IO; +using System; using System.IO; - +using System.Linq; +using Tests.SpatialLite.Osm.Data; using Xunit; -using SpatialLite.Osm; -using SpatialLite.Osm.IO; -using Tests.SpatialLite.Osm.Data; +namespace Tests.SpatialLite.Osm.IO; + +public class PbfReaderTests +{ + //resolution for default granularity + private const double _resolution = 1E-07; + + private readonly EntityMetadata _details; + private readonly NodeInfo _node, _nodeTags, _nodeProperties; + private readonly WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; + private readonly RelationInfo _relationNode, _relationWay, _relationRelation, _relationProperties, _relationTags; + + public PbfReaderTests() + { + _details = new EntityMetadata() + { + Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), + Uid = 127998, + User = "Luk@s", + Visible = true, + Version = 2, + Changeset = 6410629 + }; + + _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); + _nodeTags = new NodeInfo(1, 50.4, 16.2, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") })); + _nodeProperties = new NodeInfo(1, 50.4, 16.2, new TagsCollection(), _details); + + _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); + _wayTags = new WayInfo(1, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), new long[] { 10, 11, 12 }); + _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); + _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); + + _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); + _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); + _relationTags = new RelationInfo( + 1, + new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), + new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); + } -namespace Tests.SpatialLite.Osm.IO { - public class PbfReaderTests { - //resolution for default granularity - private const double _resolution = 1E-07; - - private EntityMetadata _details; - private NodeInfo _node, _nodeTags, _nodeProperties; - private WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; - private RelationInfo _relationNode, _relationWay, _relationRelation, _relationProperties, _relationTags; - - public PbfReaderTests() { - _details = new EntityMetadata() { - Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), - Uid = 127998, - User = "Luk@s", - Visible = true, - Version = 2, - Changeset = 6410629 - }; - - _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); - _nodeTags = new NodeInfo(1, 50.4, 16.2, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") })); - _nodeProperties = new NodeInfo(1, 50.4, 16.2, new TagsCollection(), _details); - - _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); - _wayTags = new WayInfo(1, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), new long[] { 10, 11, 12 }); - _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); - _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); - - _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); - _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); - _relationTags = new RelationInfo( - 1, - new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), - new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); - } + [Fact] + public void Constructor_StreamSettings_ThrowsExceptionIfStreamDoesntContainOSMHeaderBeforeOSMData() + { + var dataStream = TestDataReader.OpenPbf("pbf-without-osm-header.pbf"); + Assert.Throws(() => new PbfReader(dataStream, new OsmReaderSettings() { ReadMetadata = false })); + } - [Fact] - public void Constructor_StreamSettings_ThrowsExceptionIfStreamDoesntContainOSMHeaderBeforeOSMData() { - var dataStream = TestDataReader.OpenPbf("pbf-without-osm-header.pbf"); - Assert.Throws(() => new PbfReader(dataStream, new OsmReaderSettings() { ReadMetadata = false })); - } + [Fact] + public void Constructor_StreamSettings_ThrowsExceptionIfOSMHeaderDefinedUnsupportedRequiredFeature() + { + var dataStream = TestDataReader.OpenPbf("pbf-unsupported-required-feature.pbf"); + Assert.Throws(() => new PbfReader(dataStream, new OsmReaderSettings() { ReadMetadata = false })); + } + + [Fact] + public void Constructor_StreamSettings_SetsSettingsAndMakesThemIsReadOnly() + { + var dataStream = TestDataReader.OpenPbf("pbf-n-node.pbf"); + OsmReaderSettings settings = new(); - [Fact] - public void Constructor_StreamSettings_ThrowsExceptionIfOSMHeaderDefinedUnsupportedRequiredFeature() { - var dataStream = TestDataReader.OpenPbf("pbf-unsupported-required-feature.pbf"); - Assert.Throws(() => new PbfReader(dataStream, new OsmReaderSettings() { ReadMetadata = false })); + using (PbfReader target = new(dataStream, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); } + } - [Fact] - public void Constructor_StreamSettings_SetsSettingsAndMakesThemIsReadOnly() { - var dataStream = TestDataReader.OpenPbf("pbf-n-node.pbf"); - OsmReaderSettings settings = new OsmReaderSettings(); + [Fact] + public void Constructor_StringSettings_ThrowsExceptionIfFileDoesnotExist() + { + Assert.Throws(delegate { new PbfReader("non-existing-file.pbf", new OsmReaderSettings() { ReadMetadata = false }); }); + } - using (PbfReader target = new PbfReader(dataStream, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } + [Fact] + public void Constructor_StringSettings_ThrowsExceptionIfFileDoesntContainOSMHeaderBeforeOSMData() + { + string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-without-osm-header.pbf"); + Assert.Throws(() => new PbfReader(filename, new OsmReaderSettings() { ReadMetadata = false })); + } - [Fact] - public void Constructor_StringSettings_ThrowsExceptionIfFileDoesnotExist() { - Assert.Throws(delegate { new PbfReader("non-existing-file.pbf", new OsmReaderSettings() { ReadMetadata = false }); }); - } + [Fact] + public void Constructor_StringSettings_ThrowsExceptionIfOSMHeaderDefinedUnsupportedRequiredFeature() + { + string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-unsupported-required-feature.pbf"); + Assert.Throws(() => new PbfReader(filename, new OsmReaderSettings() { ReadMetadata = false })); + } - [Fact] - public void Constructor_StringSettings_ThrowsExceptionIfFileDoesntContainOSMHeaderBeforeOSMData() { - string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-without-osm-header.pbf"); - Assert.Throws(() => new PbfReader(filename, new OsmReaderSettings() { ReadMetadata = false })); - } + [Fact] + public void Constructor_StringSettings_SetsSettingsAndMakesThemIsReadOnly() + { + string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-n-node.pbf"); + OsmReaderSettings settings = new(); - [Fact] - public void Constructor_StringSettings_ThrowsExceptionIfOSMHeaderDefinedUnsupportedRequiredFeature() { - string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-unsupported-required-feature.pbf"); - Assert.Throws(() => new PbfReader(filename, new OsmReaderSettings() { ReadMetadata = false })); + using (PbfReader target = new(filename, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); } + } - [Fact] - public void Constructor_StringSettings_SetsSettingsAndMakesThemIsReadOnly() { - string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-n-node.pbf"); - OsmReaderSettings settings = new OsmReaderSettings(); + [Fact] + public void Read_ReturnsNullIfAllEntitiesHaveBeenRead() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + //read only entity + IEntityInfo read = target.Read(); - using (PbfReader target = new PbfReader(filename, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } + // should return null + read = target.Read(); + Assert.Null(read); + } - [Fact] - public void Read_ReturnsNullIfAllEntitiesHaveBeenRead() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - //read only entity - IEntityInfo read = target.Read(); + [Fact] + public void Read_ThrowInvalidDataExceptionIfHeaderBlockSizeExceedesAllowdValue() + { + Assert.Throws(() => new PbfReader(TestDataReader.OpenPbf("pbf-too-large-header-block.pbf"), new OsmReaderSettings() { ReadMetadata = false })); + } - // should return null - read = target.Read(); - Assert.Null(read); - } + [Fact] + public void Read_ThrowInvalidDataExceptionIfOsmDataBlockSizeExceedesAllowdValue() + { + Assert.Throws(() => new PbfReader(TestDataReader.OpenPbf("pbf-too-large-data-block.pbf"), new OsmReaderSettings() { ReadMetadata = false })); + } - [Fact] - public void Read_ThrowInvalidDataExceptionIfHeaderBlockSizeExceedesAllowdValue() { - Assert.Throws(() => new PbfReader(TestDataReader.OpenPbf("pbf-too-large-header-block.pbf"), new OsmReaderSettings() { ReadMetadata = false })); - } + [Fact] + public void Read_ReadsNode_DenseNoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-nd-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; - [Fact] - public void Read_ThrowInvalidDataExceptionIfOsmDataBlockSizeExceedesAllowdValue() { - Assert.Throws(() => new PbfReader(TestDataReader.OpenPbf("pbf-too-large-data-block.pbf"), new OsmReaderSettings() { ReadMetadata = false })); - } + CompareNodes(_node, readNode); + } - [Fact] - public void Read_ReadsNode_DenseNoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-nd-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_ReadsNodeWithTags_DenseNoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-nd-node-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; - this.CompareNodes(_node, readNode); - } + CompareNodes(_nodeTags, readNode); + } - [Fact] - public void Read_ReadsNodeWithTags_DenseNoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-nd-node-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_ReadsNodeWithMetadata_DenseNoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-nd-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); + NodeInfo readNode = target.Read() as NodeInfo; - this.CompareNodes(_nodeTags, readNode); - } + CompareNodes(_nodeProperties, readNode); + } - [Fact] - public void Read_ReadsNodeWithMetadata_DenseNoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-nd-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_SkipsNodeMetadataIfProcessMetadataIsFalse_DenseNoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-nd-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; - this.CompareNodes(_nodeProperties, readNode); - } + Assert.Null(readNode.Metadata); + } - [Fact] - public void Read_SkipsNodeMetadataIfProcessMetadataIsFalse_DenseNoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-nd-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_ReadsNode_NoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; - Assert.Null(readNode.Metadata); - } + CompareNodes(_node, readNode); + } - [Fact] - public void Read_ReadsNode_NoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_ReadsNodeWithTags_NoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-node-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; - this.CompareNodes(_node, readNode); - } + CompareNodes(_nodeTags, readNode); + } - [Fact] - public void Read_ReadsNodeWithTags_NoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-node-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_ReadsNodeWithMetadata_NoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); + NodeInfo readNode = target.Read() as NodeInfo; - this.CompareNodes(_nodeTags, readNode); - } + CompareNodes(_nodeProperties, readNode); + } - [Fact] - public void Read_ReadsNodeWithMetadata_NoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_SkipsNodeMetadataIfProcessMetadataIsFalse_NoCompression() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + NodeInfo readNode = target.Read() as NodeInfo; - this.CompareNodes(_nodeProperties, readNode); - } + Assert.Null(readNode.Metadata); + } - [Fact] - public void Read_SkipsNodeMetadataIfProcessMetadataIsFalse_NoCompression() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-node-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - NodeInfo readNode = target.Read() as NodeInfo; + [Fact] + public void Read_ReadsWay_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-way.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; - Assert.Null(readNode.Metadata); - } + CompareWays(_way, readWay); + } - [Fact] - public void Read_ReadsWay_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-way.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; + [Fact] + public void Read_ReadsWayWithTags_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-way-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; - this.CompareWays(_way, readWay); - } + CompareWays(_wayTags, readWay); + } - [Fact] - public void Read_ReadsWayWithTags_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-way-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; + [Fact] + public void Read_ReadsWayWithMetadata_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-way-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); + WayInfo readWay = target.Read() as WayInfo; - this.CompareWays(_wayTags, readWay); - } + CompareWays(_wayProperties, readWay); + } - [Fact] - public void Read_ReadsWayWithMetadata_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-way-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); - WayInfo readWay = target.Read() as WayInfo; + [Fact] + public void Read_SkipsWayMetadataIfProcessMetadataIsFalse_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-way-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; - this.CompareWays(_wayProperties, readWay); - } + Assert.Null(readWay.Metadata); + } - [Fact] - public void Read_SkipsWayMetadataIfProcessMetadataIsFalse_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-way-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; + [Fact] + public void Read_ReadsWayWithoutNodes_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-way-without-nodes.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + WayInfo readWay = target.Read() as WayInfo; - Assert.Null(readWay.Metadata); - } + CompareWays(_wayWithoutNodes, readWay); + } - [Fact] - public void Read_ReadsWayWithoutNodes_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-way-without-nodes.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - WayInfo readWay = target.Read() as WayInfo; + [Fact] + public void Read_ReadsRelationWithNode_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-relation-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; - this.CompareWays(_wayWithoutNodes, readWay); - } + CompareRelation(_relationNode, readRelation); + } - [Fact] - public void Read_ReadsRelationWithNode_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-relation-node.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; + [Fact] + public void Read_ReadsRelationWithWay_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-relation-way.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; - this.CompareRelation(_relationNode, readRelation); - } + CompareRelation(_relationWay, readRelation); + } - [Fact] - public void Read_ReadsRelationWithWay_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-relation-way.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; + [Fact] + public void Read_ReadsRelationWithRelation_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-relation-relation.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; - this.CompareRelation(_relationWay, readRelation); - } + CompareRelation(_relationRelation, readRelation); + } - [Fact] - public void Read_ReadsRelationWithRelation_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-relation-relation.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; + [Fact] + public void Read_ReadsRelationWithTags_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-relation-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; - this.CompareRelation(_relationRelation, readRelation); - } + CompareRelation(_relationTags, readRelation); + } - [Fact] - public void Read_ReadsRelationWithTags_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-relation-tags.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; + [Fact] + public void Read_ReadsRelationWithAllProperties_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-relation-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); + RelationInfo readRelation = target.Read() as RelationInfo; - this.CompareRelation(_relationTags, readRelation); - } + CompareRelation(_relationProperties, readRelation); + } - [Fact] - public void Read_ReadsRelationWithAllProperties_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-relation-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = true }); - RelationInfo readRelation = target.Read() as RelationInfo; + [Fact] + public void Read_SkipsRelationMetadataIfProcessMetadataIsFalse_NoCompresion() + { + PbfReader target = new(TestDataReader.OpenPbf("pbf-n-relation-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); + RelationInfo readRelation = target.Read() as RelationInfo; - this.CompareRelation(_relationProperties, readRelation); - } + Assert.Null(readRelation.Metadata); + } - [Fact] - public void Read_SkipsRelationMetadataIfProcessMetadataIsFalse_NoCompresion() { - PbfReader target = new PbfReader(TestDataReader.OpenPbf("pbf-n-relation-all-properties.pbf"), new OsmReaderSettings() { ReadMetadata = false }); - RelationInfo readRelation = target.Read() as RelationInfo; + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-n-node.pbf"); + OsmReaderSettings settings = new() { ReadMetadata = true }; - Assert.Null(readRelation.Metadata); - } + var aaa = Path.GetFullPath(filename); + PbfReader target = new(filename, settings); + target.Dispose(); - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = Path.Combine("..", "..", "..", "Data", "Pbf", "pbf-n-node.pbf"); - OsmReaderSettings settings = new OsmReaderSettings() { ReadMetadata = true }; - - var aaa = Path.GetFullPath(filename); - PbfReader target = new PbfReader(filename, settings); - target.Dispose(); - - FileStream testStream = null; - testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - testStream.Dispose(); - } + FileStream testStream = null; + testStream = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + testStream.Dispose(); + } - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToStream() { - var stream = TestDataReader.OpenPbf("pbf-n-node.pbf"); - OsmReaderSettings settings = new OsmReaderSettings() { ReadMetadata = true }; + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToStream() + { + var stream = TestDataReader.OpenPbf("pbf-n-node.pbf"); + OsmReaderSettings settings = new() { ReadMetadata = true }; - PbfReader target = new PbfReader(stream, settings); - target.Dispose(); + PbfReader target = new(stream, settings); + target.Dispose(); - Assert.False(stream.CanRead); - } + Assert.False(stream.CanRead); + } - private void CompareNodes(NodeInfo expected, NodeInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.InRange(actual.Longitude, expected.Longitude - _resolution, expected.Longitude + _resolution); - Assert.InRange(actual.Latitude, expected.Latitude - _resolution, expected.Latitude + _resolution); + private void CompareNodes(NodeInfo expected, NodeInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.InRange(actual.Longitude, expected.Longitude - _resolution, expected.Longitude + _resolution); + Assert.InRange(actual.Latitude, expected.Latitude - _resolution, expected.Latitude + _resolution); - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareWays(WayInfo expected, WayInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); + for (int i = 0; i < expected.Nodes.Count; i++) + { + Assert.Equal(expected.Nodes[i], actual.Nodes[i]); } - private void CompareWays(WayInfo expected, WayInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); - for (int i = 0; i < expected.Nodes.Count; i++) { - Assert.Equal(expected.Nodes[i], actual.Nodes[i]); - } + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); + private void CompareRelation(RelationInfo expected, RelationInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Members.Count, actual.Members.Count); + for (int i = 0; i < expected.Members.Count; i++) + { + Assert.Equal(expected.Members[i], actual.Members[i]); } - private void CompareRelation(RelationInfo expected, RelationInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Members.Count, actual.Members.Count); - for (int i = 0; i < expected.Members.Count; i++) { - Assert.Equal(expected.Members[i], actual.Members[i]); - } + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); + private void CompareTags(TagsCollection expected, TagsCollection actual) + { + if (expected == null && actual == null) + { + return; } - private void CompareTags(TagsCollection expected, TagsCollection actual) { - if (expected == null && actual == null) { - return; - } + Assert.Equal(expected.Count, actual.Count); + Assert.True(expected.All(actual.Contains)); + } - Assert.Equal(expected.Count, actual.Count); - Assert.True(expected.All(tag => actual.Contains(tag))); + private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) + { + if (expected == null && actual == null) + { + return; } - private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) { - if (expected == null && actual == null) { - return; - } + Assert.NotNull(actual); - Assert.NotNull(actual); - - Assert.Equal(expected.Timestamp, actual.Timestamp); - Assert.Equal(expected.Uid, actual.Uid); - Assert.Equal(expected.User, actual.User); - Assert.Equal(expected.Visible, actual.Visible); - Assert.Equal(expected.Version, actual.Version); - Assert.Equal(expected.Changeset, actual.Changeset); - } + Assert.Equal(expected.Timestamp, actual.Timestamp); + Assert.Equal(expected.Uid, actual.Uid); + Assert.Equal(expected.User, actual.User); + Assert.Equal(expected.Visible, actual.Visible); + Assert.Equal(expected.Version, actual.Version); + Assert.Equal(expected.Changeset, actual.Changeset); } } diff --git a/src/Tests.SpatialLite.Osm/IO/PbfWriterSettingsTests.cs b/src/Tests.SpatialLite.Osm/IO/PbfWriterSettingsTests.cs index a39f987..c0efdd2 100644 --- a/src/Tests.SpatialLite.Osm/IO/PbfWriterSettingsTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/PbfWriterSettingsTests.cs @@ -1,34 +1,36 @@ -using System; - -using Xunit; - -using SpatialLite.Osm.IO; - -namespace Tests.SpatialLite.Osm.IO { - public class PbfWriterSettingsTests { - [Fact] - public void Constructor__SetsDefaultValues() { - PbfWriterSettings target = new PbfWriterSettings(); - - Assert.True(target.UseDenseFormat); - Assert.Equal(CompressionMode.ZlibDeflate, target.Compression); - Assert.True(target.WriteMetadata); - } - - [Fact] - public void UseDenseFormatSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - PbfWriterSettings target = new PbfWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.UseDenseFormat = false); - } - - [Fact] - public void ConpressionSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() { - PbfWriterSettings target = new PbfWriterSettings(); - target.IsReadOnly = true; - - Assert.Throws(() => target.Compression = CompressionMode.ZlibDeflate); - } - } -} +using SpatialLite.Osm.IO; +using System; +using Xunit; + +namespace Tests.SpatialLite.Osm.IO; + +public class PbfWriterSettingsTests +{ + [Fact] + public void Constructor__SetsDefaultValues() + { + PbfWriterSettings target = new(); + + Assert.True(target.UseDenseFormat); + Assert.Equal(CompressionMode.ZlibDeflate, target.Compression); + Assert.True(target.WriteMetadata); + } + + [Fact] + public void UseDenseFormatSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + PbfWriterSettings target = new(); + target.IsReadOnly = true; + + Assert.Throws(() => target.UseDenseFormat = false); + } + + [Fact] + public void ConpressionSetter_ThrowInvaldOperationExceptionIfSettingsIsReadOnly() + { + PbfWriterSettings target = new(); + target.IsReadOnly = true; + + Assert.Throws(() => target.Compression = CompressionMode.ZlibDeflate); + } +} diff --git a/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs b/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs index 53eb33f..4c6b7c0 100644 --- a/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs +++ b/src/Tests.SpatialLite.Osm/IO/PbfWriterTests.cs @@ -1,492 +1,567 @@ -using System; -using System.Linq; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using SpatialLite.Osm.IO; +using System; using System.IO; - +using System.Linq; using Xunit; -using SpatialLite.Osm.IO; -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm.IO { - public class PbfWriterTests { - //resolution for default granularity - private const double _resolution = 1E-07; - - private EntityMetadata _details; - private NodeInfo _node, _nodeTags, _nodeProperties; - private WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; - private RelationInfo _relationNode, _relationWay, _relationRelation, _relationNodeProperties, _relationTags; - - public PbfWriterTests() { - _details = new EntityMetadata() { - Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), - Uid = 127998, - User = "Luk@s", - Visible = true, - Version = 2, - Changeset = 6410629 - }; - - _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); - _nodeTags = new NodeInfo(1, 50.4, 16.2, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") })); - _nodeProperties = new NodeInfo(1, 50.4, 16.2, new TagsCollection(), _details); - - _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); - _wayTags = new WayInfo(1, new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), new long[] { 10, 11, 12 }); - _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); - _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); - - _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); - _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); - _relationTags = new RelationInfo( - 1, - new TagsCollection(new Tag[] { new Tag("name", "test"), new Tag("name-2", "test-2") }), - new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); - _relationNodeProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); - } - - [Fact] - public void Constructor_FilenameSettings_SetsSettingsAndMakesThemReadOnly() { - string filename = PathHelper.GetTempFilePath("pbfwriter-constructor-test.pbf"); - - PbfWriterSettings settings = new PbfWriterSettings(); - using (PbfWriter target = new PbfWriter(filename, settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_FilenameSettings_CreatesOutputFile() { - string filename = PathHelper.GetTempFilePath("pbfwriter-constructor-creates-output-test.pbf"); - - PbfWriterSettings settings = new PbfWriterSettings(); - using (PbfWriter target = new PbfWriter(filename, settings)) { - ; - } - - Assert.True(File.Exists(filename)); - } - - [Fact] - public void Constructor_FilenameSettings_WritesOsmHeader() { - string filename = PathHelper.GetTempFilePath("pbfwriter-constructor-writes-header-test.pbf"); - - PbfWriterSettings settings = new PbfWriterSettings(); - using (PbfWriter target = new PbfWriter(filename, settings)) { - ; - } - - FileInfo fi = new FileInfo(filename); - Assert.True(fi.Length > 0); - } - - [Fact] - public void Constructor_StreamSettings_SetsSettingsAndMakeThemReadOnly() { - PbfWriterSettings settings = new PbfWriterSettings(); - using (PbfWriter target = new PbfWriter(new MemoryStream(), settings)) { - Assert.Same(settings, target.Settings); - Assert.True(settings.IsReadOnly); - } - } - - [Fact] - public void Constructor_StreamSettings_WritesOsmHeader() { - MemoryStream stream = new MemoryStream(); - PbfWriterSettings settings = new PbfWriterSettings(); - using (PbfWriter target = new PbfWriter(stream, settings)) { - ; - } - - Assert.True(stream.ToArray().Length > 0); - } - - [Fact] - public void Dispose_ClosesOutputStreamIfWritingToFiles() { - string filename = PathHelper.GetTempFilePath("pbfwriter-closes-output-filestream-test.pbf"); - - PbfWriterSettings settings = new PbfWriterSettings(); - PbfWriter target = new PbfWriter(filename, settings); - target.Dispose(); - - new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); - } - - [Fact] - public void Write_ThrowsArgumentExceptionIfWriteMetadataIsTrueButEntityDoesntHaveMetadata() { - using (PbfWriter target = new PbfWriter(new MemoryStream(), new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = true })) { - Assert.Throws(() => target.Write(_node)); - } - } - - [Fact] - public void Write_ThrowsArgumentNullExceptionIfMetadataContainsNullInsteadUsername() { - _nodeProperties.Metadata.User = null; - - using (PbfWriter target = new PbfWriter(new MemoryStream(), new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = true })) { - Assert.Throws(() => target.Write(_nodeProperties)); - } - } - - [Fact] - public void Write_IEntityInfo_WritesNode() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_node); - } - - this.TestPbfOutput(stream, _node); - } - - [Fact] - public void Write_IEntityInfo_WritesNodeWithTags() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_nodeTags); - } - - this.TestPbfOutput(stream, _nodeTags); - } - - [Fact] - public void Write_IEntityInfo_WritesNodeWithMetadata() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = true }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_nodeProperties); - } - - this.TestPbfOutput(stream, _nodeProperties); - } - - [Fact] - public void Write_IEntityInfo_DoesntWritesNodeMetadataIfWriteMetasdataSettingsIsFalse() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_nodeProperties); - } - - this.TestPbfOutput(stream, _node); - } - - [Fact] - public void Write_IEntityInfo_WritesNode_Dense() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_node); - } - - this.TestPbfOutput(stream, _node); - } - - [Fact] - public void Write_IEntityInfo_WritesNodeWithTags_Dense() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_nodeTags); - } +namespace Tests.SpatialLite.Osm.IO; + +public class PbfWriterTests +{ + //resolution for default granularity + private const double _resolution = 1E-07; + + private readonly EntityMetadata _details; + private readonly NodeInfo _node, _nodeTags, _nodeProperties; + private readonly WayInfo _way, _wayTags, _wayProperties, _wayWithoutNodes; + private readonly RelationInfo _relationNode, _relationWay, _relationRelation, _relationNodeProperties, _relationTags; + + public PbfWriterTests() + { + _details = new EntityMetadata() + { + Timestamp = new DateTime(2010, 11, 19, 22, 5, 56, DateTimeKind.Utc), + Uid = 127998, + User = "Luk@s", + Visible = true, + Version = 2, + Changeset = 6410629 + }; + + _node = new NodeInfo(1, 50.4, 16.2, new TagsCollection()); + _nodeTags = new NodeInfo(1, 50.4, 16.2, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") })); + _nodeProperties = new NodeInfo(1, 50.4, 16.2, new TagsCollection(), _details); + + _way = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }); + _wayTags = new WayInfo(1, new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), new long[] { 10, 11, 12 }); + _wayProperties = new WayInfo(1, new TagsCollection(), new long[] { 10, 11, 12 }, _details); + _wayWithoutNodes = new WayInfo(1, new TagsCollection(), new long[] { }); + + _relationNode = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationWay = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Way, Reference = 10, Role = "test" } }); + _relationRelation = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Relation, Reference = 10, Role = "test" } }); + _relationTags = new RelationInfo( + 1, + new TagsCollection(new Tag[] { new("name", "test"), new("name-2", "test-2") }), + new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }); + _relationNodeProperties = new RelationInfo(1, new TagsCollection(), new RelationMemberInfo[] { new() { MemberType = EntityType.Node, Reference = 10, Role = "test" } }, _details); + } + + [Fact] + public void Constructor_FilenameSettings_SetsSettingsAndMakesThemReadOnly() + { + string filename = PathHelper.GetTempFilePath("pbfwriter-constructor-test.pbf"); + + PbfWriterSettings settings = new(); + using (PbfWriter target = new(filename, settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } - this.TestPbfOutput(stream, _nodeTags); - } - - [Fact] - public void Write_IEntityInfo_WritesNodeWithMetadata_Dense() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = true }; - MemoryStream stream = new MemoryStream(); + [Fact] + public void Constructor_FilenameSettings_CreatesOutputFile() + { + string filename = PathHelper.GetTempFilePath("pbfwriter-constructor-creates-output-test.pbf"); - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_nodeProperties); - } + PbfWriterSettings settings = new(); + using (PbfWriter target = new(filename, settings)) + { + ; + } - this.TestPbfOutput(stream, _nodeProperties); - } - - [Fact] - public void Write_IEntityInfo_DoesntWritesNodeMetadataIfWriteMetasdataSettingsIsFalse_Dense() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); + Assert.True(File.Exists(filename)); + } - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_nodeProperties); - } + [Fact] + public void Constructor_FilenameSettings_WritesOsmHeader() + { + string filename = PathHelper.GetTempFilePath("pbfwriter-constructor-writes-header-test.pbf"); - this.TestPbfOutput(stream, _node); - } - - [Fact] - public void Write_IEntityInfo_WritesWay() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); + PbfWriterSettings settings = new(); + using (PbfWriter target = new(filename, settings)) + { + ; + } - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_way); - } + FileInfo fi = new(filename); + Assert.True(fi.Length > 0); + } + + [Fact] + public void Constructor_StreamSettings_SetsSettingsAndMakeThemReadOnly() + { + PbfWriterSettings settings = new(); + using (PbfWriter target = new(new MemoryStream(), settings)) + { + Assert.Same(settings, target.Settings); + Assert.True(settings.IsReadOnly); + } + } + + [Fact] + public void Constructor_StreamSettings_WritesOsmHeader() + { + MemoryStream stream = new(); + PbfWriterSettings settings = new(); + using (PbfWriter target = new(stream, settings)) + { + ; + } - this.TestPbfOutput(stream, _way); - } + Assert.True(stream.ToArray().Length > 0); + } - [Fact] - public void Write_IEntityInfo_WritesWayWithTags() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); + [Fact] + public void Dispose_ClosesOutputStreamIfWritingToFiles() + { + string filename = PathHelper.GetTempFilePath("pbfwriter-closes-output-filestream-test.pbf"); - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_wayTags); - } + PbfWriterSettings settings = new(); + PbfWriter target = new(filename, settings); + target.Dispose(); - this.TestPbfOutput(stream, _wayTags); - } + new FileStream(filename, FileMode.Open, FileAccess.ReadWrite); + } - [Fact] - public void Write_IEntityInfo_WritesWayWithMetadata() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = true }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_wayProperties); - } + [Fact] + public void Write_ThrowsArgumentExceptionIfWriteMetadataIsTrueButEntityDoesntHaveMetadata() + { + using (PbfWriter target = new(new MemoryStream(), new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = true })) + { + Assert.Throws(() => target.Write(_node)); + } + } - this.TestPbfOutput(stream, _wayProperties); - } + [Fact] + public void Write_ThrowsArgumentNullExceptionIfMetadataContainsNullInsteadUsername() + { + _nodeProperties.Metadata.User = null; - [Fact] - public void Write_IEntityInfo_DoesntWriteWayMetadataIfWriteMetadataSettingsIsFalse() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_wayProperties); - } + using (PbfWriter target = new(new MemoryStream(), new PbfWriterSettings() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = true })) + { + Assert.Throws(() => target.Write(_nodeProperties)); + } + } - this.TestPbfOutput(stream, _way); - } + [Fact] + public void Write_IEntityInfo_WritesNode() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); - [Fact] - public void Write_IEntityInfo_WritesRelationWithNode() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); + using (PbfWriter target = new(stream, settings)) + { + target.Write(_node); + } - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_relationNode); - } + TestPbfOutput(stream, _node); + } - this.TestPbfOutput(stream, _relationNode); - } + [Fact] + public void Write_IEntityInfo_WritesNodeWithTags() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); - [Fact] - public void Write_IEntityInfo_WritesRelationWithWay() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); + using (PbfWriter target = new(stream, settings)) + { + target.Write(_nodeTags); + } + + TestPbfOutput(stream, _nodeTags); + } + + [Fact] + public void Write_IEntityInfo_WritesNodeWithMetadata() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = true }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_nodeProperties); + } + + TestPbfOutput(stream, _nodeProperties); + } + + [Fact] + public void Write_IEntityInfo_DoesntWritesNodeMetadataIfWriteMetasdataSettingsIsFalse() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_relationWay); - } + using (PbfWriter target = new(stream, settings)) + { + target.Write(_nodeProperties); + } + + TestPbfOutput(stream, _node); + } - this.TestPbfOutput(stream, _relationWay); - } + [Fact] + public void Write_IEntityInfo_WritesNode_Dense() + { + PbfWriterSettings settings = new() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_node); + } - [Fact] - public void Write_IEntityInfo_WritesRelationWithRelation() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); + TestPbfOutput(stream, _node); + } + + [Fact] + public void Write_IEntityInfo_WritesNodeWithTags_Dense() + { + PbfWriterSettings settings = new() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_nodeTags); + } + + TestPbfOutput(stream, _nodeTags); + } + + [Fact] + public void Write_IEntityInfo_WritesNodeWithMetadata_Dense() + { + PbfWriterSettings settings = new() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = true }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_nodeProperties); + } + + TestPbfOutput(stream, _nodeProperties); + } + + [Fact] + public void Write_IEntityInfo_DoesntWritesNodeMetadataIfWriteMetasdataSettingsIsFalse_Dense() + { + PbfWriterSettings settings = new() { UseDenseFormat = true, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_nodeProperties); + } + + TestPbfOutput(stream, _node); + } + + [Fact] + public void Write_IEntityInfo_WritesWay() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_way); + } + + TestPbfOutput(stream, _way); + } + + [Fact] + public void Write_IEntityInfo_WritesWayWithTags() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_wayTags); + } + + TestPbfOutput(stream, _wayTags); + } + + [Fact] + public void Write_IEntityInfo_WritesWayWithMetadata() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = true }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_wayProperties); + } + + TestPbfOutput(stream, _wayProperties); + } + + [Fact] + public void Write_IEntityInfo_DoesntWriteWayMetadataIfWriteMetadataSettingsIsFalse() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_wayProperties); + } + + TestPbfOutput(stream, _way); + } + + [Fact] + public void Write_IEntityInfo_WritesRelationWithNode() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_relationNode); + } - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_relationRelation); - } + TestPbfOutput(stream, _relationNode); + } - this.TestPbfOutput(stream, _relationRelation); - } + [Fact] + public void Write_IEntityInfo_WritesRelationWithWay() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_relationWay); + } + + TestPbfOutput(stream, _relationWay); + } + + [Fact] + public void Write_IEntityInfo_WritesRelationWithRelation() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_relationRelation); + } + + TestPbfOutput(stream, _relationRelation); + } + + [Fact] + public void Write_IEntityInfo_WritesRelationWithTags() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_relationTags); + } + + TestPbfOutput(stream, _relationTags); + } + + [Fact] + public void Write_IEntityInfo_WritesRelationWithMetadata() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = true }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_relationNodeProperties); + } + + TestPbfOutput(stream, _relationNodeProperties); + } + + [Fact] + public void Write_IEntityInfo_DoesntWritesRelationMetadataIfWriteMetasdataSettingsIsFalse() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(_relationNodeProperties); + } + + TestPbfOutput(stream, _relationNode); + } + + [Fact] + public void Write_IOsmGeometry_WritesNode() + { + Node node = new(1, 11.1, 12.1); + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(node); + } + + TestPbfOutput(stream, new NodeInfo(node)); + } + + [Fact] + public void Write_IOsmGeometry_WritesWay() + { + Way way = new(10, new Node[] { new(1), new(2), new(3) }); + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(way); + } + + TestPbfOutput(stream, new WayInfo(way)); + } + + [Fact] + public void Write_IOsmGeometry_WritesRelation() + { + Relation relation = new(100, new RelationMember[] { new(new Node(1), "test-role") }); + + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + target.Write(relation); + } + + TestPbfOutput(stream, new RelationInfo(relation)); + } + + [Fact] + public void Write_IOsmGeometry_ThrowsExceptionIfEntityIsNull() + { + PbfWriterSettings settings = new() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; + MemoryStream stream = new(); + + using (PbfWriter target = new(stream, settings)) + { + IOsmGeometry entity = null; + Assert.Throws(() => target.Write(entity)); + } + } + + [Fact] + public void Flush_ForcesWriterToWriteDataToUnderalyingStorage() + { + MemoryStream stream = new(); + + PbfWriter target = new(stream, new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }); + + //1000 nodes should fit into tokens + for (int i = 0; i < 1000; i++) + { + NodeInfo node = new(i, 45.87, -126.5, new TagsCollection()); + target.Write(node); + } + int minimalExpectedLengthIncrease = 1000 * 8; + + long originalStreamLength = stream.Length; + target.Flush(); + + Assert.True(stream.Length > originalStreamLength + minimalExpectedLengthIncrease); + } + + private void TestPbfOutput(MemoryStream pbfStream, IEntityInfo expected) + { + if (pbfStream.CanSeek) + { + pbfStream.Seek(0, SeekOrigin.Begin); + } + else + { + pbfStream = new MemoryStream(pbfStream.ToArray()); + } + + PbfReader reader = new(pbfStream, new OsmReaderSettings() { ReadMetadata = true }); + IEntityInfo read = reader.Read(); + + switch (expected.EntityType) + { + case EntityType.Node: CompareNodes(expected as NodeInfo, read as NodeInfo); break; + case EntityType.Way: CompareWays(expected as WayInfo, read as WayInfo); break; + case EntityType.Relation: CompareRelation(expected as RelationInfo, read as RelationInfo); break; + } + } + + private void CompareNodes(NodeInfo expected, NodeInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.InRange(actual.Longitude, expected.Longitude - _resolution, expected.Longitude + _resolution); + Assert.InRange(actual.Latitude, expected.Latitude - _resolution, expected.Latitude + _resolution); + + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareWays(WayInfo expected, WayInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); + for (int i = 0; i < expected.Nodes.Count; i++) + { + Assert.Equal(expected.Nodes[i], actual.Nodes[i]); + } + + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareRelation(RelationInfo expected, RelationInfo actual) + { + Assert.Equal(expected.ID, actual.ID); + Assert.Equal(expected.Members.Count, actual.Members.Count); + for (int i = 0; i < expected.Members.Count; i++) + { + Assert.Equal(expected.Members[i], actual.Members[i]); + } + + CompareTags(expected.Tags, actual.Tags); + CompareEntityDetails(expected.Metadata, actual.Metadata); + } + + private void CompareTags(TagsCollection expected, TagsCollection actual) + { + if (expected == null && actual == null) + { + return; + } + + Assert.Equal(expected.Count, actual.Count); + Assert.True(expected.All(actual.Contains)); + } + + private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) + { + if (expected == null && actual == null) + { + return; + } - [Fact] - public void Write_IEntityInfo_WritesRelationWithTags() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_relationTags); - } + Assert.NotNull(actual); - this.TestPbfOutput(stream, _relationTags); - } - - [Fact] - public void Write_IEntityInfo_WritesRelationWithMetadata() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = true }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_relationNodeProperties); - } - - this.TestPbfOutput(stream, _relationNodeProperties); - } - - [Fact] - public void Write_IEntityInfo_DoesntWritesRelationMetadataIfWriteMetasdataSettingsIsFalse() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(_relationNodeProperties); - } - - this.TestPbfOutput(stream, _relationNode); - } - - [Fact] - public void Write_IOsmGeometry_WritesNode() { - Node node = new Node(1, 11.1, 12.1); - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(node); - } - - this.TestPbfOutput(stream, new NodeInfo(node)); - } - - [Fact] - public void Write_IOsmGeometry_WritesWay() { - Way way = new Way(10, new Node[] { new Node(1), new Node(2), new Node(3) }); - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(way); - } - - this.TestPbfOutput(stream, new WayInfo(way)); - } - - [Fact] - public void Write_IOsmGeometry_WritesRelation() { - Relation relation = new Relation(100, new RelationMember[] { new RelationMember(new Node(1), "test-role") }); - - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - target.Write(relation); - } - - this.TestPbfOutput(stream, new RelationInfo(relation)); - } - - [Fact] - public void Write_IOsmGeometry_ThrowsExceptionIfEntityIsNull() { - PbfWriterSettings settings = new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }; - MemoryStream stream = new MemoryStream(); - - using (PbfWriter target = new PbfWriter(stream, settings)) { - IOsmGeometry entity = null; - Assert.Throws(() => target.Write(entity)); - } - } - - [Fact] - public void Flush_ForcesWriterToWriteDataToUnderalyingStorage() { - MemoryStream stream = new MemoryStream(); - - PbfWriter target = new PbfWriter(stream, new PbfWriterSettings() { UseDenseFormat = false, Compression = CompressionMode.None, WriteMetadata = false }); - - //1000 nodes should fit into tokens - for (int i = 0; i < 1000; i++) { - NodeInfo node = new NodeInfo(i, 45.87, -126.5, new TagsCollection()); - target.Write(node); - } - int minimalExpectedLengthIncrease = 1000 * 8; - - long originalStreamLength = stream.Length; - target.Flush(); - - Assert.True(stream.Length > originalStreamLength + minimalExpectedLengthIncrease); - } - - private void TestPbfOutput(MemoryStream pbfStream, IEntityInfo expected) { - if (pbfStream.CanSeek) { - pbfStream.Seek(0, SeekOrigin.Begin); - } - else { - pbfStream = new MemoryStream(pbfStream.ToArray()); - } - - PbfReader reader = new PbfReader(pbfStream, new OsmReaderSettings() { ReadMetadata = true }); - IEntityInfo read = reader.Read(); - - switch (expected.EntityType) { - case EntityType.Node: this.CompareNodes(expected as NodeInfo, read as NodeInfo); break; - case EntityType.Way: this.CompareWays(expected as WayInfo, read as WayInfo); break; - case EntityType.Relation: this.CompareRelation(expected as RelationInfo, read as RelationInfo); break; - } - } - - private void CompareNodes(NodeInfo expected, NodeInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.InRange(actual.Longitude, expected.Longitude - _resolution, expected.Longitude + _resolution); - Assert.InRange(actual.Latitude, expected.Latitude - _resolution, expected.Latitude + _resolution); - - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); - } - - private void CompareWays(WayInfo expected, WayInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Nodes.Count, actual.Nodes.Count); - for (int i = 0; i < expected.Nodes.Count; i++) { - Assert.Equal(expected.Nodes[i], actual.Nodes[i]); - } - - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); - } - - private void CompareRelation(RelationInfo expected, RelationInfo actual) { - Assert.Equal(expected.ID, actual.ID); - Assert.Equal(expected.Members.Count, actual.Members.Count); - for (int i = 0; i < expected.Members.Count; i++) { - Assert.Equal(expected.Members[i], actual.Members[i]); - } - - this.CompareTags(expected.Tags, actual.Tags); - this.CompareEntityDetails(expected.Metadata, actual.Metadata); - } - - private void CompareTags(TagsCollection expected, TagsCollection actual) { - if (expected == null && actual == null) { - return; - } - - Assert.Equal(expected.Count, actual.Count); - Assert.True(expected.All(tag => actual.Contains(tag))); - } - - private void CompareEntityDetails(EntityMetadata expected, EntityMetadata actual) { - if (expected == null && actual == null) { - return; - } - - Assert.NotNull(actual); - - Assert.Equal(expected.Timestamp, actual.Timestamp); - Assert.Equal(expected.Uid, actual.Uid); - Assert.Equal(expected.User, actual.User); - Assert.Equal(expected.Visible, actual.Visible); - Assert.Equal(expected.Version, actual.Version); - Assert.Equal(expected.Changeset, actual.Changeset); - } - } + Assert.Equal(expected.Timestamp, actual.Timestamp); + Assert.Equal(expected.Uid, actual.Uid); + Assert.Equal(expected.User, actual.User); + Assert.Equal(expected.Visible, actual.Visible); + Assert.Equal(expected.Version, actual.Version); + Assert.Equal(expected.Changeset, actual.Changeset); + } } diff --git a/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs b/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs index 8e3fcd4..76369f1 100644 --- a/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs +++ b/src/Tests.SpatialLite.Osm/Integration/Pbf/OsmosisIntegrationTests.cs @@ -1,178 +1,206 @@ -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; - -using Xunit; - -using SpatialLite.Osm; -using SpatialLite.Osm.IO; -using Tests.SpatialLite.Osm.Data; - -namespace Tests.SpatialLite.Osm.Integration.Pbf { - public class OsmosisIntegrationTests { - private const int TestFileNodesCount = 129337; - private const int TestFileWaysCount = 14461; - private const int TestFileRelationsCount = 124; - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfReaderReadsFilesCreatedByOsmosis_NoDenseNoCompression() { - string pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file.pbf"); - - string osmosisArguments = string.Format("--read-pbf file={0} --write-pbf file={1} usedense=false compress=none", PathHelper.RealPbfFilePath, pbfFile); - this.CallOsmosis(osmosisArguments); - - using (PbfReader reader = new PbfReader(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfReaderReadsFilesCreatedByOsmosis_DenseNoCompression() { - var pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file-d.pbf"); - - string osmosisArguments = string.Format("--read-pbf file={0} --write-pbf file={1} usedense=true compress=none", PathHelper.RealPbfFilePath, pbfFile); - this.CallOsmosis(osmosisArguments); - - using (PbfReader reader = new PbfReader(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfReaderReadsFilesCreatedByOsmosis_NoDenseDeflateCompression() { - string pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file-c.pbf"); - - string osmosisArguments = string.Format("--read-pbf file={0} --write-pbf file={1} usedense=false compress=deflate", PathHelper.RealPbfFilePath, pbfFile); - this.CallOsmosis(osmosisArguments); - - using (PbfReader reader = new PbfReader(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfReaderReadsFilesCreatedByOsmosis_DenseDeflate() { - string pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file-dc.pbf"); - - string osmosisArguments = string.Format("--read-pbf file={0} --write-pbf file={1} usedense=true compress=deflate", PathHelper.RealPbfFilePath, pbfFile); - this.CallOsmosis(osmosisArguments); - - using (PbfReader reader = new PbfReader(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseNoCompression() { - string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file.pbf"); - - using (PbfWriter writer = new PbfWriter(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.None, UseDenseFormat = false })) { - foreach (var entityInfo in this.GetTestData()) { - writer.Write(entityInfo); - } - } - - string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); - string osmosisArguments = string.Format("--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); - this.CallOsmosis(osmosisArguments); - - Assert.True(File.Exists(osmosisXmlFile)); - Assert.True(new FileInfo(osmosisXmlFile).Length > 0); - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseDeflate() { - string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file-c.pbf"); - - using (PbfWriter writer = new PbfWriter(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = false })) { - foreach (var entityInfo in this.GetTestData()) { - writer.Write(entityInfo); - } - } - - string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); - string osmosisArguments = string.Format("--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); - this.CallOsmosis(osmosisArguments); - - Assert.True(File.Exists(osmosisXmlFile)); - Assert.True(new FileInfo(osmosisXmlFile).Length > 0); - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfWriterWritesFilesCompatibleWithOsmosis_DenseNoCompression() { - string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file-d.pbf"); - - using (PbfWriter writer = new PbfWriter(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.None, UseDenseFormat = true })) { - foreach (var entityInfo in this.GetTestData()) { - writer.Write(entityInfo); - } - } - - string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); - string osmosisArguments = string.Format("--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); - this.CallOsmosis(osmosisArguments); - - Assert.True(File.Exists(osmosisXmlFile)); - Assert.True(new FileInfo(osmosisXmlFile).Length > 0); - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void PbfWriterWritesFilesCompatibleWithOsmosis_DenseDeflate() { - string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file-dc.pbf"); - - using (PbfWriter writer = new PbfWriter(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = true })) { - foreach (var entityInfo in this.GetTestData()) { - writer.Write(entityInfo); - } - } - - string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); - string osmosisArguments = string.Format("--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); - this.CallOsmosis(osmosisArguments); - - Assert.True(File.Exists(osmosisXmlFile)); - Assert.True(new FileInfo(osmosisXmlFile).Length > 0); - } - - private void CallOsmosis(string arguments) { - ProcessStartInfo osmosisInfo = new ProcessStartInfo(PathHelper.OsmosisPath); - osmosisInfo.Arguments = arguments; - - Process osmosis = Process.Start(osmosisInfo); - osmosis.WaitForExit(); - - Assert.Equal(0, osmosis.ExitCode); - } - - private void TestReader(IOsmReader reader) { - IEntityInfo info = null; - int nodesCount = 0, waysCount = 0, relationsCount = 0; - while ((info = reader.Read()) != null) { - switch (info.EntityType) { - case EntityType.Node: nodesCount++; break; - case EntityType.Way: waysCount++; break; - case EntityType.Relation: relationsCount++; break; - } - } - - Assert.Equal(TestFileNodesCount, nodesCount); - Assert.Equal(TestFileWaysCount, waysCount); - Assert.Equal(TestFileRelationsCount, relationsCount); - } - - private IEnumerable GetTestData() { - List data = new List(); - - using (var stream = TestDataReader.OpenPbf("pbf-real-file.pbf")) { - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - IEntityInfo info = null; - while ((info = reader.Read()) != null) { - data.Add(info); - } - } - } - - return data; - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.IO; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using Tests.SpatialLite.Osm.Data; +using Xunit; + +namespace Tests.SpatialLite.Osm.Integration.Pbf; + +public class OsmosisIntegrationTests +{ + private const int TestFileNodesCount = 129337; + private const int TestFileWaysCount = 14461; + private const int TestFileRelationsCount = 124; + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfReaderReadsFilesCreatedByOsmosis_NoDenseNoCompression() + { + string pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file.pbf"); + + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-pbf file={1} usedense=false compress=none", PathHelper.RealPbfFilePath, pbfFile); + CallOsmosis(osmosisArguments); + + using (PbfReader reader = new(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfReaderReadsFilesCreatedByOsmosis_DenseNoCompression() + { + var pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file-d.pbf"); + + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-pbf file={1} usedense=true compress=none", PathHelper.RealPbfFilePath, pbfFile); + CallOsmosis(osmosisArguments); + + using (PbfReader reader = new(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfReaderReadsFilesCreatedByOsmosis_NoDenseDeflateCompression() + { + string pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file-c.pbf"); + + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-pbf file={1} usedense=false compress=deflate", PathHelper.RealPbfFilePath, pbfFile); + CallOsmosis(osmosisArguments); + + using (PbfReader reader = new(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfReaderReadsFilesCreatedByOsmosis_DenseDeflate() + { + string pbfFile = PathHelper.GetTempFilePath("pbfreader-osmosis-compatibility-test-osmosis-real-file-dc.pbf"); + + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-pbf file={1} usedense=true compress=deflate", PathHelper.RealPbfFilePath, pbfFile); + CallOsmosis(osmosisArguments); + + using (PbfReader reader = new(pbfFile, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseNoCompression() + { + string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file.pbf"); + + using (PbfWriter writer = new(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.None, UseDenseFormat = false })) + { + foreach (var entityInfo in GetTestData()) + { + writer.Write(entityInfo); + } + } + + string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); + CallOsmosis(osmosisArguments); + + Assert.True(File.Exists(osmosisXmlFile)); + Assert.True(new FileInfo(osmosisXmlFile).Length > 0); + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfWriterWritesFilesCompatibleWithOsmosis_NoDenseDeflate() + { + string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file-c.pbf"); + + using (PbfWriter writer = new(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = false })) + { + foreach (var entityInfo in GetTestData()) + { + writer.Write(entityInfo); + } + } + + string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); + CallOsmosis(osmosisArguments); + + Assert.True(File.Exists(osmosisXmlFile)); + Assert.True(new FileInfo(osmosisXmlFile).Length > 0); + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfWriterWritesFilesCompatibleWithOsmosis_DenseNoCompression() + { + string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file-d.pbf"); + + using (PbfWriter writer = new(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.None, UseDenseFormat = true })) + { + foreach (var entityInfo in GetTestData()) + { + writer.Write(entityInfo); + } + } + + string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); + CallOsmosis(osmosisArguments); + + Assert.True(File.Exists(osmosisXmlFile)); + Assert.True(new FileInfo(osmosisXmlFile).Length > 0); + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void PbfWriterWritesFilesCompatibleWithOsmosis_DenseDeflate() + { + string pbfFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-pbfwriter-real-file-dc.pbf"); + + using (PbfWriter writer = new(pbfFile, new PbfWriterSettings() { WriteMetadata = true, Compression = CompressionMode.ZlibDeflate, UseDenseFormat = true })) + { + foreach (var entityInfo in GetTestData()) + { + writer.Write(entityInfo); + } + } + + string osmosisXmlFile = PathHelper.GetTempFilePath("pbfwriter-osmosis-compatibility-test-test-file.osm"); + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-xml file={1}", pbfFile, osmosisXmlFile); + CallOsmosis(osmosisArguments); + + Assert.True(File.Exists(osmosisXmlFile)); + Assert.True(new FileInfo(osmosisXmlFile).Length > 0); + } + + private void CallOsmosis(string arguments) + { + ProcessStartInfo osmosisInfo = new(PathHelper.OsmosisPath); + osmosisInfo.Arguments = arguments; + + Process osmosis = Process.Start(osmosisInfo); + osmosis.WaitForExit(); + + Assert.Equal(0, osmosis.ExitCode); + } + + private void TestReader(IOsmReader reader) + { + int nodesCount = 0, waysCount = 0, relationsCount = 0; + IEntityInfo info; + while ((info = reader.Read()) != null) + { + switch (info.EntityType) + { + case EntityType.Node: nodesCount++; break; + case EntityType.Way: waysCount++; break; + case EntityType.Relation: relationsCount++; break; + } + } + + Assert.Equal(TestFileNodesCount, nodesCount); + Assert.Equal(TestFileWaysCount, waysCount); + Assert.Equal(TestFileRelationsCount, relationsCount); + } + + private IEnumerable GetTestData() + { + List data = new(); + + using (var stream = TestDataReader.OpenPbf("pbf-real-file.pbf")) + { + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + IEntityInfo info = null; + while ((info = reader.Read()) != null) + { + data.Add(info); + } + } + } + + return data; + } +} diff --git a/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs b/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs index 898c176..6074dc4 100644 --- a/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs +++ b/src/Tests.SpatialLite.Osm/Integration/Pbf/PbfReaderPbfWriterComplianceTests.cs @@ -1,119 +1,141 @@ -using System.Collections.Generic; -using System.IO; - -using Xunit; - -using SpatialLite.Osm; -using SpatialLite.Osm.IO; -using Tests.SpatialLite.Osm.Data; - -namespace Tests.SpatialLite.Osm.Integration.Pbf { - public class PbfReaderPbfWriterComplianceTests { - private const int TestFileNodesCount = 129337; - private const int TestFileWaysCount = 14461; - private const int TestFileRelationsCount = 124; - - [Fact, Trait("Category", "Osm.Integration")] - public void PbfReaderCanReadFileCreatedByPbfWriter_NoDenseNoCompression() { - MemoryStream stream = new MemoryStream(); - - using (PbfWriter writer = new PbfWriter(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = false, Compression = CompressionMode.None })) { - foreach (var info in this.GetTestData()) { - writer.Write(info); - } - - writer.Flush(); - - stream.Seek(0, SeekOrigin.Begin); - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - } - - [Fact, Trait("Category", "Osm.Integration")] - public void PbfReaderCanReadFileCreatedByPbfWriter_DenseNoCompression() { - MemoryStream stream = new MemoryStream(); - - using (PbfWriter writer = new PbfWriter(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = true, Compression = CompressionMode.None })) { - foreach (var info in this.GetTestData()) { - writer.Write(info); - } - - writer.Flush(); - - stream.Seek(0, SeekOrigin.Begin); - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - } - - [Fact, Trait("Category", "Osm.Integration")] - public void PbfReaderCanReadFileCreatedByPbfWriter_NoDenseDeflate() { - MemoryStream stream = new MemoryStream(); - - using (PbfWriter writer = new PbfWriter(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = false, Compression = CompressionMode.ZlibDeflate })) { - foreach (var info in this.GetTestData()) { - writer.Write(info); - } - - writer.Flush(); - - stream.Seek(0, SeekOrigin.Begin); - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - } - - [Fact, Trait("Category", "Osm.Integration")] - public void PbfReaderCanReadFileCreatedByPbfWriter_DenseDeflate() { - MemoryStream stream = new MemoryStream(); - - using (PbfWriter writer = new PbfWriter(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = true, Compression = CompressionMode.ZlibDeflate })) { - foreach (var info in this.GetTestData()) { - writer.Write(info); - } - - writer.Flush(); - - stream.Seek(0, SeekOrigin.Begin); - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - this.TestReader(reader); - } - } - } - - private void TestReader(IOsmReader reader) { - IEntityInfo info = null; - int nodesCount = 0, waysCount = 0, relationsCount = 0; - while ((info = reader.Read()) != null) { - switch (info.EntityType) { - case EntityType.Node: nodesCount++; break; - case EntityType.Way: waysCount++; break; - case EntityType.Relation: relationsCount++; break; - } - } - - Assert.Equal(TestFileNodesCount, nodesCount); - Assert.Equal(TestFileWaysCount, waysCount); - Assert.Equal(TestFileRelationsCount, relationsCount); - } - - private IEnumerable GetTestData() { - List data = new List(); - - using (var stream = TestDataReader.OpenPbf("pbf-real-file.pbf")) { - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - IEntityInfo info = null; - while ((info = reader.Read()) != null) { - data.Add(info); - } - } - } - - return data; - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.IO; +using System.Collections.Generic; +using System.IO; +using Tests.SpatialLite.Osm.Data; +using Xunit; + +namespace Tests.SpatialLite.Osm.Integration.Pbf; + +public class PbfReaderPbfWriterComplianceTests +{ + private const int TestFileNodesCount = 129337; + private const int TestFileWaysCount = 14461; + private const int TestFileRelationsCount = 124; + + [Fact, Trait("Category", "Osm.Integration")] + public void PbfReaderCanReadFileCreatedByPbfWriter_NoDenseNoCompression() + { + MemoryStream stream = new(); + + using (PbfWriter writer = new(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = false, Compression = CompressionMode.None })) + { + foreach (var info in GetTestData()) + { + writer.Write(info); + } + + writer.Flush(); + + stream.Seek(0, SeekOrigin.Begin); + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + } + + [Fact, Trait("Category", "Osm.Integration")] + public void PbfReaderCanReadFileCreatedByPbfWriter_DenseNoCompression() + { + MemoryStream stream = new(); + + using (PbfWriter writer = new(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = true, Compression = CompressionMode.None })) + { + foreach (var info in GetTestData()) + { + writer.Write(info); + } + + writer.Flush(); + + stream.Seek(0, SeekOrigin.Begin); + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + } + + [Fact, Trait("Category", "Osm.Integration")] + public void PbfReaderCanReadFileCreatedByPbfWriter_NoDenseDeflate() + { + MemoryStream stream = new(); + + using (PbfWriter writer = new(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = false, Compression = CompressionMode.ZlibDeflate })) + { + foreach (var info in GetTestData()) + { + writer.Write(info); + } + + writer.Flush(); + + stream.Seek(0, SeekOrigin.Begin); + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + } + + [Fact, Trait("Category", "Osm.Integration")] + public void PbfReaderCanReadFileCreatedByPbfWriter_DenseDeflate() + { + MemoryStream stream = new(); + + using (PbfWriter writer = new(stream, new PbfWriterSettings() { WriteMetadata = true, UseDenseFormat = true, Compression = CompressionMode.ZlibDeflate })) + { + foreach (var info in GetTestData()) + { + writer.Write(info); + } + + writer.Flush(); + + stream.Seek(0, SeekOrigin.Begin); + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + TestReader(reader); + } + } + } + + private void TestReader(IOsmReader reader) + { + IEntityInfo info = null; + int nodesCount = 0, waysCount = 0, relationsCount = 0; + while ((info = reader.Read()) != null) + { + switch (info.EntityType) + { + case EntityType.Node: nodesCount++; break; + case EntityType.Way: waysCount++; break; + case EntityType.Relation: relationsCount++; break; + } + } + + Assert.Equal(TestFileNodesCount, nodesCount); + Assert.Equal(TestFileWaysCount, waysCount); + Assert.Equal(TestFileRelationsCount, relationsCount); + } + + private IEnumerable GetTestData() + { + List data = new(); + + using (var stream = TestDataReader.OpenPbf("pbf-real-file.pbf")) + { + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + IEntityInfo info = null; + while ((info = reader.Read()) != null) + { + data.Add(info); + } + } + } + + return data; + } +} diff --git a/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs b/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs index 2dfddb3..3766c9f 100644 --- a/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs +++ b/src/Tests.SpatialLite.Osm/Integration/Xml/OsmDatabaseTests.cs @@ -1,32 +1,32 @@ -using System; -using System.Collections.Generic; -using System.Text; -using SpatialLite.Osm; -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm.IO; -using Tests.SpatialLite.Osm.Data; -using Xunit; - -namespace Tests.SpatialLite.Osm.Integration.Xml { - public class OsmDatabaseTests { - [Fact, Trait("Category", "Osm.Integration")] - public void OsmEntityInfoDatabase_LoadesRealFile() { - OsmXmlReader reader = new OsmXmlReader(TestDataReader.OpenXml("osm-real-file.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); - - Assert.Equal(6688, target.Nodes.Count); - Assert.Equal(740, target.Ways.Count); - Assert.Equal(75, target.Relations.Count); - } - - [Fact, Trait("Category", "Osm.Integration")] - public void OsmGeometryDatabase_LoadesRealFile() { - OsmXmlReader reader = new OsmXmlReader(TestDataReader.OpenXml("osm-real-file.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); - - Assert.Equal(6688, target.Nodes.Count); - Assert.Equal(740, target.Ways.Count); - Assert.Equal(75, target.Relations.Count); - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using SpatialLite.Osm.IO; +using Tests.SpatialLite.Osm.Data; +using Xunit; + +namespace Tests.SpatialLite.Osm.Integration.Xml; + +public class OsmDatabaseTests +{ + [Fact, Trait("Category", "Osm.Integration")] + public void OsmEntityInfoDatabase_LoadesRealFile() + { + OsmXmlReader reader = new(TestDataReader.OpenXml("osm-real-file.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); + + Assert.Equal(6688, target.Nodes.Count); + Assert.Equal(740, target.Ways.Count); + Assert.Equal(75, target.Relations.Count); + } + + [Fact, Trait("Category", "Osm.Integration")] + public void OsmGeometryDatabase_LoadesRealFile() + { + OsmXmlReader reader = new(TestDataReader.OpenXml("osm-real-file.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmGeometryDatabase target = OsmGeometryDatabase.Load(reader, true); + + Assert.Equal(6688, target.Nodes.Count); + Assert.Equal(740, target.Ways.Count); + Assert.Equal(75, target.Relations.Count); + } +} diff --git a/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs b/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs index f7329ea..f2658fc 100644 --- a/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs +++ b/src/Tests.SpatialLite.Osm/Integration/Xml/OsmosisIntegrationTests.cs @@ -1,87 +1,100 @@ -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; - -using Xunit; - -using SpatialLite.Osm; -using SpatialLite.Osm.IO; -using Tests.SpatialLite.Osm.Data; - -namespace Tests.SpatialLite.Osm.Integration.Xml { - public class OsmosisIntegrationTests { - private const int TestFileNodesCount = 129337; - private const int TestFileWaysCount = 14461; - private const int TestFileRelationsCount = 124; - - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void XmlOsmReaderReadsFilesCreatedByOsmosis() { - string xmlFile = PathHelper.GetTempFilePath("xmlreader-osmosis-compatibility-test-osmosis-real-file.osm"); - string osmosisArguments = string.Format("--read-pbf file={0} --write-xml file={1}", PathHelper.RealPbfFilePath, xmlFile); - this.CallOsmosis(osmosisArguments); - - using (OsmXmlReader reader = new OsmXmlReader(xmlFile, new OsmXmlReaderSettings() { ReadMetadata = true, StrictMode = false })) { - this.TestReader(reader); - } - } - - [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] - public void XmlOsmWriterWritesFilesCompatibleWithOsmosis() { - string xmlFile = PathHelper.GetTempFilePath("xmlwriter-osmosis-compatibility-test-xmlwriter-real-file.osm"); - using (OsmXmlWriter writer = new OsmXmlWriter(xmlFile, new OsmWriterSettings() { WriteMetadata = true })) { - foreach (var entityInfo in this.GetTestData()) { - writer.Write(entityInfo); - } - } - - string osmosisXmlFile = PathHelper.GetTempFilePath("xmlwriter-osmosis-compatibility-test-test-file.osm"); - string osmosisArguments = string.Format("--read-xml file={0} --write-xml file={1}", xmlFile, osmosisXmlFile); - this.CallOsmosis(osmosisArguments); - - Assert.True(File.Exists(osmosisXmlFile)); - Assert.True(new FileInfo(osmosisXmlFile).Length > 0); - } - - private IEnumerable GetTestData() { - List data = new List(); - - using (var stream = TestDataReader.OpenPbf("pbf-real-file.pbf")) { - using (PbfReader reader = new PbfReader(stream, new OsmReaderSettings() { ReadMetadata = true })) { - IEntityInfo info = null; - while ((info = reader.Read()) != null) { - data.Add(info); - } - } - } - - return data; - } - - private void CallOsmosis(string arguments) { - ProcessStartInfo osmosisInfo = new ProcessStartInfo(PathHelper.OsmosisPath); - osmosisInfo.Arguments = arguments; - - Process osmosis = Process.Start(osmosisInfo); - osmosis.WaitForExit(); - - Assert.Equal(0, osmosis.ExitCode); - } - - private void TestReader(IOsmReader reader) { - IEntityInfo info = null; - int nodesCount = 0, waysCount = 0, relationsCount = 0; - while ((info = reader.Read()) != null) { - switch (info.EntityType) { - case EntityType.Node: nodesCount++; break; - case EntityType.Way: waysCount++; break; - case EntityType.Relation: relationsCount++; break; - } - } - - Assert.Equal(TestFileNodesCount, nodesCount); - Assert.Equal(TestFileWaysCount, waysCount); - Assert.Equal(TestFileRelationsCount, relationsCount); - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.IO; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using Tests.SpatialLite.Osm.Data; +using Xunit; + +namespace Tests.SpatialLite.Osm.Integration.Xml; + +public class OsmosisIntegrationTests +{ + private const int TestFileNodesCount = 129337; + private const int TestFileWaysCount = 14461; + private const int TestFileRelationsCount = 124; + + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void XmlOsmReaderReadsFilesCreatedByOsmosis() + { + string xmlFile = PathHelper.GetTempFilePath("xmlreader-osmosis-compatibility-test-osmosis-real-file.osm"); + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-pbf file={0} --write-xml file={1}", PathHelper.RealPbfFilePath, xmlFile); + CallOsmosis(osmosisArguments); + + using (OsmXmlReader reader = new(xmlFile, new OsmXmlReaderSettings() { ReadMetadata = true, StrictMode = false })) + { + TestReader(reader); + } + } + + [Fact(Skip = "Test requires Windows-specific osmosis.bat file which is not available in Linux CI environment"), Trait("Category", "Osm.Integration")] + public void XmlOsmWriterWritesFilesCompatibleWithOsmosis() + { + string xmlFile = PathHelper.GetTempFilePath("xmlwriter-osmosis-compatibility-test-xmlwriter-real-file.osm"); + using (OsmXmlWriter writer = new(xmlFile, new OsmWriterSettings() { WriteMetadata = true })) + { + foreach (var entityInfo in GetTestData()) + { + writer.Write(entityInfo); + } + } + + string osmosisXmlFile = PathHelper.GetTempFilePath("xmlwriter-osmosis-compatibility-test-test-file.osm"); + string osmosisArguments = string.Format(CultureInfo.InvariantCulture, "--read-xml file={0} --write-xml file={1}", xmlFile, osmosisXmlFile); + CallOsmosis(osmosisArguments); + + Assert.True(File.Exists(osmosisXmlFile)); + Assert.True(new FileInfo(osmosisXmlFile).Length > 0); + } + + private IEnumerable GetTestData() + { + List data = new(); + + using (var stream = TestDataReader.OpenPbf("pbf-real-file.pbf")) + { + using (PbfReader reader = new(stream, new OsmReaderSettings() { ReadMetadata = true })) + { + IEntityInfo info = null; + while ((info = reader.Read()) != null) + { + data.Add(info); + } + } + } + + return data; + } + + private void CallOsmosis(string arguments) + { + ProcessStartInfo osmosisInfo = new(PathHelper.OsmosisPath); + osmosisInfo.Arguments = arguments; + + Process osmosis = Process.Start(osmosisInfo); + osmosis.WaitForExit(); + + Assert.Equal(0, osmosis.ExitCode); + } + + private void TestReader(IOsmReader reader) + { + int nodesCount = 0, waysCount = 0, relationsCount = 0; + IEntityInfo info; + while ((info = reader.Read()) != null) + { + switch (info.EntityType) + { + case EntityType.Node: nodesCount++; break; + case EntityType.Way: waysCount++; break; + case EntityType.Relation: relationsCount++; break; + } + } + + Assert.Equal(TestFileNodesCount, nodesCount); + Assert.Equal(TestFileWaysCount, waysCount); + Assert.Equal(TestFileRelationsCount, relationsCount); + } +} diff --git a/src/Tests.SpatialLite.Osm/NodeInfoTests.cs b/src/Tests.SpatialLite.Osm/NodeInfoTests.cs index e000e87..5d6a8f2 100644 --- a/src/Tests.SpatialLite.Osm/NodeInfoTests.cs +++ b/src/Tests.SpatialLite.Osm/NodeInfoTests.cs @@ -1,64 +1,67 @@ -using System; - -using Xunit; - -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm { - public class NodeInfoTests { - - [Fact] - public void Constructor_PropertiesWithoutEntityDetails_SetsProperties() { - int id = 15; - double latitude = 15.4; - double longitude = -23.7; - TagsCollection tags = new TagsCollection(); - - NodeInfo target = new NodeInfo(id, latitude, longitude, tags); - - Assert.Equal(EntityType.Node, target.EntityType); - Assert.Equal(id, target.ID); - Assert.Equal(latitude, target.Latitude); - Assert.Equal(longitude, target.Longitude); - Assert.Same(tags, target.Tags); - Assert.Null(target.Metadata); - } - - [Fact] - public void Constructor_Properties_SetsProperties() { - int id = 15; - double latitude = 15.4; - double longitude = -23.7; - TagsCollection tags = new TagsCollection(); - EntityMetadata details = new EntityMetadata(); - - NodeInfo target = new NodeInfo(id, latitude, longitude, tags, details); - - Assert.Equal(EntityType.Node, target.EntityType); - Assert.Equal(id, target.ID); - Assert.Equal(latitude, target.Latitude); - Assert.Equal(longitude, target.Longitude); - Assert.Same(tags, target.Tags); - Assert.Same(details, target.Metadata); - } - - [Fact] - public void Constructor_Node_SetsProperties() { - Node node = new Node(1, 10.1, 12.1, new TagsCollection()) { Metadata = new EntityMetadata() }; - - NodeInfo target = new NodeInfo(node); - - Assert.Equal(node.ID, target.ID); - Assert.Equal(node.Position.X, target.Longitude); - Assert.Equal(node.Position.Y, target.Latitude); - Assert.Same(node.Tags, target.Tags); - Assert.Same(node.Metadata, target.Metadata); - } - - [Fact] - public void Constructor_Node_ThrowsExceptionIfNodeIsNull() { - Assert.Throws(() => new NodeInfo(null)); - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class NodeInfoTests +{ + + [Fact] + public void Constructor_PropertiesWithoutEntityDetails_SetsProperties() + { + int id = 15; + double latitude = 15.4; + double longitude = -23.7; + TagsCollection tags = new TagsCollection(); + + NodeInfo target = new NodeInfo(id, latitude, longitude, tags); + + Assert.Equal(EntityType.Node, target.EntityType); + Assert.Equal(id, target.ID); + Assert.Equal(latitude, target.Latitude); + Assert.Equal(longitude, target.Longitude); + Assert.Same(tags, target.Tags); + Assert.Null(target.Metadata); + } + + [Fact] + public void Constructor_Properties_SetsProperties() + { + int id = 15; + double latitude = 15.4; + double longitude = -23.7; + TagsCollection tags = new TagsCollection(); + EntityMetadata details = new EntityMetadata(); + + NodeInfo target = new NodeInfo(id, latitude, longitude, tags, details); + + Assert.Equal(EntityType.Node, target.EntityType); + Assert.Equal(id, target.ID); + Assert.Equal(latitude, target.Latitude); + Assert.Equal(longitude, target.Longitude); + Assert.Same(tags, target.Tags); + Assert.Same(details, target.Metadata); + } + + [Fact] + public void Constructor_Node_SetsProperties() + { + Node node = new Node(1, 10.1, 12.1, new TagsCollection()) { Metadata = new EntityMetadata() }; + + NodeInfo target = new NodeInfo(node); + + Assert.Equal(node.ID, target.ID); + Assert.Equal(node.Position.X, target.Longitude); + Assert.Equal(node.Position.Y, target.Latitude); + Assert.Same(node.Tags, target.Tags); + Assert.Same(node.Metadata, target.Metadata); + } + + [Fact] + public void Constructor_Node_ThrowsExceptionIfNodeIsNull() + { + Assert.Throws(() => new NodeInfo(null)); + } +} diff --git a/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs b/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs index 27a8e9d..46aa3a0 100644 --- a/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs +++ b/src/Tests.SpatialLite.Osm/OsmDatabaseTests.cs @@ -1,419 +1,467 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Xunit; - -using SpatialLite.Osm; -using SpatialLite.Osm.Geometries; - -namespace Tests.SpatialLite.Osm { - public class OsmDatabaseTests { - Node[] _nodeData; - Way[] _wayData; - Relation[] _relationData; - IOsmGeometry[] _data; - - public OsmDatabaseTests() { - _nodeData = new Node[3]; - _nodeData[0] = new Node(1); - _nodeData[1] = new Node(2); - _nodeData[2] = new Node(3); - - _wayData = new Way[2]; - _wayData[0] = new Way(1, _nodeData); - _wayData[1] = new Way(2, _nodeData.Skip(1)); - - _relationData = new Relation[2]; - _relationData[0] = new Relation(1, new RelationMember[] { new RelationMember(_wayData[0], "way"), new RelationMember(_nodeData[0], "node") }); - _relationData[1] = new Relation(2, new RelationMember[] { new RelationMember(_relationData[0], "relation"), new RelationMember(_nodeData[0], "node") }); - - _data = _nodeData.Concat(_wayData).Concat(_relationData).ToArray(); - } - - [Fact] - public void Constructor__CreatesEmptyDatabase() { - OsmDatabase target = new OsmDatabase(); - - Assert.Empty(target); - Assert.Empty(target.Nodes); - Assert.Empty(target.Ways); - Assert.Empty(target.Relations); - } - - [Fact] - public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() { - OsmDatabase target = new OsmDatabase(_data); - - for (int i = 0; i < _data.Length; i++) { - Assert.Contains(_data[i], target); - } - } - - [Fact] - public void Constructor_IEnumerable_AddEnittiesToCorrectCollections() { - OsmDatabase target = new OsmDatabase(_data); - - for (int i = 0; i < _nodeData.Length; i++) { - Assert.Contains(_nodeData[i], target.Nodes); - } - - for (int i = 0; i < _wayData.Length; i++) { - Assert.Contains(_wayData[i], target.Ways); - } - - for (int i = 0; i < _relationData.Length; i++) { - Assert.Contains(_relationData[i], target.Relations); - } - } - - [Fact] - public void Count_ReturnsNumberOfAllEntities() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.Equal(_data.Length, target.Count); - } - - [Fact] - public void IsReadOnly_ReturnsFalse() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.False(target.IsReadOnly); - } - - [Fact] - public void Item_ReturnsNullIfIDIsNotPresentInCollection() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.Null(target[10000, EntityType.Node]); - } - - [Fact] - public void Item_ReturnsNodeWithSpecificID() { - OsmDatabase target = new OsmDatabase(_data); - IOsmGeometry entity = target[_nodeData[0].ID, EntityType.Node]; - - Assert.Same(_nodeData[0], entity); - } - - [Fact] - public void Item_ReturnsWayWithSpecificID() { - OsmDatabase target = new OsmDatabase(_data); - IOsmGeometry entity = target[_wayData[0].ID, EntityType.Way]; - - Assert.Same(_wayData[0], entity); - } - - [Fact] - public void Item_ReturnsRelationWithSpecificID() { - OsmDatabase target = new OsmDatabase(_data); - IOsmGeometry entity = target[_relationData[0].ID, EntityType.Relation]; - - Assert.Same(_relationData[0], entity); - } - - [Fact] - public void Add_AddsNodeToCollection() { - OsmDatabase target = new OsmDatabase(_nodeData.Skip(1)); - target.Add(_nodeData[0]); - - Assert.Contains(_nodeData[0], target); - } - - [Fact] - public void Add_AddsWayToCollection() { - OsmDatabase target = new OsmDatabase(_wayData.Skip(1)); - target.Add(_wayData[0]); - - Assert.Contains(_wayData[0], target); - } - - [Fact] - public void Add_AddsRelationToCollection() { - OsmDatabase target = new OsmDatabase(_relationData.Skip(1)); - target.Add(_relationData[0]); - - Assert.Contains(_relationData[0], target); - } - - [Fact] - public void Add_ThrowsArgumentNullExceptionIfItemIsNull() { - OsmDatabase target = new OsmDatabase(); - - Assert.Throws(() => target.Add(null)); - } - - [Fact] - public void Add_ThrowsExceptionWhenAddingDuplicateID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.Throws(() => target.Add(_data[0])); - } - - [Fact] - public void Clear_RemovesAllItemsFromCollection() { - OsmDatabase target = new OsmDatabase(_data); - target.Clear(); - - Assert.Empty(target); - Assert.Empty(target.Nodes); - Assert.Empty(target.Ways); - Assert.Empty(target.Relations); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseForNull() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.DoesNotContain(null, target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainNode() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.DoesNotContain(new Node(10000), target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsNode() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.Contains(_nodeData[0], target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainWay() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.DoesNotContain(new Way(10000), target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsWay() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.Contains(_wayData[0], target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainRelation() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.DoesNotContain(new Relation(10000), target); - } - - [Fact] - public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsRelation() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.Contains(_relationData[0], target); - } - - [Fact] - public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainNodeID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.False(target.Contains(10000, EntityType.Node)); - } - - [Fact] - public void Contains_ID_ReturnsTrueIfCollectionContainsNodeID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.True(target.Contains(_nodeData[0].ID, EntityType.Node)); - } - - [Fact] - public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainWayID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.False(target.Contains(10000, EntityType.Way)); - } - - [Fact] - public void Contains_ID_ReturnsTrueIfCollectionContainsWayID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.True(target.Contains(_wayData[0].ID, EntityType.Way)); - } - - [Fact] - public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainRelationID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.False(target.Contains(10000, EntityType.Relation)); - } - - [Fact] - public void Contains_ID_ReturnsTrueIfCollectionContainsRelationID() { - OsmDatabase target = new OsmDatabase(_data); - - Assert.True(target.Contains(_relationData[0].ID, EntityType.Relation)); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsFalseIfItemIsNull() { - OsmDatabase target = new OsmDatabase(_data); - - bool callResult = target.Remove(null); - - Assert.False(callResult); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfNodeIsNotPresent() { - OsmDatabase target = new OsmDatabase(_nodeData.Skip(1)); - - bool callResult = target.Remove(_nodeData[0]); - - Assert.False(callResult); - Assert.Contains(_nodeData[1], target); - Assert.Contains(_nodeData[2], target); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsTrueAndRemovesNodeFromCollection() { - OsmDatabase target = new OsmDatabase(_nodeData); - - bool callResult = target.Remove(_data[0]); - - Assert.True(callResult); - Assert.DoesNotContain(_nodeData[0], target); - Assert.Contains(_nodeData[1], target); - Assert.Contains(_nodeData[2], target); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfWayIsNotPresent() { - OsmDatabase target = new OsmDatabase(_wayData.Skip(1)); - - bool callResult = target.Remove(_wayData[0]); - - Assert.False(callResult); - Assert.Contains(_wayData[1], target); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsTrueAndRemovesWayFromCollection() { - OsmDatabase target = new OsmDatabase(_wayData); - - bool callResult = target.Remove(_wayData[0]); - - Assert.True(callResult); - Assert.DoesNotContain(_wayData[0], target); - Assert.Contains(_wayData[1], target); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfRelationIsNotPresent() { - OsmDatabase target = new OsmDatabase(_relationData.Skip(1)); - - bool callResult = target.Remove(_relationData[0]); - - Assert.False(callResult); - Assert.Contains(_relationData[1], target); - } - - [Fact] - public void Remove_IOsmGeometry_ReturnsTrueAndRemovesRelationFromCollection() { - OsmDatabase target = new OsmDatabase(_relationData); - - bool callResult = target.Remove(_relationData[0]); - - Assert.True(callResult); - Assert.DoesNotContain(_relationData[0], target); - Assert.Contains(_relationData[1], target); - } - - [Fact] - public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfNodeIsNotPresent() { - OsmDatabase target = new OsmDatabase(_nodeData.Skip(1)); - - bool callResult = target.Remove(_nodeData[0].ID, EntityType.Node); - - Assert.False(callResult); - Assert.Contains(_nodeData[1], target); - Assert.Contains(_nodeData[2], target); - } - - [Fact] - public void Remove_ID_ReturnsTrueAndRemovesNodeFromCollection() { - OsmDatabase target = new OsmDatabase(_nodeData); - - bool callResult = target.Remove(_data[0].ID, EntityType.Node); - - Assert.True(callResult); - Assert.DoesNotContain(_nodeData[0], target); - Assert.Contains(_nodeData[1], target); - Assert.Contains(_nodeData[2], target); - } - - [Fact] - public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfWayIsNotPresent() { - OsmDatabase target = new OsmDatabase(_wayData.Skip(1)); - - bool callResult = target.Remove(_wayData[0].ID, EntityType.Way); - - Assert.False(callResult); - Assert.Contains(_wayData[1], target); - } - - [Fact] - public void Remove_ID_ReturnsTrueAndRemovesWayFromCollection() { - OsmDatabase target = new OsmDatabase(_wayData); - - bool callResult = target.Remove(_wayData[0].ID, EntityType.Way); - - Assert.True(callResult); - Assert.DoesNotContain(_wayData[0], target); - Assert.Contains(_wayData[1], target); - } - - [Fact] - public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfRelationIsNotPresent() { - OsmDatabase target = new OsmDatabase(_relationData.Skip(1)); - - bool callResult = target.Remove(_relationData[0].ID, EntityType.Relation); - - Assert.False(callResult); - Assert.Contains(_relationData[1], target); - } - - [Fact] - public void Remove_ID_ReturnsTrueAndRemovesRelationFromCollection() { - OsmDatabase target = new OsmDatabase(_relationData); - - bool callResult = target.Remove(_relationData[0].ID, EntityType.Relation); - - Assert.True(callResult); - Assert.DoesNotContain(_relationData[0], target); - Assert.Contains(_relationData[1], target); - } - - [Fact] - public void GetEnumerator_ReturnsEnumeratorThatEnumeratesAllEntities() { - OsmDatabase target = new OsmDatabase(_data); - - IEnumerable result = target; - - Assert.Equal(_data.Length, target.Count()); - foreach (var entity in target) { - Assert.Contains(entity, _data); - } - } - - [Fact] - public void CopyTo_CopiesEntitiesToArray() { - OsmDatabase target = new OsmDatabase(_data); - IOsmGeometry[] array = new IOsmGeometry[_data.Length]; - - target.CopyTo(array, 0); - - for (int i = 0; i < _data.Length; i++) { - Assert.Same(_data[i], array[i]); - } - } - - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class OsmDatabaseTests +{ + private readonly Node[] _nodeData; + private readonly Way[] _wayData; + private readonly Relation[] _relationData; + private readonly IOsmGeometry[] _data; + + public OsmDatabaseTests() + { + _nodeData = new Node[3]; + _nodeData[0] = new Node(1); + _nodeData[1] = new Node(2); + _nodeData[2] = new Node(3); + + _wayData = new Way[2]; + _wayData[0] = new Way(1, _nodeData); + _wayData[1] = new Way(2, _nodeData.Skip(1)); + + _relationData = new Relation[2]; + _relationData[0] = new Relation(1, new RelationMember[] { new(_wayData[0], "way"), new(_nodeData[0], "node") }); + _relationData[1] = new Relation(2, new RelationMember[] { new(_relationData[0], "relation"), new(_nodeData[0], "node") }); + + _data = _nodeData.Concat(_wayData).Concat(_relationData).ToArray(); + } + + [Fact] + public void Constructor__CreatesEmptyDatabase() + { + OsmDatabase target = new(); + + Assert.Empty(target); + Assert.Empty(target.Nodes); + Assert.Empty(target.Ways); + Assert.Empty(target.Relations); + } + + [Fact] + public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() + { + OsmDatabase target = new(_data); + + for (int i = 0; i < _data.Length; i++) + { + Assert.Contains(_data[i], target); + } + } + + [Fact] + public void Constructor_IEnumerable_AddEnittiesToCorrectCollections() + { + OsmDatabase target = new(_data); + + for (int i = 0; i < _nodeData.Length; i++) + { + Assert.Contains(_nodeData[i], target.Nodes); + } + + for (int i = 0; i < _wayData.Length; i++) + { + Assert.Contains(_wayData[i], target.Ways); + } + + for (int i = 0; i < _relationData.Length; i++) + { + Assert.Contains(_relationData[i], target.Relations); + } + } + + [Fact] + public void Count_ReturnsNumberOfAllEntities() + { + OsmDatabase target = new(_data); + + Assert.Equal(_data.Length, target.Count); + } + + [Fact] + public void IsReadOnly_ReturnsFalse() + { + OsmDatabase target = new(_data); + + Assert.False(target.IsReadOnly); + } + + [Fact] + public void Item_ReturnsNullIfIDIsNotPresentInCollection() + { + OsmDatabase target = new(_data); + + Assert.Null(target[10000, EntityType.Node]); + } + + [Fact] + public void Item_ReturnsNodeWithSpecificID() + { + OsmDatabase target = new(_data); + IOsmGeometry entity = target[_nodeData[0].ID, EntityType.Node]; + + Assert.Same(_nodeData[0], entity); + } + + [Fact] + public void Item_ReturnsWayWithSpecificID() + { + OsmDatabase target = new(_data); + IOsmGeometry entity = target[_wayData[0].ID, EntityType.Way]; + + Assert.Same(_wayData[0], entity); + } + + [Fact] + public void Item_ReturnsRelationWithSpecificID() + { + OsmDatabase target = new(_data); + IOsmGeometry entity = target[_relationData[0].ID, EntityType.Relation]; + + Assert.Same(_relationData[0], entity); + } + + [Fact] + public void Add_AddsNodeToCollection() + { + OsmDatabase target = new(_nodeData.Skip(1)); + target.Add(_nodeData[0]); + + Assert.Contains(_nodeData[0], target); + } + + [Fact] + public void Add_AddsWayToCollection() + { + OsmDatabase target = new(_wayData.Skip(1)); + target.Add(_wayData[0]); + + Assert.Contains(_wayData[0], target); + } + + [Fact] + public void Add_AddsRelationToCollection() + { + OsmDatabase target = new(_relationData.Skip(1)); + target.Add(_relationData[0]); + + Assert.Contains(_relationData[0], target); + } + + [Fact] + public void Add_ThrowsArgumentNullExceptionIfItemIsNull() + { + OsmDatabase target = new(); + + Assert.Throws(() => target.Add(null)); + } + + [Fact] + public void Add_ThrowsExceptionWhenAddingDuplicateID() + { + OsmDatabase target = new(_data); + + Assert.Throws(() => target.Add(_data[0])); + } + + [Fact] + public void Clear_RemovesAllItemsFromCollection() + { + OsmDatabase target = new(_data); + target.Clear(); + + Assert.Empty(target); + Assert.Empty(target.Nodes); + Assert.Empty(target.Ways); + Assert.Empty(target.Relations); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseForNull() + { + OsmDatabase target = new(_data); + + Assert.DoesNotContain(null, target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainNode() + { + OsmDatabase target = new(_data); + + Assert.DoesNotContain(new Node(10000), target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsNode() + { + OsmDatabase target = new(_data); + + Assert.Contains(_nodeData[0], target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainWay() + { + OsmDatabase target = new(_data); + + Assert.DoesNotContain(new Way(10000), target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsWay() + { + OsmDatabase target = new(_data); + + Assert.Contains(_wayData[0], target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsFalseIfCollectionDoesNotContainRelation() + { + OsmDatabase target = new(_data); + + Assert.DoesNotContain(new Relation(10000), target); + } + + [Fact] + public void Contains_IOsmGeometry_ReturnsTrueIfCollectionContainsRelation() + { + OsmDatabase target = new(_data); + + Assert.Contains(_relationData[0], target); + } + + [Fact] + public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainNodeID() + { + OsmDatabase target = new(_data); + + Assert.False(target.Contains(10000, EntityType.Node)); + } + + [Fact] + public void Contains_ID_ReturnsTrueIfCollectionContainsNodeID() + { + OsmDatabase target = new(_data); + + Assert.True(target.Contains(_nodeData[0].ID, EntityType.Node)); + } + + [Fact] + public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainWayID() + { + OsmDatabase target = new(_data); + + Assert.False(target.Contains(10000, EntityType.Way)); + } + + [Fact] + public void Contains_ID_ReturnsTrueIfCollectionContainsWayID() + { + OsmDatabase target = new(_data); + + Assert.True(target.Contains(_wayData[0].ID, EntityType.Way)); + } + + [Fact] + public void Contains_ID_ReturnsFalseIfCollectionDoesNotContainRelationID() + { + OsmDatabase target = new(_data); + + Assert.False(target.Contains(10000, EntityType.Relation)); + } + + [Fact] + public void Contains_ID_ReturnsTrueIfCollectionContainsRelationID() + { + OsmDatabase target = new(_data); + + Assert.True(target.Contains(_relationData[0].ID, EntityType.Relation)); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsFalseIfItemIsNull() + { + OsmDatabase target = new(_data); + + bool callResult = target.Remove(null); + + Assert.False(callResult); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfNodeIsNotPresent() + { + OsmDatabase target = new(_nodeData.Skip(1)); + + bool callResult = target.Remove(_nodeData[0]); + + Assert.False(callResult); + Assert.Contains(_nodeData[1], target); + Assert.Contains(_nodeData[2], target); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsTrueAndRemovesNodeFromCollection() + { + OsmDatabase target = new(_nodeData); + + bool callResult = target.Remove(_data[0]); + + Assert.True(callResult); + Assert.DoesNotContain(_nodeData[0], target); + Assert.Contains(_nodeData[1], target); + Assert.Contains(_nodeData[2], target); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfWayIsNotPresent() + { + OsmDatabase target = new(_wayData.Skip(1)); + + bool callResult = target.Remove(_wayData[0]); + + Assert.False(callResult); + Assert.Contains(_wayData[1], target); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsTrueAndRemovesWayFromCollection() + { + OsmDatabase target = new(_wayData); + + bool callResult = target.Remove(_wayData[0]); + + Assert.True(callResult); + Assert.DoesNotContain(_wayData[0], target); + Assert.Contains(_wayData[1], target); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsFalseAndDoesntModifyCollectionIfRelationIsNotPresent() + { + OsmDatabase target = new(_relationData.Skip(1)); + + bool callResult = target.Remove(_relationData[0]); + + Assert.False(callResult); + Assert.Contains(_relationData[1], target); + } + + [Fact] + public void Remove_IOsmGeometry_ReturnsTrueAndRemovesRelationFromCollection() + { + OsmDatabase target = new(_relationData); + + bool callResult = target.Remove(_relationData[0]); + + Assert.True(callResult); + Assert.DoesNotContain(_relationData[0], target); + Assert.Contains(_relationData[1], target); + } + + [Fact] + public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfNodeIsNotPresent() + { + OsmDatabase target = new(_nodeData.Skip(1)); + + bool callResult = target.Remove(_nodeData[0].ID, EntityType.Node); + + Assert.False(callResult); + Assert.Contains(_nodeData[1], target); + Assert.Contains(_nodeData[2], target); + } + + [Fact] + public void Remove_ID_ReturnsTrueAndRemovesNodeFromCollection() + { + OsmDatabase target = new(_nodeData); + + bool callResult = target.Remove(_data[0].ID, EntityType.Node); + + Assert.True(callResult); + Assert.DoesNotContain(_nodeData[0], target); + Assert.Contains(_nodeData[1], target); + Assert.Contains(_nodeData[2], target); + } + + [Fact] + public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfWayIsNotPresent() + { + OsmDatabase target = new(_wayData.Skip(1)); + + bool callResult = target.Remove(_wayData[0].ID, EntityType.Way); + + Assert.False(callResult); + Assert.Contains(_wayData[1], target); + } + + [Fact] + public void Remove_ID_ReturnsTrueAndRemovesWayFromCollection() + { + OsmDatabase target = new(_wayData); + + bool callResult = target.Remove(_wayData[0].ID, EntityType.Way); + + Assert.True(callResult); + Assert.DoesNotContain(_wayData[0], target); + Assert.Contains(_wayData[1], target); + } + + [Fact] + public void Remove_ID_ReturnsFalseAndDoesntModifyCollectionIfRelationIsNotPresent() + { + OsmDatabase target = new(_relationData.Skip(1)); + + bool callResult = target.Remove(_relationData[0].ID, EntityType.Relation); + + Assert.False(callResult); + Assert.Contains(_relationData[1], target); + } + + [Fact] + public void Remove_ID_ReturnsTrueAndRemovesRelationFromCollection() + { + OsmDatabase target = new(_relationData); + + bool callResult = target.Remove(_relationData[0].ID, EntityType.Relation); + + Assert.True(callResult); + Assert.DoesNotContain(_relationData[0], target); + Assert.Contains(_relationData[1], target); + } + + [Fact] + public void GetEnumerator_ReturnsEnumeratorThatEnumeratesAllEntities() + { + OsmDatabase target = new(_data); + + IEnumerable result = target; + + Assert.Equal(_data.Length, target.Count()); + foreach (var entity in target) + { + Assert.Contains(entity, _data); + } + } + + [Fact] + public void CopyTo_CopiesEntitiesToArray() + { + OsmDatabase target = new(_data); + IOsmGeometry[] array = new IOsmGeometry[_data.Length]; + + target.CopyTo(array, 0); + + for (int i = 0; i < _data.Length; i++) + { + Assert.Same(_data[i], array[i]); + } + } +} diff --git a/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs b/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs index a62145a..d12bf5a 100644 --- a/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs +++ b/src/Tests.SpatialLite.Osm/OsmEntityInfoDatabaseTests.cs @@ -1,125 +1,136 @@ -using System.Collections.Generic; -using System.Linq; -using System.IO; - -using Xunit; -using Moq; - -using SpatialLite.Osm; -using SpatialLite.Osm.IO; -using Tests.SpatialLite.Osm.Data; - -namespace Tests.SpatialLite.Osm.Geometries { - public class OsmEntityInfoDatabaseTests { - NodeInfo[] _nodeData; - WayInfo[] _wayData; - RelationInfo[] _relationData; - IEntityInfo[] _data; - - public OsmEntityInfoDatabaseTests() { - _nodeData = new NodeInfo[3]; - _nodeData[0] = new NodeInfo(1, 10.1, 11.1, new TagsCollection()); - _nodeData[1] = new NodeInfo(2, 10.2, 11.2, new TagsCollection()); - _nodeData[2] = new NodeInfo(3, 10.3, 11.3, new TagsCollection()); - - _wayData = new WayInfo[2]; - _wayData[0] = new WayInfo(10, new TagsCollection(), _nodeData.Select(n => n.ID).ToArray()); - _wayData[1] = new WayInfo(11, new TagsCollection(), _nodeData.Select(n => n.ID).Skip(1).ToArray()); - - _relationData = new RelationInfo[2]; - _relationData[0] = new RelationInfo(100, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { Reference = 10, Role = "way" }, new RelationMemberInfo() { Reference = 1, Role = "node" } }); - _relationData[1] = new RelationInfo(101, new TagsCollection(), new RelationMemberInfo[] { new RelationMemberInfo() { Reference = 101, Role = "relation" }, new RelationMemberInfo() { Reference = 1, Role = "node" } }); - - _data = _nodeData.Concat(_wayData).Concat(_relationData).ToArray(); - } - - [Fact] - public void Constructor__CreatesEmptyDatabase() { - OsmEntityInfoDatabase target = new OsmEntityInfoDatabase(); - - Assert.Empty(target); - Assert.Empty(target.Nodes); - Assert.Empty(target.Ways); - Assert.Empty(target.Relations); - } - - [Fact] - public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() { - OsmEntityInfoDatabase target = new OsmEntityInfoDatabase(_data); - - for (int i = 0; i < _data.Length; i++) { - Assert.Contains(_data[i], target); - } - } - - [Fact] - public void Constructor_IEnumerable_AddEnittiesToCorrextCollections() { - OsmEntityInfoDatabase target = new OsmEntityInfoDatabase(_data); - - for (int i = 0; i < _nodeData.Length; i++) { - Assert.Contains(_nodeData[i], target.Nodes); - } - - for (int i = 0; i < _wayData.Length; i++) { - Assert.Contains(_wayData[i], target.Ways); - } - - for (int i = 0; i < _relationData.Length; i++) { - Assert.Contains(_relationData[i], target.Relations); - } - } - - [Fact] - public void Load_IOsmReader_LoadsNodes() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-nodes.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); - - Assert.Equal(3, target.Nodes.Count); - Assert.True(target.Nodes.Contains(1)); - Assert.True(target.Nodes.Contains(2)); - Assert.True(target.Nodes.Contains(3)); - } - - [Fact] - public void Load_IOsmReader_LoadsWay() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); - - Assert.Equal(3, target.Nodes.Count); - Assert.True(target.Nodes.Contains(1)); - Assert.True(target.Nodes.Contains(2)); - Assert.True(target.Nodes.Contains(3)); - - Assert.Equal(1, target.Ways.Count); - Assert.True(target.Ways.Contains(10)); - } - - [Fact] - public void Load_IOsmReader_LoadsRelation() { - IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); - OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); - - Assert.Equal(1, target.Nodes.Count); - Assert.True(target.Nodes.Contains(1)); - - Assert.Equal(1, target.Relations.Count); - Assert.True(target.Relations.Contains(100)); - } - - [Fact] - public void Save_CallsIOsmWriterWriteForAllEntities() { - List written = new List(); - Mock writerM = new Mock(); - - writerM.Setup(w => w.Write(It.IsAny())).Callback((e) => written.Add(e)); - - OsmEntityInfoDatabase target = new OsmEntityInfoDatabase(_data); - target.Save(writerM.Object); - - Assert.Equal(target.Count, written.Count); - foreach (var entity in target) { - Assert.Contains(entity, written); - } - } - } -} \ No newline at end of file +using Moq; +using SpatialLite.Osm; +using SpatialLite.Osm.IO; +using System.Collections.Generic; +using System.Linq; +using Tests.SpatialLite.Osm.Data; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class OsmEntityInfoDatabaseTests +{ + private readonly NodeInfo[] _nodeData; + private readonly WayInfo[] _wayData; + private readonly RelationInfo[] _relationData; + private readonly IEntityInfo[] _data; + + public OsmEntityInfoDatabaseTests() + { + _nodeData = new NodeInfo[3]; + _nodeData[0] = new NodeInfo(1, 10.1, 11.1, new TagsCollection()); + _nodeData[1] = new NodeInfo(2, 10.2, 11.2, new TagsCollection()); + _nodeData[2] = new NodeInfo(3, 10.3, 11.3, new TagsCollection()); + + _wayData = new WayInfo[2]; + _wayData[0] = new WayInfo(10, new TagsCollection(), _nodeData.Select(n => n.ID).ToArray()); + _wayData[1] = new WayInfo(11, new TagsCollection(), _nodeData.Select(n => n.ID).Skip(1).ToArray()); + + _relationData = new RelationInfo[2]; + _relationData[0] = new RelationInfo(100, new TagsCollection(), new RelationMemberInfo[] { new() { Reference = 10, Role = "way" }, new() { Reference = 1, Role = "node" } }); + _relationData[1] = new RelationInfo(101, new TagsCollection(), new RelationMemberInfo[] { new() { Reference = 101, Role = "relation" }, new() { Reference = 1, Role = "node" } }); + + _data = _nodeData.Concat(_wayData).Concat(_relationData).ToArray(); + } + + [Fact] + public void Constructor__CreatesEmptyDatabase() + { + OsmEntityInfoDatabase target = new(); + + Assert.Empty(target); + Assert.Empty(target.Nodes); + Assert.Empty(target.Ways); + Assert.Empty(target.Relations); + } + + [Fact] + public void Constructor_IEnumerable_CreatesCollectionWithSpecifiedItems() + { + OsmEntityInfoDatabase target = new(_data); + + for (int i = 0; i < _data.Length; i++) + { + Assert.Contains(_data[i], target); + } + } + + [Fact] + public void Constructor_IEnumerable_AddEnittiesToCorrextCollections() + { + OsmEntityInfoDatabase target = new(_data); + + for (int i = 0; i < _nodeData.Length; i++) + { + Assert.Contains(_nodeData[i], target.Nodes); + } + + for (int i = 0; i < _wayData.Length; i++) + { + Assert.Contains(_wayData[i], target.Ways); + } + + for (int i = 0; i < _relationData.Length; i++) + { + Assert.Contains(_relationData[i], target.Relations); + } + } + + [Fact] + public void Load_IOsmReader_LoadsNodes() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-nodes.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); + + Assert.Equal(3, target.Nodes.Count); + Assert.True(target.Nodes.Contains(1)); + Assert.True(target.Nodes.Contains(2)); + Assert.True(target.Nodes.Contains(3)); + } + + [Fact] + public void Load_IOsmReader_LoadsWay() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-way.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); + + Assert.Equal(3, target.Nodes.Count); + Assert.True(target.Nodes.Contains(1)); + Assert.True(target.Nodes.Contains(2)); + Assert.True(target.Nodes.Contains(3)); + + Assert.Single(target.Ways); + Assert.True(target.Ways.Contains(10)); + } + + [Fact] + public void Load_IOsmReader_LoadsRelation() + { + IOsmReader reader = new OsmXmlReader(TestDataReader.OpenOsmDB("osm-relation.osm"), new OsmXmlReaderSettings() { ReadMetadata = true }); + OsmEntityInfoDatabase target = OsmEntityInfoDatabase.Load(reader); + + Assert.Single(target.Nodes); + Assert.True(target.Nodes.Contains(1)); + + Assert.Single(target.Relations); + Assert.True(target.Relations.Contains(100)); + } + + [Fact] + public void Save_CallsIOsmWriterWriteForAllEntities() + { + List written = new(); + Mock writerM = new(); + + writerM.Setup(w => w.Write(It.IsAny())).Callback(written.Add); + + OsmEntityInfoDatabase target = new(_data); + target.Save(writerM.Object); + + Assert.Equal(target.Count, written.Count); + foreach (var entity in target) + { + Assert.Contains(entity, written); + } + } +} diff --git a/src/Tests.SpatialLite.Osm/PathHelper.cs b/src/Tests.SpatialLite.Osm/PathHelper.cs index a02dfac..241b96a 100644 --- a/src/Tests.SpatialLite.Osm/PathHelper.cs +++ b/src/Tests.SpatialLite.Osm/PathHelper.cs @@ -1,30 +1,34 @@ -using System.IO; - -namespace Tests.SpatialLite.Osm { - static class PathHelper { - private const string TempDirectoryName = "Temp"; - - private static string _osmosisPath = Path.GetFullPath(Path.Combine("Utils", "Osmosis", "bin", "osmosis.bat")); - public static string OsmosisPath => _osmosisPath; - - private static string _realXmlFilePath = Path.GetFullPath(Path.Combine("Data", "Xml", "osm-real-file.osm")); - public static string RealXmlFilePath => _realXmlFilePath; - - - private static string _realPbfFilePath = Path.GetFullPath(Path.Combine("Data", "Pbf", "pbf-real-file.pbf")); - public static string RealPbfFilePath => _realPbfFilePath; - - public static string GetTempFilePath(string filename) { - if (!Directory.Exists(TempDirectoryName)) { - Directory.CreateDirectory(TempDirectoryName); - } - - string pbfFile = Path.GetFullPath(Path.Combine(TempDirectoryName, filename)); - if (File.Exists(pbfFile)) { - File.Delete(pbfFile); - } - - return pbfFile; - } - } -} +using System.IO; + +namespace Tests.SpatialLite.Osm; + +internal static class PathHelper +{ + private const string TempDirectoryName = "Temp"; + + private static readonly string _osmosisPath = Path.GetFullPath(Path.Combine("Utils", "Osmosis", "bin", "osmosis.bat")); + public static string OsmosisPath => _osmosisPath; + + private static readonly string _realXmlFilePath = Path.GetFullPath(Path.Combine("Data", "Xml", "osm-real-file.osm")); + public static string RealXmlFilePath => _realXmlFilePath; + + + private static readonly string _realPbfFilePath = Path.GetFullPath(Path.Combine("Data", "Pbf", "pbf-real-file.pbf")); + public static string RealPbfFilePath => _realPbfFilePath; + + public static string GetTempFilePath(string filename) + { + if (!Directory.Exists(TempDirectoryName)) + { + Directory.CreateDirectory(TempDirectoryName); + } + + string pbfFile = Path.GetFullPath(Path.Combine(TempDirectoryName, filename)); + if (File.Exists(pbfFile)) + { + File.Delete(pbfFile); + } + + return pbfFile; + } +} diff --git a/src/Tests.SpatialLite.Osm/Properties/AssemblyInfo.cs b/src/Tests.SpatialLite.Osm/Properties/AssemblyInfo.cs index 9d8b2db..01a3102 100644 --- a/src/Tests.SpatialLite.Osm/Properties/AssemblyInfo.cs +++ b/src/Tests.SpatialLite.Osm/Properties/AssemblyInfo.cs @@ -1,19 +1,18 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Tests.SpatialLite.Osm")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("31b15109-c9ad-428b-bd1a-6f13ea2cd852")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tests.SpatialLite.Osm")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("31b15109-c9ad-428b-bd1a-6f13ea2cd852")] diff --git a/src/Tests.SpatialLite.Osm/RelationInfoTests.cs b/src/Tests.SpatialLite.Osm/RelationInfoTests.cs index 09c394d..931d443 100644 --- a/src/Tests.SpatialLite.Osm/RelationInfoTests.cs +++ b/src/Tests.SpatialLite.Osm/RelationInfoTests.cs @@ -1,71 +1,76 @@ -using System; -using System.Collections.Generic; - -using Xunit; - -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm { - public class RelationMemberTests { - - [Fact] - public void Constructor_PropertiesWithoutEntityDetails_SetsProperties() { - int id = 45; - TagsCollection tags = new TagsCollection(); - List members = new List(); - - RelationInfo target = new RelationInfo(id, tags, members); - - Assert.Equal(EntityType.Relation, target.EntityType); - Assert.Equal(id, target.ID); - Assert.Same(tags, target.Tags); - Assert.Same(members, target.Members); - Assert.Null(target.Metadata); - } - - [Fact] - public void Constructor_Properties_SetsProperties() { - int id = 45; - TagsCollection tags = new TagsCollection(); - List members = new List(); - EntityMetadata details = new EntityMetadata(); - - RelationInfo target = new RelationInfo(id, tags, members, details); - - Assert.Equal(EntityType.Relation, target.EntityType); - Assert.Equal(id, target.ID); - Assert.Same(tags, target.Tags); - Assert.Same(members, target.Members); - Assert.Same(details, target.Metadata); - } - - [Fact] - public void Constructor_Relation_SetsProperties() { - Relation relation = new Relation(100, new RelationMember[0], new TagsCollection()) { Metadata = new EntityMetadata() }; - - RelationInfo target = new RelationInfo(relation); - - Assert.Equal(relation.ID, target.ID); - Assert.Same(relation.Tags, target.Tags); - Assert.Same(relation.Metadata, target.Metadata); - } - - [Fact] - public void Constructor_Relation_SetsRelationMembers() { - Relation relation = new Relation(100, new RelationMember[] { new RelationMember(new Node(1)), new RelationMember(new Node(2)) }, new TagsCollection()) { Metadata = new EntityMetadata() }; - - RelationInfo target = new RelationInfo(relation); - - Assert.Equal(relation.Geometries.Count, target.Members.Count); - for (int i = 0; i < relation.Geometries.Count; i++) { - Assert.Equal(relation.Geometries[i].Member.ID, target.Members[i].Reference); - } - } - - [Fact] - public void Constructor_Relation_ThrowExceptionIfRelationIsNull() { - Assert.Throws(() => new RelationInfo(null)); - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; +using System.Collections.Generic; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class RelationMemberTests +{ + + [Fact] + public void Constructor_PropertiesWithoutEntityDetails_SetsProperties() + { + int id = 45; + TagsCollection tags = new(); + List members = new(); + + RelationInfo target = new(id, tags, members); + + Assert.Equal(EntityType.Relation, target.EntityType); + Assert.Equal(id, target.ID); + Assert.Same(tags, target.Tags); + Assert.Same(members, target.Members); + Assert.Null(target.Metadata); + } + + [Fact] + public void Constructor_Properties_SetsProperties() + { + int id = 45; + TagsCollection tags = new(); + List members = new(); + EntityMetadata details = new(); + + RelationInfo target = new(id, tags, members, details); + + Assert.Equal(EntityType.Relation, target.EntityType); + Assert.Equal(id, target.ID); + Assert.Same(tags, target.Tags); + Assert.Same(members, target.Members); + Assert.Same(details, target.Metadata); + } + + [Fact] + public void Constructor_Relation_SetsProperties() + { + Relation relation = new(100, new RelationMember[0], new TagsCollection()) { Metadata = new EntityMetadata() }; + + RelationInfo target = new(relation); + + Assert.Equal(relation.ID, target.ID); + Assert.Same(relation.Tags, target.Tags); + Assert.Same(relation.Metadata, target.Metadata); + } + + [Fact] + public void Constructor_Relation_SetsRelationMembers() + { + Relation relation = new(100, new RelationMember[] { new(new Node(1)), new(new Node(2)) }, new TagsCollection()) { Metadata = new EntityMetadata() }; + + RelationInfo target = new(relation); + + Assert.Equal(relation.Geometries.Count, target.Members.Count); + for (int i = 0; i < relation.Geometries.Count; i++) + { + Assert.Equal(relation.Geometries[i].Member.ID, target.Members[i].Reference); + } + } + + [Fact] + public void Constructor_Relation_ThrowExceptionIfRelationIsNull() + { + Assert.Throws(() => new RelationInfo(null)); + } +} diff --git a/src/Tests.SpatialLite.Osm/RelationMemberInfoTests.cs b/src/Tests.SpatialLite.Osm/RelationMemberInfoTests.cs index da718d6..c3b938d 100644 --- a/src/Tests.SpatialLite.Osm/RelationMemberInfoTests.cs +++ b/src/Tests.SpatialLite.Osm/RelationMemberInfoTests.cs @@ -1,20 +1,21 @@ -using Xunit; - -using SpatialLite.Osm; -using SpatialLite.Osm.Geometries; - -namespace Tests.SpatialLite.Osm { - public class RelationMemberInfoTests { - - [Fact] - public void Constructor_RelationMember_SetsProperties() { - RelationMember member = new RelationMember(new Node(1), "test-role"); - - RelationMemberInfo target = new RelationMemberInfo(member); - - Assert.Equal(member.Member.ID, target.Reference); - Assert.Equal(member.MemberType, target.MemberType); - Assert.Equal(member.Role, target.Role); - } - } -} +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class RelationMemberInfoTests +{ + + [Fact] + public void Constructor_RelationMember_SetsProperties() + { + RelationMember member = new(new Node(1), "test-role"); + + RelationMemberInfo target = new(member); + + Assert.Equal(member.Member.ID, target.Reference); + Assert.Equal(member.MemberType, target.MemberType); + Assert.Equal(member.Role, target.Role); + } +} diff --git a/src/Tests.SpatialLite.Osm/TagTests.cs b/src/Tests.SpatialLite.Osm/TagTests.cs index 4ac7c51..71d3bd9 100644 --- a/src/Tests.SpatialLite.Osm/TagTests.cs +++ b/src/Tests.SpatialLite.Osm/TagTests.cs @@ -1,94 +1,102 @@ -using System; - -using Xunit; - -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm { - public class TagTests { - - [Fact] - public void Constructor_TagValue_SetsKeyAndValue() { - string key = "test-key"; - string value = "test-value"; - - Tag target = new Tag(key, value); - - Assert.Equal(key, target.Key); - Assert.Equal(value, target.Value); - } - - [Fact] - public void Constructor_TagValue_ThrowsExceptionIfKeyIsNull() { - string key = null; - string value = "test-value"; - - Assert.Throws(delegate { new Tag(key, value); }); - } - - [Fact] - public void Constructor_TagValue_ThrowsExceptionIfKeyIsEmpty() { - string key = string.Empty; - string value = "test-value"; - - Assert.Throws(delegate { new Tag(key, value); }); - } - - [Fact] - public void Constructor_TagValue_ThrowsExceptionIfValueIsNull() { - string key = "test-key"; - string value = null; - - Assert.Throws(delegate { new Tag(key, value); }); - } - - [Fact] - public void Equals_ReturnTrueForSameKeyAndValue() { - Tag target = new Tag("test-key", "test-value"); - Tag other = new Tag("test-key", "test-value"); - - Assert.True(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnTrueForSameKeyAndValueAsObject() { - Tag target = new Tag("test-key", "test-value"); - Tag other = new Tag("test-key", "test-value"); - - Assert.True(target.Equals((object)other)); - } - - [Fact] - public void Equals_ReturnFalseForDifferentKeys() { - Tag target = new Tag("test-key", "test-value"); - Tag other = new Tag("different-key", "test-value"); - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnFalseForDifferentValues() { - Tag target = new Tag("test-key", "test-value"); - Tag other = new Tag("test-key", "different-value"); - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnFalseForOtherObject() { - Tag target = new Tag("test-key", "test-value"); - string other = "Test"; - - Assert.False(target.Equals(other)); - } - - [Fact] - public void Equals_ReturnFalseForNull() { - Tag target = new Tag("test-key", "test-value"); - object other = null; - - Assert.False(target.Equals(other)); - } - - } -} +using SpatialLite.Osm; +using System; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class TagTests +{ + + [Fact] + public void Constructor_TagValue_SetsKeyAndValue() + { + string key = "test-key"; + string value = "test-value"; + + Tag target = new(key, value); + + Assert.Equal(key, target.Key); + Assert.Equal(value, target.Value); + } + + [Fact] + public void Constructor_TagValue_ThrowsExceptionIfKeyIsNull() + { + string key = null; + string value = "test-value"; + + Assert.Throws(delegate { new Tag(key, value); }); + } + + [Fact] + public void Constructor_TagValue_ThrowsExceptionIfKeyIsEmpty() + { + string key = string.Empty; + string value = "test-value"; + + Assert.Throws(delegate { new Tag(key, value); }); + } + + [Fact] + public void Constructor_TagValue_ThrowsExceptionIfValueIsNull() + { + string key = "test-key"; + string value = null; + + Assert.Throws(delegate { new Tag(key, value); }); + } + + [Fact] + public void Equals_ReturnTrueForSameKeyAndValue() + { + Tag target = new("test-key", "test-value"); + Tag other = new("test-key", "test-value"); + + Assert.True(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnTrueForSameKeyAndValueAsObject() + { + Tag target = new("test-key", "test-value"); + Tag other = new("test-key", "test-value"); + + Assert.True(target.Equals((object)other)); + } + + [Fact] + public void Equals_ReturnFalseForDifferentKeys() + { + Tag target = new("test-key", "test-value"); + Tag other = new("different-key", "test-value"); + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnFalseForDifferentValues() + { + Tag target = new("test-key", "test-value"); + Tag other = new("test-key", "different-value"); + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnFalseForOtherObject() + { + Tag target = new("test-key", "test-value"); + string other = "Test"; + + Assert.False(target.Equals(other)); + } + + [Fact] + public void Equals_ReturnFalseForNull() + { + Tag target = new("test-key", "test-value"); + object other = null; + + Assert.False(target.Equals(other)); + } +} diff --git a/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs b/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs index 074270c..92dc0ca 100644 --- a/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs +++ b/src/Tests.SpatialLite.Osm/TagsCollectionTests.cs @@ -1,305 +1,340 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Xunit; - -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm { - public class TagsCollectionTests { - Tag[] _tags = new Tag[] { - new Tag("test-key-1", "test-value-1"), - new Tag("test-key-2", "test-value-2"), - new Tag("test-key-3", "test-value-3") - }; - - Tag[] _tagsDuplicitKeys = new Tag[] { - new Tag("test-key-1", "test-value-1"), - new Tag("test-key-1", "test-value-2") - }; - - [Fact] - public void Constructor_CreatesEmptyTagsCollection() { - TagsCollection target = new TagsCollection(); - - Assert.Empty(target); - } - - [Fact] - public void Constructor_IEnumerable_CreatesCollectionWithGivetTags() { - TagsCollection target = new TagsCollection(_tags); - - Assert.Equal(_tags.Count(), target.Count()); - Assert.Contains(_tags[0], target); - Assert.Contains(_tags[1], target); - } - - [Fact] - public void Constructor_IEnumerable_ThrowsExceptionWithDuplicateKeys() { - Assert.Throws(() => new TagsCollection(_tagsDuplicitKeys)); - } - - [Fact] - public void Add_AddsTag() { - TagsCollection target = new TagsCollection(); - target.Add(_tags[0]); - - Assert.Contains(_tags[0], target); - } - - [Fact] - public void Add_ThrowsExceptionIfTagAlreadyPresent() { - TagsCollection target = new TagsCollection(); - target.Add(_tagsDuplicitKeys[0]); - - Assert.Throws(delegate { target.Add(_tagsDuplicitKeys[1]); }); - } - - [Fact] - public void Clear_DoesNothingOnEmptyCollection() { - TagsCollection target = new TagsCollection(); - - target.Clear(); - } - - [Fact] - public void Clear_RemovesAllItems() { - TagsCollection target = new TagsCollection(_tags); - target.Clear(); - - Assert.Empty(target); - } - - [Fact] - public void Contains_Tag_ReturnsFalseForEmptyCollection() { - TagsCollection target = new TagsCollection(); - - Assert.DoesNotContain(new Tag("key", "value"), target); - } - - [Fact] - public void Contains_Tag_ReturnsFalseIfCollectionDoesNotContainTag() { - TagsCollection target = new TagsCollection(_tags); - - Tag testTag = new Tag("test-key-1", "other-value"); - Assert.DoesNotContain(testTag, target); - } - - [Fact] - public void Contains_Tag_ReturnsTrueIfCollectionContainsTag() { - TagsCollection target = new TagsCollection(_tags); - - Assert.Contains(_tags[0], target); - } - - [Fact] - public void Contains_string_ReturnsFalseForEmptyCollection() { - TagsCollection target = new TagsCollection(); - - Assert.False(target.Contains("key")); - } - - [Fact] - public void Contains_string_ReturnsFalseIfCollectionDoesNotContainTag() { - TagsCollection target = new TagsCollection(_tags); - - Assert.False(target.Contains("non-existing-key")); - } - - [Fact] - public void Contains_string_ReturnsTrueIfCollectionContainsTag() { - TagsCollection target = new TagsCollection(_tags); - - Assert.True(target.Contains(_tags[0].Key)); - } - - [Fact] - public void CopyTo_ThrowsArgumentNullExceptionIfArrayIsNull() { - TagsCollection target = new TagsCollection(_tags); - - Assert.Throws(() => target.CopyTo(null, 0)); - } - - [Fact] - public void CopyTo_ThrowsArgumentOutOfRangeExceptionIfIndexIsLessThenZero() { - Tag[] array = new Tag[5]; - TagsCollection target = new TagsCollection(_tags); - - Assert.Throws(() => target.CopyTo(array, -4)); - } - - [Fact] - public void CopyTo_ThrowsArgumentExceptionIfSpaceDesignedForCollectionInArrayIsShort() { - Tag[] array = new Tag[5]; - TagsCollection target = new TagsCollection(_tags); - - Assert.Throws(() => target.CopyTo(array, 4)); - } - - [Fact] - public void CopyTo_CopiesElementsToArray() { - Tag[] array = new Tag[5]; - TagsCollection target = new TagsCollection(_tags); - - target.CopyTo(array, 1); - - Assert.Null(array[0]); - Assert.Same(_tags[0], array[1]); - Assert.Same(_tags[1], array[2]); - Assert.Same(_tags[2], array[3]); - Assert.Null(array[4]); - } - - [Fact] - public void GetTag_ReturnsNullForEmptyCollection() { - TagsCollection target = new TagsCollection(); - - Assert.Throws(() => target.GetTag("other-key")); - } - - [Fact] - public void GetTag_ReturnsNullIfCollectionDoesNotContainTag() { - TagsCollection target = new TagsCollection(_tags); - - Assert.Throws(() => target.GetTag("other-key")); - } - - [Fact] - public void GetTag_ReturnsTagIfCollectionContainsTag() { - TagsCollection target = new TagsCollection(_tags); - Tag returned = target.GetTag(_tags[0].Key); - - Assert.Same(_tags[0], returned); - } - - [Fact] - public void Remove_Tag_ReturnsFalseForEmptyCollection() { - TagsCollection target = new TagsCollection(); - bool removed = target.Remove(new Tag("key", "value")); - - Assert.False(removed); - } - - [Fact] - public void Remove_Tag_DoNothingAndReturnsFalseIfCollectionDoesNotContainTag() { - TagsCollection target = new TagsCollection(_tags); - - Tag testTag = new Tag("other-key", "other-value"); - Assert.False(target.Remove(testTag)); - this.CompareCollections(_tags, target); - } - - [Fact] - public void Remove_Tag_RemovesItemAndReturnsTrueIfCollectionContainsTag() { - TagsCollection target = new TagsCollection(_tags); - - Assert.True(target.Remove(_tags[0])); - this.CompareCollections(_tags.Skip(1), target); - } - - [Fact] - public void Remove_string_ReturnsFalseForEmptyCollection() { - TagsCollection target = new TagsCollection(); - bool removed = target.Remove("key"); - - Assert.False(removed); - } - - [Fact] - public void Remove_string_DoNothingAndReturnsFalseIfCollectionDoesNotContainTag() { - Tag[] tags = new Tag[] { new Tag("test-key-1", "test-value"), new Tag("test-key-2", "test-value") }; - - TagsCollection target = new TagsCollection(tags); - - Assert.False(target.Remove("non-existing-tag")); - } - - [Fact] - public void Remove_string_RemovesItemAndReturnsTrueIfCollectionContainsTag() { - Tag[] tags = new Tag[] { new Tag("test-key-1", "test-value"), new Tag("test-key-2", "test-value") }; - - TagsCollection target = new TagsCollection(tags); - - Assert.True(target.Remove(tags[1].Key)); - Assert.Single(target); - Assert.Contains(tags[0], target); - } - - [Fact] - public void Count_ReturnsZeroForEmptyCollection() { - TagsCollection target = new TagsCollection(); - - Assert.Empty(target); - } - - [Fact] - public void Count_ReturnsTagsCount() { - TagsCollection target = new TagsCollection(_tags); - - Assert.Equal(_tags.Length, target.Count); - } - - [Fact] - public void IsReadOnly_ReturnsFalse() { - TagsCollection target = new TagsCollection(); - - Assert.False(target.IsReadOnly); - } - - [Fact] - public void Item_Get_ThrowsExceptionForEmptyCollection() { - TagsCollection target = new TagsCollection(); - - Assert.Throws(() => target["other-key"]); - } - - [Fact] - public void Item_Get_ThrowsExceptionIfCollectionDoesNotContainTag() { - TagsCollection target = new TagsCollection(_tags); - - Assert.Throws(() => target["other-key"]); - } - - [Fact] - public void Item_Get_ReturnsTagValueIfCollectionContainsTag() { - TagsCollection target = new TagsCollection(_tags); - string returnedValue = target[_tags[0].Key]; - - Assert.Equal(_tags[0].Value, returnedValue); - } - - [Fact] - public void Item_Set_AddsItemToEmptyCollection() { - TagsCollection target = new TagsCollection(); - - target["test-key"] = "test-value"; - - Assert.Single(target); - Assert.Equal("test-value", target["test-key"]); - } - - [Fact] - public void Item_Set_AddsItemToCollection() { - TagsCollection target = new TagsCollection(_tags); - - target["test-key-101"] = "test-value-101"; - - Assert.Equal(_tags.Length + 1, target.Count); - Assert.Equal("test-value-101", target["test-key-101"]); - } - - [Fact] - public void Item_Set_SetsTagValue() { - TagsCollection target = new TagsCollection(_tags); - target[_tags[0].Key] = "new-value"; - - Assert.Equal("new-value", target[_tags[0].Key]); - } - - private void CompareCollections(IEnumerable expected, IEnumerable actual) { - Assert.Equal(expected.Count(), actual.Count()); - Assert.True(expected.All(tag => actual.Contains(tag))); - } - } -} +using SpatialLite.Osm; +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace Tests.SpatialLite.Osm; + +public class TagsCollectionTests +{ + private readonly Tag[] _tags = new Tag[] { + new("test-key-1", "test-value-1"), + new("test-key-2", "test-value-2"), + new("test-key-3", "test-value-3") + }; + + private readonly Tag[] _tagsDuplicitKeys = new Tag[] { + new("test-key-1", "test-value-1"), + new("test-key-1", "test-value-2") + }; + + [Fact] + public void Constructor_CreatesEmptyTagsCollection() + { + TagsCollection target = new(); + + Assert.Empty(target); + } + + [Fact] + public void Constructor_IEnumerable_CreatesCollectionWithGivetTags() + { + TagsCollection target = new(_tags); + + Assert.Equal(_tags.Count(), target.Count()); + Assert.Contains(_tags[0], target); + Assert.Contains(_tags[1], target); + } + + [Fact] + public void Constructor_IEnumerable_ThrowsExceptionWithDuplicateKeys() + { + Assert.Throws(() => new TagsCollection(_tagsDuplicitKeys)); + } + + [Fact] + public void Add_AddsTag() + { + TagsCollection target = new(); + target.Add(_tags[0]); + + Assert.Contains(_tags[0], target); + } + + [Fact] + public void Add_ThrowsExceptionIfTagAlreadyPresent() + { + TagsCollection target = new(); + target.Add(_tagsDuplicitKeys[0]); + + Assert.Throws(delegate { target.Add(_tagsDuplicitKeys[1]); }); + } + + [Fact] + public void Clear_DoesNothingOnEmptyCollection() + { + TagsCollection target = new(); + + target.Clear(); + } + + [Fact] + public void Clear_RemovesAllItems() + { + TagsCollection target = new(_tags); + target.Clear(); + + Assert.Empty(target); + } + + [Fact] + public void Contains_Tag_ReturnsFalseForEmptyCollection() + { + TagsCollection target = new(); + + Assert.DoesNotContain(new Tag("key", "value"), target); + } + + [Fact] + public void Contains_Tag_ReturnsFalseIfCollectionDoesNotContainTag() + { + TagsCollection target = new(_tags); + + Tag testTag = new("test-key-1", "other-value"); + Assert.DoesNotContain(testTag, target); + } + + [Fact] + public void Contains_Tag_ReturnsTrueIfCollectionContainsTag() + { + TagsCollection target = new(_tags); + + Assert.Contains(_tags[0], target); + } + + [Fact] + public void Contains_string_ReturnsFalseForEmptyCollection() + { + TagsCollection target = new(); + + Assert.False(target.Contains("key")); + } + + [Fact] + public void Contains_string_ReturnsFalseIfCollectionDoesNotContainTag() + { + TagsCollection target = new(_tags); + + Assert.False(target.Contains("non-existing-key")); + } + + [Fact] + public void Contains_string_ReturnsTrueIfCollectionContainsTag() + { + TagsCollection target = new(_tags); + + Assert.True(target.Contains(_tags[0].Key)); + } + + [Fact] + public void CopyTo_ThrowsArgumentNullExceptionIfArrayIsNull() + { + TagsCollection target = new(_tags); + + Assert.Throws(() => target.CopyTo(null, 0)); + } + + [Fact] + public void CopyTo_ThrowsArgumentOutOfRangeExceptionIfIndexIsLessThenZero() + { + Tag[] array = new Tag[5]; + TagsCollection target = new(_tags); + + Assert.Throws(() => target.CopyTo(array, -4)); + } + + [Fact] + public void CopyTo_ThrowsArgumentExceptionIfSpaceDesignedForCollectionInArrayIsShort() + { + Tag[] array = new Tag[5]; + TagsCollection target = new(_tags); + + Assert.Throws(() => target.CopyTo(array, 4)); + } + + [Fact] + public void CopyTo_CopiesElementsToArray() + { + Tag[] array = new Tag[5]; + TagsCollection target = new(_tags); + + target.CopyTo(array, 1); + + Assert.Null(array[0]); + Assert.Same(_tags[0], array[1]); + Assert.Same(_tags[1], array[2]); + Assert.Same(_tags[2], array[3]); + Assert.Null(array[4]); + } + + [Fact] + public void GetTag_ReturnsNullForEmptyCollection() + { + TagsCollection target = new(); + + Assert.Throws(() => target.GetTag("other-key")); + } + + [Fact] + public void GetTag_ReturnsNullIfCollectionDoesNotContainTag() + { + TagsCollection target = new(_tags); + + Assert.Throws(() => target.GetTag("other-key")); + } + + [Fact] + public void GetTag_ReturnsTagIfCollectionContainsTag() + { + TagsCollection target = new(_tags); + Tag returned = target.GetTag(_tags[0].Key); + + Assert.Same(_tags[0], returned); + } + + [Fact] + public void Remove_Tag_ReturnsFalseForEmptyCollection() + { + TagsCollection target = new(); + bool removed = target.Remove(new Tag("key", "value")); + + Assert.False(removed); + } + + [Fact] + public void Remove_Tag_DoNothingAndReturnsFalseIfCollectionDoesNotContainTag() + { + TagsCollection target = new(_tags); + + Tag testTag = new("other-key", "other-value"); + Assert.False(target.Remove(testTag)); + CompareCollections(_tags, target); + } + + [Fact] + public void Remove_Tag_RemovesItemAndReturnsTrueIfCollectionContainsTag() + { + TagsCollection target = new(_tags); + + Assert.True(target.Remove(_tags[0])); + CompareCollections(_tags.Skip(1), target); + } + + [Fact] + public void Remove_string_ReturnsFalseForEmptyCollection() + { + TagsCollection target = new(); + bool removed = target.Remove("key"); + + Assert.False(removed); + } + + [Fact] + public void Remove_string_DoNothingAndReturnsFalseIfCollectionDoesNotContainTag() + { + Tag[] tags = new Tag[] { new("test-key-1", "test-value"), new("test-key-2", "test-value") }; + + TagsCollection target = new(tags); + + Assert.False(target.Remove("non-existing-tag")); + } + + [Fact] + public void Remove_string_RemovesItemAndReturnsTrueIfCollectionContainsTag() + { + Tag[] tags = new Tag[] { new("test-key-1", "test-value"), new("test-key-2", "test-value") }; + + TagsCollection target = new(tags); + + Assert.True(target.Remove(tags[1].Key)); + Assert.Single(target); + Assert.Contains(tags[0], target); + } + + [Fact] + public void Count_ReturnsZeroForEmptyCollection() + { + TagsCollection target = new(); + + Assert.Empty(target); + } + + [Fact] + public void Count_ReturnsTagsCount() + { + TagsCollection target = new(_tags); + + Assert.Equal(_tags.Length, target.Count); + } + + [Fact] + public void IsReadOnly_ReturnsFalse() + { + TagsCollection target = new(); + + Assert.False(target.IsReadOnly); + } + + [Fact] + public void Item_Get_ThrowsExceptionForEmptyCollection() + { + TagsCollection target = new(); + + Assert.Throws(() => target["other-key"]); + } + + [Fact] + public void Item_Get_ThrowsExceptionIfCollectionDoesNotContainTag() + { + TagsCollection target = new(_tags); + + Assert.Throws(() => target["other-key"]); + } + + [Fact] + public void Item_Get_ReturnsTagValueIfCollectionContainsTag() + { + TagsCollection target = new(_tags); + string returnedValue = target[_tags[0].Key]; + + Assert.Equal(_tags[0].Value, returnedValue); + } + + [Fact] + public void Item_Set_AddsItemToEmptyCollection() + { + TagsCollection target = new(); + + target["test-key"] = "test-value"; + + Assert.Single(target); + Assert.Equal("test-value", target["test-key"]); + } + + [Fact] + public void Item_Set_AddsItemToCollection() + { + TagsCollection target = new(_tags); + + target["test-key-101"] = "test-value-101"; + + Assert.Equal(_tags.Length + 1, target.Count); + Assert.Equal("test-value-101", target["test-key-101"]); + } + + [Fact] + public void Item_Set_SetsTagValue() + { + TagsCollection target = new(_tags); + target[_tags[0].Key] = "new-value"; + + Assert.Equal("new-value", target[_tags[0].Key]); + } + + private void CompareCollections(IEnumerable expected, IEnumerable actual) + { + Assert.Equal(expected.Count(), actual.Count()); + Assert.True(expected.All(tag => actual.Contains(tag))); + } +} diff --git a/src/Tests.SpatialLite.Osm/WayInfoTests.cs b/src/Tests.SpatialLite.Osm/WayInfoTests.cs index bdc3e12..6039014 100644 --- a/src/Tests.SpatialLite.Osm/WayInfoTests.cs +++ b/src/Tests.SpatialLite.Osm/WayInfoTests.cs @@ -1,71 +1,76 @@ -using System; +using SpatialLite.Osm; +using SpatialLite.Osm.Geometries; +using System; using System.Collections.Generic; - using Xunit; -using SpatialLite.Osm.Geometries; -using SpatialLite.Osm; - -namespace Tests.SpatialLite.Osm { - public class WayInfoTests { - - [Fact] - public void Constructor_PropertiesWithoutEntityDetails_SetsProperties() { - int id = 45; - TagsCollection tags = new TagsCollection(); - List nodes = new List(); - - WayInfo target = new WayInfo(id, tags, nodes); - - Assert.Equal(EntityType.Way, target.EntityType); - Assert.Equal(id, target.ID); - Assert.Same(tags, target.Tags); - Assert.Same(nodes, target.Nodes); - Assert.Null(target.Metadata); - } - - [Fact] - public void Constructor_Properties_SetsProperties() { - int id = 45; - TagsCollection tags = new TagsCollection(); - List nodes = new List(); - EntityMetadata details = new EntityMetadata(); - - WayInfo target = new WayInfo(id, tags, nodes, details); - - Assert.Equal(EntityType.Way, target.EntityType); - Assert.Equal(id, target.ID); - Assert.Same(tags, target.Tags); - Assert.Same(nodes, target.Nodes); - Assert.Same(details, target.Metadata); - } - - [Fact] - public void Constructor_Way_SetsProperties() { - Way way = new Way(10, new Node[0], new TagsCollection()) { Metadata = new EntityMetadata() }; - - WayInfo target = new WayInfo(way); - - Assert.Equal(way.ID, target.ID); - Assert.Same(way.Tags, target.Tags); - Assert.Same(way.Metadata, target.Metadata); - } - - [Fact] - public void Constructor_Way_SetsNodesReferences() { - Way way = new Way(10, new Node[] {new Node(1), new Node(2), new Node(3)}, new TagsCollection()) { Metadata = new EntityMetadata() }; - - WayInfo target = new WayInfo(way); - - Assert.Equal(way.Nodes.Count, target.Nodes.Count); - for (int i = 0; i < way.Nodes.Count; i++) { - Assert.Equal(way.Nodes[i].ID, target.Nodes[i]); - } - } - - [Fact] - public void Constructor_Way_ThrowsExceptionIfWayIsNull() { - Assert.Throws(() => new WayInfo(null)); - } - } +namespace Tests.SpatialLite.Osm; + +public class WayInfoTests +{ + + [Fact] + public void Constructor_PropertiesWithoutEntityDetails_SetsProperties() + { + int id = 45; + TagsCollection tags = new(); + List nodes = new(); + + WayInfo target = new(id, tags, nodes); + + Assert.Equal(EntityType.Way, target.EntityType); + Assert.Equal(id, target.ID); + Assert.Same(tags, target.Tags); + Assert.Same(nodes, target.Nodes); + Assert.Null(target.Metadata); + } + + [Fact] + public void Constructor_Properties_SetsProperties() + { + int id = 45; + TagsCollection tags = new(); + List nodes = new(); + EntityMetadata details = new(); + + WayInfo target = new(id, tags, nodes, details); + + Assert.Equal(EntityType.Way, target.EntityType); + Assert.Equal(id, target.ID); + Assert.Same(tags, target.Tags); + Assert.Same(nodes, target.Nodes); + Assert.Same(details, target.Metadata); + } + + [Fact] + public void Constructor_Way_SetsProperties() + { + Way way = new(10, new Node[0], new TagsCollection()) { Metadata = new EntityMetadata() }; + + WayInfo target = new(way); + + Assert.Equal(way.ID, target.ID); + Assert.Same(way.Tags, target.Tags); + Assert.Same(way.Metadata, target.Metadata); + } + + [Fact] + public void Constructor_Way_SetsNodesReferences() + { + Way way = new(10, new Node[] { new(1), new(2), new(3) }, new TagsCollection()) { Metadata = new EntityMetadata() }; + + WayInfo target = new(way); + + Assert.Equal(way.Nodes.Count, target.Nodes.Count); + for (int i = 0; i < way.Nodes.Count; i++) + { + Assert.Equal(way.Nodes[i].ID, target.Nodes[i]); + } + } + + [Fact] + public void Constructor_Way_ThrowsExceptionIfWayIsNull() + { + Assert.Throws(() => new WayInfo(null)); + } }