From 8ea21218306814b263334cb0ed8190d95689ca8d Mon Sep 17 00:00:00 2001 From: Bert Temme Date: Thu, 16 Nov 2023 10:46:20 +0100 Subject: [PATCH] to 1.0 --- .github/workflows/build.yml | 2 +- README.md | 10 +++++---- geoarrow/geoarrow.csproj | 4 ++-- geoparquet-tools/geoparquet-tools.csproj | 2 +- .../{1.0.0-beta.1 => 1.0.0}/schema.json | 2 +- geoparquet.codegen/Program.cs | 4 ++-- geoparquet.codegen/geoparquet.codegen.csproj | 6 +++--- geoparquet.sln | 3 ++- geoparquet.tests/UnitTest1.cs | 21 ------------------- geoparquet.tests/geoparquet.tests.csproj | 11 +++++----- src/GeoMetadata.cs | 2 +- src/geoparquet.csproj | 12 +++++------ 12 files changed, 30 insertions(+), 49 deletions(-) rename geoparquet.codegen/{1.0.0-beta.1 => 1.0.0}/schema.json (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 763fb70..94d3142 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/README.md b/README.md index 05d6062..9520dca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # GeoParquet -.NET 6 Reader/Writer library for GeoParquet files. +.NET 8 Reader/Writer library for GeoParquet files. https://geoparquet.org/ @@ -83,7 +83,7 @@ var file = "testfixtures/gemeenten2016_1.0.parquet"; var file1 = new ParquetFileReader(file); var geoParquet = file1.GetGeoMetadata(); -Assert.That(geoParquet.Version == "1.0.0-beta.1"); +Assert.That(geoParquet.Version == "1.0.0"); var rowGroupReader = file1.RowGroup(0); var gemName = rowGroupReader.Column(33).LogicalReader().First(); @@ -162,7 +162,7 @@ parquetFileWriter.Close(); ## Dependencies -- ParquetSharp 12 https://github.com/G-Research/ParquetSharp +- ParquetSharp 14 https://github.com/G-Research/ParquetSharp ## Schema generation @@ -171,7 +171,7 @@ GeoParquet metadata classes are generated from JSON schema using NJsonSchema.Cod Schema used: -https://geoparquet.org/releases/v1.0.0-beta.1/schema.json +https://geoparquet.org/releases/v1.0.0/schema.json # Roadmap @@ -185,6 +185,8 @@ https://geoparquet.org/releases/v1.0.0-beta.1/schema.json ## History +2023-11-16: version 1.0 - using schema v1.0.0, ParquetSharp to 13 - to .NET 8 + 2023-07-13: version 0.5 - using schema v1.0.0-beta.1, ParquetSharp to 12.0.1 2023-01-01: version 0.4 - using ParquetSharp 10.0.1-beta1 instead of Parquet.Net 4 diff --git a/geoarrow/geoarrow.csproj b/geoarrow/geoarrow.csproj index b525b50..3e07191 100644 --- a/geoarrow/geoarrow.csproj +++ b/geoarrow/geoarrow.csproj @@ -1,14 +1,14 @@ - net6.0 + net8.0 enable enable - + diff --git a/geoparquet-tools/geoparquet-tools.csproj b/geoparquet-tools/geoparquet-tools.csproj index 08fecbc..73da33e 100644 --- a/geoparquet-tools/geoparquet-tools.csproj +++ b/geoparquet-tools/geoparquet-tools.csproj @@ -3,7 +3,7 @@ true Exe - net7.0 + net8.0 geoparquet_tools enable enable diff --git a/geoparquet.codegen/1.0.0-beta.1/schema.json b/geoparquet.codegen/1.0.0/schema.json similarity index 98% rename from geoparquet.codegen/1.0.0-beta.1/schema.json rename to geoparquet.codegen/1.0.0/schema.json index 1dd5c69..62bfb26 100644 --- a/geoparquet.codegen/1.0.0-beta.1/schema.json +++ b/geoparquet.codegen/1.0.0/schema.json @@ -7,7 +7,7 @@ "properties": { "version": { "type": "string", - "const": "1.0.0-beta.1" + "const": "1.0.0" }, "primary_column": { "type": "string", diff --git a/geoparquet.codegen/Program.cs b/geoparquet.codegen/Program.cs index c7f1739..5528f0c 100644 --- a/geoparquet.codegen/Program.cs +++ b/geoparquet.codegen/Program.cs @@ -2,8 +2,8 @@ using NJsonSchema.CodeGeneration.CSharp; // schema sources: -// - https://geoparquet.org/releases/v1.0.0-beta.1/schema.json -var json = File.ReadAllText("./1.0.0-beta.1/schema.json"); +// - https://geoparquet.org/releases/v1.0.0/schema.json +var json = File.ReadAllText("./1.0.0/schema.json"); // there are two manual actions :-( // diff --git a/geoparquet.codegen/geoparquet.codegen.csproj b/geoparquet.codegen/geoparquet.codegen.csproj index 2e78ad5..7b26d59 100644 --- a/geoparquet.codegen/geoparquet.codegen.csproj +++ b/geoparquet.codegen/geoparquet.codegen.csproj @@ -1,8 +1,8 @@ - + Exe - net6.0 + net8.0 enable enable @@ -12,7 +12,7 @@ - + PreserveNewest diff --git a/geoparquet.sln b/geoparquet.sln index 0cc1964..89b6162 100644 --- a/geoparquet.sln +++ b/geoparquet.sln @@ -18,11 +18,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "geoparquet.codegen", "geopa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "geoarrow", "geoarrow\geoarrow.csproj", "{B248BBD6-C347-484F-90DC-D8E0445223AC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "geoparquet-tools", "geoparquet-tools\geoparquet-tools.csproj", "{7AA60A0A-12D7-4B0C-BC08-B210B27D1C54}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "geoparquet-tools", "geoparquet-tools\geoparquet-tools.csproj", "{7AA60A0A-12D7-4B0C-BC08-B210B27D1C54}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B583E30A-1019-4222-A379-D5EF627091D1}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .github\workflows\build.yml = .github\workflows\build.yml EndProjectSection EndProject Global diff --git a/geoparquet.tests/UnitTest1.cs b/geoparquet.tests/UnitTest1.cs index f8efcfe..b8a0e0d 100644 --- a/geoparquet.tests/UnitTest1.cs +++ b/geoparquet.tests/UnitTest1.cs @@ -9,25 +9,6 @@ namespace GeoParquet.Tests; public class Tests { - // [Test] - public void AddMetadata() - { - var file = @"test.parquet"; - var file1 = new ParquetFileReader(file); - - var bbox = new double[] { 3.3583782525105832, - 50.750367484598314, - 7.2274984508458306, - 53.555014517907608}; - - var geoColumn = new GeoColumn(); - geoColumn.Bbox = bbox; - geoColumn.Encoding = "WKB"; - geoColumn.Geometry_types.Add("Polygon"); - var geometadata = GeoMetadata.GetGeoMetadata(geoColumn); - // todo add metadata - } - [Test] public void ReadArrowPointFile() { @@ -52,7 +33,6 @@ public void ReadUtrechtKunstwerkenFileToDataFrame() public void ReadUtrechtKunstwerkenFile() { var file = "testfixtures/utrecht_kunstwerken.parquet"; - //var file = "d:/aaa/cities_arrow1.parquet"; var file1 = new ParquetFileReader(file); var geoParquet = file1.GetGeoMetadata(); var rowGroupReader = file1.RowGroup(0); @@ -268,7 +248,6 @@ public void WriteGeoParquetGroupNodeFile() messagesWriter.WriteBatch(new string[] { "London", "Derby" }); fileWriter.Close(); - } } diff --git a/geoparquet.tests/geoparquet.tests.csproj b/geoparquet.tests/geoparquet.tests.csproj index fdd9a93..59489a1 100644 --- a/geoparquet.tests/geoparquet.tests.csproj +++ b/geoparquet.tests/geoparquet.tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 enable enable @@ -9,13 +9,12 @@ - - + + - - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/GeoMetadata.cs b/src/GeoMetadata.cs index 8ee4dd1..28473e9 100644 --- a/src/GeoMetadata.cs +++ b/src/GeoMetadata.cs @@ -7,7 +7,7 @@ public static class GeoMetadata public static Dictionary GetGeoMetadata(GeoColumn geoColumn) { var parquet = new GeoParquet(); - parquet.Version = "1.0.0-beta.1"; + parquet.Version = "1.0.0"; parquet.Primary_column = "geometry"; parquet.Columns.Add("geometry", geoColumn); diff --git a/src/geoparquet.csproj b/src/geoparquet.csproj index dcc6280..e5b1e97 100644 --- a/src/geoparquet.csproj +++ b/src/geoparquet.csproj @@ -1,13 +1,14 @@  - net6.0 + net8.0 enable enable True - 0.5 - 0.5 - version 0.5 + 1.0 + 1.0 + 1.0 + version 1.0 https://github.com/bertt/geoparquet git parquet, geoparquet, wkb, geoarrow, arrow @@ -18,7 +19,6 @@ bertt.geoparquet bertt.geoparquet - 0.5 Bert Temme @@ -31,7 +31,7 @@ - +