Skip to content

Commit

Permalink
to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bertt committed Nov 16, 2023
1 parent 053fa85 commit 8ea2121
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeoParquet

.NET 6 Reader/Writer library for GeoParquet files.
.NET 8 Reader/Writer library for GeoParquet files.

https://geoparquet.org/

Expand Down Expand Up @@ -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<String>().First();
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions geoarrow/geoarrow.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NetTopologySuite.Features" Version="2.1.0" />
<PackageReference Include="ParquetSharp" Version="12.0.1" />
<PackageReference Include="ParquetSharp" Version="13.0.0-beta1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion geoparquet-tools/geoparquet-tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<PublishAot>true</PublishAot>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>geoparquet_tools</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"version": {
"type": "string",
"const": "1.0.0-beta.1"
"const": "1.0.0"
},
"primary_column": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions geoparquet.codegen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 :-(
//
Expand Down
6 changes: 3 additions & 3 deletions geoparquet.codegen/geoparquet.codegen.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<None Update="1.0.0-beta.1\schema.json">
<None Update="1.0.0\schema.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion geoparquet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 0 additions & 21 deletions geoparquet.tests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand Down Expand Up @@ -268,7 +248,6 @@ public void WriteGeoParquetGroupNodeFile()
messagesWriter.WriteBatch(new string[] { "London", "Derby" });

fileWriter.Close();

}
}

11 changes: 5 additions & 6 deletions geoparquet.tests/geoparquet.tests.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Apache.Arrow" Version="12.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Apache.Arrow" Version="14.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NetTopologySuite" Version="2.5.0" />
<PackageReference Include="NetTopologySuite.IO.GeoJSON" Version="3.0.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.5.0">
<PackageReference Include="NUnit.Analyzers" Version="3.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/GeoMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public static class GeoMetadata
public static Dictionary<string, string> 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);

Expand Down
12 changes: 6 additions & 6 deletions src/geoparquet.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<FileVersion>0.5</FileVersion>
<AssemblyVersion>0.5</AssemblyVersion>
<PackageReleaseNotes>version 0.5</PackageReleaseNotes>
<FileVersion>1.0</FileVersion>
<AssemblyVersion>1.0</AssemblyVersion>
<Version>1.0</Version>
<PackageReleaseNotes>version 1.0</PackageReleaseNotes>
<RepositoryUrl>https://github.com/bertt/geoparquet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>parquet, geoparquet, wkb, geoarrow, arrow</PackageTags>
Expand All @@ -18,7 +19,6 @@
<Company />
<PackageId>bertt.geoparquet</PackageId>
<Title>bertt.geoparquet</Title>
<Version>0.5</Version>
<Authors>Bert Temme</Authors>
</PropertyGroup>

Expand All @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ParquetSharp" Version="12.0.1" />
<PackageReference Include="ParquetSharp" Version="13.0.0-beta1" />
</ItemGroup>

</Project>

0 comments on commit 8ea2121

Please sign in to comment.