Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wip/redo everything #69

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 1 addition & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
dotnet_style_predefined_type_for_locals_parameters_members = true:error
Copy link
Contributor

Choose a reason for hiding this comment

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

@FObermaier it's ok to remove these lines?

dotnet_style_predefined_type_for_member_access = true:error
csharp_style_var_for_built_in_types = false:error
csharp_style_var_when_type_is_apparent = true:error
csharp_style_var_elsewhere = true:error

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ FakesAssemblies/

# Others
/NetTopologySuite.IO/NetTopologySuite.IO.GeoTools/NetTopologySuite.IO.GeoTools.csproj.DotSettings
/src/NetTopologySuite.IO.Esri.Core/dBASE.xlsx
/src/ShpDmsPrec
171 changes: 171 additions & 0 deletions NetTopologySuite.IO.Esri.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B0923F22-AF00-46DA-B5CE-73F4D398DE37}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
dBASE.md = dBASE.md
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.ShapeFile", "src\NetTopologySuite.IO.ShapeFile\NetTopologySuite.IO.ShapeFile.csproj", "{04CAE5A6-0B7B-47F8-9899-46EE805478E7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.ShapeFile.Test", "test\NetTopologySuite.IO.ShapeFile.Test\NetTopologySuite.IO.ShapeFile.Test.csproj", "{89254B6E-F130-41F3-8956-2F790E99C6F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.ShapefileNG", "src\NetTopologySuite.IO.ShapefileNG\NetTopologySuite.IO.ShapefileNG.csproj", "{54244379-0702-40E8-8773-0973B3485293}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.ShapefileNG.Test", "test\NetTopologySuite.IO.ShapefileNG.Test\NetTopologySuite.IO.ShapefileNG.Test.csproj", "{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.Esri", "src\NetTopologySuite.IO.Esri\NetTopologySuite.IO.Esri.csproj", "{960D89DB-F534-4207-931E-4BB8B4DCA483}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.Esri.Test", "test\NetTopologySuite.IO.Esri.Test\NetTopologySuite.IO.Esri.Test.csproj", "{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.Esri.Core", "src\NetTopologySuite.IO.Esri.Core\NetTopologySuite.IO.Esri.Core.csproj", "{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTopologySuite.IO.GDB", "src\NetTopologySuite.IO.GDB\NetTopologySuite.IO.GDB.csproj", "{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|ARM.ActiveCfg = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|ARM.Build.0 = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|x64.Build.0 = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|x86.ActiveCfg = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Debug|x86.Build.0 = Debug|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|Any CPU.Build.0 = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|ARM.ActiveCfg = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|ARM.Build.0 = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|x64.ActiveCfg = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|x64.Build.0 = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|x86.ActiveCfg = Release|Any CPU
{04CAE5A6-0B7B-47F8-9899-46EE805478E7}.Release|x86.Build.0 = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|ARM.ActiveCfg = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|ARM.Build.0 = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|x64.ActiveCfg = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|x64.Build.0 = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|x86.ActiveCfg = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Debug|x86.Build.0 = Debug|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|Any CPU.Build.0 = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|ARM.ActiveCfg = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|ARM.Build.0 = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|x64.ActiveCfg = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|x64.Build.0 = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|x86.ActiveCfg = Release|Any CPU
{89254B6E-F130-41F3-8956-2F790E99C6F0}.Release|x86.Build.0 = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|ARM.ActiveCfg = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|ARM.Build.0 = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|x64.ActiveCfg = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|x64.Build.0 = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|x86.ActiveCfg = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Debug|x86.Build.0 = Debug|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|Any CPU.Build.0 = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|ARM.ActiveCfg = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|ARM.Build.0 = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|x64.ActiveCfg = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|x64.Build.0 = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|x86.ActiveCfg = Release|Any CPU
{54244379-0702-40E8-8773-0973B3485293}.Release|x86.Build.0 = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|ARM.Build.0 = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|x64.ActiveCfg = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|x64.Build.0 = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|x86.ActiveCfg = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Debug|x86.Build.0 = Debug|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|Any CPU.Build.0 = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|ARM.ActiveCfg = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|ARM.Build.0 = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|x64.ActiveCfg = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|x64.Build.0 = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|x86.ActiveCfg = Release|Any CPU
{7B2FB807-A99D-40E9-AE5B-4931BE2086FA}.Release|x86.Build.0 = Release|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Debug|Any CPU.Build.0 = Debug|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Debug|ARM.ActiveCfg = Debug|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Debug|x64.ActiveCfg = Debug|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Debug|x86.ActiveCfg = Debug|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Release|Any CPU.ActiveCfg = Release|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Release|Any CPU.Build.0 = Release|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Release|ARM.ActiveCfg = Release|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Release|x64.ActiveCfg = Release|Any CPU
{960D89DB-F534-4207-931E-4BB8B4DCA483}.Release|x86.ActiveCfg = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|ARM.ActiveCfg = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|ARM.Build.0 = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|x64.ActiveCfg = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|x64.Build.0 = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|x86.ActiveCfg = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Debug|x86.Build.0 = Debug|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|Any CPU.Build.0 = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|ARM.ActiveCfg = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|ARM.Build.0 = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|x64.ActiveCfg = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|x64.Build.0 = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|x86.ActiveCfg = Release|Any CPU
{46F2F8D9-855C-40E6-A93F-DB96A3343C8E}.Release|x86.Build.0 = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|ARM.ActiveCfg = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|ARM.Build.0 = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|x64.ActiveCfg = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|x64.Build.0 = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|x86.ActiveCfg = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Debug|x86.Build.0 = Debug|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|Any CPU.Build.0 = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|ARM.ActiveCfg = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|ARM.Build.0 = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|x64.ActiveCfg = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|x64.Build.0 = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|x86.ActiveCfg = Release|Any CPU
{2BE3CBAE-CBF5-4B67-B1CB-CA64365A6157}.Release|x86.Build.0 = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|ARM.Build.0 = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|x64.ActiveCfg = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|x64.Build.0 = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|x86.ActiveCfg = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Debug|x86.Build.0 = Debug|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|Any CPU.Build.0 = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|ARM.ActiveCfg = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|ARM.Build.0 = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|x64.ActiveCfg = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|x64.Build.0 = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|x86.ActiveCfg = Release|Any CPU
{09E5D241-0DBA-42FF-9B7C-A4E4B43DB2DA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {06DEE0C5-480C-4A70-BC80-3791D98E6A89}
EndGlobalSection
EndGlobal
44 changes: 0 additions & 44 deletions NetTopologySuite.IO.ShapeFile.sln

This file was deleted.

36 changes: 36 additions & 0 deletions src/NetTopologySuite.IO.Esri.Core/Buffers/ArrayBuffer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace NetTopologySuite.IO
{
internal class ArrayBuffer
{
private static readonly int ExpandLimit = 4 * 1024 * 1024; // 4MB * sizeof(T)

private static int GetExpandedLength<T>(T[] array)
{
if (array.Length < 4)
return array.Length + 4;

if (array.Length > ExpandLimit)
return array.Length + ExpandLimit;

return array.Length * 2;
}

public static void Expand<T>(ref T[] array, int minLength)
{
if (array.Length < minLength)
{
var expandedLength = Math.Max(minLength, GetExpandedLength(array));
Array.Resize(ref array, expandedLength);
}
}

public static void Expand<T>(ref T[] array)
{
Array.Resize(ref array, GetExpandedLength(array));
}
}
}
Loading