diff --git a/GAP-LEDGER.md b/GAP-LEDGER.md index aa71d48..aaf4dfd 100644 --- a/GAP-LEDGER.md +++ b/GAP-LEDGER.md @@ -10,14 +10,14 @@ A kind with no rows is a site the generators watch and that nothing reached in this run. It prints so that an empty class reads as a measurement rather than as a class nobody looked at. -Generated from `meos-idl.json` at MobilityDB `b49672e5450e50899effb3a22aa5112da9145f80` by `tools/codegen.py` +Generated from `meos-idl.json` at MobilityDB `af8640985336c41cf98467783f7eb4e9e0d1e0f0` by `tools/codegen.py` and `tools/objectgen.py`. Do not edit. ## The flat surface — `tools/codegen.py` -### parameter nullability — 4365 +### parameter nullability — 4401 `shape.nullable` names the parameters a function accepts NULL for, and the catalog carries no field saying a parameter is required. A pointer parameter named in neither reaches the surface with its contract unstated: the wrapper takes it, and nothing says whether zero is an argument or a fault. @@ -1076,6 +1076,8 @@ and `tools/objectgen.py`. Do not edit. | geo_makeline_garray | gsarr | | geo_mem_size | gs | | geo_meos_coverage | gs | +| geo_merge_each_n_stboxes | gs, count | +| geo_merge_n_stboxes | gs, count | | geo_num_geos | gs | | geo_num_points | gs | | geo_out | gs, size_out | @@ -1523,7 +1525,9 @@ and `tools/objectgen.py`. Do not edit. | line_point_n | geom | | line_substring | gs | | meos_array_add | array, value | +| meos_array_add_intl | array, value | | meos_array_count | array | +| meos_array_count_intl | array | | meos_array_get | array | | meos_array_get_intl | array | | meos_array_reset | array | @@ -1783,8 +1787,6 @@ and `tools/objectgen.py`. Do not edit. | nullhandletype_from_string | str | | number_set_tbox | box | | number_tstzspan_to_tbox | s | -| numeric_in | str | -| numeric_out | num, size_out | | numset_set_tbox | s, box | | numset_shift_scale | s | | numspan_expand | s | @@ -2427,6 +2429,8 @@ and `tools/objectgen.py`. Do not edit. | set_make_exp | values | | set_make_free | values | | set_mem_size | s | +| set_merge_each_n_spans | s, count | +| set_merge_n_spans | s, count | | set_ne | s1, s2 | | set_num_values | s | | set_out | s, size_out | @@ -2529,6 +2533,8 @@ and `tools/objectgen.py`. Do not edit. | spanset_make_exp | spans | | spanset_make_free | spans | | spanset_mem_size | ss | +| spanset_merge_each_n_spans | ss, count | +| spanset_merge_n_spans | ss, count | | spanset_ne | ss1, ss2 | | spanset_num_spans | ss | | spanset_out | ss, size_out | @@ -3000,6 +3006,8 @@ and `tools/objectgen.py`. Do not edit. | temporal_mem_size | temp | | temporal_merge_array | temparr | | temporal_merge_combinefn | state1, state2 | +| temporal_merge_each_n_spans | temp, count | +| temporal_merge_n_spans | temp, count | | temporal_min_inst_p | temp | | temporal_min_instant | temp | | temporal_min_value | temp | @@ -3250,6 +3258,8 @@ and `tools/objectgen.py`. Do not edit. | tgeo_force2d | temp | | tgeo_force3d | temp | | tgeo_from_base_temp | gs, temp | +| tgeo_merge_each_n_stboxes | temp, count | +| tgeo_merge_n_stboxes | temp, count | | tgeo_minus_geom | temp, gs | | tgeo_minus_stbox | temp, box | | tgeo_minus_value | temp, gs | @@ -3315,6 +3325,7 @@ and `tools/objectgen.py`. Do not edit. | tgeoinst_restrict_geom | inst, gs | | tgeoinst_restrict_stbox | inst, box | | tgeoinst_set_stbox | inst, box | +| tgeoinst_stboxes | inst | | tgeom_tgeog | temp | | tgeometry_from_mfjson | str | | tgeometry_in | str | @@ -3351,11 +3362,13 @@ and `tools/objectgen.py`. Do not edit. | tgeoseq_from_base_tstzspan | gs, s | | tgeoseq_restrict_geom | seq, gs | | tgeoseq_restrict_stbox | seq, box | +| tgeoseq_split_each_n_stboxes | seq, count | | tgeoseq_split_n_stboxes | seq, count | | tgeoseq_stboxes | seq, count | | tgeoseqset_from_base_tstzspanset | gs, ss | | tgeoseqset_restrict_geom | ss, gs | | tgeoseqset_restrict_stbox | ss, box | +| tgeoseqset_split_each_n_stboxes | ss, count | | tgeoseqset_split_n_stboxes | ss, count | | tgeoseqset_stboxes | ss, count | | tgt_base_temporal | temp | @@ -3488,6 +3501,7 @@ and `tools/objectgen.py`. Do not edit. | tinstant_set_bbox | inst, box | | tinstant_set_tstzspan | inst, s | | tinstant_shift_time | inst, interv | +| tinstant_spans | inst | | tinstant_time | inst | | tinstant_timestamps | inst, count | | tinstant_timestamptz | inst | @@ -3720,6 +3734,8 @@ and `tools/objectgen.py`. Do not edit. | tnumber_avg_value | temp | | tnumber_delta_value | temp | | tnumber_integral | temp | +| tnumber_merge_each_n_tboxes | temp, count | +| tnumber_merge_n_tboxes | temp, count | | tnumber_minus_span | temp, span | | tnumber_minus_spanset | temp, ss | | tnumber_minus_tbox | temp, box | @@ -3749,6 +3765,7 @@ and `tools/objectgen.py`. Do not edit. | tnumberinst_restrict_spanset | inst, ss | | tnumberinst_set_tbox | inst, box | | tnumberinst_shift_value | inst | +| tnumberinst_tboxes | inst | | tnumberinst_valuespans | inst | | tnumberseq_abs | seq | | tnumberseq_angular_difference | seq | @@ -3757,6 +3774,9 @@ and `tools/objectgen.py`. Do not edit. | tnumberseq_integral | seq | | tnumberseq_set_tbox | seq, box | | tnumberseq_shift_scale_value | seq | +| tnumberseq_split_each_n_tboxes | seq, count | +| tnumberseq_split_n_tboxes | seq, count | +| tnumberseq_tboxes | seq, count | | tnumberseq_twavg | seq | | tnumberseq_valuespans | seq | | tnumberseqset_abs | ss | @@ -3768,6 +3788,9 @@ and `tools/objectgen.py`. Do not edit. | tnumberseqset_restrict_spanset | ss, spanset | | tnumberseqset_set_tbox | ss, box | | tnumberseqset_shift_scale_value | ss | +| tnumberseqset_split_each_n_tboxes | ss, count | +| tnumberseqset_split_n_tboxes | ss, count | +| tnumberseqset_tboxes | ss, count | | tnumberseqset_twavg | ss | | tnumberseqset_valuespans | ss | | tor_bool_tbool | temp | @@ -3892,7 +3915,12 @@ and `tools/objectgen.py`. Do not edit. | tpoint_to_geomeas | tpoint | | tpoint_trajectory | temp | | tpoint_twcentroid | temp | +| tpointcloud_merge_each_n_tpcboxes | temp, count | +| tpointcloud_merge_n_tpcboxes | temp, count | +| tpointcloud_split_each_n_tpcboxes | temp, count | +| tpointcloud_split_n_tpcboxes | temp, count | | tpointcloud_to_tpcbox | temp | +| tpointcloud_tpcboxes | temp, count | | tpointinst_make | gs | | tpointseq_azimuth | seq | | tpointseq_cumulative_length | seq | @@ -4032,6 +4060,8 @@ and `tools/objectgen.py`. Do not edit. | trgeometry_geom | temp | | trgeometry_in | str | | trgeometry_length | temp | +| trgeometry_merge_each_n_stboxes | temp, count | +| trgeometry_merge_n_stboxes | temp, count | | trgeometry_minus_geom | temp, gs | | trgeometry_minus_stbox | temp, box | | trgeometry_minus_value | temp, pose | @@ -4139,6 +4169,9 @@ and `tools/objectgen.py`. Do not edit. | tsequence_set_interp | seq | | tsequence_set_tstzspan | seq, s | | tsequence_shift_scale_time | seq, shift, duration | +| tsequence_spans | seq, count | +| tsequence_split_each_n_spans | seq, count | +| tsequence_split_n_spans | seq, count | | tsequence_start_timestamptz | seq | | tsequence_subseq | seq | | tsequence_time | seq | @@ -4201,6 +4234,9 @@ and `tools/objectgen.py`. Do not edit. | tsequenceset_set_interp | ss | | tsequenceset_set_tstzspan | ss, s | | tsequenceset_shift_scale_time | ss, start, duration | +| tsequenceset_spans | ss, count | +| tsequenceset_split_each_n_spans | ss, count | +| tsequenceset_split_n_spans | ss, count | | tsequenceset_start_timestamptz | ss | | tsequenceset_time | ss | | tsequenceset_timestamps | ss, count | @@ -4389,15 +4425,22 @@ and `tools/objectgen.py`. Do not edit. | unistr | txt | | value_set_span | s | -### unreadable return — 3 +### unreadable return — 10 A pointer answer whose pointed-to type no emitted function accepts. The caller receives an address and the catalog names nothing this binding reaches that renders it, operates on it or takes it back. | function | api | pointed-to type | | --- | --- | --- | +| date_extract | internal | NumericData | | geopose_frame | public | GeoPoseFrame | | geopose_frames | public | GeoPoseFrame | +| interval_extract | internal | NumericData | +| jsonb_to_numeric | internal | NumericData | | meos_proj_get_context | internal | pj_ctx | +| time_extract | internal | NumericData | +| timestamp_extract | internal | NumericData | +| timestamptz_extract | internal | NumericData | +| timetz_extract | internal | NumericData | ### array element type — 1 diff --git a/MEOS.NET.Tests/PortableIoTests.cs b/MEOS.NET.Tests/PortableIoTests.cs index bdbb39c..7f4e5ad 100644 --- a/MEOS.NET.Tests/PortableIoTests.cs +++ b/MEOS.NET.Tests/PortableIoTests.cs @@ -159,18 +159,20 @@ public void ABoxRoundTripsThroughItsExtendedText() } [TestMethod] - public void AJsonbAJsonPathAndANumericRoundTripThroughTheirText() + public void AJsonbAJsonPathAndAJsonNumberRoundTripThroughTheirText() { Jsonb jb = Jsonb.FromText("{\"a\": 1, \"b\": \"two\"}")!; JsonPath path = JsonPath.FromText("$.a")!; - Numeric num = Numeric.FromText("12.50", -1)!; + Jsonb num = Jsonb.FromText("12.50")!; Assert.AreEqual("{\"a\": 1, \"b\": \"two\"}", jb.AsText()); Assert.AreEqual(jb.AsText(), Jsonb.FromText(jb.AsText())!.AsText()); Assert.AreEqual("$.\"a\"", path.AsText()); Assert.AreEqual(path.AsText(), JsonPath.FromText(path.AsText())!.AsText()); + // A JSON number keeps every digit as its text and reads as a double Assert.AreEqual("12.50", num.AsText()); - Assert.AreEqual(num.AsText(), Numeric.FromText(num.AsText(), -1)!.AsText()); + Assert.AreEqual(num.AsText(), Jsonb.FromText(num.AsText())!.AsText()); + Assert.AreEqual(12.5, num.ToFloat8()); } [TestMethod] diff --git a/MEOS.NET/Functions/Meos.Native.g.cs b/MEOS.NET/Functions/Meos.Native.g.cs index b361fd9..ed6476f 100644 --- a/MEOS.NET/Functions/Meos.Native.g.cs +++ b/MEOS.NET/Functions/Meos.Native.g.cs @@ -1127,6 +1127,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "set_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SetSpans(IntPtr s, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "set_merge_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SetMergeEachNSpans(IntPtr s, int elems_per_span, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "set_merge_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SetMergeNSpans(IntPtr s, int span_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "set_split_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SetSplitEachNSpans(IntPtr s, int elems_per_span, IntPtr count); @@ -1136,6 +1142,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "spanset_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpansetSpans(IntPtr ss, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "spanset_merge_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SpansetMergeEachNSpans(IntPtr ss, int elems_per_span, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "spanset_merge_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SpansetMergeNSpans(IntPtr ss, int span_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "spanset_split_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpansetSplitEachNSpans(IntPtr ss, int elems_per_span, IntPtr count); @@ -4221,12 +4233,24 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "temporal_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalSpans(IntPtr temp, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "temporal_merge_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TemporalMergeEachNSpans(IntPtr temp, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "temporal_merge_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TemporalMergeNSpans(IntPtr temp, int span_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "temporal_split_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalSplitEachNSpans(IntPtr temp, int elem_count, IntPtr count); [LibraryImport(DllPath, EntryPoint = "temporal_split_n_spans", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalSplitNSpans(IntPtr temp, int span_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tnumber_merge_each_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberMergeEachNTboxes(IntPtr temp, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumber_merge_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberMergeNTboxes(IntPtr temp, int box_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tnumber_split_each_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TnumberSplitEachNTboxes(IntPtr temp, int elem_count, IntPtr count); @@ -5748,6 +5772,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geo_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeoStboxes(IntPtr gs, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "geo_merge_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr GeoMergeEachNStboxes(IntPtr gs, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "geo_merge_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr GeoMergeNStboxes(IntPtr gs, int box_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "geo_split_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeoSplitEachNStboxes(IntPtr gs, int elem_count, IntPtr count); @@ -6534,6 +6564,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tgeo_space_time_boxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeoSpaceTimeBoxes(IntPtr temp, double xsize, double ysize, double zsize, IntPtr duration, IntPtr sorigin, long torigin, [MarshalAs(UnmanagedType.U1)] bool bitmatrix, [MarshalAs(UnmanagedType.U1)] bool border_inc, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tgeo_merge_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TgeoMergeEachNStboxes(IntPtr temp, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tgeo_merge_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TgeoMergeNStboxes(IntPtr temp, int box_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tgeo_split_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeoSplitEachNStboxes(IntPtr temp, int elem_count, IntPtr count); @@ -8227,9 +8263,15 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tgeogpoint_great_circle_distance", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeogpointGreatCircleDistance(IntPtr a, IntPtr b); + [LibraryImport(DllPath, EntryPoint = "meos_array_add_intl", StringMarshalling = StringMarshalling.Utf8)] + internal static partial void MeosArrayAddIntl(IntPtr array, IntPtr value); + [LibraryImport(DllPath, EntryPoint = "meos_array_get_intl", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr MeosArrayGetIntl(IntPtr array, int n); + [LibraryImport(DllPath, EntryPoint = "meos_array_count_intl", StringMarshalling = StringMarshalling.Utf8)] + internal static partial int MeosArrayCountIntl(IntPtr array); + [LibraryImport(DllPath, EntryPoint = "prng_get_generation_rng", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PrngGetGenerationRng(); @@ -9022,6 +9064,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tinstant_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TinstantMake(ulong value, int temptype, long t); + [LibraryImport(DllPath, EntryPoint = "tinstant_make_intl", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TinstantMakeIntl(ulong value, int temptype, long t); + [LibraryImport(DllPath, EntryPoint = "tinstant_make_free", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TinstantMakeFree(ulong value, int temptype, long t); @@ -9091,6 +9136,48 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tsequenceset_set_tstzspan", StringMarshalling = StringMarshalling.Utf8)] internal static partial void TsequencesetSetTstzspan(IntPtr ss, IntPtr s); + [LibraryImport(DllPath, EntryPoint = "tinstant_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TinstantSpans(IntPtr inst); + + [LibraryImport(DllPath, EntryPoint = "tsequence_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TsequenceSpans(IntPtr seq, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tsequenceset_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TsequencesetSpans(IntPtr ss, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tsequence_split_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TsequenceSplitNSpans(IntPtr seq, int span_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tsequenceset_split_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TsequencesetSplitNSpans(IntPtr ss, int span_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tsequence_split_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TsequenceSplitEachNSpans(IntPtr seq, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tsequenceset_split_each_n_spans", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TsequencesetSplitEachNSpans(IntPtr ss, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumberinst_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberinstTboxes(IntPtr inst); + + [LibraryImport(DllPath, EntryPoint = "tnumberseq_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberseqTboxes(IntPtr seq, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumberseqset_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberseqsetTboxes(IntPtr ss, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumberseq_split_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberseqSplitNTboxes(IntPtr seq, int box_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumberseqset_split_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberseqsetSplitNTboxes(IntPtr ss, int box_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumberseq_split_each_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberseqSplitEachNTboxes(IntPtr seq, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tnumberseqset_split_each_n_tboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TnumberseqsetSplitEachNTboxes(IntPtr ss, int elem_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "temporal_end_inst", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalEndInst(IntPtr temp); @@ -10265,12 +10352,18 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tpointseq_linear_trajectory", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointseqLinearTrajectory(IntPtr seq, [MarshalAs(UnmanagedType.U1)] bool unary_union); + [LibraryImport(DllPath, EntryPoint = "tgeoinst_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TgeoinstStboxes(IntPtr inst); + [LibraryImport(DllPath, EntryPoint = "tgeoseq_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeoseqStboxes(IntPtr seq, IntPtr count); [LibraryImport(DllPath, EntryPoint = "tgeoseq_split_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeoseqSplitNStboxes(IntPtr seq, int max_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tgeoseq_split_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TgeoseqSplitEachNStboxes(IntPtr seq, int elem_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tpointseqset_azimuth", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointseqsetAzimuth(IntPtr ss); @@ -10290,6 +10383,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tgeoseqset_split_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeoseqsetSplitNStboxes(IntPtr ss, int max_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tgeoseqset_split_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TgeoseqsetSplitEachNStboxes(IntPtr ss, int elem_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tpoint_get_coord", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointGetCoord(IntPtr temp, int coord); @@ -10329,12 +10425,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tpointseqset_twcentroid", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointseqsetTwcentroid(IntPtr ss); - [LibraryImport(DllPath, EntryPoint = "numeric_in", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr NumericIn(string str, int typmod); - - [LibraryImport(DllPath, EntryPoint = "numeric_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr NumericOut(IntPtr num, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "json_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr JsonIn(string str); @@ -11903,6 +11993,21 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tpointcloud_to_tpcbox", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointcloudToTpcbox(IntPtr temp); + [LibraryImport(DllPath, EntryPoint = "tpointcloud_tpcboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TpointcloudTpcboxes(IntPtr temp, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tpointcloud_split_n_tpcboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TpointcloudSplitNTpcboxes(IntPtr temp, int box_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tpointcloud_split_each_n_tpcboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TpointcloudSplitEachNTpcboxes(IntPtr temp, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tpointcloud_merge_n_tpcboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TpointcloudMergeNTpcboxes(IntPtr temp, int box_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "tpointcloud_merge_each_n_tpcboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TpointcloudMergeEachNTpcboxes(IntPtr temp, int elem_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "tpcbox_hasx", StringMarshalling = StringMarshalling.Utf8)] [return: MarshalAs(UnmanagedType.U1)] internal static partial bool TpcboxHasx(IntPtr box); @@ -14372,6 +14477,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "trgeometry_split_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TrgeometrySplitNStboxes(IntPtr temp, int box_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "trgeometry_merge_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TrgeometryMergeEachNStboxes(IntPtr temp, int elem_count, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "trgeometry_merge_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TrgeometryMergeNStboxes(IntPtr temp, int box_count, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "trgeometry_split_each_n_stboxes", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TrgeometrySplitEachNStboxes(IntPtr temp, int elem_count, IntPtr count); diff --git a/MEOS.NET/Functions/Meos.meos.g.cs b/MEOS.NET/Functions/Meos.meos.g.cs index a130d8f..09fc08e 100644 --- a/MEOS.NET/Functions/Meos.meos.g.cs +++ b/MEOS.NET/Functions/Meos.meos.g.cs @@ -1488,6 +1488,36 @@ public static IntPtr[] SetSpans(IntPtr s) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] SetMergeEachNSpans(IntPtr s, int elems_per_span) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.SetMergeEachNSpans(s, elems_per_span, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] SetMergeNSpans(IntPtr s, int span_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.SetMergeNSpans(s, span_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] SetSplitEachNSpans(IntPtr s, int elems_per_span) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); @@ -1533,6 +1563,36 @@ public static IntPtr[] SpansetSpans(IntPtr ss) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] SpansetMergeEachNSpans(IntPtr ss, int elems_per_span) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.SpansetMergeEachNSpans(ss, elems_per_span, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] SpansetMergeNSpans(IntPtr ss, int span_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.SpansetMergeNSpans(ss, span_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] SpansetSplitEachNSpans(IntPtr ss, int elems_per_span) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); @@ -4754,6 +4814,36 @@ public static IntPtr[] TemporalSpans(IntPtr temp) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] TemporalMergeEachNSpans(IntPtr temp, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TemporalMergeEachNSpans(temp, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TemporalMergeNSpans(IntPtr temp, int span_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TemporalMergeNSpans(temp, span_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] TemporalSplitEachNSpans(IntPtr temp, int elem_count) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); @@ -4784,6 +4874,36 @@ public static IntPtr[] TemporalSplitNSpans(IntPtr temp, int span_count) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] TnumberMergeEachNTboxes(IntPtr temp, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberMergeEachNTboxes(temp, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TnumberMergeNTboxes(IntPtr temp, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberMergeNTboxes(temp, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] TnumberSplitEachNTboxes(IntPtr temp, int elem_count) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); diff --git a/MEOS.NET/Functions/Meos.meos_geo.g.cs b/MEOS.NET/Functions/Meos.meos_geo.g.cs index d62aaa4..bdefbbc 100644 --- a/MEOS.NET/Functions/Meos.meos_geo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_geo.g.cs @@ -443,6 +443,36 @@ public static IntPtr[] GeoStboxes(IntPtr gs) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] GeoMergeEachNStboxes(IntPtr gs, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.GeoMergeEachNStboxes(gs, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] GeoMergeNStboxes(IntPtr gs, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.GeoMergeNStboxes(gs, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] GeoSplitEachNStboxes(IntPtr gs, int elem_count) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); @@ -1508,6 +1538,36 @@ public static IntPtr[] TgeoSpaceTimeBoxes(IntPtr temp, double xsize, double ysiz finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] TgeoMergeEachNStboxes(IntPtr temp, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TgeoMergeEachNStboxes(temp, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TgeoMergeNStboxes(IntPtr temp, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TgeoMergeNStboxes(temp, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] TgeoSplitEachNStboxes(IntPtr temp, int elem_count) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); diff --git a/MEOS.NET/Functions/Meos.meos_internal.g.cs b/MEOS.NET/Functions/Meos.meos_internal.g.cs index 646539d..a8fb07d 100644 --- a/MEOS.NET/Functions/Meos.meos_internal.g.cs +++ b/MEOS.NET/Functions/Meos.meos_internal.g.cs @@ -9,9 +9,15 @@ namespace MEOS.NET.Functions /// The MEOS functions meos_internal.h declares. public static partial class Meos { + public static void MeosArrayAddIntl(IntPtr array, IntPtr value) + => SafeExecution(() => Native.MeosArrayAddIntl(array, value)); + public static IntPtr MeosArrayGetIntl(IntPtr array, int n) => SafeExecution(() => Native.MeosArrayGetIntl(array, n)); + public static int MeosArrayCountIntl(IntPtr array) + => SafeExecution(() => Native.MeosArrayCountIntl(array)); + public static IntPtr PrngGetGenerationRng() => SafeExecution(() => Native.PrngGetGenerationRng()); @@ -805,6 +811,9 @@ public static IntPtr TinstantCopy(IntPtr inst) public static IntPtr TinstantMake(ulong value, int temptype, long t) => SafeExecution(() => Native.TinstantMake(value, temptype, t)); + public static IntPtr TinstantMakeIntl(ulong value, int temptype, long t) + => SafeExecution(() => Native.TinstantMakeIntl(value, temptype, t)); + public static IntPtr TinstantMakeFree(ulong value, int temptype, long t) => SafeExecution(() => Native.TinstantMakeFree(value, temptype, t)); @@ -874,6 +883,192 @@ public static void TsequenceSetTstzspan(IntPtr seq, IntPtr s) public static void TsequencesetSetTstzspan(IntPtr ss, IntPtr s) => SafeExecution(() => Native.TsequencesetSetTstzspan(ss, s)); + public static IntPtr TinstantSpans(IntPtr inst) + => SafeExecution(() => Native.TinstantSpans(inst)); + + public static IntPtr[] TsequenceSpans(IntPtr seq) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TsequenceSpans(seq, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TsequencesetSpans(IntPtr ss) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TsequencesetSpans(ss, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TsequenceSplitNSpans(IntPtr seq, int span_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TsequenceSplitNSpans(seq, span_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TsequencesetSplitNSpans(IntPtr ss, int span_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TsequencesetSplitNSpans(ss, span_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TsequenceSplitEachNSpans(IntPtr seq, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TsequenceSplitEachNSpans(seq, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TsequencesetSplitEachNSpans(IntPtr ss, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TsequencesetSplitEachNSpans(ss, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 24); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr TnumberinstTboxes(IntPtr inst) + => SafeExecution(() => Native.TnumberinstTboxes(inst)); + + public static IntPtr[] TnumberseqTboxes(IntPtr seq) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberseqTboxes(seq, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TnumberseqsetTboxes(IntPtr ss) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberseqsetTboxes(ss, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TnumberseqSplitNTboxes(IntPtr seq, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberseqSplitNTboxes(seq, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TnumberseqsetSplitNTboxes(IntPtr ss, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberseqsetSplitNTboxes(ss, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TnumberseqSplitEachNTboxes(IntPtr seq, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberseqSplitEachNTboxes(seq, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TnumberseqsetSplitEachNTboxes(IntPtr ss, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TnumberseqsetSplitEachNTboxes(ss, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 56); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr TemporalEndInst(IntPtr temp) => SafeExecution(() => Native.TemporalEndInst(temp)); diff --git a/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs b/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs index 9be7b30..5af4951 100644 --- a/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs @@ -399,6 +399,9 @@ public static double TpointseqLength(IntPtr seq, bool spheroid) public static IntPtr TpointseqLinearTrajectory(IntPtr seq, bool unary_union) => SafeExecution(() => Native.TpointseqLinearTrajectory(seq, unary_union)); + public static IntPtr TgeoinstStboxes(IntPtr inst) + => SafeExecution(() => Native.TgeoinstStboxes(inst)); + public static IntPtr[] TgeoseqStboxes(IntPtr seq) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); @@ -429,6 +432,21 @@ public static IntPtr[] TgeoseqSplitNStboxes(IntPtr seq, int max_count) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] TgeoseqSplitEachNStboxes(IntPtr seq, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TgeoseqSplitEachNStboxes(seq, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr TpointseqsetAzimuth(IntPtr ss) => SafeExecution(() => Native.TpointseqsetAzimuth(ss)); @@ -471,6 +489,21 @@ public static IntPtr[] TgeoseqsetSplitNStboxes(IntPtr ss, int max_count) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] TgeoseqsetSplitEachNStboxes(IntPtr ss, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TgeoseqsetSplitEachNStboxes(ss, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr TpointGetCoord(IntPtr temp, int coord) => SafeExecution(() => Native.TpointGetCoord(temp, coord)); diff --git a/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs b/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs index 256b277..29fcedc 100644 --- a/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs +++ b/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs @@ -485,6 +485,81 @@ public static IntPtr PcpatchToTpcbox(IntPtr pa) public static IntPtr TpointcloudToTpcbox(IntPtr temp) => SafeExecution(() => Native.TpointcloudToTpcbox(temp)); + public static IntPtr[] TpointcloudTpcboxes(IntPtr temp) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TpointcloudTpcboxes(temp, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 88); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TpointcloudSplitNTpcboxes(IntPtr temp, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TpointcloudSplitNTpcboxes(temp, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 88); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TpointcloudSplitEachNTpcboxes(IntPtr temp, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TpointcloudSplitEachNTpcboxes(temp, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 88); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TpointcloudMergeNTpcboxes(IntPtr temp, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TpointcloudMergeNTpcboxes(temp, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 88); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TpointcloudMergeEachNTpcboxes(IntPtr temp, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TpointcloudMergeEachNTpcboxes(temp, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 88); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static bool TpcboxHasx(IntPtr box) => SafeExecution(() => Native.TpcboxHasx(box)); diff --git a/MEOS.NET/Functions/Meos.meos_rgeo.g.cs b/MEOS.NET/Functions/Meos.meos_rgeo.g.cs index d4657c6..d5caac1 100644 --- a/MEOS.NET/Functions/Meos.meos_rgeo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_rgeo.g.cs @@ -258,6 +258,36 @@ public static IntPtr[] TrgeometrySplitNStboxes(IntPtr temp, int box_count) finally { Marshal.FreeHGlobal(_cnt); } } + public static IntPtr[] TrgeometryMergeEachNStboxes(IntPtr temp, int elem_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TrgeometryMergeEachNStboxes(temp, elem_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] TrgeometryMergeNStboxes(IntPtr temp, int box_count) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.TrgeometryMergeNStboxes(temp, box_count, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = IntPtr.Add(_p, _i * 80); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static IntPtr[] TrgeometrySplitEachNStboxes(IntPtr temp, int elem_count) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); diff --git a/MEOS.NET/Functions/Meos.pg_numeric.g.cs b/MEOS.NET/Functions/Meos.pg_numeric.g.cs deleted file mode 100644 index 53bc468..0000000 --- a/MEOS.NET/Functions/Meos.pg_numeric.g.cs +++ /dev/null @@ -1,35 +0,0 @@ -#nullable enable - -using System.Runtime.InteropServices; - -using MEOS.NET.Structures; - -namespace MEOS.NET.Functions -{ - /// The MEOS functions pg_numeric.h declares. - public static partial class Meos - { - public static IntPtr NumericIn(string str, int typmod) - => SafeExecution(() => Native.NumericIn(str, typmod)); - - public static string NumericOut(IntPtr num) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.NumericOut(num, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - - } -} diff --git a/MEOS.NET/Types/Geo.g.cs b/MEOS.NET/Types/Geo.g.cs index 23019e2..e48888b 100644 --- a/MEOS.NET/Types/Geo.g.cs +++ b/MEOS.NET/Types/Geo.g.cs @@ -141,6 +141,12 @@ public double Length(bool spheroid) public int MemSize() => Meos.GeoMemSize(this.Ptr); + public STBox?[] MergeEachNStboxes(int elem_count) + => MEOSFactory.WrapSTBoxArray(Meos.GeoMergeEachNStboxes(this.Ptr, elem_count)); + + public STBox?[] MergeNStboxes(int box_count) + => MEOSFactory.WrapSTBoxArray(Meos.GeoMergeNStboxes(this.Ptr, box_count)); + public Set? Minus(GeoSet s) => MEOSFactory.WrapSet(Meos.MinusGeoSet(this.Ptr, s.Ptr)); diff --git a/MEOS.NET/Types/Jsonb.g.cs b/MEOS.NET/Types/Jsonb.g.cs index 145416a..4168804 100644 --- a/MEOS.NET/Types/Jsonb.g.cs +++ b/MEOS.NET/Types/Jsonb.g.cs @@ -343,9 +343,6 @@ public int ToInt32() public long ToInt64() => Meos.JsonbToInt64(this.Ptr); - public Numeric? ToNumeric() - => MEOSFactory.WrapNumeric(Meos.JsonbToNumeric(this.Ptr)); - public Set? ToSet() => MEOSFactory.WrapSet(Meos.JsonbToSet(this.Ptr)); diff --git a/MEOS.NET/Types/MEOSFactory.g.cs b/MEOS.NET/Types/MEOSFactory.g.cs index 347f027..945253f 100644 --- a/MEOS.NET/Types/MEOSFactory.g.cs +++ b/MEOS.NET/Types/MEOSFactory.g.cs @@ -185,30 +185,6 @@ public static class MEOSFactory return wrapped; } - /// The value at as the Numeric - /// class the model gives its runtime type. - public static Numeric? WrapNumeric(IntPtr ptr) - { - if (ptr == IntPtr.Zero) - { - return null; - } - - return new Numeric(ptr); - } - - /// Every element of a C array of Numeric pointers, wrapped. - public static Numeric?[] WrapNumericArray(IntPtr[] ptrs) - { - Numeric?[] wrapped = new Numeric?[ptrs.Length]; - for (int i = 0; i < ptrs.Length; i++) - { - wrapped[i] = WrapNumeric(ptrs[i]); - } - - return wrapped; - } - /// The value at as the Pcschema /// class the model gives its runtime type. public static Pcschema? WrapPcschema(IntPtr ptr) diff --git a/MEOS.NET/Types/Numeric.g.cs b/MEOS.NET/Types/Numeric.g.cs deleted file mode 100644 index 1e91680..0000000 --- a/MEOS.NET/Types/Numeric.g.cs +++ /dev/null @@ -1,28 +0,0 @@ -#nullable enable - -using System.Runtime.InteropServices; - -using MEOS.NET.Enums; -using MEOS.NET.Functions; -using MEOS.NET.Structures; - -namespace MEOS.NET.Types -{ - /// PostgreSQL's arbitrary-precision number, the value jsonb_to_numeric and the extract functions of the time types answer and numeric_in and numeric_out read and write. MEOS registers it in no enum, so it names no temptype. - [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] - public class Numeric : Value - { - internal Numeric(IntPtr ptr) : base(ptr) { } - - /// The text MEOS writes this value as. - public override string ToString() - => this.AsText(); - - public string AsText() - => Meos.NumericOut(this.Ptr); - - public static Numeric? FromText(string str, int typmod) - => MEOSFactory.WrapNumeric(Meos.NumericIn(str, typmod)); - - } -} diff --git a/MEOS.NET/Types/Set.g.cs b/MEOS.NET/Types/Set.g.cs index a6a1f15..90e2915 100644 --- a/MEOS.NET/Types/Set.g.cs +++ b/MEOS.NET/Types/Set.g.cs @@ -83,6 +83,12 @@ public bool Lt(Set s2) public int MemSize() => Meos.SetMemSize(this.Ptr); + public Span?[] MergeEachNSpans(int elems_per_span) + => MEOSFactory.WrapSpanArray(Meos.SetMergeEachNSpans(this.Ptr, elems_per_span)); + + public Span?[] MergeNSpans(int span_count) + => MEOSFactory.WrapSpanArray(Meos.SetMergeNSpans(this.Ptr, span_count)); + public Set? Minus(Set s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); diff --git a/MEOS.NET/Types/SpanSet.g.cs b/MEOS.NET/Types/SpanSet.g.cs index 2556e65..0fa713f 100644 --- a/MEOS.NET/Types/SpanSet.g.cs +++ b/MEOS.NET/Types/SpanSet.g.cs @@ -111,6 +111,12 @@ public bool Lt(SpanSet ss2) public int MemSize() => Meos.SpansetMemSize(this.Ptr); + public Span?[] MergeEachNSpans(int elems_per_span) + => MEOSFactory.WrapSpanArray(Meos.SpansetMergeEachNSpans(this.Ptr, elems_per_span)); + + public Span?[] MergeNSpans(int span_count) + => MEOSFactory.WrapSpanArray(Meos.SpansetMergeNSpans(this.Ptr, span_count)); + public SpanSet? Minus(Span s) => MEOSFactory.WrapSpanSet(Meos.MinusSpansetSpan(this.Ptr, s.Ptr)); diff --git a/MEOS.NET/Types/TGeo.g.cs b/MEOS.NET/Types/TGeo.g.cs index 4d991a6..56eaa9e 100644 --- a/MEOS.NET/Types/TGeo.g.cs +++ b/MEOS.NET/Types/TGeo.g.cs @@ -113,6 +113,12 @@ public int EverOverlaps(TGeo temp2) public Temporal? Force3d(double zvalue) => MEOSFactory.WrapTemporal(Meos.TgeoForce3d(this.Ptr, zvalue)); + public STBox?[] MergeEachNStboxes(int elem_count) + => MEOSFactory.WrapSTBoxArray(Meos.TgeoMergeEachNStboxes(this.Ptr, elem_count)); + + public STBox?[] MergeNStboxes(int box_count) + => MEOSFactory.WrapSTBoxArray(Meos.TgeoMergeNStboxes(this.Ptr, box_count)); + public Temporal? MinusGeom(Geo gs) => MEOSFactory.WrapTemporal(Meos.TgeoMinusGeom(this.Ptr, gs.Ptr)); diff --git a/MEOS.NET/Types/TNumber.g.cs b/MEOS.NET/Types/TNumber.g.cs index 7d1273f..ac4aa03 100644 --- a/MEOS.NET/Types/TNumber.g.cs +++ b/MEOS.NET/Types/TNumber.g.cs @@ -107,6 +107,12 @@ public bool Left(TBox box) public bool Left(TNumber temp2) => Meos.LeftTnumberTnumber(this.Ptr, temp2.Ptr); + public TBox?[] MergeEachNTboxes(int elem_count) + => MEOSFactory.WrapTBoxArray(Meos.TnumberMergeEachNTboxes(this.Ptr, elem_count)); + + public TBox?[] MergeNTboxes(int box_count) + => MEOSFactory.WrapTBoxArray(Meos.TnumberMergeNTboxes(this.Ptr, box_count)); + public Temporal? MinusSpan(Span span) => MEOSFactory.WrapTemporal(Meos.TnumberMinusSpan(this.Ptr, span.Ptr)); diff --git a/MEOS.NET/Types/TRGeometry.g.cs b/MEOS.NET/Types/TRGeometry.g.cs index d7f1ec4..0d614bd 100644 --- a/MEOS.NET/Types/TRGeometry.g.cs +++ b/MEOS.NET/Types/TRGeometry.g.cs @@ -177,6 +177,12 @@ public bool Left(TRGeometry temp2) public double Length() => Meos.TrgeometryLength(this.Ptr); + public STBox?[] MergeEachNStboxes(int elem_count) + => MEOSFactory.WrapSTBoxArray(Meos.TrgeometryMergeEachNStboxes(this.Ptr, elem_count)); + + public STBox?[] MergeNStboxes(int box_count) + => MEOSFactory.WrapSTBoxArray(Meos.TrgeometryMergeNStboxes(this.Ptr, box_count)); + public Temporal? MinusGeom(Geo gs) => MEOSFactory.WrapTemporal(Meos.TrgeometryMinusGeom(this.Ptr, gs.Ptr)); diff --git a/MEOS.NET/Types/Temporal.g.cs b/MEOS.NET/Types/Temporal.g.cs index 13ed734..f39c1e2 100644 --- a/MEOS.NET/Types/Temporal.g.cs +++ b/MEOS.NET/Types/Temporal.g.cs @@ -259,6 +259,12 @@ public int MemSize() public Temporal? Merge(Temporal temp2) => MEOSFactory.WrapTemporal(Meos.TemporalMerge(this.Ptr, temp2.Ptr)); + public Span?[] MergeEachNSpans(int elem_count) + => MEOSFactory.WrapSpanArray(Meos.TemporalMergeEachNSpans(this.Ptr, elem_count)); + + public Span?[] MergeNSpans(int span_count) + => MEOSFactory.WrapSpanArray(Meos.TemporalMergeNSpans(this.Ptr, span_count)); + public Temporal? MinInstant() => MEOSFactory.WrapTemporal(Meos.TemporalMinInstant(this.Ptr));