diff --git a/ExampleApp/Program.cs b/ExampleApp/Program.cs index 8080c21..f0ceb20 100644 --- a/ExampleApp/Program.cs +++ b/ExampleApp/Program.cs @@ -20,7 +20,7 @@ Console.WriteLine($" text : {made}"); Console.WriteLine(" adding 34 to its value"); Temporal sum = MEOSFactory.WrapTemporal(Meos.AddTfloatFloat(made.Ptr, 34.0))!; - Console.WriteLine($" text : {Meos.TfloatOut(sum.Ptr, 15)}"); + Console.WriteLine($" text : {Meos.TemporalOut(sum.Ptr, 15)}"); Console.WriteLine($" always <= 30.0? : {Meos.AlwaysLeTfloatFloat(sum.Ptr, 30.0) == 1}\n"); Console.WriteLine("Reading a float span set from \"{[8, 10], [11, 12]}\""); diff --git a/GAP-LEDGER.md b/GAP-LEDGER.md index 6685f6d..758638b 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 `6f329a98d05bece363940b0489a34295ce09d7f2` by `tools/codegen.py` +Generated from `meos-idl.json` at MobilityDB `78ebe3b7fe401f25dc4c0372ef6b8a294abd579c` by `tools/codegen.py` and `tools/objectgen.py`. Do not edit. ## The flat surface — `tools/codegen.py` -### parameter nullability — 4354 +### parameter nullability — 4335 `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. @@ -40,6 +40,7 @@ and `tools/objectgen.py`. Do not edit. | acontains_tcbuffer_tcbuffer | temp1, temp2 | | acontains_tgeo_geo | temp, gs | | acontains_tgeo_tgeo | temp1, temp2 | +| acontains_tgeoarr_tgeoarr | arr1, arr2, count | | acovers_cbuffer_tcbuffer | cb, temp | | acovers_geo_tcbuffer | gs, temp | | acovers_geo_tgeo | gs, temp | @@ -49,6 +50,7 @@ and `tools/objectgen.py`. Do not edit. | acovers_tcbuffer_tcbuffer | temp1, temp2 | | acovers_tgeo_geo | temp, gs | | acovers_tgeo_tgeo | temp1, temp2 | +| acovers_tgeoarr_tgeoarr | arr1, arr2, count | | acovers_trgeometry_geo | temp, gs | | add_bigint_tbigint | tnumber | | add_date_interval | interv | @@ -350,6 +352,7 @@ and `tools/objectgen.py`. Do not edit. | bbox_temporal_split_boxes | temp, count | | bbox_union_span_span | s1, s2, result | | bearing_point_point | gs1, gs2, result | +| bearing_point_tpoint | gs, temp | | bearing_tpoint_point | temp, gs | | bearing_tpoint_tpoint | temp1, temp2 | | before_date_set | s | @@ -393,7 +396,6 @@ and `tools/objectgen.py`. Do not edit. | bigintset_end_value | s | | bigintset_in | str | | bigintset_make | values | -| bigintset_out | set, size_out | | bigintset_shift_scale | s | | bigintset_start_value | s | | bigintset_value_n | s, result | @@ -402,7 +404,6 @@ and `tools/objectgen.py`. Do not edit. | bigintspan_expand | s | | bigintspan_in | str | | bigintspan_lower | s | -| bigintspan_out | s, size_out | | bigintspan_set_floatspan | s1, s2 | | bigintspan_set_intspan | s1, s2 | | bigintspan_shift_scale | s | @@ -413,7 +414,6 @@ and `tools/objectgen.py`. Do not edit. | bigintspanset_bins | ss, count | | bigintspanset_in | str | | bigintspanset_lower | ss | -| bigintspanset_out | ss, size_out | | bigintspanset_shift_scale | ss | | bigintspanset_upper | ss | | bigintspanset_width | ss | @@ -463,10 +463,11 @@ and `tools/objectgen.py`. Do not edit. | cbufferset_end_value | s | | cbufferset_in | str | | cbufferset_make | values | -| cbufferset_out | s, size_out | | cbufferset_start_value | s | | cbufferset_value_n | s, result | | cbufferset_values | s, count | +| concat_jsonb_jsonbset | jb, s | +| concat_jsonb_tjsonb | jb, temp | | concat_jsonbset_jsonb | s, jb | | concat_tjsonb_jsonb | temp, jb | | concat_tjsonb_tjsonb | temp1, temp2 | @@ -486,6 +487,7 @@ and `tools/objectgen.py`. Do not edit. | contained_int_span | s | | contained_int_spanset | ss | | contained_jsonb_set | jb, s | +| contained_jsonb_tjsonb | jb, temp | | contained_npoint_set | np, s | | contained_numspan_tbox | s, box | | contained_numspan_tnumber | s, temp | @@ -517,6 +519,8 @@ and `tools/objectgen.py`. Do not edit. | contained_timestamptz_set | s | | contained_timestamptz_span | s | | contained_timestamptz_spanset | ss | +| contained_tjsonb_jsonb | temp, jb | +| contained_tjsonb_tjsonb | temp1, temp2 | | contained_tnumber_numspan | temp, s | | contained_tnumber_tbox | temp, box | | contained_tnumber_tnumber | temp1, temp2 | @@ -532,6 +536,7 @@ and `tools/objectgen.py`. Do not edit. | contained_value_span | s | | contained_value_spanset | ss | | contains_cbuffer_cbuffer | cb1, cb2 | +| contains_jsonb_tjsonb | jb, temp | | contains_numspan_tbox | s, box | | contains_numspan_tnumber | s, temp | | contains_rid_bigintset_tnpoint | s, temp | @@ -605,7 +610,6 @@ and `tools/objectgen.py`. Do not edit. | dateset_end_value | s | | dateset_in | str | | dateset_make | values | -| dateset_out | s, size_out | | dateset_shift_scale | s | | dateset_start_value | s | | dateset_to_tstzset | s | @@ -616,7 +620,6 @@ and `tools/objectgen.py`. Do not edit. | datespan_get_bin | duration | | datespan_in | str | | datespan_lower | s | -| datespan_out | s, size_out | | datespan_set_tstzspan | s1, s2 | | datespan_shift_scale | s | | datespan_to_tstzspan | s | @@ -629,7 +632,6 @@ and `tools/objectgen.py`. Do not edit. | datespanset_in | str | | datespanset_lower | ss | | datespanset_num_dates | ss | -| datespanset_out | ss, size_out | | datespanset_shift_scale | ss | | datespanset_start_date | ss | | datespanset_to_tstzspanset | ss | @@ -715,6 +717,7 @@ and `tools/objectgen.py`. Do not edit. | econtains_tcbuffer_tcbuffer | temp1, temp2 | | econtains_tgeo_geo | temp, gs | | econtains_tgeo_tgeo | temp1, temp2 | +| econtains_tgeoarr_tgeoarr | arr1, arr2, count | | ecovers_cbuffer_tcbuffer | cb, temp | | ecovers_geo_tcbuffer | gs, temp | | ecovers_geo_tgeo | gs, temp | @@ -724,6 +727,7 @@ and `tools/objectgen.py`. Do not edit. | ecovers_tcbuffer_tcbuffer | temp1, temp2 | | ecovers_tgeo_geo | temp, gs | | ecovers_tgeo_tgeo | temp1, temp2 | +| ecovers_tgeoarr_tgeoarr | arr1, arr2, count | | ecovers_trgeometry_geo | temp, gs | | edisjoint_cbuffer_tcbuffer | cb, temp | | edisjoint_geo_tcbuffer | gs, temp | @@ -934,7 +938,6 @@ and `tools/objectgen.py`. Do not edit. | floatset_floor | s | | floatset_in | str | | floatset_make | values | -| floatset_out | set, size_out | | floatset_radians | s | | floatset_shift_scale | s | | floatset_start_value | s | @@ -948,7 +951,6 @@ and `tools/objectgen.py`. Do not edit. | floatspan_floor | s | | floatspan_in | str | | floatspan_lower | s | -| floatspan_out | s, size_out | | floatspan_radians | s | | floatspan_round | s | | floatspan_round_set | s, result | @@ -965,7 +967,6 @@ and `tools/objectgen.py`. Do not edit. | floatspanset_floor | ss | | floatspanset_in | str | | floatspanset_lower | ss | -| floatspanset_out | ss, size_out | | floatspanset_radians | ss | | floatspanset_round | ss | | floatspanset_shift_scale | ss | @@ -1152,7 +1153,6 @@ and `tools/objectgen.py`. Do not edit. | h3indexset_grid_disk | cells | | h3indexset_in | str | | h3indexset_make | values | -| h3indexset_out | s, size_out | | h3indexset_start_value | s | | h3indexset_value_n | s, result | | h3indexset_values | s, count | @@ -1271,7 +1271,6 @@ and `tools/objectgen.py`. Do not edit. | intset_end_value | s | | intset_in | str | | intset_make | values | -| intset_out | set, size_out | | intset_shift_scale | s | | intset_start_value | s | | intset_to_floatset | s | @@ -1281,7 +1280,6 @@ and `tools/objectgen.py`. Do not edit. | intspan_expand | s | | intspan_in | str | | intspan_lower | s | -| intspan_out | s, size_out | | intspan_set_bigintspan | s1, s2 | | intspan_set_floatspan | s1, s2 | | intspan_shift_scale | s | @@ -1292,7 +1290,6 @@ and `tools/objectgen.py`. Do not edit. | intspanset_bins | ss, count | | intspanset_in | str | | intspanset_lower | ss | -| intspanset_out | ss, size_out | | intspanset_shift_scale | ss | | intspanset_to_floatspanset | ss | | intspanset_upper | ss | @@ -1393,7 +1390,6 @@ and `tools/objectgen.py`. Do not edit. | jsonbset_object_field | set, key | | jsonbset_object_field_common | set, key | | jsonbset_object_field_text | set, key | -| jsonbset_out | s, size_out | | jsonbset_path_exists | set, jp, vars, count | | jsonbset_path_exists_intl | set, jp, vars, count | | jsonbset_path_match | set, jp, vars, count | @@ -1701,7 +1697,6 @@ and `tools/objectgen.py`. Do not edit. | npointset_end_value | s | | npointset_in | str | | npointset_make | values | -| npointset_out | s, size_out | | npointset_routes | s | | npointset_start_value | s | | npointset_value_n | s, result | @@ -1990,7 +1985,6 @@ and `tools/objectgen.py`. Do not edit. | pcpatchset_end_value | s | | pcpatchset_in | str | | pcpatchset_make | values | -| pcpatchset_out | s, size_out | | pcpatchset_start_value | s | | pcpatchset_value_n | s, result | | pcpatchset_values | s, count | @@ -2021,7 +2015,6 @@ and `tools/objectgen.py`. Do not edit. | pcpointset_end_value | s | | pcpointset_in | str | | pcpointset_make | values | -| pcpointset_out | s, size_out | | pcpointset_start_value | s | | pcpointset_value_n | s, result | | pcpointset_values | s, count | @@ -2125,14 +2118,12 @@ and `tools/objectgen.py`. Do not edit. | posechainset_end_value | s | | posechainset_in | str | | posechainset_make | values | -| posechainset_out | s, size_out | | posechainset_start_value | s | | posechainset_value_n | s, result | | posechainset_values | s, count | | poseset_end_value | s | | poseset_in | str | | poseset_make | values | -| poseset_out | s, size_out | | poseset_start_value | s | | poseset_value_n | s, result | | poseset_values | s, count | @@ -2156,7 +2147,6 @@ and `tools/objectgen.py`. Do not edit. | quadbinset_grid_disk | cells | | quadbinset_in | str | | quadbinset_make | values | -| quadbinset_out | s, size_out | | quadbinset_start_value | s | | quadbinset_uncompact_cells | cells | | quadbinset_value_n | s, result | @@ -2246,6 +2236,13 @@ and `tools/objectgen.py`. Do not edit. | rasterstatsstate_serialize | state, size_out | | rasterunionstate_deserialize | bytes | | rasterunionstate_serialize | state, size_out | +| reachabilitystate_close | state, count | +| reachabilitystate_deserialize | bytes | +| reachabilitystate_instants | state, count | +| reachabilitystate_kept | state | +| reachabilitystate_reports | state | +| reachabilitystate_serialize | state, size_out | +| reachabilitystate_unreachable | state | | right_bigint_set | s | | right_bigint_span | s | | right_bigint_spanset | ss | @@ -2324,7 +2321,6 @@ and `tools/objectgen.py`. Do not edit. | s2cellset_end_value | s | | s2cellset_in | str | | s2cellset_make | values | -| s2cellset_out | s, size_out | | s2cellset_start_value | s | | s2cellset_uncompact_cells | cells | | s2cellset_value_n | s, result | @@ -2503,7 +2499,6 @@ and `tools/objectgen.py`. Do not edit. | spatialset_as_ewkt | set, size_out | | spatialset_as_hexewkb | s, size_out | | spatialset_as_text | set, size_out | -| spatialset_out | s, size_out | | spatialset_set_srid | s | | spatialset_set_stbox | set, result | | spatialset_srid | s | @@ -2533,6 +2528,7 @@ and `tools/objectgen.py`. Do not edit. | stbox_as_ewkb | box, size_out | | stbox_as_hexewkb | box, size_out | | stbox_as_hexwkb | box, size_out | +| stbox_as_text | box, size_out | | stbox_as_wkb | box, size_out | | stbox_back | box1, box2 | | stbox_before | box1, box2 | @@ -2642,7 +2638,6 @@ and `tools/objectgen.py`. Do not edit. | tbigint_max_value | temp | | tbigint_min_value | temp | | tbigint_minus_value | temp | -| tbigint_out | temp, size_out | | tbigint_scale_value | temp | | tbigint_shift_scale_value | temp | | tbigint_shift_value | temp | @@ -2686,7 +2681,6 @@ and `tools/objectgen.py`. Do not edit. | tbool_from_mfjson | str | | tbool_in | str | | tbool_minus_value | temp | -| tbool_out | temp, size_out | | tbool_start_value | temp | | tbool_tand_combinefn | state1, state2 | | tbool_to_tint | temp | @@ -2818,6 +2812,7 @@ and `tools/objectgen.py`. Do not edit. | tcontains_tcbuffer_tcbuffer | temp1, temp2 | | tcontains_tgeo_geo | temp, gs | | tcontains_tgeo_tgeo | temp1, temp2 | +| tcontains_tgeoarr_tgeoarr | arr1, arr2, count, periods | | tcontseq_after_timestamptz | seq | | tcontseq_before_timestamptz | seq | | tcontseq_restrict_minmax | seq | @@ -2829,6 +2824,7 @@ and `tools/objectgen.py`. Do not edit. | tcovers_tcbuffer_tcbuffer | temp1, temp2 | | tcovers_tgeo_geo | temp, gs | | tcovers_tgeo_tgeo | temp1, temp2 | +| tcovers_tgeoarr_tgeoarr | arr1, arr2, count, periods | | tdiscseq_after_timestamptz | seq | | tdiscseq_before_timestamptz | seq | | tdiscseq_restrict_minmax | seq | @@ -2964,6 +2960,9 @@ and `tools/objectgen.py`. Do not edit. | temporal_num_sequences | temp | | temporal_num_timestamps | temp | | temporal_out | temp, size_out | +| temporal_reachability_filter | temp | +| temporal_reachability_filter_finalfn | state | +| temporal_reachability_filter_transfn | inst | | temporal_restart | temp | | temporal_restrict_minmax | temp | | temporal_restrict_timestamptz | temp | @@ -3118,7 +3117,6 @@ and `tools/objectgen.py`. Do not edit. | textset_initcap | s | | textset_lower | s | | textset_make | values | -| textset_out | set, size_out | | textset_start_value | s | | textset_to_jsonbset | s | | textset_upper | s | @@ -3139,7 +3137,6 @@ and `tools/objectgen.py`. Do not edit. | tfloat_max_value | temp | | tfloat_min_value | temp | | tfloat_minus_value | temp | -| tfloat_out | temp, size_out | | tfloat_radians | temp | | tfloat_scale_value | temp | | tfloat_shift_scale_value | temp | @@ -3343,7 +3340,6 @@ and `tools/objectgen.py`. Do not edit. | th3index_is_valid_vertex | temp | | th3index_local_ij_to_cell | origin, coord | | th3index_minus_value | temp | -| th3index_out | temp, size_out | | th3index_start_value | temp | | th3index_to_tbigint | temp | | th3index_to_tgeogpoint | temp | @@ -3451,7 +3447,6 @@ and `tools/objectgen.py`. Do not edit. | tint_max_value | temp | | tint_min_value | temp | | tint_minus_value | temp | -| tint_out | temp, size_out | | tint_scale_value | temp | | tint_shift_scale_value | temp | | tint_shift_value | temp | @@ -3529,7 +3524,6 @@ and `tools/objectgen.py`. Do not edit. | tjsonb_object_field | temp, key | | tjsonb_object_field_common | temp, key | | tjsonb_object_field_text | temp, key | -| tjsonb_out | temp, size_out | | tjsonb_path_exists | temp, jp, vars | | tjsonb_path_exists_intl | temp, jp, vars | | tjsonb_path_match | temp, jp, vars | @@ -3643,7 +3637,6 @@ and `tools/objectgen.py`. Do not edit. | tnpoint_minus_npoint | temp, np | | tnpoint_minus_npointset | temp, s | | tnpoint_minus_stbox | temp, box | -| tnpoint_out | temp, size_out | | tnpoint_positions | temp, count | | tnpoint_route | temp | | tnpoint_routes | temp | @@ -3727,6 +3720,7 @@ and `tools/objectgen.py`. Do not edit. | tpcbox_as_ewkb | box, size_out | | tpcbox_as_hexewkb | box, size_out | | tpcbox_as_hexwkb | box, size_out | +| tpcbox_as_text | box, size_out | | tpcbox_as_wkb | box, size_out | | tpcbox_cmp | box1, box2 | | tpcbox_copy | box | @@ -3768,7 +3762,6 @@ and `tools/objectgen.py`. Do not edit. | tpcpatch_in | str | | tpcpatch_minus_value | temp, pa | | tpcpatch_npoints | temp | -| tpcpatch_out | temp, size_out | | tpcpatch_pcid | temp | | tpcpatch_start_npoints | temp | | tpcpatch_start_value | temp | @@ -3793,7 +3786,6 @@ and `tools/objectgen.py`. Do not edit. | tpcpoint_from_mfjson | mfjson | | tpcpoint_in | str | | tpcpoint_minus_value | temp, pt | -| tpcpoint_out | temp, size_out | | tpcpoint_pcid | temp | | tpcpoint_start_value | temp | | tpcpoint_to_tgeogpoint | temp | @@ -3811,10 +3803,8 @@ and `tools/objectgen.py`. Do not edit. | tpcpointseqset_from_base_tstzspanset | pt, ss | | tpcpointseqset_in | str | | tpoint_angular_difference | temp | -| tpoint_as_mvtgeom | temp, bounds, gsarr, timesarr, count | +| tpoint_as_mvtgeom | temp, bounds, timesarr, count | | tpoint_at_elevation | temp, s | -| tpoint_at_geom | temp, gs | -| tpoint_at_value | temp, gs | | tpoint_azimuth | temp | | tpoint_cumulative_length | temp | | tpoint_direction | temp, result | @@ -3833,8 +3823,6 @@ and `tools/objectgen.py`. Do not edit. | tpoint_linear_restrict_geom | temp, gs | | tpoint_make_simple | temp, count | | tpoint_minus_elevation | temp, s | -| tpoint_minus_geom | temp, gs | -| tpoint_minus_value | temp, gs | | tpoint_speed | temp | | tpoint_tfloat_to_geomeas | tpoint, measure, result | | tpoint_tfloat_to_geomeas_intl | tpoint, meas, result | @@ -3944,7 +3932,6 @@ and `tools/objectgen.py`. Do not edit. | tquadbin_grid_distance | origin, dest | | tquadbin_in | str | | tquadbin_minus_value | temp | -| tquadbin_out | temp, size_out | | tquadbin_start_value | temp | | tquadbin_to_tbigint | temp | | tquadbin_to_tgeogpoint | temp | @@ -4060,7 +4047,6 @@ and `tools/objectgen.py`. Do not edit. | ts2cell_grid_distance | origin, dest | | ts2cell_in | str | | ts2cell_minus_value | temp | -| ts2cell_out | temp, size_out | | ts2cell_start_value | temp | | ts2cell_to_tbigint | temp | | ts2cell_to_tgeompoint | temp | @@ -4200,7 +4186,6 @@ and `tools/objectgen.py`. Do not edit. | tspatial_as_ewkt | temp, size_out | | tspatial_as_hexewkb | temp, size_out | | tspatial_as_text | temp, size_out | -| tspatial_out | temp, size_out | | tspatial_set_srid | temp | | tspatial_set_stbox | temp, result | | tspatial_srid | temp | @@ -4216,7 +4201,6 @@ and `tools/objectgen.py`. Do not edit. | tstzset_end_value | s | | tstzset_in | str | | tstzset_make | values | -| tstzset_out | set, size_out | | tstzset_scale | s, duration | | tstzset_set_stbox | s, result | | tstzset_set_tbox | s, box | @@ -4235,7 +4219,6 @@ and `tools/objectgen.py`. Do not edit. | tstzspan_get_bin | duration | | tstzspan_in | str | | tstzspan_lower | s | -| tstzspan_out | s, size_out | | tstzspan_scale | s, duration | | tstzspan_set_datespan | s1, s2 | | tstzspan_set_stbox | s, result | @@ -4253,7 +4236,6 @@ and `tools/objectgen.py`. Do not edit. | tstzspanset_in | str | | tstzspanset_lower | ss | | tstzspanset_num_timestamps | ss | -| tstzspanset_out | ss, size_out | | tstzspanset_scale | ss, duration | | tstzspanset_set_stbox | s, result | | tstzspanset_shift | ss, shift | @@ -4276,7 +4258,6 @@ and `tools/objectgen.py`. Do not edit. | ttext_max_value | temp | | ttext_min_value | temp | | ttext_minus_value | temp, txt | -| ttext_out | temp, size_out | | ttext_start_value | temp | | ttext_to_tjsonb | temp | | ttext_unnest | temp, values, count | @@ -4438,13 +4419,11 @@ The flat surface emits no wrapper for the function, so the layer has no signatur None in this run. -### return needs a class — 1 +### return needs a class — 0 The function answers a type no class stands for and no scalar, value struct or array rule reads, so there is nothing to hand back. -| class | member | what is missing | -| --- | --- | --- | -| TPoint | asMVTGeom | return bool needs wrapping | +None in this run. ### argument needs a class — 0 diff --git a/MEOS.NET.Tests/OutputPointerTests.cs b/MEOS.NET.Tests/OutputPointerTests.cs index 11b46d2..7c3d29b 100644 --- a/MEOS.NET.Tests/OutputPointerTests.cs +++ b/MEOS.NET.Tests/OutputPointerTests.cs @@ -1,15 +1,12 @@ -using System.Runtime.InteropServices; - using MEOS.NET.Functions; using MEOS.NET.Types; namespace MEOS.NET.Tests { /// - /// A MEOS function that answers a value through one output pointer and an - /// array through another, counted by a third, hands back the array and takes - /// the pointer it writes the value through; where MEOS says it answers - /// nothing, the array is null. + /// A MEOS function that answers a value and writes an array beside it, + /// counted through another pointer, hands back both; where MEOS answers + /// NULL, the pair is null. /// [TestClass] public class OutputPointerTests : MeosTest @@ -20,48 +17,34 @@ public class OutputPointerTests : MeosTest [TestMethod] public void AnMvtGeometryAnswersItsGeometryAndItsTimesInOrder() { - Temporal trip = TGeomPoint.In(Trip)!; + TPoint trip = (TPoint)TGeomPoint.In(Trip)!; STBox bounds = STBox.In("STBOX XT(((0,0),(10,10)),[2000-01-01, 2000-01-04])")!; - IntPtr geom = Marshal.AllocHGlobal(IntPtr.Size); - try - { - long[]? times = Meos.TpointAsMvtgeom(trip.Ptr, bounds.Ptr, 4096, 0, true, geom); + (Geo? geom, long[] times)? answer = trip.AsMVTGeom(bounds, 4096, 0, true); - // The geometry is a GSERIALIZED the geometry functions read. - StringAssert.StartsWith(Meos.GeoAsText(Marshal.ReadIntPtr(geom), 6), "LINESTRING"); + Assert.IsNotNull(answer); + // The geometry is a GSERIALIZED the geometry functions read. + Assert.IsNotNull(answer!.Value.geom); + StringAssert.StartsWith(Meos.GeoAsText(answer.Value.geom!.Ptr, 6), "LINESTRING"); - // The times are the array MEOS counted, in order. - Assert.IsNotNull(times); - Assert.IsTrue(times!.Length > 0, $"count was {times.Length}"); - for (int i = 1; i < times.Length; i++) - { - Assert.IsTrue(times[i] > times[i - 1], $"timestamp {i} is out of order"); - } - } - finally + // The times are the array MEOS counted, in order. + long[] times = answer.Value.times; + Assert.IsTrue(times.Length > 0, $"count was {times.Length}"); + for (int i = 1; i < times.Length; i++) { - Marshal.FreeHGlobal(geom); + Assert.IsTrue(times[i] > times[i - 1], $"timestamp {i} is out of order"); } } [TestMethod] public void AnMvtGeometryOutsideTheTileIsNull() { - // tpoint_as_mvtgeom answers false for a trip with no representation - // in the tile, and writes neither the geometry nor the times. - Temporal trip = TGeomPoint.In(Trip)!; + // tpoint_as_mvtgeom answers NULL for a trip with no representation + // in the tile, and writes no times. + TPoint trip = (TPoint)TGeomPoint.In(Trip)!; STBox bounds = STBox.In("STBOX XT(((100,100),(110,110)),[2000-01-01, 2000-01-04])")!; - IntPtr geom = Marshal.AllocHGlobal(IntPtr.Size); - try - { - Assert.IsNull(Meos.TpointAsMvtgeom(trip.Ptr, bounds.Ptr, 4096, 0, true, geom)); - } - finally - { - Marshal.FreeHGlobal(geom); - } + Assert.IsNull(trip.AsMVTGeom(bounds, 4096, 0, true)); } } } diff --git a/MEOS.NET.Tests/StringSizeTests.cs b/MEOS.NET.Tests/StringSizeTests.cs index f8cfac7..bab6622 100644 --- a/MEOS.NET.Tests/StringSizeTests.cs +++ b/MEOS.NET.Tests/StringSizeTests.cs @@ -16,7 +16,7 @@ public void AValueHoldingTwoByteCharactersReadsBackWhole() { const string text = "{\"Zürich\"@2001-01-01 00:00:00+00, \"Liège\"@2001-01-02 00:00:00+00}"; - Assert.AreEqual(text, Meos.TtextOut(Meos.TtextIn(text))); + Assert.AreEqual(text, Meos.TemporalOut(Meos.TtextIn(text), 15)); } [TestMethod] @@ -25,7 +25,7 @@ public void AStringBeyondTheLargeObjectThresholdReadsBackWhole() string value = new('x', 200000); string text = $"\"{value}\"@2001-01-01 00:00:00+00"; - Assert.AreEqual(text, Meos.TtextOut(Meos.TtextIn(text))); + Assert.AreEqual(text, Meos.TemporalOut(Meos.TtextIn(text), 15)); } [TestMethod] diff --git a/MEOS.NET/Errors/MEOSErrorCodes.g.cs b/MEOS.NET/Errors/MEOSErrorCodes.g.cs index 1757ebf..1d4326e 100644 --- a/MEOS.NET/Errors/MEOSErrorCodes.g.cs +++ b/MEOS.NET/Errors/MEOSErrorCodes.g.cs @@ -81,14 +81,44 @@ public enum MEOSErrorCodes /// GEOJSON output error (MEOS_ERR_GEOJSON_OUTPUT). GEOJSONOutput = 27, - /// SQL JSON error (MEOS_ERR_SQL_JSON_ERROR). - SQLJSONError = 28, - /// Regular expression error (MEOS_ERR_INVALID_REGULAR_EXPRESSION). InvalidRegularExpression = 29, /// Date or time value out of range (MEOS_ERR_DATETIME_OUT_OF_RANGE). DatetimeOutOfRange = 30, + /// Non-numeric SQL/JSON item (MEOS_ERR_NON_NUMERIC_SQL_JSON_ITEM). + NonNumericSQLJSONItem = 31, + + /// Invalid argument for an SQL/JSON datetime function (MEOS_ERR_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION). + InvalidArgumentForSQLJSONDatetimeFunction = 32, + + /// More than one SQL/JSON item (MEOS_ERR_MORE_THAN_ONE_SQL_JSON_ITEM). + MoreThanOneSQLJSONItem = 33, + + /// Singleton SQL/JSON item required (MEOS_ERR_SINGLETON_SQL_JSON_ITEM_REQUIRED). + SingletonSQLJSONItemRequired = 34, + + /// SQL/JSON array not found (MEOS_ERR_SQL_JSON_ARRAY_NOT_FOUND). + SQLJSONArrayNotFound = 35, + + /// Invalid SQL/JSON subscript (MEOS_ERR_INVALID_SQL_JSON_SUBSCRIPT). + InvalidSQLJSONSubscript = 36, + + /// SQL/JSON object not found (MEOS_ERR_SQL_JSON_OBJECT_NOT_FOUND). + SQLJSONObjectNotFound = 37, + + /// SQL/JSON member not found (MEOS_ERR_SQL_JSON_MEMBER_NOT_FOUND). + SQLJSONMemberNotFound = 38, + + /// SQL/JSON number not found (MEOS_ERR_SQL_JSON_NUMBER_NOT_FOUND). + SQLJSONNumberNotFound = 39, + + /// Duplicate JSON object key value (MEOS_ERR_DUPLICATE_JSON_OBJECT_KEY_VALUE). + DuplicateJSONObjectKeyValue = 40, + + /// Undefined object (MEOS_ERR_UNDEFINED_OBJECT). + UndefinedObject = 41, + } } diff --git a/MEOS.NET/Errors/MEOSErrorHandling.g.cs b/MEOS.NET/Errors/MEOSErrorHandling.g.cs index bd8d991..9ba34e2 100644 --- a/MEOS.NET/Errors/MEOSErrorHandling.g.cs +++ b/MEOS.NET/Errors/MEOSErrorHandling.g.cs @@ -52,9 +52,19 @@ internal static void InternalErrorHandler(int level, int errorCode, string messa 25 => new MEOSWKBOutputException(level, MEOSErrorCodes.WKBOutput, message), 26 => new MEOSGEOJSONInputException(level, MEOSErrorCodes.GEOJSONInput, message), 27 => new MEOSGEOJSONOutputException(level, MEOSErrorCodes.GEOJSONOutput, message), - 28 => new MEOSSQLJSONErrorException(level, MEOSErrorCodes.SQLJSONError, message), 29 => new MEOSInvalidRegularExpressionException(level, MEOSErrorCodes.InvalidRegularExpression, message), 30 => new MEOSDatetimeOutOfRangeException(level, MEOSErrorCodes.DatetimeOutOfRange, message), + 31 => new MEOSNonNumericSQLJSONItemException(level, MEOSErrorCodes.NonNumericSQLJSONItem, message), + 32 => new MEOSInvalidArgumentForSQLJSONDatetimeFunctionException(level, MEOSErrorCodes.InvalidArgumentForSQLJSONDatetimeFunction, message), + 33 => new MEOSMoreThanOneSQLJSONItemException(level, MEOSErrorCodes.MoreThanOneSQLJSONItem, message), + 34 => new MEOSSingletonSQLJSONItemRequiredException(level, MEOSErrorCodes.SingletonSQLJSONItemRequired, message), + 35 => new MEOSSQLJSONArrayNotFoundException(level, MEOSErrorCodes.SQLJSONArrayNotFound, message), + 36 => new MEOSInvalidSQLJSONSubscriptException(level, MEOSErrorCodes.InvalidSQLJSONSubscript, message), + 37 => new MEOSSQLJSONObjectNotFoundException(level, MEOSErrorCodes.SQLJSONObjectNotFound, message), + 38 => new MEOSSQLJSONMemberNotFoundException(level, MEOSErrorCodes.SQLJSONMemberNotFound, message), + 39 => new MEOSSQLJSONNumberNotFoundException(level, MEOSErrorCodes.SQLJSONNumberNotFound, message), + 40 => new MEOSDuplicateJSONObjectKeyValueException(level, MEOSErrorCodes.DuplicateJSONObjectKeyValue, message), + 41 => new MEOSUndefinedObjectException(level, MEOSErrorCodes.UndefinedObject, message), // A code this binding does not name is still an error MEOS // raised, so it reaches the caller rather than being dropped. _ => new MEOSInternalErrorException( diff --git a/MEOS.NET/Exceptions/MEOSDuplicateJSONObjectKeyValueException.g.cs b/MEOS.NET/Exceptions/MEOSDuplicateJSONObjectKeyValueException.g.cs new file mode 100644 index 0000000..11ae72a --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSDuplicateJSONObjectKeyValueException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// Duplicate JSON object key value (MEOS_ERR_DUPLICATE_JSON_OBJECT_KEY_VALUE). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSDuplicateJSONObjectKeyValueException : MEOSException + { + internal MEOSDuplicateJSONObjectKeyValueException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSInvalidArgumentForSQLJSONDatetimeFunctionException.g.cs b/MEOS.NET/Exceptions/MEOSInvalidArgumentForSQLJSONDatetimeFunctionException.g.cs new file mode 100644 index 0000000..57a2f8d --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSInvalidArgumentForSQLJSONDatetimeFunctionException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// Invalid argument for an SQL/JSON datetime function (MEOS_ERR_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSInvalidArgumentForSQLJSONDatetimeFunctionException : MEOSException + { + internal MEOSInvalidArgumentForSQLJSONDatetimeFunctionException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSInvalidSQLJSONSubscriptException.g.cs b/MEOS.NET/Exceptions/MEOSInvalidSQLJSONSubscriptException.g.cs new file mode 100644 index 0000000..1bcfe17 --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSInvalidSQLJSONSubscriptException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// Invalid SQL/JSON subscript (MEOS_ERR_INVALID_SQL_JSON_SUBSCRIPT). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSInvalidSQLJSONSubscriptException : MEOSException + { + internal MEOSInvalidSQLJSONSubscriptException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSMoreThanOneSQLJSONItemException.g.cs b/MEOS.NET/Exceptions/MEOSMoreThanOneSQLJSONItemException.g.cs new file mode 100644 index 0000000..e1284fa --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSMoreThanOneSQLJSONItemException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// More than one SQL/JSON item (MEOS_ERR_MORE_THAN_ONE_SQL_JSON_ITEM). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSMoreThanOneSQLJSONItemException : MEOSException + { + internal MEOSMoreThanOneSQLJSONItemException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSNonNumericSQLJSONItemException.g.cs b/MEOS.NET/Exceptions/MEOSNonNumericSQLJSONItemException.g.cs new file mode 100644 index 0000000..a6e207e --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSNonNumericSQLJSONItemException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// Non-numeric SQL/JSON item (MEOS_ERR_NON_NUMERIC_SQL_JSON_ITEM). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSNonNumericSQLJSONItemException : MEOSException + { + internal MEOSNonNumericSQLJSONItemException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSSQLJSONArrayNotFoundException.g.cs b/MEOS.NET/Exceptions/MEOSSQLJSONArrayNotFoundException.g.cs new file mode 100644 index 0000000..41cdde5 --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSSQLJSONArrayNotFoundException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// SQL/JSON array not found (MEOS_ERR_SQL_JSON_ARRAY_NOT_FOUND). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSSQLJSONArrayNotFoundException : MEOSException + { + internal MEOSSQLJSONArrayNotFoundException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSSQLJSONErrorException.g.cs b/MEOS.NET/Exceptions/MEOSSQLJSONErrorException.g.cs deleted file mode 100644 index a8792d1..0000000 --- a/MEOS.NET/Exceptions/MEOSSQLJSONErrorException.g.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable enable - -using MEOS.NET.Errors; - -namespace MEOS.NET.Exceptions -{ - /// SQL JSON error (MEOS_ERR_SQL_JSON_ERROR). - [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] - public class MEOSSQLJSONErrorException : MEOSException - { - internal MEOSSQLJSONErrorException(int level, MEOSErrorCodes code, string message) - : base(level, code, message) - { } - } -} diff --git a/MEOS.NET/Exceptions/MEOSSQLJSONMemberNotFoundException.g.cs b/MEOS.NET/Exceptions/MEOSSQLJSONMemberNotFoundException.g.cs new file mode 100644 index 0000000..cb84a69 --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSSQLJSONMemberNotFoundException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// SQL/JSON member not found (MEOS_ERR_SQL_JSON_MEMBER_NOT_FOUND). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSSQLJSONMemberNotFoundException : MEOSException + { + internal MEOSSQLJSONMemberNotFoundException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSSQLJSONNumberNotFoundException.g.cs b/MEOS.NET/Exceptions/MEOSSQLJSONNumberNotFoundException.g.cs new file mode 100644 index 0000000..b32fb7b --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSSQLJSONNumberNotFoundException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// SQL/JSON number not found (MEOS_ERR_SQL_JSON_NUMBER_NOT_FOUND). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSSQLJSONNumberNotFoundException : MEOSException + { + internal MEOSSQLJSONNumberNotFoundException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSSQLJSONObjectNotFoundException.g.cs b/MEOS.NET/Exceptions/MEOSSQLJSONObjectNotFoundException.g.cs new file mode 100644 index 0000000..3a2abb7 --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSSQLJSONObjectNotFoundException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// SQL/JSON object not found (MEOS_ERR_SQL_JSON_OBJECT_NOT_FOUND). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSSQLJSONObjectNotFoundException : MEOSException + { + internal MEOSSQLJSONObjectNotFoundException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSSingletonSQLJSONItemRequiredException.g.cs b/MEOS.NET/Exceptions/MEOSSingletonSQLJSONItemRequiredException.g.cs new file mode 100644 index 0000000..19ac2ce --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSSingletonSQLJSONItemRequiredException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// Singleton SQL/JSON item required (MEOS_ERR_SINGLETON_SQL_JSON_ITEM_REQUIRED). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSSingletonSQLJSONItemRequiredException : MEOSException + { + internal MEOSSingletonSQLJSONItemRequiredException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Exceptions/MEOSUndefinedObjectException.g.cs b/MEOS.NET/Exceptions/MEOSUndefinedObjectException.g.cs new file mode 100644 index 0000000..a79a5cc --- /dev/null +++ b/MEOS.NET/Exceptions/MEOSUndefinedObjectException.g.cs @@ -0,0 +1,15 @@ +#nullable enable + +using MEOS.NET.Errors; + +namespace MEOS.NET.Exceptions +{ + /// Undefined object (MEOS_ERR_UNDEFINED_OBJECT). + [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] + public class MEOSUndefinedObjectException : MEOSException + { + internal MEOSUndefinedObjectException(int level, MEOSErrorCodes code, string message) + : base(level, code, message) + { } + } +} diff --git a/MEOS.NET/Functions/Meos.Native.g.cs b/MEOS.NET/Functions/Meos.Native.g.cs index 45c052d..b1bbe71 100644 --- a/MEOS.NET/Functions/Meos.Native.g.cs +++ b/MEOS.NET/Functions/Meos.Native.g.cs @@ -361,84 +361,48 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "bigintset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr BigintsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "bigintset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr BigintsetOut(IntPtr set, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "bigintspan_expand", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr BigintspanExpand(IntPtr s, long value); [LibraryImport(DllPath, EntryPoint = "bigintspan_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr BigintspanIn(string str); - [LibraryImport(DllPath, EntryPoint = "bigintspan_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr BigintspanOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "bigintspanset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr BigintspansetIn(string str); - [LibraryImport(DllPath, EntryPoint = "bigintspanset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr BigintspansetOut(IntPtr ss, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "dateset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr DatesetIn(string str); - [LibraryImport(DllPath, EntryPoint = "dateset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr DatesetOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "datespan_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr DatespanIn(string str); - [LibraryImport(DllPath, EntryPoint = "datespan_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr DatespanOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "datespanset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr DatespansetIn(string str); - [LibraryImport(DllPath, EntryPoint = "datespanset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr DatespansetOut(IntPtr ss, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "floatset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr FloatsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "floatset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr FloatsetOut(IntPtr set, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "floatspan_expand", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr FloatspanExpand(IntPtr s, double value); [LibraryImport(DllPath, EntryPoint = "floatspan_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr FloatspanIn(string str); - [LibraryImport(DllPath, EntryPoint = "floatspan_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr FloatspanOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "floatspanset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr FloatspansetIn(string str); - [LibraryImport(DllPath, EntryPoint = "floatspanset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr FloatspansetOut(IntPtr ss, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "intset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr IntsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "intset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr IntsetOut(IntPtr set, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "intspan_expand", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr IntspanExpand(IntPtr s, int value); [LibraryImport(DllPath, EntryPoint = "intspan_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr IntspanIn(string str); - [LibraryImport(DllPath, EntryPoint = "intspan_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr IntspanOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "intspanset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr IntspansetIn(string str); - [LibraryImport(DllPath, EntryPoint = "intspanset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr IntspansetOut(IntPtr ss, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "set_as_hexwkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SetAsHexwkb(IntPtr s, byte variant, out nuint size_out); @@ -451,6 +415,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "set_from_wkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SetFromWkb(IntPtr wkb, ulong size); + [LibraryImport(DllPath, EntryPoint = "set_out", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SetOut(IntPtr s, int maxdd, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "span_as_hexwkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpanAsHexwkb(IntPtr s, byte variant, out nuint size_out); @@ -463,6 +430,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "span_from_wkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpanFromWkb(IntPtr wkb, ulong size); + [LibraryImport(DllPath, EntryPoint = "span_out", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SpanOut(IntPtr s, int maxdd, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "spanset_as_hexwkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpansetAsHexwkb(IntPtr ss, byte variant, out nuint size_out); @@ -475,30 +445,21 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "spanset_from_wkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpansetFromWkb(IntPtr wkb, ulong size); + [LibraryImport(DllPath, EntryPoint = "spanset_out", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr SpansetOut(IntPtr ss, int maxdd, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "textset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TextsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "textset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TextsetOut(IntPtr set, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tstzset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TstzsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "tstzset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TstzsetOut(IntPtr set, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tstzspan_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TstzspanIn(string str); - [LibraryImport(DllPath, EntryPoint = "tstzspan_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TstzspanOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tstzspanset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TstzspansetIn(string str); - [LibraryImport(DllPath, EntryPoint = "tstzspanset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TstzspansetOut(IntPtr ss, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "bigintset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr BigintsetMake(IntPtr values, int count); @@ -640,6 +601,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "timestamptz_to_spanset", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TimestamptzToSpanset(long t); + [LibraryImport(DllPath, EntryPoint = "timestamptz_to_unix_us", StringMarshalling = StringMarshalling.Utf8)] + internal static partial long TimestamptzToUnixUs(long t); + [LibraryImport(DllPath, EntryPoint = "tstzset_to_dateset", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TstzsetToDateset(IntPtr s); @@ -649,6 +613,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tstzspanset_to_datespanset", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TstzspansetToDatespanset(IntPtr ss); + [LibraryImport(DllPath, EntryPoint = "unix_us_to_timestamptz", StringMarshalling = StringMarshalling.Utf8)] + internal static partial long UnixUsToTimestamptz(long us); + [LibraryImport(DllPath, EntryPoint = "bigintset_end_value", StringMarshalling = StringMarshalling.Utf8)] internal static partial long BigintsetEndValue(IntPtr s); @@ -3031,9 +2998,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tbool_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TboolIn(string str); - [LibraryImport(DllPath, EntryPoint = "tbool_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TboolOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "temporal_as_hexwkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalAsHexwkb(IntPtr temp, byte variant, out nuint size_out); @@ -3058,15 +3022,15 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "temporal_from_wkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalFromWkb(IntPtr wkb, ulong size); + [LibraryImport(DllPath, EntryPoint = "temporal_out", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TemporalOut(IntPtr temp, int maxdd, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "tfloat_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TfloatFromMfjson(string str); [LibraryImport(DllPath, EntryPoint = "tfloat_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TfloatIn(string str); - [LibraryImport(DllPath, EntryPoint = "tfloat_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TfloatOut(IntPtr temp, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tint_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TintFromMfjson(string str); @@ -3079,21 +3043,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tbigint_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TbigintIn(string str); - [LibraryImport(DllPath, EntryPoint = "tint_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TintOut(IntPtr temp, out nuint size_out); - - [LibraryImport(DllPath, EntryPoint = "tbigint_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TbigintOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "ttext_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TtextFromMfjson(string str); [LibraryImport(DllPath, EntryPoint = "ttext_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TtextIn(string str); - [LibraryImport(DllPath, EntryPoint = "ttext_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TtextOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tbool_from_base_temp", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TboolFromBaseTemp([MarshalAs(UnmanagedType.U1)] bool b, IntPtr temp); @@ -4989,6 +4944,39 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "temporal_ext_kalman_filter", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalExtKalmanFilter(IntPtr temp, double gate, double q, double variance, [MarshalAs(UnmanagedType.U1)] bool to_drop); + [LibraryImport(DllPath, EntryPoint = "temporal_reachability_filter", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TemporalReachabilityFilter(IntPtr temp, double maxspeed); + + [LibraryImport(DllPath, EntryPoint = "temporal_reachability_filter_transfn", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TemporalReachabilityFilterTransfn(IntPtr state, IntPtr inst, double maxspeed); + + [LibraryImport(DllPath, EntryPoint = "temporal_reachability_filter_finalfn", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TemporalReachabilityFilterFinalfn(IntPtr state); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_instants", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ReachabilitystateInstants(IntPtr state, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_close", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ReachabilitystateClose(IntPtr state, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_free", StringMarshalling = StringMarshalling.Utf8)] + internal static partial void ReachabilitystateFree(IntPtr state); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_kept", StringMarshalling = StringMarshalling.Utf8)] + internal static partial int ReachabilitystateKept(IntPtr state); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_reports", StringMarshalling = StringMarshalling.Utf8)] + internal static partial int ReachabilitystateReports(IntPtr state); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_unreachable", StringMarshalling = StringMarshalling.Utf8)] + internal static partial int ReachabilitystateUnreachable(IntPtr state); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_deserialize", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ReachabilitystateDeserialize(IntPtr bytes, ulong size); + + [LibraryImport(DllPath, EntryPoint = "reachabilitystate_serialize", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ReachabilitystateSerialize(IntPtr state, IntPtr size_out); + [LibraryImport(DllPath, EntryPoint = "temporal_time_bins", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalTimeBins(IntPtr temp, IntPtr duration, long torigin, [MarshalAs(UnmanagedType.U1)] bool border_inc, IntPtr count); @@ -5520,31 +5508,10 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geo_typename", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeoTypename(int type); - [LibraryImport(DllPath, EntryPoint = "geog_area", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeogArea(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); - - [LibraryImport(DllPath, EntryPoint = "geog_centroid", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr GeogCentroid(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); - - [LibraryImport(DllPath, EntryPoint = "geog_length", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeogLength(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); - - [LibraryImport(DllPath, EntryPoint = "geog_perimeter", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeogPerimeter(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); - [LibraryImport(DllPath, EntryPoint = "geom_azimuth", StringMarshalling = StringMarshalling.Utf8)] [return: MarshalAs(UnmanagedType.U1)] internal static partial bool GeomAzimuth(IntPtr gs1, IntPtr gs2, IntPtr result); - [LibraryImport(DllPath, EntryPoint = "geom_area", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeomArea(IntPtr gs); - - [LibraryImport(DllPath, EntryPoint = "geom_length", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeomLength(IntPtr gs); - - [LibraryImport(DllPath, EntryPoint = "geom_perimeter", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeomPerimeter(IntPtr gs); - [LibraryImport(DllPath, EntryPoint = "line_numpoints", StringMarshalling = StringMarshalling.Utf8)] internal static partial int LineNumpoints(IntPtr gs); @@ -5638,9 +5605,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geom_buffer", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeomBuffer(IntPtr gs, double size, string @params); - [LibraryImport(DllPath, EntryPoint = "geom_centroid", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr GeomCentroid(IntPtr gs); - [LibraryImport(DllPath, EntryPoint = "geom_convex_hull", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeomConvexHull(IntPtr gs); @@ -5663,9 +5627,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geom_oriented_envelope", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeomOrientedEnvelope(IntPtr gs); - [LibraryImport(DllPath, EntryPoint = "geom_shortestline", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr GeomShortestline(IntPtr gs1, IntPtr gs2); - [LibraryImport(DllPath, EntryPoint = "geom_shortestline2d", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeomShortestline2d(IntPtr gs1, IntPtr gs2); @@ -5722,26 +5683,10 @@ private static partial class Native [return: MarshalAs(UnmanagedType.U1)] internal static partial bool GeomDwithin(IntPtr gs1, IntPtr gs2, double dist); - [LibraryImport(DllPath, EntryPoint = "geom_dwithin2d", StringMarshalling = StringMarshalling.Utf8)] - [return: MarshalAs(UnmanagedType.U1)] - internal static partial bool GeomDwithin2d(IntPtr gs1, IntPtr gs2, double dist); - - [LibraryImport(DllPath, EntryPoint = "geom_dwithin3d", StringMarshalling = StringMarshalling.Utf8)] - [return: MarshalAs(UnmanagedType.U1)] - internal static partial bool GeomDwithin3d(IntPtr gs1, IntPtr gs2, double dist); - [LibraryImport(DllPath, EntryPoint = "geom_intersects", StringMarshalling = StringMarshalling.Utf8)] [return: MarshalAs(UnmanagedType.U1)] internal static partial bool GeomIntersects(IntPtr gs1, IntPtr gs2); - [LibraryImport(DllPath, EntryPoint = "geom_intersects2d", StringMarshalling = StringMarshalling.Utf8)] - [return: MarshalAs(UnmanagedType.U1)] - internal static partial bool GeomIntersects2d(IntPtr gs1, IntPtr gs2); - - [LibraryImport(DllPath, EntryPoint = "geom_intersects3d", StringMarshalling = StringMarshalling.Utf8)] - [return: MarshalAs(UnmanagedType.U1)] - internal static partial bool GeomIntersects3d(IntPtr gs1, IntPtr gs2); - [LibraryImport(DllPath, EntryPoint = "geom_relate", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeomRelate(IntPtr gs1, IntPtr gs2, out nuint size_out); @@ -5771,9 +5716,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geog_distance", StringMarshalling = StringMarshalling.Utf8)] internal static partial double GeogDistance(IntPtr g1, IntPtr g2, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); - [LibraryImport(DllPath, EntryPoint = "geog_shortestline", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr GeogShortestline(IntPtr gs1, IntPtr gs2, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); - [LibraryImport(DllPath, EntryPoint = "geom_distance", StringMarshalling = StringMarshalling.Utf8)] internal static partial double GeomDistance(IntPtr gs1, IntPtr gs2); @@ -5783,12 +5725,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geom_max_distance", StringMarshalling = StringMarshalling.Utf8)] internal static partial double GeomMaxDistance(IntPtr gs1, IntPtr gs2); - [LibraryImport(DllPath, EntryPoint = "geom_max_distance2d", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeomMaxDistance2d(IntPtr gs1, IntPtr gs2); - - [LibraryImport(DllPath, EntryPoint = "geom_max_distance3d", StringMarshalling = StringMarshalling.Utf8)] - internal static partial double GeomMaxDistance3d(IntPtr gs1, IntPtr gs2); - [LibraryImport(DllPath, EntryPoint = "geom_distance3d", StringMarshalling = StringMarshalling.Utf8)] internal static partial double GeomDistance3d(IntPtr gs1, IntPtr gs2); @@ -5805,9 +5741,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "geomset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeomsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "spatialset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr SpatialsetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "spatialset_as_text", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpatialsetAsText(IntPtr set, int maxdd, out nuint size_out); @@ -5904,6 +5837,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "stbox_as_hexwkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr StboxAsHexwkb(IntPtr box, byte variant, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "stbox_as_text", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr StboxAsText(IntPtr box, int maxdd, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "stbox_as_wkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr StboxAsWkb(IntPtr box, byte variant, IntPtr size_out); @@ -6197,9 +6133,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "stbox_sortkey", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr StboxSortkey(IntPtr box, IntPtr size); - [LibraryImport(DllPath, EntryPoint = "tspatial_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TspatialOut(IntPtr temp, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tgeogpoint_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TgeogpointFromMfjson(string str); @@ -6303,8 +6236,7 @@ private static partial class Native internal static partial IntPtr TgeompointToTgeometry(IntPtr temp); [LibraryImport(DllPath, EntryPoint = "tpoint_as_mvtgeom", StringMarshalling = StringMarshalling.Utf8)] - [return: MarshalAs(UnmanagedType.U1)] - internal static partial bool TpointAsMvtgeom(IntPtr temp, IntPtr bounds, int extent, int buffer, [MarshalAs(UnmanagedType.U1)] bool clip_geom, IntPtr gsarr, IntPtr timesarr, IntPtr count); + internal static partial IntPtr TpointAsMvtgeom(IntPtr temp, IntPtr bounds, int extent, int buffer, [MarshalAs(UnmanagedType.U1)] bool clip_geom, IntPtr timesarr, IntPtr count); [LibraryImport(DllPath, EntryPoint = "tpoint_tfloat_to_geomeas", StringMarshalling = StringMarshalling.Utf8)] [return: MarshalAs(UnmanagedType.U1)] @@ -6320,8 +6252,11 @@ private static partial class Native [return: MarshalAs(UnmanagedType.U1)] internal static partial bool BearingPointPoint(IntPtr gs1, IntPtr gs2, IntPtr result); + [LibraryImport(DllPath, EntryPoint = "bearing_point_tpoint", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr BearingPointTpoint(IntPtr gs, IntPtr temp); + [LibraryImport(DllPath, EntryPoint = "bearing_tpoint_point", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr BearingTpointPoint(IntPtr temp, IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool invert); + internal static partial IntPtr BearingTpointPoint(IntPtr temp, IntPtr gs); [LibraryImport(DllPath, EntryPoint = "bearing_tpoint_tpoint", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr BearingTpointTpoint(IntPtr temp1, IntPtr temp2); @@ -6471,21 +6406,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tpoint_at_elevation", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointAtElevation(IntPtr temp, IntPtr s); - [LibraryImport(DllPath, EntryPoint = "tpoint_at_geom", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TpointAtGeom(IntPtr temp, IntPtr gs); - - [LibraryImport(DllPath, EntryPoint = "tpoint_at_value", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TpointAtValue(IntPtr temp, IntPtr gs); - [LibraryImport(DllPath, EntryPoint = "tpoint_minus_elevation", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpointMinusElevation(IntPtr temp, IntPtr s); - [LibraryImport(DllPath, EntryPoint = "tpoint_minus_geom", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TpointMinusGeom(IntPtr temp, IntPtr gs); - - [LibraryImport(DllPath, EntryPoint = "tpoint_minus_value", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TpointMinusValue(IntPtr temp, IntPtr gs); - [LibraryImport(DllPath, EntryPoint = "always_eq_geo_tgeo", StringMarshalling = StringMarshalling.Utf8)] internal static partial int AlwaysEqGeoTgeo(IntPtr gs, IntPtr temp); @@ -6996,6 +6919,18 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "atouches_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr AtouchesTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "econtains_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr EcontainsTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "acontains_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr AcontainsTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "ecovers_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr EcoversTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count); + + [LibraryImport(DllPath, EntryPoint = "acovers_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr AcoversTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "edisjoint_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr EdisjointTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count); @@ -7011,6 +6946,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "ttouches_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TtouchesTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count, IntPtr periods); + [LibraryImport(DllPath, EntryPoint = "tcontains_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TcontainsTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count, IntPtr periods); + + [LibraryImport(DllPath, EntryPoint = "tcovers_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TcoversTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count, IntPtr periods); + [LibraryImport(DllPath, EntryPoint = "tdisjoint_tgeoarr_tgeoarr", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TdisjointTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2, IntPtr count, IntPtr periods); @@ -7254,9 +7195,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "cbufferset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr CbuffersetIn(string str); - [LibraryImport(DllPath, EntryPoint = "cbufferset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr CbuffersetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "cbufferset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr CbuffersetMake(IntPtr values, int count); @@ -7910,15 +7848,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "th3indexseqset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr Th3indexseqsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "th3index_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr Th3indexOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "th3index_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr Th3indexFromMfjson(string mfjson); - [LibraryImport(DllPath, EntryPoint = "th3index_make", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr Th3indexMake(ulong value, long t); - [LibraryImport(DllPath, EntryPoint = "th3indexinst_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr Th3indexinstMake(ulong value, long t); @@ -8077,9 +8009,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "h3indexset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr H3indexsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "h3indexset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr H3indexsetOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "h3indexset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr H3indexsetMake(IntPtr values, int count); @@ -8246,21 +8175,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "set_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SetIn(string str, int settype); - [LibraryImport(DllPath, EntryPoint = "set_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr SetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "span_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpanIn(string str, int spantype); - [LibraryImport(DllPath, EntryPoint = "span_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr SpanOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "spanset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SpansetIn(string str, int spantype); - [LibraryImport(DllPath, EntryPoint = "spanset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr SpansetOut(IntPtr ss, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "set_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr SetMake(IntPtr values, int count, int basetype, [MarshalAs(UnmanagedType.U1)] bool order); @@ -8878,9 +8798,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "temporal_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemporalIn(string str, int temptype); - [LibraryImport(DllPath, EntryPoint = "temporal_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TemporalOut(IntPtr temp, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "temparr_out", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TemparrOut(IntPtr temparr, int count, int maxdd); @@ -9826,6 +9743,58 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "point_round", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PointRound(IntPtr gs, int maxdd); + [LibraryImport(DllPath, EntryPoint = "geog_centroid", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr GeogCentroid(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); + + [LibraryImport(DllPath, EntryPoint = "geog_shortestline", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr GeogShortestline(IntPtr gs1, IntPtr gs2, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); + + [LibraryImport(DllPath, EntryPoint = "geom_centroid", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr GeomCentroid(IntPtr gs); + + [LibraryImport(DllPath, EntryPoint = "geom_shortestline", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr GeomShortestline(IntPtr gs1, IntPtr gs2); + + [LibraryImport(DllPath, EntryPoint = "geom_dwithin2d", StringMarshalling = StringMarshalling.Utf8)] + [return: MarshalAs(UnmanagedType.U1)] + internal static partial bool GeomDwithin2d(IntPtr gs1, IntPtr gs2, double dist); + + [LibraryImport(DllPath, EntryPoint = "geom_dwithin3d", StringMarshalling = StringMarshalling.Utf8)] + [return: MarshalAs(UnmanagedType.U1)] + internal static partial bool GeomDwithin3d(IntPtr gs1, IntPtr gs2, double dist); + + [LibraryImport(DllPath, EntryPoint = "geom_intersects2d", StringMarshalling = StringMarshalling.Utf8)] + [return: MarshalAs(UnmanagedType.U1)] + internal static partial bool GeomIntersects2d(IntPtr gs1, IntPtr gs2); + + [LibraryImport(DllPath, EntryPoint = "geom_intersects3d", StringMarshalling = StringMarshalling.Utf8)] + [return: MarshalAs(UnmanagedType.U1)] + internal static partial bool GeomIntersects3d(IntPtr gs1, IntPtr gs2); + + [LibraryImport(DllPath, EntryPoint = "geog_area", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeogArea(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); + + [LibraryImport(DllPath, EntryPoint = "geog_length", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeogLength(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); + + [LibraryImport(DllPath, EntryPoint = "geog_perimeter", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeogPerimeter(IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool use_spheroid); + + [LibraryImport(DllPath, EntryPoint = "geom_area", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeomArea(IntPtr gs); + + [LibraryImport(DllPath, EntryPoint = "geom_length", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeomLength(IntPtr gs); + + [LibraryImport(DllPath, EntryPoint = "geom_max_distance2d", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeomMaxDistance2d(IntPtr gs1, IntPtr gs2); + + [LibraryImport(DllPath, EntryPoint = "geom_max_distance3d", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeomMaxDistance3d(IntPtr gs1, IntPtr gs2); + + [LibraryImport(DllPath, EntryPoint = "geom_perimeter", StringMarshalling = StringMarshalling.Utf8)] + internal static partial double GeomPerimeter(IntPtr gs); + [LibraryImport(DllPath, EntryPoint = "geo_scale_geo_intl", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr GeoScaleGeoIntl(IntPtr gs, IntPtr scale, IntPtr sorigin); @@ -10514,9 +10483,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "jsonbset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr JsonbsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "jsonbset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr JsonbsetOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "jsonbset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr JsonbsetMake(IntPtr values, int count); @@ -10542,8 +10508,11 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "jsonbset_values", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr JsonbsetValues(IntPtr s, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "concat_jsonb_jsonbset", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ConcatJsonbJsonbset(IntPtr jb, IntPtr s); + [LibraryImport(DllPath, EntryPoint = "concat_jsonbset_jsonb", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr ConcatJsonbsetJsonb(IntPtr s, IntPtr jb, [MarshalAs(UnmanagedType.U1)] bool invert); + internal static partial IntPtr ConcatJsonbsetJsonb(IntPtr s, IntPtr jb); [LibraryImport(DllPath, EntryPoint = "jsonbset_array_length", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr JsonbsetArrayLength(IntPtr set); @@ -10679,9 +10648,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tjsonb_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TjsonbIn(string str); - [LibraryImport(DllPath, EntryPoint = "tjsonb_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TjsonbOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tjsonbinst_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TjsonbinstIn(string str); @@ -10735,14 +10701,29 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tjsonb_unnest", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TjsonbUnnest(IntPtr temp, IntPtr values, IntPtr count); + [LibraryImport(DllPath, EntryPoint = "concat_jsonb_tjsonb", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ConcatJsonbTjsonb(IntPtr jb, IntPtr temp); + [LibraryImport(DllPath, EntryPoint = "concat_tjsonb_jsonb", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr ConcatTjsonbJsonb(IntPtr temp, IntPtr jb, [MarshalAs(UnmanagedType.U1)] bool invert); + internal static partial IntPtr ConcatTjsonbJsonb(IntPtr temp, IntPtr jb); [LibraryImport(DllPath, EntryPoint = "concat_tjsonb_tjsonb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr ConcatTjsonbTjsonb(IntPtr temp1, IntPtr temp2); + [LibraryImport(DllPath, EntryPoint = "contained_jsonb_tjsonb", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ContainedJsonbTjsonb(IntPtr jb, IntPtr temp); + + [LibraryImport(DllPath, EntryPoint = "contained_tjsonb_jsonb", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ContainedTjsonbJsonb(IntPtr temp, IntPtr jb); + + [LibraryImport(DllPath, EntryPoint = "contained_tjsonb_tjsonb", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ContainedTjsonbTjsonb(IntPtr temp1, IntPtr temp2); + + [LibraryImport(DllPath, EntryPoint = "contains_jsonb_tjsonb", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr ContainsJsonbTjsonb(IntPtr jb, IntPtr temp); + [LibraryImport(DllPath, EntryPoint = "contains_tjsonb_jsonb", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr ContainsTjsonbJsonb(IntPtr temp, IntPtr jb, [MarshalAs(UnmanagedType.U1)] bool invert); + internal static partial IntPtr ContainsTjsonbJsonb(IntPtr temp, IntPtr jb); [LibraryImport(DllPath, EntryPoint = "contains_tjsonb_tjsonb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr ContainsTjsonbTjsonb(IntPtr temp1, IntPtr temp2); @@ -11150,9 +11131,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "npointset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr NpointsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "npointset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr NpointsetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "npointset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr NpointsetMake(IntPtr values, int count); @@ -11213,9 +11191,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tnpoint_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TnpointFromMfjson(string mfjson); - [LibraryImport(DllPath, EntryPoint = "tnpoint_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TnpointOut(IntPtr temp, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tnpointinst_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TnpointinstMake(IntPtr np, long t); @@ -11672,9 +11647,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "pcpointset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PcpointsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "pcpointset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr PcpointsetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "pcpointset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PcpointsetMake(IntPtr values, int count); @@ -11726,9 +11698,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "pcpatchset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PcpatchsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "pcpatchset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr PcpatchsetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "pcpatchset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PcpatchsetMake(IntPtr values, int count); @@ -11795,6 +11764,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tpcbox_from_wkb", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpcboxFromWkb(IntPtr wkb, ulong size); + [LibraryImport(DllPath, EntryPoint = "tpcbox_as_text", StringMarshalling = StringMarshalling.Utf8)] + internal static partial IntPtr TpcboxAsText(IntPtr box, int maxdd, out nuint size_out); + [LibraryImport(DllPath, EntryPoint = "tpcbox_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpcboxIn(string str); @@ -12011,18 +11983,12 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tpcpoint_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpcpointIn(string str); - [LibraryImport(DllPath, EntryPoint = "tpcpoint_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TpcpointOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tpcpoint_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpcpointFromMfjson(string mfjson); [LibraryImport(DllPath, EntryPoint = "tpcpatch_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpcpatchIn(string str); - [LibraryImport(DllPath, EntryPoint = "tpcpatch_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TpcpatchOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tpcpatch_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TpcpatchFromMfjson(string mfjson); @@ -12770,9 +12736,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "poseset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PosesetIn(string str); - [LibraryImport(DllPath, EntryPoint = "poseset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr PosesetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "poseset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PosesetMake(IntPtr values, int count); @@ -13162,9 +13125,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "posechainset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PosechainsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "posechainset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr PosechainsetOut(IntPtr s, int maxdd, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "posechainset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr PosechainsetMake(IntPtr values, int count); @@ -13529,9 +13489,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "quadbinset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr QuadbinsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "quadbinset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr QuadbinsetOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "quadbinset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr QuadbinsetMake(IntPtr values, int count); @@ -13589,15 +13546,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "tquadbinseqset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TquadbinseqsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "tquadbin_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TquadbinOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "tquadbin_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TquadbinFromMfjson(string mfjson); - [LibraryImport(DllPath, EntryPoint = "tquadbin_make", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TquadbinMake(ulong value, long t); - [LibraryImport(DllPath, EntryPoint = "tquadbininst_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TquadbininstMake(ulong value, long t); @@ -14322,10 +14273,10 @@ private static partial class Native internal static partial IntPtr TrgeometryAsTinstant(IntPtr temp); [LibraryImport(DllPath, EntryPoint = "trgeometry_as_tsequence", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TrgeometryAsTsequence(IntPtr temp, string interp_str); + internal static partial IntPtr TrgeometryAsTsequence(IntPtr temp, int interp); [LibraryImport(DllPath, EntryPoint = "trgeometry_as_tsequenceset", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr TrgeometryAsTsequenceset(IntPtr temp, string interp_str); + internal static partial IntPtr TrgeometryAsTsequenceset(IntPtr temp, int interp); [LibraryImport(DllPath, EntryPoint = "trgeometry_after_timestamptz", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr TrgeometryAfterTimestamptz(IntPtr temp, long t, [MarshalAs(UnmanagedType.U1)] bool strict); @@ -14725,9 +14676,6 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "s2cellset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr S2cellsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "s2cellset_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr S2cellsetOut(IntPtr s, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "s2cellset_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr S2cellsetMake(IntPtr values, int count); @@ -14785,15 +14733,9 @@ private static partial class Native [LibraryImport(DllPath, EntryPoint = "ts2cellseqset_in", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr Ts2cellseqsetIn(string str); - [LibraryImport(DllPath, EntryPoint = "ts2cell_out", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr Ts2cellOut(IntPtr temp, out nuint size_out); - [LibraryImport(DllPath, EntryPoint = "ts2cell_from_mfjson", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr Ts2cellFromMfjson(string mfjson); - [LibraryImport(DllPath, EntryPoint = "ts2cell_make", StringMarshalling = StringMarshalling.Utf8)] - internal static partial IntPtr Ts2cellMake(ulong value, long t); - [LibraryImport(DllPath, EntryPoint = "ts2cellinst_make", StringMarshalling = StringMarshalling.Utf8)] internal static partial IntPtr Ts2cellinstMake(ulong value, long t); diff --git a/MEOS.NET/Functions/Meos.meos.g.cs b/MEOS.NET/Functions/Meos.meos.g.cs index 4b3db04..8fe891e 100644 --- a/MEOS.NET/Functions/Meos.meos.g.cs +++ b/MEOS.NET/Functions/Meos.meos.g.cs @@ -566,239 +566,52 @@ public static string MobilitydbFullVersion() public static IntPtr BigintsetIn(string str) => SafeExecution(() => Native.BigintsetIn(str)); - public static string BigintsetOut(IntPtr set) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.BigintsetOut(set, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr BigintspanExpand(IntPtr s, long value) => SafeExecution(() => Native.BigintspanExpand(s, value)); public static IntPtr BigintspanIn(string str) => SafeExecution(() => Native.BigintspanIn(str)); - public static string BigintspanOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.BigintspanOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr BigintspansetIn(string str) => SafeExecution(() => Native.BigintspansetIn(str)); - public static string BigintspansetOut(IntPtr ss) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.BigintspansetOut(ss, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr DatesetIn(string str) => SafeExecution(() => Native.DatesetIn(str)); - public static string DatesetOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.DatesetOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr DatespanIn(string str) => SafeExecution(() => Native.DatespanIn(str)); - public static string DatespanOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.DatespanOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr DatespansetIn(string str) => SafeExecution(() => Native.DatespansetIn(str)); - public static string DatespansetOut(IntPtr ss) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.DatespansetOut(ss, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr FloatsetIn(string str) => SafeExecution(() => Native.FloatsetIn(str)); - public static string FloatsetOut(IntPtr set, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.FloatsetOut(set, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr FloatspanExpand(IntPtr s, double value) => SafeExecution(() => Native.FloatspanExpand(s, value)); public static IntPtr FloatspanIn(string str) => SafeExecution(() => Native.FloatspanIn(str)); - public static string FloatspanOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.FloatspanOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr FloatspansetIn(string str) => SafeExecution(() => Native.FloatspansetIn(str)); - public static string FloatspansetOut(IntPtr ss, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.FloatspansetOut(ss, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr IntsetIn(string str) => SafeExecution(() => Native.IntsetIn(str)); - public static string IntsetOut(IntPtr set) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.IntsetOut(set, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr IntspanExpand(IntPtr s, int value) => SafeExecution(() => Native.IntspanExpand(s, value)); public static IntPtr IntspanIn(string str) => SafeExecution(() => Native.IntspanIn(str)); - public static string IntspanOut(IntPtr s) + public static IntPtr IntspansetIn(string str) + => SafeExecution(() => Native.IntspansetIn(str)); + + public static string SetAsHexwkb(IntPtr s, byte variant) { nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.IntspanOut(s, out _size)); + IntPtr _p = SafeExecution(() => Native.SetAsHexwkb(s, variant, out _size)); if (_p == IntPtr.Zero) { return null!; @@ -814,13 +627,19 @@ public static string IntspanOut(IntPtr s) } } - public static IntPtr IntspansetIn(string str) - => SafeExecution(() => Native.IntspansetIn(str)); + public static IntPtr SetAsWkb(IntPtr s, byte variant, IntPtr size_out) + => SafeExecution(() => Native.SetAsWkb(s, variant, size_out)); + + public static IntPtr SetFromHexwkb(string hexwkb) + => SafeExecution(() => Native.SetFromHexwkb(hexwkb)); + + public static IntPtr SetFromWkb(IntPtr wkb, ulong size) + => SafeExecution(() => Native.SetFromWkb(wkb, size)); - public static string IntspansetOut(IntPtr ss) + public static string SetOut(IntPtr s, int maxdd) { nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.IntspansetOut(ss, out _size)); + IntPtr _p = SafeExecution(() => Native.SetOut(s, maxdd, out _size)); if (_p == IntPtr.Zero) { return null!; @@ -836,10 +655,10 @@ public static string IntspansetOut(IntPtr ss) } } - public static string SetAsHexwkb(IntPtr s, byte variant) + public static string SpanAsHexwkb(IntPtr s, byte variant) { nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.SetAsHexwkb(s, variant, out _size)); + IntPtr _p = SafeExecution(() => Native.SpanAsHexwkb(s, variant, out _size)); if (_p == IntPtr.Zero) { return null!; @@ -855,19 +674,19 @@ public static string SetAsHexwkb(IntPtr s, byte variant) } } - public static IntPtr SetAsWkb(IntPtr s, byte variant, IntPtr size_out) - => SafeExecution(() => Native.SetAsWkb(s, variant, size_out)); + public static IntPtr SpanAsWkb(IntPtr s, byte variant, IntPtr size_out) + => SafeExecution(() => Native.SpanAsWkb(s, variant, size_out)); - public static IntPtr SetFromHexwkb(string hexwkb) - => SafeExecution(() => Native.SetFromHexwkb(hexwkb)); + public static IntPtr SpanFromHexwkb(string hexwkb) + => SafeExecution(() => Native.SpanFromHexwkb(hexwkb)); - public static IntPtr SetFromWkb(IntPtr wkb, ulong size) - => SafeExecution(() => Native.SetFromWkb(wkb, size)); + public static IntPtr SpanFromWkb(IntPtr wkb, ulong size) + => SafeExecution(() => Native.SpanFromWkb(wkb, size)); - public static string SpanAsHexwkb(IntPtr s, byte variant) + public static string SpanOut(IntPtr s, int maxdd) { nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.SpanAsHexwkb(s, variant, out _size)); + IntPtr _p = SafeExecution(() => Native.SpanOut(s, maxdd, out _size)); if (_p == IntPtr.Zero) { return null!; @@ -883,15 +702,6 @@ public static string SpanAsHexwkb(IntPtr s, byte variant) } } - public static IntPtr SpanAsWkb(IntPtr s, byte variant, IntPtr size_out) - => SafeExecution(() => Native.SpanAsWkb(s, variant, size_out)); - - public static IntPtr SpanFromHexwkb(string hexwkb) - => SafeExecution(() => Native.SpanFromHexwkb(hexwkb)); - - public static IntPtr SpanFromWkb(IntPtr wkb, ulong size) - => SafeExecution(() => Native.SpanFromWkb(wkb, size)); - public static string SpansetAsHexwkb(IntPtr ss, byte variant) { nuint _size = 0; @@ -920,13 +730,10 @@ public static IntPtr SpansetFromHexwkb(string hexwkb) public static IntPtr SpansetFromWkb(IntPtr wkb, ulong size) => SafeExecution(() => Native.SpansetFromWkb(wkb, size)); - public static IntPtr TextsetIn(string str) - => SafeExecution(() => Native.TextsetIn(str)); - - public static string TextsetOut(IntPtr set) + public static string SpansetOut(IntPtr ss, int maxdd) { nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TextsetOut(set, out _size)); + IntPtr _p = SafeExecution(() => Native.SpansetOut(ss, maxdd, out _size)); if (_p == IntPtr.Zero) { return null!; @@ -942,72 +749,18 @@ public static string TextsetOut(IntPtr set) } } + public static IntPtr TextsetIn(string str) + => SafeExecution(() => Native.TextsetIn(str)); + public static IntPtr TstzsetIn(string str) => SafeExecution(() => Native.TstzsetIn(str)); - public static string TstzsetOut(IntPtr set) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TstzsetOut(set, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TstzspanIn(string str) => SafeExecution(() => Native.TstzspanIn(str)); - public static string TstzspanOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TstzspanOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TstzspansetIn(string str) => SafeExecution(() => Native.TstzspansetIn(str)); - public static string TstzspansetOut(IntPtr ss) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TstzspansetOut(ss, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr BigintsetMake(IntPtr values, int count) => SafeExecution(() => Native.BigintsetMake(values, count)); @@ -1149,6 +902,9 @@ public static IntPtr TimestamptzToSpan(long t) public static IntPtr TimestamptzToSpanset(long t) => SafeExecution(() => Native.TimestamptzToSpanset(t)); + public static long TimestamptzToUnixUs(long t) + => SafeExecution(() => Native.TimestamptzToUnixUs(t)); + public static IntPtr TstzsetToDateset(IntPtr s) => SafeExecution(() => Native.TstzsetToDateset(s)); @@ -1158,6 +914,9 @@ public static IntPtr TstzspanToDatespan(IntPtr s) public static IntPtr TstzspansetToDatespanset(IntPtr ss) => SafeExecution(() => Native.TstzspansetToDatespanset(ss)); + public static long UnixUsToTimestamptz(long us) + => SafeExecution(() => Native.UnixUsToTimestamptz(us)); + public static long BigintsetEndValue(IntPtr s) => SafeExecution(() => Native.BigintsetEndValue(s)); @@ -3522,25 +3281,6 @@ public static IntPtr TboolFromMfjson(string str) public static IntPtr TboolIn(string str) => SafeExecution(() => Native.TboolIn(str)); - public static string TboolOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TboolOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static string TemporalAsHexwkb(IntPtr temp, byte variant) { nuint _size = 0; @@ -3597,16 +3337,10 @@ public static IntPtr TemporalFromHexwkb(string hexwkb) public static IntPtr TemporalFromWkb(IntPtr wkb, ulong size) => SafeExecution(() => Native.TemporalFromWkb(wkb, size)); - public static IntPtr TfloatFromMfjson(string str) - => SafeExecution(() => Native.TfloatFromMfjson(str)); - - public static IntPtr TfloatIn(string str) - => SafeExecution(() => Native.TfloatIn(str)); - - public static string TfloatOut(IntPtr temp, int maxdd) + public static string TemporalOut(IntPtr temp, int maxdd) { nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TfloatOut(temp, maxdd, out _size)); + IntPtr _p = SafeExecution(() => Native.TemporalOut(temp, maxdd, out _size)); if (_p == IntPtr.Zero) { return null!; @@ -3622,6 +3356,12 @@ public static string TfloatOut(IntPtr temp, int maxdd) } } + public static IntPtr TfloatFromMfjson(string str) + => SafeExecution(() => Native.TfloatFromMfjson(str)); + + public static IntPtr TfloatIn(string str) + => SafeExecution(() => Native.TfloatIn(str)); + public static IntPtr TintFromMfjson(string str) => SafeExecution(() => Native.TintFromMfjson(str)); @@ -3634,69 +3374,12 @@ public static IntPtr TintIn(string str) public static IntPtr TbigintIn(string str) => SafeExecution(() => Native.TbigintIn(str)); - public static string TintOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TintOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - - public static string TbigintOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TbigintOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TtextFromMfjson(string str) => SafeExecution(() => Native.TtextFromMfjson(str)); public static IntPtr TtextIn(string str) => SafeExecution(() => Native.TtextIn(str)); - public static string TtextOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TtextOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TboolFromBaseTemp(bool b, IntPtr temp) => SafeExecution(() => Native.TboolFromBaseTemp(b, temp)); @@ -5794,6 +5477,63 @@ public static double TemporalLcssDistance(IntPtr temp1, IntPtr temp2, double eps public static IntPtr TemporalExtKalmanFilter(IntPtr temp, double gate, double q, double variance, bool to_drop) => SafeExecution(() => Native.TemporalExtKalmanFilter(temp, gate, q, variance, to_drop)); + public static IntPtr TemporalReachabilityFilter(IntPtr temp, double maxspeed) + => SafeExecution(() => Native.TemporalReachabilityFilter(temp, maxspeed)); + + public static IntPtr TemporalReachabilityFilterTransfn(IntPtr state, IntPtr inst, double maxspeed) + => SafeExecution(() => Native.TemporalReachabilityFilterTransfn(state, inst, maxspeed)); + + public static IntPtr TemporalReachabilityFilterFinalfn(IntPtr state) + => SafeExecution(() => Native.TemporalReachabilityFilterFinalfn(state)); + + public static IntPtr[] ReachabilitystateInstants(IntPtr state) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.ReachabilitystateInstants(state, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = Marshal.ReadIntPtr(_p, _i * IntPtr.Size); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static IntPtr[] ReachabilitystateClose(IntPtr state) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.ReachabilitystateClose(state, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + IntPtr[] _out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { _out[_i] = Marshal.ReadIntPtr(_p, _i * IntPtr.Size); } + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static void ReachabilitystateFree(IntPtr state) + => SafeExecution(() => Native.ReachabilitystateFree(state)); + + public static int ReachabilitystateKept(IntPtr state) + => SafeExecution(() => Native.ReachabilitystateKept(state)); + + public static int ReachabilitystateReports(IntPtr state) + => SafeExecution(() => Native.ReachabilitystateReports(state)); + + public static int ReachabilitystateUnreachable(IntPtr state) + => SafeExecution(() => Native.ReachabilitystateUnreachable(state)); + + public static IntPtr ReachabilitystateDeserialize(IntPtr bytes, ulong size) + => SafeExecution(() => Native.ReachabilitystateDeserialize(bytes, size)); + + public static IntPtr ReachabilitystateSerialize(IntPtr state, IntPtr size_out) + => SafeExecution(() => Native.ReachabilitystateSerialize(state, size_out)); + public static IntPtr[] TemporalTimeBins(IntPtr temp, IntPtr duration, long torigin, bool border_inc) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); diff --git a/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs b/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs index d2dfa0b..06831c1 100644 --- a/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs +++ b/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs @@ -240,25 +240,6 @@ public static bool CbufferNe(IntPtr cb1, IntPtr cb2) public static IntPtr CbuffersetIn(string str) => SafeExecution(() => Native.CbuffersetIn(str)); - public static string CbuffersetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.CbuffersetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr CbuffersetMake(IntPtr values, int count) => SafeExecution(() => Native.CbuffersetMake(values, count)); diff --git a/MEOS.NET/Functions/Meos.meos_geo.g.cs b/MEOS.NET/Functions/Meos.meos_geo.g.cs index ea2fa24..e21112a 100644 --- a/MEOS.NET/Functions/Meos.meos_geo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_geo.g.cs @@ -223,30 +223,9 @@ public static double GeoPerimeter(IntPtr gs, bool spheroid) public static string? GeoTypename(int type) => Marshal.PtrToStringUTF8(SafeExecution(() => Native.GeoTypename(type))); - public static double GeogArea(IntPtr gs, bool use_spheroid) - => SafeExecution(() => Native.GeogArea(gs, use_spheroid)); - - public static IntPtr GeogCentroid(IntPtr gs, bool use_spheroid) - => SafeExecution(() => Native.GeogCentroid(gs, use_spheroid)); - - public static double GeogLength(IntPtr gs, bool use_spheroid) - => SafeExecution(() => Native.GeogLength(gs, use_spheroid)); - - public static double GeogPerimeter(IntPtr gs, bool use_spheroid) - => SafeExecution(() => Native.GeogPerimeter(gs, use_spheroid)); - public static bool GeomAzimuth(IntPtr gs1, IntPtr gs2, IntPtr result) => SafeExecution(() => Native.GeomAzimuth(gs1, gs2, result)); - public static double GeomArea(IntPtr gs) - => SafeExecution(() => Native.GeomArea(gs)); - - public static double GeomLength(IntPtr gs) - => SafeExecution(() => Native.GeomLength(gs)); - - public static double GeomPerimeter(IntPtr gs) - => SafeExecution(() => Native.GeomPerimeter(gs)); - public static int LineNumpoints(IntPtr gs) => SafeExecution(() => Native.LineNumpoints(gs)); @@ -352,9 +331,6 @@ public static IntPtr GeomBoundary(IntPtr gs) public static IntPtr GeomBuffer(IntPtr gs, double size, string @params) => SafeExecution(() => Native.GeomBuffer(gs, size, @params)); - public static IntPtr GeomCentroid(IntPtr gs) - => SafeExecution(() => Native.GeomCentroid(gs)); - public static IntPtr GeomConvexHull(IntPtr gs) => SafeExecution(() => Native.GeomConvexHull(gs)); @@ -376,9 +352,6 @@ public static IntPtr GeomMinimumBoundingRadius(IntPtr geom, IntPtr radius) public static IntPtr GeomOrientedEnvelope(IntPtr gs) => SafeExecution(() => Native.GeomOrientedEnvelope(gs)); - public static IntPtr GeomShortestline(IntPtr gs1, IntPtr gs2) - => SafeExecution(() => Native.GeomShortestline(gs1, gs2)); - public static IntPtr GeomShortestline2d(IntPtr gs1, IntPtr gs2) => SafeExecution(() => Native.GeomShortestline2d(gs1, gs2)); @@ -427,21 +400,9 @@ public static bool GeomDisjoint2d(IntPtr gs1, IntPtr gs2) public static bool GeomDwithin(IntPtr gs1, IntPtr gs2, double dist) => SafeExecution(() => Native.GeomDwithin(gs1, gs2, dist)); - public static bool GeomDwithin2d(IntPtr gs1, IntPtr gs2, double dist) - => SafeExecution(() => Native.GeomDwithin2d(gs1, gs2, dist)); - - public static bool GeomDwithin3d(IntPtr gs1, IntPtr gs2, double dist) - => SafeExecution(() => Native.GeomDwithin3d(gs1, gs2, dist)); - public static bool GeomIntersects(IntPtr gs1, IntPtr gs2) => SafeExecution(() => Native.GeomIntersects(gs1, gs2)); - public static bool GeomIntersects2d(IntPtr gs1, IntPtr gs2) - => SafeExecution(() => Native.GeomIntersects2d(gs1, gs2)); - - public static bool GeomIntersects3d(IntPtr gs1, IntPtr gs2) - => SafeExecution(() => Native.GeomIntersects3d(gs1, gs2)); - public static string GeomRelate(IntPtr gs1, IntPtr gs2) { nuint _size = 0; @@ -521,9 +482,6 @@ public static IntPtr GeoShortestline(IntPtr gs1, IntPtr gs2, bool spheroid) public static double GeogDistance(IntPtr g1, IntPtr g2, bool use_spheroid) => SafeExecution(() => Native.GeogDistance(g1, g2, use_spheroid)); - public static IntPtr GeogShortestline(IntPtr gs1, IntPtr gs2, bool use_spheroid) - => SafeExecution(() => Native.GeogShortestline(gs1, gs2, use_spheroid)); - public static double GeomDistance(IntPtr gs1, IntPtr gs2) => SafeExecution(() => Native.GeomDistance(gs1, gs2)); @@ -533,12 +491,6 @@ public static double GeomDistance2d(IntPtr gs1, IntPtr gs2) public static double GeomMaxDistance(IntPtr gs1, IntPtr gs2) => SafeExecution(() => Native.GeomMaxDistance(gs1, gs2)); - public static double GeomMaxDistance2d(IntPtr gs1, IntPtr gs2) - => SafeExecution(() => Native.GeomMaxDistance2d(gs1, gs2)); - - public static double GeomMaxDistance3d(IntPtr gs1, IntPtr gs2) - => SafeExecution(() => Native.GeomMaxDistance3d(gs1, gs2)); - public static double GeomDistance3d(IntPtr gs1, IntPtr gs2) => SafeExecution(() => Native.GeomDistance3d(gs1, gs2)); @@ -554,25 +506,6 @@ public static IntPtr GeogsetIn(string str) public static IntPtr GeomsetIn(string str) => SafeExecution(() => Native.GeomsetIn(str)); - public static string SpatialsetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.SpatialsetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static string SpatialsetAsText(IntPtr set, int maxdd) { nuint _size = 0; @@ -758,6 +691,25 @@ public static string StboxAsHexwkb(IntPtr box, byte variant) } } + public static string StboxAsText(IntPtr box, int maxdd) + { + nuint _size = 0; + IntPtr _p = SafeExecution(() => Native.StboxAsText(box, maxdd, out _size)); + if (_p == IntPtr.Zero) + { + return null!; + } + + try + { + return Marshal.PtrToStringUTF8(_p, (int)_size - 1); + } + finally + { + Marshal.FreeCoTaskMem(_p); + } + } + public static IntPtr StboxAsWkb(IntPtr box, byte variant, IntPtr size_out) => SafeExecution(() => Native.StboxAsWkb(box, variant, size_out)); @@ -1045,25 +997,6 @@ public static bool StboxNe(IntPtr box1, IntPtr box2) public static IntPtr StboxSortkey(IntPtr box, IntPtr size) => SafeExecution(() => Native.StboxSortkey(box, size)); - public static string TspatialOut(IntPtr temp, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TspatialOut(temp, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TgeogpointFromMfjson(string str) => SafeExecution(() => Native.TgeogpointFromMfjson(str)); @@ -1214,13 +1147,14 @@ public static IntPtr TgeometryToTgeompoint(IntPtr temp) public static IntPtr TgeompointToTgeometry(IntPtr temp) => SafeExecution(() => Native.TgeompointToTgeometry(temp)); - public static long[]? TpointAsMvtgeom(IntPtr temp, IntPtr bounds, int extent, int buffer, bool clip_geom, IntPtr gsarr) + public static (IntPtr, long[])? TpointAsMvtgeom(IntPtr temp, IntPtr bounds, int extent, int buffer, bool clip_geom) { IntPtr _out_timesarr = Marshal.AllocHGlobal(IntPtr.Size); IntPtr _count_count = Marshal.AllocHGlobal(sizeof(int)); try { - if (!SafeExecution(() => Native.TpointAsMvtgeom(temp, bounds, extent, buffer, clip_geom, gsarr, _out_timesarr, _count_count))) + IntPtr _value = SafeExecution(() => Native.TpointAsMvtgeom(temp, bounds, extent, buffer, clip_geom, _out_timesarr, _count_count)); + if (_value == IntPtr.Zero) { return null; } @@ -1229,7 +1163,7 @@ public static IntPtr TgeompointToTgeometry(IntPtr temp) IntPtr __out_timesarr_arr = Marshal.ReadIntPtr(_out_timesarr); long[] __out_timesarr_out = new long[_n]; Marshal.Copy(__out_timesarr_arr, __out_timesarr_out, 0, _n); - return __out_timesarr_out; + return (_value, __out_timesarr_out); } finally { @@ -1250,8 +1184,11 @@ public static IntPtr TspatialToStbox(IntPtr temp) public static bool BearingPointPoint(IntPtr gs1, IntPtr gs2, IntPtr result) => SafeExecution(() => Native.BearingPointPoint(gs1, gs2, result)); - public static IntPtr BearingTpointPoint(IntPtr temp, IntPtr gs, bool invert) - => SafeExecution(() => Native.BearingTpointPoint(temp, gs, invert)); + public static IntPtr BearingPointTpoint(IntPtr gs, IntPtr temp) + => SafeExecution(() => Native.BearingPointTpoint(gs, temp)); + + public static IntPtr BearingTpointPoint(IntPtr temp, IntPtr gs) + => SafeExecution(() => Native.BearingTpointPoint(temp, gs)); public static IntPtr BearingTpointTpoint(IntPtr temp1, IntPtr temp2) => SafeExecution(() => Native.BearingTpointTpoint(temp1, temp2)); @@ -1442,21 +1379,9 @@ public static IntPtr TgeoMinusValue(IntPtr temp, IntPtr gs) public static IntPtr TpointAtElevation(IntPtr temp, IntPtr s) => SafeExecution(() => Native.TpointAtElevation(temp, s)); - public static IntPtr TpointAtGeom(IntPtr temp, IntPtr gs) - => SafeExecution(() => Native.TpointAtGeom(temp, gs)); - - public static IntPtr TpointAtValue(IntPtr temp, IntPtr gs) - => SafeExecution(() => Native.TpointAtValue(temp, gs)); - public static IntPtr TpointMinusElevation(IntPtr temp, IntPtr s) => SafeExecution(() => Native.TpointMinusElevation(temp, s)); - public static IntPtr TpointMinusGeom(IntPtr temp, IntPtr gs) - => SafeExecution(() => Native.TpointMinusGeom(temp, gs)); - - public static IntPtr TpointMinusValue(IntPtr temp, IntPtr gs) - => SafeExecution(() => Native.TpointMinusValue(temp, gs)); - public static int AlwaysEqGeoTgeo(IntPtr gs, IntPtr temp) => SafeExecution(() => Native.AlwaysEqGeoTgeo(gs, temp)); @@ -2042,6 +1967,62 @@ public static int[] AtouchesTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, finally { Marshal.FreeHGlobal(_cnt); } } + public static int[] EcontainsTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.EcontainsTgeoarrTgeoarr(arr1, count1, arr2, count2, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + int[] _out = new int[_n]; + Marshal.Copy(_p, _out, 0, _n); + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static int[] AcontainsTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.AcontainsTgeoarrTgeoarr(arr1, count1, arr2, count2, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + int[] _out = new int[_n]; + Marshal.Copy(_p, _out, 0, _n); + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static int[] EcoversTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.EcoversTgeoarrTgeoarr(arr1, count1, arr2, count2, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + int[] _out = new int[_n]; + Marshal.Copy(_p, _out, 0, _n); + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + + public static int[] AcoversTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) + { + IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); + try + { + IntPtr _p = SafeExecution(() => Native.AcoversTgeoarrTgeoarr(arr1, count1, arr2, count2, _cnt)); + int _n = Marshal.ReadInt32(_cnt); + int[] _out = new int[_n]; + Marshal.Copy(_p, _out, 0, _n); + return _out; + } + finally { Marshal.FreeHGlobal(_cnt); } + } + public static int[] EdisjointTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) { IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int)); @@ -2139,6 +2120,52 @@ public static (int[], IntPtr[]) TtouchesTgeoarrTgeoarr(IntPtr arr1, int count1, } } + public static (int[], IntPtr[]) TcontainsTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) + { + IntPtr _count_count = Marshal.AllocHGlobal(sizeof(int)); + IntPtr _out_periods = Marshal.AllocHGlobal(IntPtr.Size); + try + { + IntPtr _resultPtr = SafeExecution(() => Native.TcontainsTgeoarrTgeoarr(arr1, count1, arr2, count2, _count_count, _out_periods)); + int _n = Marshal.ReadInt32(_count_count); + int[] _resultArr = new int[_n]; + Marshal.Copy(_resultPtr, _resultArr, 0, _n); + IntPtr __out_periods_arr = Marshal.ReadIntPtr(_out_periods); + IntPtr[] __out_periods_out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { __out_periods_out[_i] = Marshal.ReadIntPtr(__out_periods_arr, _i * IntPtr.Size); } + return (_resultArr, __out_periods_out); + } + finally + { + Marshal.FreeHGlobal(_count_count); + Marshal.FreeHGlobal(_out_periods); + } + } + + public static (int[], IntPtr[]) TcoversTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) + { + IntPtr _count_count = Marshal.AllocHGlobal(sizeof(int)); + IntPtr _out_periods = Marshal.AllocHGlobal(IntPtr.Size); + try + { + IntPtr _resultPtr = SafeExecution(() => Native.TcoversTgeoarrTgeoarr(arr1, count1, arr2, count2, _count_count, _out_periods)); + int _n = Marshal.ReadInt32(_count_count); + int[] _resultArr = new int[_n]; + Marshal.Copy(_resultPtr, _resultArr, 0, _n); + IntPtr __out_periods_arr = Marshal.ReadIntPtr(_out_periods); + IntPtr[] __out_periods_out = new IntPtr[_n]; + for (int _i = 0; _i < _n; _i++) + { __out_periods_out[_i] = Marshal.ReadIntPtr(__out_periods_arr, _i * IntPtr.Size); } + return (_resultArr, __out_periods_out); + } + finally + { + Marshal.FreeHGlobal(_count_count); + Marshal.FreeHGlobal(_out_periods); + } + } + public static (int[], IntPtr[]) TdisjointTgeoarrTgeoarr(IntPtr arr1, int count1, IntPtr arr2, int count2) { IntPtr _count_count = Marshal.AllocHGlobal(sizeof(int)); diff --git a/MEOS.NET/Functions/Meos.meos_h3.g.cs b/MEOS.NET/Functions/Meos.meos_h3.g.cs index 44e8cef..48e180f 100644 --- a/MEOS.NET/Functions/Meos.meos_h3.g.cs +++ b/MEOS.NET/Functions/Meos.meos_h3.g.cs @@ -152,31 +152,9 @@ public static IntPtr Th3indexseqIn(string str, int interp) public static IntPtr Th3indexseqsetIn(string str) => SafeExecution(() => Native.Th3indexseqsetIn(str)); - public static string Th3indexOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.Th3indexOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr Th3indexFromMfjson(string mfjson) => SafeExecution(() => Native.Th3indexFromMfjson(mfjson)); - public static IntPtr Th3indexMake(ulong value, long t) - => SafeExecution(() => Native.Th3indexMake(value, t)); - public static IntPtr Th3indexinstMake(ulong value, long t) => SafeExecution(() => Native.Th3indexinstMake(value, t)); @@ -408,25 +386,6 @@ public static IntPtr H3indexToSet(ulong cell) public static IntPtr H3indexsetIn(string str) => SafeExecution(() => Native.H3indexsetIn(str)); - public static string H3indexsetOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.H3indexsetOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr H3indexsetMake(IntPtr values, int count) => SafeExecution(() => Native.H3indexsetMake(values, count)); diff --git a/MEOS.NET/Functions/Meos.meos_internal.g.cs b/MEOS.NET/Functions/Meos.meos_internal.g.cs index 8875301..7f7d59a 100644 --- a/MEOS.NET/Functions/Meos.meos_internal.g.cs +++ b/MEOS.NET/Functions/Meos.meos_internal.g.cs @@ -57,69 +57,12 @@ public static void FloatspanRoundSet(IntPtr s, int maxdd, IntPtr result) public static IntPtr SetIn(string str, int settype) => SafeExecution(() => Native.SetIn(str, settype)); - public static string SetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.SetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr SpanIn(string str, int spantype) => SafeExecution(() => Native.SpanIn(str, spantype)); - public static string SpanOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.SpanOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr SpansetIn(string str, int spantype) => SafeExecution(() => Native.SpansetIn(str, spantype)); - public static string SpansetOut(IntPtr ss, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.SpansetOut(ss, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr SetMake(IntPtr values, int count, int basetype, bool order) => SafeExecution(() => Native.SetMake(values, count, basetype, order)); @@ -691,25 +634,6 @@ public static IntPtr TboolseqsetIn(string str) public static IntPtr TemporalIn(string str, int temptype) => SafeExecution(() => Native.TemporalIn(str, temptype)); - public static string TemporalOut(IntPtr temp, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TemporalOut(temp, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TemparrOut(IntPtr temparr, int count, int maxdd) => SafeExecution(() => Native.TemparrOut(temparr, count, maxdd)); diff --git a/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs b/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs index 83a530e..9be7b30 100644 --- a/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs @@ -18,6 +18,54 @@ public static ulong DatumGeoRound(ulong value, ulong size) public static IntPtr PointRound(IntPtr gs, int maxdd) => SafeExecution(() => Native.PointRound(gs, maxdd)); + public static IntPtr GeogCentroid(IntPtr gs, bool use_spheroid) + => SafeExecution(() => Native.GeogCentroid(gs, use_spheroid)); + + public static IntPtr GeogShortestline(IntPtr gs1, IntPtr gs2, bool use_spheroid) + => SafeExecution(() => Native.GeogShortestline(gs1, gs2, use_spheroid)); + + public static IntPtr GeomCentroid(IntPtr gs) + => SafeExecution(() => Native.GeomCentroid(gs)); + + public static IntPtr GeomShortestline(IntPtr gs1, IntPtr gs2) + => SafeExecution(() => Native.GeomShortestline(gs1, gs2)); + + public static bool GeomDwithin2d(IntPtr gs1, IntPtr gs2, double dist) + => SafeExecution(() => Native.GeomDwithin2d(gs1, gs2, dist)); + + public static bool GeomDwithin3d(IntPtr gs1, IntPtr gs2, double dist) + => SafeExecution(() => Native.GeomDwithin3d(gs1, gs2, dist)); + + public static bool GeomIntersects2d(IntPtr gs1, IntPtr gs2) + => SafeExecution(() => Native.GeomIntersects2d(gs1, gs2)); + + public static bool GeomIntersects3d(IntPtr gs1, IntPtr gs2) + => SafeExecution(() => Native.GeomIntersects3d(gs1, gs2)); + + public static double GeogArea(IntPtr gs, bool use_spheroid) + => SafeExecution(() => Native.GeogArea(gs, use_spheroid)); + + public static double GeogLength(IntPtr gs, bool use_spheroid) + => SafeExecution(() => Native.GeogLength(gs, use_spheroid)); + + public static double GeogPerimeter(IntPtr gs, bool use_spheroid) + => SafeExecution(() => Native.GeogPerimeter(gs, use_spheroid)); + + public static double GeomArea(IntPtr gs) + => SafeExecution(() => Native.GeomArea(gs)); + + public static double GeomLength(IntPtr gs) + => SafeExecution(() => Native.GeomLength(gs)); + + public static double GeomMaxDistance2d(IntPtr gs1, IntPtr gs2) + => SafeExecution(() => Native.GeomMaxDistance2d(gs1, gs2)); + + public static double GeomMaxDistance3d(IntPtr gs1, IntPtr gs2) + => SafeExecution(() => Native.GeomMaxDistance3d(gs1, gs2)); + + public static double GeomPerimeter(IntPtr gs) + => SafeExecution(() => Native.GeomPerimeter(gs)); + public static IntPtr GeoScaleGeoIntl(IntPtr gs, IntPtr scale, IntPtr sorigin) => SafeExecution(() => Native.GeoScaleGeoIntl(gs, scale, sorigin)); diff --git a/MEOS.NET/Functions/Meos.meos_json.g.cs b/MEOS.NET/Functions/Meos.meos_json.g.cs index f7dffa8..220dad8 100644 --- a/MEOS.NET/Functions/Meos.meos_json.g.cs +++ b/MEOS.NET/Functions/Meos.meos_json.g.cs @@ -478,25 +478,6 @@ public static string JsonpathOut(IntPtr jp) public static IntPtr JsonbsetIn(string str) => SafeExecution(() => Native.JsonbsetIn(str)); - public static string JsonbsetOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.JsonbsetOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr JsonbsetMake(IntPtr values, int count) => SafeExecution(() => Native.JsonbsetMake(values, count)); @@ -533,8 +514,11 @@ public static IntPtr[] JsonbsetValues(IntPtr s) finally { Marshal.FreeHGlobal(_cnt); } } - public static IntPtr ConcatJsonbsetJsonb(IntPtr s, IntPtr jb, bool invert) - => SafeExecution(() => Native.ConcatJsonbsetJsonb(s, jb, invert)); + public static IntPtr ConcatJsonbJsonbset(IntPtr jb, IntPtr s) + => SafeExecution(() => Native.ConcatJsonbJsonbset(jb, s)); + + public static IntPtr ConcatJsonbsetJsonb(IntPtr s, IntPtr jb) + => SafeExecution(() => Native.ConcatJsonbsetJsonb(s, jb)); public static IntPtr JsonbsetArrayLength(IntPtr set) => SafeExecution(() => Native.JsonbsetArrayLength(set)); @@ -740,25 +724,6 @@ public static IntPtr TjsonbFromMfjson(string str) public static IntPtr TjsonbIn(string str) => SafeExecution(() => Native.TjsonbIn(str)); - public static string TjsonbOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TjsonbOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TjsonbinstIn(string str) => SafeExecution(() => Native.TjsonbinstIn(str)); @@ -843,14 +808,29 @@ public static (IntPtr[], IntPtr[]) TjsonbUnnest(IntPtr temp) } } - public static IntPtr ConcatTjsonbJsonb(IntPtr temp, IntPtr jb, bool invert) - => SafeExecution(() => Native.ConcatTjsonbJsonb(temp, jb, invert)); + public static IntPtr ConcatJsonbTjsonb(IntPtr jb, IntPtr temp) + => SafeExecution(() => Native.ConcatJsonbTjsonb(jb, temp)); + + public static IntPtr ConcatTjsonbJsonb(IntPtr temp, IntPtr jb) + => SafeExecution(() => Native.ConcatTjsonbJsonb(temp, jb)); public static IntPtr ConcatTjsonbTjsonb(IntPtr temp1, IntPtr temp2) => SafeExecution(() => Native.ConcatTjsonbTjsonb(temp1, temp2)); - public static IntPtr ContainsTjsonbJsonb(IntPtr temp, IntPtr jb, bool invert) - => SafeExecution(() => Native.ContainsTjsonbJsonb(temp, jb, invert)); + public static IntPtr ContainedJsonbTjsonb(IntPtr jb, IntPtr temp) + => SafeExecution(() => Native.ContainedJsonbTjsonb(jb, temp)); + + public static IntPtr ContainedTjsonbJsonb(IntPtr temp, IntPtr jb) + => SafeExecution(() => Native.ContainedTjsonbJsonb(temp, jb)); + + public static IntPtr ContainedTjsonbTjsonb(IntPtr temp1, IntPtr temp2) + => SafeExecution(() => Native.ContainedTjsonbTjsonb(temp1, temp2)); + + public static IntPtr ContainsJsonbTjsonb(IntPtr jb, IntPtr temp) + => SafeExecution(() => Native.ContainsJsonbTjsonb(jb, temp)); + + public static IntPtr ContainsTjsonbJsonb(IntPtr temp, IntPtr jb) + => SafeExecution(() => Native.ContainsTjsonbJsonb(temp, jb)); public static IntPtr ContainsTjsonbTjsonb(IntPtr temp1, IntPtr temp2) => SafeExecution(() => Native.ContainsTjsonbTjsonb(temp1, temp2)); diff --git a/MEOS.NET/Functions/Meos.meos_npoint.g.cs b/MEOS.NET/Functions/Meos.meos_npoint.g.cs index 999284f..a4de5f6 100644 --- a/MEOS.NET/Functions/Meos.meos_npoint.g.cs +++ b/MEOS.NET/Functions/Meos.meos_npoint.g.cs @@ -364,25 +364,6 @@ public static bool NsegmentNe(IntPtr ns1, IntPtr ns2) public static IntPtr NpointsetIn(string str) => SafeExecution(() => Native.NpointsetIn(str)); - public static string NpointsetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.NpointsetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr NpointsetMake(IntPtr values, int count) => SafeExecution(() => Native.NpointsetMake(values, count)); @@ -452,25 +433,6 @@ public static IntPtr TnpointIn(string str) public static IntPtr TnpointFromMfjson(string mfjson) => SafeExecution(() => Native.TnpointFromMfjson(mfjson)); - public static string TnpointOut(IntPtr temp, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TnpointOut(temp, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TnpointinstMake(IntPtr np, long t) => SafeExecution(() => Native.TnpointinstMake(np, t)); diff --git a/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs b/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs index 8468df7..7274c53 100644 --- a/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs +++ b/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs @@ -265,25 +265,6 @@ public static bool PcpatchGe(IntPtr pa1, IntPtr pa2) public static IntPtr PcpointsetIn(string str) => SafeExecution(() => Native.PcpointsetIn(str)); - public static string PcpointsetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.PcpointsetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr PcpointsetMake(IntPtr values, int count) => SafeExecution(() => Native.PcpointsetMake(values, count)); @@ -344,25 +325,6 @@ public static IntPtr PcpointUnionTransfn(IntPtr state, IntPtr pt) public static IntPtr PcpatchsetIn(string str) => SafeExecution(() => Native.PcpatchsetIn(str)); - public static string PcpatchsetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.PcpatchsetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr PcpatchsetMake(IntPtr values, int count) => SafeExecution(() => Native.PcpatchsetMake(values, count)); @@ -470,6 +432,25 @@ public static IntPtr TpcboxFromHexwkb(string hexwkb) public static IntPtr TpcboxFromWkb(IntPtr wkb, ulong size) => SafeExecution(() => Native.TpcboxFromWkb(wkb, size)); + public static string TpcboxAsText(IntPtr box, int maxdd) + { + nuint _size = 0; + IntPtr _p = SafeExecution(() => Native.TpcboxAsText(box, maxdd, out _size)); + if (_p == IntPtr.Zero) + { + return null!; + } + + try + { + return Marshal.PtrToStringUTF8(_p, (int)_size - 1); + } + finally + { + Marshal.FreeCoTaskMem(_p); + } + } + public static IntPtr TpcboxIn(string str) => SafeExecution(() => Native.TpcboxIn(str)); @@ -660,50 +641,12 @@ public static bool OverafterTpcboxTpcbox(IntPtr box1, IntPtr box2) public static IntPtr TpcpointIn(string str) => SafeExecution(() => Native.TpcpointIn(str)); - public static string TpcpointOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TpcpointOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TpcpointFromMfjson(string mfjson) => SafeExecution(() => Native.TpcpointFromMfjson(mfjson)); public static IntPtr TpcpatchIn(string str) => SafeExecution(() => Native.TpcpatchIn(str)); - public static string TpcpatchOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TpcpatchOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TpcpatchFromMfjson(string mfjson) => SafeExecution(() => Native.TpcpatchFromMfjson(mfjson)); diff --git a/MEOS.NET/Functions/Meos.meos_pose.g.cs b/MEOS.NET/Functions/Meos.meos_pose.g.cs index 09efd7f..4d49307 100644 --- a/MEOS.NET/Functions/Meos.meos_pose.g.cs +++ b/MEOS.NET/Functions/Meos.meos_pose.g.cs @@ -451,25 +451,6 @@ public static bool PoseNe(IntPtr pose1, IntPtr pose2) public static IntPtr PosesetIn(string str) => SafeExecution(() => Native.PosesetIn(str)); - public static string PosesetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.PosesetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr PosesetMake(IntPtr values, int count) => SafeExecution(() => Native.PosesetMake(values, count)); @@ -1017,25 +998,6 @@ public static double DistancePosechainStbox(IntPtr pc, IntPtr box) public static IntPtr PosechainsetIn(string str) => SafeExecution(() => Native.PosechainsetIn(str)); - public static string PosechainsetOut(IntPtr s, int maxdd) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.PosechainsetOut(s, maxdd, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr PosechainsetMake(IntPtr values, int count) => SafeExecution(() => Native.PosechainsetMake(values, count)); diff --git a/MEOS.NET/Functions/Meos.meos_quadbin.g.cs b/MEOS.NET/Functions/Meos.meos_quadbin.g.cs index 6b0e167..eba71c3 100644 --- a/MEOS.NET/Functions/Meos.meos_quadbin.g.cs +++ b/MEOS.NET/Functions/Meos.meos_quadbin.g.cs @@ -249,25 +249,6 @@ public static IntPtr QuadbinsetCoverCells(IntPtr cells, int resolution) public static IntPtr QuadbinsetIn(string str) => SafeExecution(() => Native.QuadbinsetIn(str)); - public static string QuadbinsetOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.QuadbinsetOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr QuadbinsetMake(IntPtr values, int count) => SafeExecution(() => Native.QuadbinsetMake(values, count)); @@ -334,31 +315,9 @@ public static IntPtr TquadbinseqIn(string str, int interp) public static IntPtr TquadbinseqsetIn(string str) => SafeExecution(() => Native.TquadbinseqsetIn(str)); - public static string TquadbinOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.TquadbinOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr TquadbinFromMfjson(string mfjson) => SafeExecution(() => Native.TquadbinFromMfjson(mfjson)); - public static IntPtr TquadbinMake(ulong value, long t) - => SafeExecution(() => Native.TquadbinMake(value, t)); - public static IntPtr TquadbininstMake(ulong value, long t) => SafeExecution(() => Native.TquadbininstMake(value, t)); diff --git a/MEOS.NET/Functions/Meos.meos_rgeo.g.cs b/MEOS.NET/Functions/Meos.meos_rgeo.g.cs index faf46b0..8ec732d 100644 --- a/MEOS.NET/Functions/Meos.meos_rgeo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_rgeo.g.cs @@ -402,11 +402,11 @@ public static IntPtr TrgeometryTranslate(IntPtr temp, double deltax, double delt public static IntPtr TrgeometryAsTinstant(IntPtr temp) => SafeExecution(() => Native.TrgeometryAsTinstant(temp)); - public static IntPtr TrgeometryAsTsequence(IntPtr temp, string interp_str) - => SafeExecution(() => Native.TrgeometryAsTsequence(temp, interp_str)); + public static IntPtr TrgeometryAsTsequence(IntPtr temp, int interp) + => SafeExecution(() => Native.TrgeometryAsTsequence(temp, interp)); - public static IntPtr TrgeometryAsTsequenceset(IntPtr temp, string interp_str) - => SafeExecution(() => Native.TrgeometryAsTsequenceset(temp, interp_str)); + public static IntPtr TrgeometryAsTsequenceset(IntPtr temp, int interp) + => SafeExecution(() => Native.TrgeometryAsTsequenceset(temp, interp)); public static IntPtr TrgeometryAfterTimestamptz(IntPtr temp, long t, bool strict) => SafeExecution(() => Native.TrgeometryAfterTimestamptz(temp, t, strict)); diff --git a/MEOS.NET/Functions/Meos.meos_s2cell.g.cs b/MEOS.NET/Functions/Meos.meos_s2cell.g.cs index 1f3f463..4a63da5 100644 --- a/MEOS.NET/Functions/Meos.meos_s2cell.g.cs +++ b/MEOS.NET/Functions/Meos.meos_s2cell.g.cs @@ -225,25 +225,6 @@ public static IntPtr S2cellsetCoverCells(IntPtr cells, int resolution) public static IntPtr S2cellsetIn(string str) => SafeExecution(() => Native.S2cellsetIn(str)); - public static string S2cellsetOut(IntPtr s) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.S2cellsetOut(s, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr S2cellsetMake(IntPtr values, int count) => SafeExecution(() => Native.S2cellsetMake(values, count)); @@ -310,31 +291,9 @@ public static IntPtr Ts2cellseqIn(string str, int interp) public static IntPtr Ts2cellseqsetIn(string str) => SafeExecution(() => Native.Ts2cellseqsetIn(str)); - public static string Ts2cellOut(IntPtr temp) - { - nuint _size = 0; - IntPtr _p = SafeExecution(() => Native.Ts2cellOut(temp, out _size)); - if (_p == IntPtr.Zero) - { - return null!; - } - - try - { - return Marshal.PtrToStringUTF8(_p, (int)_size - 1); - } - finally - { - Marshal.FreeCoTaskMem(_p); - } - } - public static IntPtr Ts2cellFromMfjson(string mfjson) => SafeExecution(() => Native.Ts2cellFromMfjson(mfjson)); - public static IntPtr Ts2cellMake(ulong value, long t) - => SafeExecution(() => Native.Ts2cellMake(value, t)); - public static IntPtr Ts2cellinstMake(ulong value, long t) => SafeExecution(() => Native.Ts2cellinstMake(value, t)); diff --git a/MEOS.NET/Types/BigIntSet.g.cs b/MEOS.NET/Types/BigIntSet.g.cs index e64cd79..747d95e 100644 --- a/MEOS.NET/Types/BigIntSet.g.cs +++ b/MEOS.NET/Types/BigIntSet.g.cs @@ -16,10 +16,10 @@ internal BigIntSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Contained(BigIntSet s2) => Meos.ContainedSetSet(this.Ptr, s2.Ptr); @@ -63,9 +63,6 @@ public bool Left(BigIntSet s2) public Set? Minus(BigIntSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.BigintsetOut(this.Ptr); - public bool Overlaps(BigIntSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/BigIntSpan.g.cs b/MEOS.NET/Types/BigIntSpan.g.cs index d2be8ca..b10c2a8 100644 --- a/MEOS.NET/Types/BigIntSpan.g.cs +++ b/MEOS.NET/Types/BigIntSpan.g.cs @@ -14,10 +14,6 @@ public class BigIntSpan : Span { internal BigIntSpan(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(long i) => Meos.AdjacentSpanBigint(this.Ptr, i); @@ -27,8 +23,8 @@ public bool Adjacent(BigIntSpan s2) public bool Adjacent(BigIntSpanSet ss) => Meos.AdjacentSpanSpanset(this.Ptr, ss.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Span?[] Bins(long vsize, long vorigin, bool border_inc) => MEOSFactory.WrapSpanArray(Meos.BigintspanBins(this.Ptr, vsize, vorigin, border_inc)); @@ -90,9 +86,6 @@ public long Lower() public long Nad(TBox box) => Meos.NadBigintspanTbox(this.Ptr, box.Ptr); - public string Out() - => Meos.BigintspanOut(this.Ptr); - public bool Overlaps(BigIntSpan s2) => Meos.OverlapsSpanSpan(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/BigIntSpanSet.g.cs b/MEOS.NET/Types/BigIntSpanSet.g.cs index 8609c4b..ae0dc16 100644 --- a/MEOS.NET/Types/BigIntSpanSet.g.cs +++ b/MEOS.NET/Types/BigIntSpanSet.g.cs @@ -14,10 +14,6 @@ public class BigIntSpanSet : SpanSet { internal BigIntSpanSet(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(long i) => Meos.AdjacentSpansetBigint(this.Ptr, i); @@ -27,8 +23,8 @@ public bool Adjacent(BigIntSpan s) public bool Adjacent(BigIntSpanSet ss2) => Meos.AdjacentSpansetSpanset(this.Ptr, ss2.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Span?[] Bins(long vsize, long vorigin, bool border_inc) => MEOSFactory.WrapSpanArray(Meos.BigintspansetBins(this.Ptr, vsize, vorigin, border_inc)); @@ -87,9 +83,6 @@ public long Lower() public SpanSet? Minus(BigIntSpanSet ss2) => MEOSFactory.WrapSpanSet(Meos.MinusSpansetSpanset(this.Ptr, ss2.Ptr)); - public string Out() - => Meos.BigintspansetOut(this.Ptr); - public bool Overlaps(BigIntSpan s) => Meos.OverlapsSpansetSpan(this.Ptr, s.Ptr); diff --git a/MEOS.NET/Types/CBufferSet.g.cs b/MEOS.NET/Types/CBufferSet.g.cs index a6962bc..8dee147 100644 --- a/MEOS.NET/Types/CBufferSet.g.cs +++ b/MEOS.NET/Types/CBufferSet.g.cs @@ -45,9 +45,6 @@ public double Distance(CBufferSet s2) public Set? Minus(CBufferSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public new string Out(int maxdd) - => Meos.CbuffersetOut(this.Ptr, maxdd); - public bool Overlaps(CBufferSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/DateSet.g.cs b/MEOS.NET/Types/DateSet.g.cs index b7f3b3f..20c2857 100644 --- a/MEOS.NET/Types/DateSet.g.cs +++ b/MEOS.NET/Types/DateSet.g.cs @@ -16,13 +16,13 @@ internal DateSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool After(DateOnly d) => Meos.AfterSetDate(this.Ptr, MEOSConvert.ToDateADT(d)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Before(DateOnly d) => Meos.BeforeSetDate(this.Ptr, MEOSConvert.ToDateADT(d)); @@ -60,9 +60,6 @@ public bool Left(DateSet s2) public Set? Minus(DateSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.DatesetOut(this.Ptr); - public bool Overafter(DateOnly d) => Meos.OverafterSetDate(this.Ptr, MEOSConvert.ToDateADT(d)); diff --git a/MEOS.NET/Types/DateSpan.g.cs b/MEOS.NET/Types/DateSpan.g.cs index ec7100c..0d75c05 100644 --- a/MEOS.NET/Types/DateSpan.g.cs +++ b/MEOS.NET/Types/DateSpan.g.cs @@ -14,10 +14,6 @@ public class DateSpan : Span { internal DateSpan(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(DateOnly d) => Meos.AdjacentSpanDate(this.Ptr, MEOSConvert.ToDateADT(d)); @@ -30,8 +26,8 @@ public bool Adjacent(DateSpanSet ss) public bool After(DateOnly d) => Meos.AfterSpanDate(this.Ptr, MEOSConvert.ToDateADT(d)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Before(DateOnly d) => Meos.BeforeSpanDate(this.Ptr, MEOSConvert.ToDateADT(d)); @@ -101,9 +97,6 @@ public DateOnly Lower() public SpanSet? Minus(DateSpanSet ss) => MEOSFactory.WrapSpanSet(Meos.MinusSpanSpanset(this.Ptr, ss.Ptr)); - public string Out() - => Meos.DatespanOut(this.Ptr); - public bool Overafter(DateOnly d) => Meos.OverafterSpanDate(this.Ptr, MEOSConvert.ToDateADT(d)); diff --git a/MEOS.NET/Types/DateSpanSet.g.cs b/MEOS.NET/Types/DateSpanSet.g.cs index 26639ee..5ed7ee0 100644 --- a/MEOS.NET/Types/DateSpanSet.g.cs +++ b/MEOS.NET/Types/DateSpanSet.g.cs @@ -14,10 +14,6 @@ public class DateSpanSet : SpanSet { internal DateSpanSet(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(DateOnly d) => Meos.AdjacentSpansetDate(this.Ptr, MEOSConvert.ToDateADT(d)); @@ -30,8 +26,8 @@ public bool Adjacent(DateSpanSet ss2) public bool After(DateOnly d) => Meos.AfterSpansetDate(this.Ptr, MEOSConvert.ToDateADT(d)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Before(DateOnly d) => Meos.BeforeSpansetDate(this.Ptr, MEOSConvert.ToDateADT(d)); @@ -131,9 +127,6 @@ public DateOnly Lower() public int NumDates() => Meos.DatespansetNumDates(this.Ptr); - public string Out() - => Meos.DatespansetOut(this.Ptr); - public bool Overafter(DateOnly d) => Meos.OverafterSpansetDate(this.Ptr, MEOSConvert.ToDateADT(d)); diff --git a/MEOS.NET/Types/FloatSet.g.cs b/MEOS.NET/Types/FloatSet.g.cs index 304d58e..d662cfc 100644 --- a/MEOS.NET/Types/FloatSet.g.cs +++ b/MEOS.NET/Types/FloatSet.g.cs @@ -66,9 +66,6 @@ public bool Left(FloatSet s2) public Set? Minus(FloatSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out(int maxdd) - => Meos.FloatsetOut(this.Ptr, maxdd); - public bool Overlaps(FloatSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/FloatSpan.g.cs b/MEOS.NET/Types/FloatSpan.g.cs index ad77566..ee2fb8c 100644 --- a/MEOS.NET/Types/FloatSpan.g.cs +++ b/MEOS.NET/Types/FloatSpan.g.cs @@ -14,10 +14,6 @@ public class FloatSpan : Span { internal FloatSpan(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(15); - public bool Adjacent(double d) => Meos.AdjacentSpanFloat(this.Ptr, d); @@ -99,9 +95,6 @@ public double Lower() public double Nad(TBox box) => Meos.NadFloatspanTbox(this.Ptr, box.Ptr); - public string Out(int maxdd) - => Meos.FloatspanOut(this.Ptr, maxdd); - public bool Overlaps(FloatSpan s2) => Meos.OverlapsSpanSpan(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/FloatSpanSet.g.cs b/MEOS.NET/Types/FloatSpanSet.g.cs index de00a5a..089886f 100644 --- a/MEOS.NET/Types/FloatSpanSet.g.cs +++ b/MEOS.NET/Types/FloatSpanSet.g.cs @@ -14,10 +14,6 @@ public class FloatSpanSet : SpanSet { internal FloatSpanSet(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(15); - public bool Adjacent(double d) => Meos.AdjacentSpansetFloat(this.Ptr, d); @@ -96,9 +92,6 @@ public double Lower() public SpanSet? Minus(FloatSpanSet ss2) => MEOSFactory.WrapSpanSet(Meos.MinusSpansetSpanset(this.Ptr, ss2.Ptr)); - public string Out(int maxdd) - => Meos.FloatspansetOut(this.Ptr, maxdd); - public bool Overlaps(FloatSpan s) => Meos.OverlapsSpansetSpan(this.Ptr, s.Ptr); diff --git a/MEOS.NET/Types/Geo.g.cs b/MEOS.NET/Types/Geo.g.cs index cdb946d..b75b104 100644 --- a/MEOS.NET/Types/Geo.g.cs +++ b/MEOS.NET/Types/Geo.g.cs @@ -72,6 +72,27 @@ public string AsHexEWKB(string endian) public string AsText(int precision) => Meos.GeoAsText(this.Ptr, precision); + public double? Bearing(Geo gs2) + { + IntPtr _result = Marshal.AllocHGlobal(8); + try + { + if (!Meos.BearingPointPoint(this.Ptr, gs2.Ptr, _result)) + { + return null; + } + + return Marshal.PtrToStructure(_result); + } + finally + { + Marshal.FreeHGlobal(_result); + } + } + + public Temporal? Bearing(TPoint temp) + => MEOSFactory.WrapTemporal(Meos.BearingPointTpoint(this.Ptr, temp.Ptr)); + public Geo? Centroid(bool spheroid) => MEOSFactory.WrapGeo(Meos.GeoCentroid(this.Ptr, spheroid)); diff --git a/MEOS.NET/Types/Geography.g.cs b/MEOS.NET/Types/Geography.g.cs index 157c69c..a8c305a 100644 --- a/MEOS.NET/Types/Geography.g.cs +++ b/MEOS.NET/Types/Geography.g.cs @@ -44,14 +44,29 @@ public int AlwaysNe(TGeogPoint temp) public int AlwaysNe(TGeography temp) => Meos.AlwaysNeGeoTgeo(this.Ptr, temp.Ptr); - public new double Area(bool use_spheroid) - => Meos.GeogArea(this.Ptr, use_spheroid); - public string AsMFJSON(int option, int precision, string srs) => this.AsGeoJSON(option, precision, srs); - public new Geo? Centroid(bool use_spheroid) - => MEOSFactory.WrapGeo(Meos.GeogCentroid(this.Ptr, use_spheroid)); + public double? Bearing(Geography gs2) + { + IntPtr _result = Marshal.AllocHGlobal(8); + try + { + if (!Meos.BearingPointPoint(this.Ptr, gs2.Ptr, _result)) + { + return null; + } + + return Marshal.PtrToStructure(_result); + } + finally + { + Marshal.FreeHGlobal(_result); + } + } + + public Temporal? Bearing(TGeogPoint temp) + => MEOSFactory.WrapTemporal(Meos.BearingPointTpoint(this.Ptr, temp.Ptr)); public bool Contained(GeogSet s) => Meos.ContainedGeoSet(this.Ptr, s.Ptr); @@ -113,18 +128,9 @@ public int EverNe(TGeography temp) public bool Intersects(Geo gs2, bool use_spheroid) => Meos.GeogIntersects(this.Ptr, gs2.Ptr, use_spheroid); - public new double Length(bool use_spheroid) - => Meos.GeogLength(this.Ptr, use_spheroid); - public Set? Minus(GeogSet s) => MEOSFactory.WrapSet(Meos.MinusGeoSet(this.Ptr, s.Ptr)); - public new double Perimeter(bool use_spheroid) - => Meos.GeogPerimeter(this.Ptr, use_spheroid); - - public new Geo? Shortestline(Geo gs2, bool use_spheroid) - => MEOSFactory.WrapGeo(Meos.GeogShortestline(this.Ptr, gs2.Ptr, use_spheroid)); - public Temporal? Tdisjoint(TGeogPoint temp) => MEOSFactory.WrapTemporal(Meos.TdisjointGeoTgeo(this.Ptr, temp.Ptr)); diff --git a/MEOS.NET/Types/Geometry.g.cs b/MEOS.NET/Types/Geometry.g.cs index a493288..36263f7 100644 --- a/MEOS.NET/Types/Geometry.g.cs +++ b/MEOS.NET/Types/Geometry.g.cs @@ -89,9 +89,6 @@ public int AlwaysNe(TGeomPoint temp) public int AlwaysNe(TGeometry temp) => Meos.AlwaysNeGeoTgeo(this.Ptr, temp.Ptr); - public double Area() - => Meos.GeomArea(this.Ptr); - public string AsMFJSON(int option, int precision, string srs) => this.AsGeoJSON(option, precision, srs); @@ -122,15 +119,33 @@ public int Atouches(TCBuffer temp) } } + public double? Bearing(Geometry gs2) + { + IntPtr _result = Marshal.AllocHGlobal(8); + try + { + if (!Meos.BearingPointPoint(this.Ptr, gs2.Ptr, _result)) + { + return null; + } + + return Marshal.PtrToStructure(_result); + } + finally + { + Marshal.FreeHGlobal(_result); + } + } + + public Temporal? Bearing(TGeomPoint temp) + => MEOSFactory.WrapTemporal(Meos.BearingPointTpoint(this.Ptr, temp.Ptr)); + public Geo? Boundary() => MEOSFactory.WrapGeo(Meos.GeomBoundary(this.Ptr)); public Geo? Buffer(double size, string @params) => MEOSFactory.WrapGeo(Meos.GeomBuffer(this.Ptr, size, @params)); - public Geo? Centroid() - => MEOSFactory.WrapGeo(Meos.GeomCentroid(this.Ptr)); - public bool Contained(GeomSet s) => Meos.ContainedGeoSet(this.Ptr, s.Ptr); @@ -164,12 +179,6 @@ public double Distance3d(Geo gs2) public bool Dwithin(Geo gs2, double dist) => Meos.GeomDwithin(this.Ptr, gs2.Ptr, dist); - public bool Dwithin2d(Geo gs2, double dist) - => Meos.GeomDwithin2d(this.Ptr, gs2.Ptr, dist); - - public bool Dwithin3d(Geo gs2, double dist) - => Meos.GeomDwithin3d(this.Ptr, gs2.Ptr, dist); - public int Econtains(TGeo temp) => Meos.EcontainsGeoTgeo(this.Ptr, temp.Ptr); @@ -290,27 +299,12 @@ public int EverNe(TGeometry temp) public bool Intersects(Geo gs2) => Meos.GeomIntersects(this.Ptr, gs2.Ptr); - public bool Intersects2d(Geo gs2) - => Meos.GeomIntersects2d(this.Ptr, gs2.Ptr); - - public bool Intersects3d(Geo gs2) - => Meos.GeomIntersects3d(this.Ptr, gs2.Ptr); - public bool IsSimple() => Meos.GeomIsSimple(this.Ptr); - public double Length() - => Meos.GeomLength(this.Ptr); - public double MaxDistance(Geo gs2) => Meos.GeomMaxDistance(this.Ptr, gs2.Ptr); - public double MaxDistance2d(Geo gs2) - => Meos.GeomMaxDistance2d(this.Ptr, gs2.Ptr); - - public double MaxDistance3d(Geo gs2) - => Meos.GeomMaxDistance3d(this.Ptr, gs2.Ptr); - public (Geo?, double) MinimumBoundingRadius() { IntPtr _radius = Marshal.AllocHGlobal(8); @@ -332,18 +326,12 @@ public double MaxDistance3d(Geo gs2) public Geo? OrientedEnvelope() => MEOSFactory.WrapGeo(Meos.GeomOrientedEnvelope(this.Ptr)); - public double Perimeter() - => Meos.GeomPerimeter(this.Ptr); - public string Relate(Geo gs2) => Meos.GeomRelate(this.Ptr, gs2.Ptr); public bool RelatePattern(Geo gs2, string patt) => Meos.GeomRelatePattern(this.Ptr, gs2.Ptr, patt); - public Geo? Shortestline(Geo gs2) - => MEOSFactory.WrapGeo(Meos.GeomShortestline(this.Ptr, gs2.Ptr)); - public Geo? Shortestline2d(Geo gs2) => MEOSFactory.WrapGeo(Meos.GeomShortestline2d(this.Ptr, gs2.Ptr)); diff --git a/MEOS.NET/Types/H3IndexSet.g.cs b/MEOS.NET/Types/H3IndexSet.g.cs index bf3d62f..e90f151 100644 --- a/MEOS.NET/Types/H3IndexSet.g.cs +++ b/MEOS.NET/Types/H3IndexSet.g.cs @@ -16,7 +16,7 @@ internal H3IndexSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Contained(H3IndexSet s2) => Meos.ContainedSetSet(this.Ptr, s2.Ptr); @@ -51,9 +51,6 @@ public int EverEq(TH3Index th3idx) public Set? Minus(H3IndexSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.H3indexsetOut(this.Ptr); - public bool Overlaps(H3IndexSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/IntSet.g.cs b/MEOS.NET/Types/IntSet.g.cs index fb9ffe0..d44011e 100644 --- a/MEOS.NET/Types/IntSet.g.cs +++ b/MEOS.NET/Types/IntSet.g.cs @@ -16,10 +16,10 @@ internal IntSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Contained(IntSet s2) => Meos.ContainedSetSet(this.Ptr, s2.Ptr); @@ -57,9 +57,6 @@ public bool Left(IntSet s2) public Set? Minus(IntSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.IntsetOut(this.Ptr); - public bool Overlaps(IntSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/IntSpan.g.cs b/MEOS.NET/Types/IntSpan.g.cs index 09cbe6e..fcb7bd2 100644 --- a/MEOS.NET/Types/IntSpan.g.cs +++ b/MEOS.NET/Types/IntSpan.g.cs @@ -14,10 +14,6 @@ public class IntSpan : Span { internal IntSpan(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(int i) => Meos.AdjacentSpanInt(this.Ptr, i); @@ -27,8 +23,8 @@ public bool Adjacent(IntSpan s2) public bool Adjacent(IntSpanSet ss) => Meos.AdjacentSpanSpanset(this.Ptr, ss.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Span?[] Bins(int vsize, int vorigin, bool border_inc) => MEOSFactory.WrapSpanArray(Meos.IntspanBins(this.Ptr, vsize, vorigin, border_inc)); @@ -90,9 +86,6 @@ public int Lower() public int Nad(TBox box) => Meos.NadIntspanTbox(this.Ptr, box.Ptr); - public string Out() - => Meos.IntspanOut(this.Ptr); - public bool Overlaps(IntSpan s2) => Meos.OverlapsSpanSpan(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/IntSpanSet.g.cs b/MEOS.NET/Types/IntSpanSet.g.cs index 24b03e1..a2032d3 100644 --- a/MEOS.NET/Types/IntSpanSet.g.cs +++ b/MEOS.NET/Types/IntSpanSet.g.cs @@ -14,10 +14,6 @@ public class IntSpanSet : SpanSet { internal IntSpanSet(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(int i) => Meos.AdjacentSpansetInt(this.Ptr, i); @@ -27,8 +23,8 @@ public bool Adjacent(IntSpan s) public bool Adjacent(IntSpanSet ss2) => Meos.AdjacentSpansetSpanset(this.Ptr, ss2.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Span?[] Bins(int vsize, int vorigin, bool border_inc) => MEOSFactory.WrapSpanArray(Meos.IntspansetBins(this.Ptr, vsize, vorigin, border_inc)); @@ -87,9 +83,6 @@ public int Lower() public SpanSet? Minus(IntSpanSet ss2) => MEOSFactory.WrapSpanSet(Meos.MinusSpansetSpanset(this.Ptr, ss2.Ptr)); - public string Out() - => Meos.IntspansetOut(this.Ptr); - public bool Overlaps(IntSpan s) => Meos.OverlapsSpansetSpan(this.Ptr, s.Ptr); diff --git a/MEOS.NET/Types/Jsonb.g.cs b/MEOS.NET/Types/Jsonb.g.cs index 223b927..d5513bf 100644 --- a/MEOS.NET/Types/Jsonb.g.cs +++ b/MEOS.NET/Types/Jsonb.g.cs @@ -285,6 +285,9 @@ public bool PathMatch(JsonPath jp, Jsonb vars, bool silent, bool tz) } } + public Set? SetConcat(JsonbSet s) + => MEOSFactory.WrapSet(Meos.ConcatJsonbJsonbset(this.Ptr, s.Ptr)); + public Jsonb? SetLax(Text[] path_elems, Jsonb newjb, bool create, Text handle_null) { IntPtr[] _path_elemsValues = new IntPtr[path_elems.Length]; @@ -307,9 +310,18 @@ public bool PathMatch(JsonPath jp, Jsonb vars, bool silent, bool tz) public Jsonb? StripNulls(bool strip_in_arrays) => MEOSFactory.WrapJsonb(Meos.JsonbStripNulls(this.Ptr, strip_in_arrays)); + public Temporal? TConcat(TJsonb temp) + => MEOSFactory.WrapTemporal(Meos.ConcatJsonbTjsonb(this.Ptr, temp.Ptr)); + public Temporal? Teq(TJsonb temp) => MEOSFactory.WrapTemporal(Meos.TeqJsonbTjsonb(this.Ptr, temp.Ptr)); + public Temporal? TjsonbContained(TJsonb temp) + => MEOSFactory.WrapTemporal(Meos.ContainedJsonbTjsonb(this.Ptr, temp.Ptr)); + + public Temporal? TjsonbContains(TJsonb temp) + => MEOSFactory.WrapTemporal(Meos.ContainsJsonbTjsonb(this.Ptr, temp.Ptr)); + public Temporal? Tne(TJsonb temp) => MEOSFactory.WrapTemporal(Meos.TneJsonbTjsonb(this.Ptr, temp.Ptr)); diff --git a/MEOS.NET/Types/JsonbSet.g.cs b/MEOS.NET/Types/JsonbSet.g.cs index 0075e81..fd02b8c 100644 --- a/MEOS.NET/Types/JsonbSet.g.cs +++ b/MEOS.NET/Types/JsonbSet.g.cs @@ -16,7 +16,7 @@ internal JsonbSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public Set? ArrayElement(int idx, string null_handle) => MEOSFactory.WrapSet(Meos.JsonbsetArrayElement(this.Ptr, idx, Meos.NullhandletypeFromString(null_handle))); @@ -27,11 +27,11 @@ public override string ToString() public Set? ArrayLength() => MEOSFactory.WrapSet(Meos.JsonbsetArrayLength(this.Ptr)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); - public Set? Concat(Jsonb jb, bool invert) - => MEOSFactory.WrapSet(Meos.ConcatJsonbsetJsonb(this.Ptr, jb.Ptr, invert)); + public Set? Concat(Jsonb jb) + => MEOSFactory.WrapSet(Meos.ConcatJsonbsetJsonb(this.Ptr, jb.Ptr)); public bool Contained(JsonbSet s2) => Meos.ContainedSetSet(this.Ptr, s2.Ptr); @@ -186,9 +186,6 @@ public bool[] ExistsArray(Text[] keys, bool any) public Set? ObjectFieldText(Text key, string null_handle) => MEOSFactory.WrapSet(Meos.JsonbsetObjectFieldText(this.Ptr, key.Ptr, Meos.NullhandletypeFromString(null_handle))); - public string Out() - => Meos.JsonbsetOut(this.Ptr); - public bool Overlaps(JsonbSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/NPointSet.g.cs b/MEOS.NET/Types/NPointSet.g.cs index 4ce3ca4..de7bcf7 100644 --- a/MEOS.NET/Types/NPointSet.g.cs +++ b/MEOS.NET/Types/NPointSet.g.cs @@ -45,9 +45,6 @@ public double Distance(NPointSet s2) public Set? Minus(NPointSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public new string Out(int maxdd) - => Meos.NpointsetOut(this.Ptr, maxdd); - public bool Overlaps(NPointSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/PCPatchSet.g.cs b/MEOS.NET/Types/PCPatchSet.g.cs index 4b6bb79..2fd752b 100644 --- a/MEOS.NET/Types/PCPatchSet.g.cs +++ b/MEOS.NET/Types/PCPatchSet.g.cs @@ -42,9 +42,6 @@ public bool Contains(PCPatchSet s2) public Set? Minus(PCPatchSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public new string Out(int maxdd) - => Meos.PcpatchsetOut(this.Ptr, maxdd); - public bool Overlaps(PCPatchSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/PCPointSet.g.cs b/MEOS.NET/Types/PCPointSet.g.cs index eda7571..55b219a 100644 --- a/MEOS.NET/Types/PCPointSet.g.cs +++ b/MEOS.NET/Types/PCPointSet.g.cs @@ -42,9 +42,6 @@ public bool Contains(PCPointSet s2) public Set? Minus(PCPointSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public new string Out(int maxdd) - => Meos.PcpointsetOut(this.Ptr, maxdd); - public bool Overlaps(PCPointSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/PoseChainSet.g.cs b/MEOS.NET/Types/PoseChainSet.g.cs index ce8708d..7f7fa03 100644 --- a/MEOS.NET/Types/PoseChainSet.g.cs +++ b/MEOS.NET/Types/PoseChainSet.g.cs @@ -45,9 +45,6 @@ public double Distance(PoseChainSet s2) public Set? Minus(PoseChainSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public new string Out(int maxdd) - => Meos.PosechainsetOut(this.Ptr, maxdd); - public bool Overlaps(PoseChainSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/PoseSet.g.cs b/MEOS.NET/Types/PoseSet.g.cs index 1a1cf24..26610f1 100644 --- a/MEOS.NET/Types/PoseSet.g.cs +++ b/MEOS.NET/Types/PoseSet.g.cs @@ -45,9 +45,6 @@ public double Distance(PoseSet s2) public Set? Minus(PoseSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public new string Out(int maxdd) - => Meos.PosesetOut(this.Ptr, maxdd); - public bool Overlaps(PoseSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/QuadbinSet.g.cs b/MEOS.NET/Types/QuadbinSet.g.cs index 17ff31f..0e17560 100644 --- a/MEOS.NET/Types/QuadbinSet.g.cs +++ b/MEOS.NET/Types/QuadbinSet.g.cs @@ -16,7 +16,7 @@ internal QuadbinSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public Set? CompactCells() => MEOSFactory.WrapSet(Meos.QuadbinsetCompactCells(this.Ptr)); @@ -54,9 +54,6 @@ public int EverEq(TQuadbin tqb) public Set? Minus(QuadbinSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.QuadbinsetOut(this.Ptr); - public bool Overlaps(QuadbinSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/S2CellSet.g.cs b/MEOS.NET/Types/S2CellSet.g.cs index 0bebd7b..4cad03b 100644 --- a/MEOS.NET/Types/S2CellSet.g.cs +++ b/MEOS.NET/Types/S2CellSet.g.cs @@ -16,7 +16,7 @@ internal S2CellSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public Set? CompactCells() => MEOSFactory.WrapSet(Meos.S2cellsetCompactCells(this.Ptr)); @@ -51,9 +51,6 @@ public int EverEq(TS2Cell temp) public Set? Minus(S2CellSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.S2cellsetOut(this.Ptr); - public bool Overlaps(S2CellSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/STBox.g.cs b/MEOS.NET/Types/STBox.g.cs index ef6053c..398653e 100644 --- a/MEOS.NET/Types/STBox.g.cs +++ b/MEOS.NET/Types/STBox.g.cs @@ -16,7 +16,7 @@ internal STBox(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(15); + => this.AsText(15); public bool Above(STBox box2) => Meos.AboveStboxStbox(this.Ptr, box2.Ptr); @@ -162,6 +162,9 @@ public double Area(bool spheroid) } } + public string AsEWKT(int maxdd) + => this.Out(maxdd); + public string AsHexEWKB(byte variant) => Meos.StboxAsHexewkb(this.Ptr, variant); @@ -169,7 +172,7 @@ public string AsHexWKB(byte variant) => Meos.StboxAsHexwkb(this.Ptr, variant); public string AsText(int maxdd) - => this.Out(maxdd); + => Meos.StboxAsText(this.Ptr, maxdd); public byte[]? AsWKB(byte variant) { @@ -1247,6 +1250,9 @@ public double Volume() public static STBox? FromEWKB(byte[] wkb) => STBox.FromWKB(wkb); + public static STBox? FromEWKT(string str) + => STBox.In(str); + public static STBox? FromGbox(GBOX box) { IntPtr _box = Marshal.AllocHGlobal(Marshal.SizeOf()); diff --git a/MEOS.NET/Types/Set.g.cs b/MEOS.NET/Types/Set.g.cs index 187d83b..90fae03 100644 --- a/MEOS.NET/Types/Set.g.cs +++ b/MEOS.NET/Types/Set.g.cs @@ -89,6 +89,9 @@ public bool Ne(Set s2) public int NumValues() => Meos.SetNumValues(this.Ptr); + public string Out(int maxdd) + => Meos.SetOut(this.Ptr, maxdd); + public bool Overlaps(Set s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/Span.g.cs b/MEOS.NET/Types/Span.g.cs index dc0e10a..296e7b0 100644 --- a/MEOS.NET/Types/Span.g.cs +++ b/MEOS.NET/Types/Span.g.cs @@ -14,6 +14,10 @@ public class Span : Collection { internal Span(IntPtr ptr) : base(ptr) { } + /// The text MEOS writes this value as. + public override string ToString() + => this.Out(15); + public bool Adjacent(Span s2) => Meos.AdjacentSpanSpan(this.Ptr, s2.Ptr); @@ -107,6 +111,9 @@ public bool Lt(Span s2) public bool Ne(Span s2) => Meos.SpanNe(this.Ptr, s2.Ptr); + public string Out(int maxdd) + => Meos.SpanOut(this.Ptr, maxdd); + public bool Overlaps(Span s2) => Meos.OverlapsSpanSpan(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/SpanSet.g.cs b/MEOS.NET/Types/SpanSet.g.cs index 641dbed..430a1ad 100644 --- a/MEOS.NET/Types/SpanSet.g.cs +++ b/MEOS.NET/Types/SpanSet.g.cs @@ -14,6 +14,10 @@ public class SpanSet : Collection { internal SpanSet(IntPtr ptr) : base(ptr) { } + /// The text MEOS writes this value as. + public override string ToString() + => this.Out(15); + public bool Adjacent(Span s) => Meos.AdjacentSpansetSpan(this.Ptr, s.Ptr); @@ -116,6 +120,9 @@ public bool Ne(SpanSet ss2) public int NumSpans() => Meos.SpansetNumSpans(this.Ptr); + public string Out(int maxdd) + => Meos.SpansetOut(this.Ptr, maxdd); + public bool Overlaps(Span s) => Meos.OverlapsSpansetSpan(this.Ptr, s.Ptr); diff --git a/MEOS.NET/Types/SpatialSet.g.cs b/MEOS.NET/Types/SpatialSet.g.cs index 0f95c23..189bb32 100644 --- a/MEOS.NET/Types/SpatialSet.g.cs +++ b/MEOS.NET/Types/SpatialSet.g.cs @@ -44,9 +44,6 @@ public string AsHexEWKB(byte variant) public string AsText(int maxdd) => Meos.SpatialsetAsText(this.Ptr, maxdd); - public string Out(int maxdd) - => Meos.SpatialsetOut(this.Ptr, maxdd); - public int SRID() => Meos.SpatialsetSrid(this.Ptr); diff --git a/MEOS.NET/Types/TBigInt.g.cs b/MEOS.NET/Types/TBigInt.g.cs index 14cef1e..ed92486 100644 --- a/MEOS.NET/Types/TBigInt.g.cs +++ b/MEOS.NET/Types/TBigInt.g.cs @@ -16,7 +16,7 @@ internal TBigInt(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public Temporal? Add(long i) => MEOSFactory.WrapTemporal(Meos.AddTbigintBigint(this.Ptr, i)); @@ -69,8 +69,8 @@ public int AlwaysNe(long i) public int AlwaysNe(TBigInt temp2) => Meos.AlwaysNeTemporalTemporal(this.Ptr, temp2.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Temporal? AtValue(long i) => MEOSFactory.WrapTemporal(Meos.TbigintAtValue(this.Ptr, i)); @@ -168,9 +168,6 @@ public long Nad(TBox box) public long Nad(TBigInt temp2) => Meos.NadTbigintTbigint(this.Ptr, temp2.Ptr); - public string Out() - => Meos.TbigintOut(this.Ptr); - public bool Overafter(TBigInt temp2) => Meos.OverafterTnumberTnumber(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TBool.g.cs b/MEOS.NET/Types/TBool.g.cs index 526d837..3e06c5f 100644 --- a/MEOS.NET/Types/TBool.g.cs +++ b/MEOS.NET/Types/TBool.g.cs @@ -16,7 +16,7 @@ internal TBool(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Adjacent(TBool temp2) => Meos.AdjacentTemporalTemporal(this.Ptr, temp2.Ptr); @@ -36,8 +36,8 @@ public int AlwaysNe(bool b) public int AlwaysNe(TBool temp2) => Meos.AlwaysNeTemporalTemporal(this.Ptr, temp2.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Temporal? AtValue(bool b) => MEOSFactory.WrapTemporal(Meos.TboolAtValue(this.Ptr, b)); @@ -69,9 +69,6 @@ public int EverNe(TBool temp2) public Temporal? MinusValue(bool b) => MEOSFactory.WrapTemporal(Meos.TboolMinusValue(this.Ptr, b)); - public string Out() - => Meos.TboolOut(this.Ptr); - public bool Overafter(TBool temp2) => Meos.OverafterTemporalTemporal(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TFloat.g.cs b/MEOS.NET/Types/TFloat.g.cs index deaef4a..84a5bb2 100644 --- a/MEOS.NET/Types/TFloat.g.cs +++ b/MEOS.NET/Types/TFloat.g.cs @@ -189,9 +189,6 @@ public double Nad(TFloat temp2) public double Nad(TBox box) => Meos.NadTfloatTbox(this.Ptr, box.Ptr); - public string Out(int maxdd) - => Meos.TfloatOut(this.Ptr, maxdd); - public bool Overafter(TFloat temp2) => Meos.OverafterTnumberTnumber(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TGeogPoint.g.cs b/MEOS.NET/Types/TGeogPoint.g.cs index fc38cc7..ce288a7 100644 --- a/MEOS.NET/Types/TGeogPoint.g.cs +++ b/MEOS.NET/Types/TGeogPoint.g.cs @@ -54,8 +54,8 @@ public int AlwaysNe(Geography gs) public int AlwaysNe(TGeogPoint temp2) => Meos.AlwaysNeTgeoTgeo(this.Ptr, temp2.Ptr); - public Temporal? Bearing(Geography gs, bool invert) - => MEOSFactory.WrapTemporal(Meos.BearingTpointPoint(this.Ptr, gs.Ptr, invert)); + public Temporal? Bearing(Geography gs) + => MEOSFactory.WrapTemporal(Meos.BearingTpointPoint(this.Ptr, gs.Ptr)); public bool Before(TGeogPoint temp2) => Meos.BeforeTspatialTspatial(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TGeomPoint.g.cs b/MEOS.NET/Types/TGeomPoint.g.cs index b5ae83b..1c3ca8b 100644 --- a/MEOS.NET/Types/TGeomPoint.g.cs +++ b/MEOS.NET/Types/TGeomPoint.g.cs @@ -66,8 +66,8 @@ public bool Back(TGeomPoint temp2) public Temporal? Bearing(TGeomPoint temp2) => MEOSFactory.WrapTemporal(Meos.BearingTpointTpoint(this.Ptr, temp2.Ptr)); - public Temporal? Bearing(Geometry gs, bool invert) - => MEOSFactory.WrapTemporal(Meos.BearingTpointPoint(this.Ptr, gs.Ptr, invert)); + public Temporal? Bearing(Geometry gs) + => MEOSFactory.WrapTemporal(Meos.BearingTpointPoint(this.Ptr, gs.Ptr)); public bool Before(TGeomPoint temp2) => Meos.BeforeTspatialTspatial(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TH3Index.g.cs b/MEOS.NET/Types/TH3Index.g.cs index 82d2085..7a99cfe 100644 --- a/MEOS.NET/Types/TH3Index.g.cs +++ b/MEOS.NET/Types/TH3Index.g.cs @@ -16,7 +16,7 @@ internal TH3Index(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Above(TH3Index temp2) => Meos.AboveTspatialTspatial(this.Ptr, temp2.Ptr); @@ -138,9 +138,6 @@ public bool Left(TH3Index temp2) public Temporal? MinusValue(ulong cell) => MEOSFactory.WrapTemporal(Meos.Th3indexMinusValue(this.Ptr, cell)); - public string Out() - => Meos.Th3indexOut(this.Ptr); - public bool Overabove(TH3Index temp2) => Meos.OveraboveTspatialTspatial(this.Ptr, temp2.Ptr); @@ -283,8 +280,5 @@ public ulong[] Values() public static Temporal? In(string str) => MEOSFactory.WrapTemporal(Meos.Th3indexIn(str)); - public static Temporal? Make(ulong value, DateTime t) - => MEOSFactory.WrapTemporal(Meos.Th3indexMake(value, MEOSConvert.ToTimestampTz(t))); - } } diff --git a/MEOS.NET/Types/TH3IndexInst.g.cs b/MEOS.NET/Types/TH3IndexInst.g.cs index cfff329..7cdf3a4 100644 --- a/MEOS.NET/Types/TH3IndexInst.g.cs +++ b/MEOS.NET/Types/TH3IndexInst.g.cs @@ -14,7 +14,7 @@ public class TH3IndexInst : TH3Index { internal TH3IndexInst(IntPtr ptr) : base(ptr) { } - public new static Temporal? Make(ulong value, DateTime t) + public static Temporal? Make(ulong value, DateTime t) => MEOSFactory.WrapTemporal(Meos.Th3indexinstMake(value, MEOSConvert.ToTimestampTz(t))); } diff --git a/MEOS.NET/Types/TInt.g.cs b/MEOS.NET/Types/TInt.g.cs index 8540671..e88bc1f 100644 --- a/MEOS.NET/Types/TInt.g.cs +++ b/MEOS.NET/Types/TInt.g.cs @@ -16,7 +16,7 @@ internal TInt(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public Temporal? Add(int i) => MEOSFactory.WrapTemporal(Meos.AddTintInt(this.Ptr, i)); @@ -69,8 +69,8 @@ public int AlwaysNe(int i) public int AlwaysNe(TInt temp2) => Meos.AlwaysNeTemporalTemporal(this.Ptr, temp2.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Temporal? AtValue(int i) => MEOSFactory.WrapTemporal(Meos.TintAtValue(this.Ptr, i)); @@ -168,9 +168,6 @@ public int Nad(TBox box) public int Nad(TInt temp2) => Meos.NadTintTint(this.Ptr, temp2.Ptr); - public string Out() - => Meos.TintOut(this.Ptr); - public bool Overafter(TInt temp2) => Meos.OverafterTnumberTnumber(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TJsonb.g.cs b/MEOS.NET/Types/TJsonb.g.cs index 9e1fe16..00738a3 100644 --- a/MEOS.NET/Types/TJsonb.g.cs +++ b/MEOS.NET/Types/TJsonb.g.cs @@ -16,7 +16,7 @@ internal TJsonb(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Adjacent(TJsonb temp2) => Meos.AdjacentTemporalTemporal(this.Ptr, temp2.Ptr); @@ -45,8 +45,8 @@ public int AlwaysNe(TJsonb temp2) public Temporal? ArrayLength() => MEOSFactory.WrapTemporal(Meos.TjsonbArrayLength(this.Ptr)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Temporal? AtValue(Jsonb jsb) => MEOSFactory.WrapTemporal(Meos.TjsonbAtValue(this.Ptr, jsb.Ptr)); @@ -54,8 +54,8 @@ public string AsText() public bool Before(TJsonb temp2) => Meos.BeforeTemporalTemporal(this.Ptr, temp2.Ptr); - public Temporal? Concat(Jsonb jb, bool invert) - => MEOSFactory.WrapTemporal(Meos.ConcatTjsonbJsonb(this.Ptr, jb.Ptr, invert)); + public Temporal? Concat(Jsonb jb) + => MEOSFactory.WrapTemporal(Meos.ConcatTjsonbJsonb(this.Ptr, jb.Ptr)); public Temporal? Concat(TJsonb temp2) => MEOSFactory.WrapTemporal(Meos.ConcatTjsonbTjsonb(this.Ptr, temp2.Ptr)); @@ -63,11 +63,8 @@ public bool Before(TJsonb temp2) public bool Contained(TJsonb temp2) => Meos.ContainedTemporalTemporal(this.Ptr, temp2.Ptr); - public Temporal? Contains(Jsonb jb, bool invert) - => MEOSFactory.WrapTemporal(Meos.ContainsTjsonbJsonb(this.Ptr, jb.Ptr, invert)); - - public Temporal? Contains(TJsonb temp2) - => MEOSFactory.WrapTemporal(Meos.ContainsTjsonbTjsonb(this.Ptr, temp2.Ptr)); + public bool Contains(TJsonb temp2) + => Meos.ContainsTemporalTemporal(this.Ptr, temp2.Ptr); public Temporal? Delete(Text key) => MEOSFactory.WrapTemporal(Meos.TjsonbDelete(this.Ptr, key.Ptr)); @@ -254,9 +251,6 @@ public int EverNe(TJsonb temp2) public Temporal? ObjectFieldText(Text key, string null_handle) => MEOSFactory.WrapTemporal(Meos.TjsonbObjectFieldText(this.Ptr, key.Ptr, Meos.NullhandletypeFromString(null_handle))); - public string Out() - => Meos.TjsonbOut(this.Ptr); - public bool Overafter(TJsonb temp2) => Meos.OverafterTemporalTemporal(this.Ptr, temp2.Ptr); @@ -334,6 +328,18 @@ public bool Same(TJsonb temp2) public Temporal? Teq(TJsonb temp2) => MEOSFactory.WrapTemporal(Meos.TeqTemporalTemporal(this.Ptr, temp2.Ptr)); + public Temporal? TjsonbContained(Jsonb jb) + => MEOSFactory.WrapTemporal(Meos.ContainedTjsonbJsonb(this.Ptr, jb.Ptr)); + + public Temporal? TjsonbContained(TJsonb temp2) + => MEOSFactory.WrapTemporal(Meos.ContainedTjsonbTjsonb(this.Ptr, temp2.Ptr)); + + public Temporal? TjsonbContains(Jsonb jb) + => MEOSFactory.WrapTemporal(Meos.ContainsTjsonbJsonb(this.Ptr, jb.Ptr)); + + public Temporal? TjsonbContains(TJsonb temp2) + => MEOSFactory.WrapTemporal(Meos.ContainsTjsonbTjsonb(this.Ptr, temp2.Ptr)); + public Temporal? Tne(Jsonb jb) => MEOSFactory.WrapTemporal(Meos.TneTjsonbJsonb(this.Ptr, jb.Ptr)); diff --git a/MEOS.NET/Types/TNPoint.g.cs b/MEOS.NET/Types/TNPoint.g.cs index 15ebee3..4132a1e 100644 --- a/MEOS.NET/Types/TNPoint.g.cs +++ b/MEOS.NET/Types/TNPoint.g.cs @@ -150,9 +150,6 @@ public double Nad(TNPoint temp2) public Temporal? Nai(TNPoint temp2) => MEOSFactory.WrapTemporal(Meos.NaiTnpointTnpoint(this.Ptr, temp2.Ptr)); - public new string Out(int maxdd) - => Meos.TnpointOut(this.Ptr, maxdd); - public bool Overabove(TNPoint temp2) => Meos.OveraboveTspatialTspatial(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/TPCBox.g.cs b/MEOS.NET/Types/TPCBox.g.cs index 614faac..99ae23e 100644 --- a/MEOS.NET/Types/TPCBox.g.cs +++ b/MEOS.NET/Types/TPCBox.g.cs @@ -16,7 +16,7 @@ internal TPCBox(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(15); + => this.AsText(15); public bool Above(TPCBox box2) => Meos.AboveTpcboxTpcbox(this.Ptr, box2.Ptr); @@ -75,6 +75,9 @@ public bool After(TPCPoint temp) } } + public string AsEWKT(int maxdd) + => this.Out(maxdd); + public string AsHexEWKB(byte variant) => Meos.TpcboxAsHexewkb(this.Ptr, variant); @@ -82,7 +85,7 @@ public string AsHexWKB(byte variant) => Meos.TpcboxAsHexwkb(this.Ptr, variant); public string AsText(int maxdd) - => this.Out(maxdd); + => Meos.TpcboxAsText(this.Ptr, maxdd); public byte[]? AsWKB(byte variant) { @@ -588,6 +591,9 @@ public bool Same(TPCPoint temp) public static TPCBox? FromEWKB(byte[] wkb) => TPCBox.FromWKB(wkb); + public static TPCBox? FromEWKT(string str) + => TPCBox.In(str); + public static TPCBox? FromHexEWKB(string hexwkb) => TPCBox.FromHexWKB(hexwkb); diff --git a/MEOS.NET/Types/TPCPatch.g.cs b/MEOS.NET/Types/TPCPatch.g.cs index aa5c6e8..8a3ff68 100644 --- a/MEOS.NET/Types/TPCPatch.g.cs +++ b/MEOS.NET/Types/TPCPatch.g.cs @@ -16,7 +16,7 @@ internal TPCPatch(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public int AlwaysEq(PCPatch pa) => Meos.AlwaysEqTpcpatchPcpatch(this.Ptr, pa.Ptr); @@ -57,9 +57,6 @@ public int EverNe(TPCPatch temp2) public long Npoints() => Meos.TpcpatchNpoints(this.Ptr); - public string Out() - => Meos.TpcpatchOut(this.Ptr); - public uint Pcid() => Meos.TpcpatchPcid(this.Ptr); diff --git a/MEOS.NET/Types/TPCPoint.g.cs b/MEOS.NET/Types/TPCPoint.g.cs index d69fbb1..ee1a53e 100644 --- a/MEOS.NET/Types/TPCPoint.g.cs +++ b/MEOS.NET/Types/TPCPoint.g.cs @@ -16,7 +16,7 @@ internal TPCPoint(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public int AlwaysEq(PCPoint pt) => Meos.AlwaysEqTpcpointPcpoint(this.Ptr, pt.Ptr); @@ -57,9 +57,6 @@ public int EverNe(TPCPoint temp2) public double Nad(Geo gs) => Meos.NadTpcpointGeo(this.Ptr, gs.Ptr); - public string Out() - => Meos.TpcpointOut(this.Ptr); - public uint Pcid() => Meos.TpcpointPcid(this.Ptr); diff --git a/MEOS.NET/Types/TPoint.g.cs b/MEOS.NET/Types/TPoint.g.cs index 9f20e86..c9c0bf2 100644 --- a/MEOS.NET/Types/TPoint.g.cs +++ b/MEOS.NET/Types/TPoint.g.cs @@ -17,20 +17,21 @@ internal TPoint(IntPtr ptr) : base(ptr) { } public Temporal? AngularDifference() => MEOSFactory.WrapTemporal(Meos.TpointAngularDifference(this.Ptr)); - public Temporal? AtElevation(Span s) - => MEOSFactory.WrapTemporal(Meos.TpointAtElevation(this.Ptr, s.Ptr)); + public (Geo?, long[])? AsMVTGeom(STBox bounds, int extent, int buffer, bool clip_geom) + { + var _answered = Meos.TpointAsMvtgeom(this.Ptr, bounds.Ptr, extent, buffer, clip_geom); - public new Temporal? AtGeom(Geo gs) - => MEOSFactory.WrapTemporal(Meos.TpointAtGeom(this.Ptr, gs.Ptr)); + return _answered is null ? null : (MEOSFactory.WrapGeo(_answered.Value.Item1), _answered.Value.Item2); + } - public new Temporal? AtValue(Geo gs) - => MEOSFactory.WrapTemporal(Meos.TpointAtValue(this.Ptr, gs.Ptr)); + public Temporal? AtElevation(Span s) + => MEOSFactory.WrapTemporal(Meos.TpointAtElevation(this.Ptr, s.Ptr)); public Temporal? Azimuth() => MEOSFactory.WrapTemporal(Meos.TpointAzimuth(this.Ptr)); - public Temporal? Bearing(Geo gs, bool invert) - => MEOSFactory.WrapTemporal(Meos.BearingTpointPoint(this.Ptr, gs.Ptr, invert)); + public Temporal? Bearing(Geo gs) + => MEOSFactory.WrapTemporal(Meos.BearingTpointPoint(this.Ptr, gs.Ptr)); public Temporal? CumulativeLength(bool spheroid) => MEOSFactory.WrapTemporal(Meos.TpointCumulativeLength(this.Ptr, spheroid)); @@ -74,12 +75,6 @@ public double Length(bool spheroid) public Temporal? MinusElevation(Span s) => MEOSFactory.WrapTemporal(Meos.TpointMinusElevation(this.Ptr, s.Ptr)); - public new Temporal? MinusGeom(Geo gs) - => MEOSFactory.WrapTemporal(Meos.TpointMinusGeom(this.Ptr, gs.Ptr)); - - public new Temporal? MinusValue(Geo gs) - => MEOSFactory.WrapTemporal(Meos.TpointMinusValue(this.Ptr, gs.Ptr)); - public Temporal? Speed(bool spheroid) => MEOSFactory.WrapTemporal(Meos.TpointSpeed(this.Ptr, spheroid)); diff --git a/MEOS.NET/Types/TQuadbin.g.cs b/MEOS.NET/Types/TQuadbin.g.cs index e1f37b3..10587f0 100644 --- a/MEOS.NET/Types/TQuadbin.g.cs +++ b/MEOS.NET/Types/TQuadbin.g.cs @@ -16,7 +16,7 @@ internal TQuadbin(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Above(TQuadbin temp2) => Meos.AboveTspatialTspatial(this.Ptr, temp2.Ptr); @@ -96,9 +96,6 @@ public bool Left(TQuadbin temp2) public Temporal? MinusValue(ulong cell) => MEOSFactory.WrapTemporal(Meos.TquadbinMinusValue(this.Ptr, cell)); - public string Out() - => Meos.TquadbinOut(this.Ptr); - public bool Overabove(TQuadbin temp2) => Meos.OveraboveTspatialTspatial(this.Ptr, temp2.Ptr); @@ -235,8 +232,5 @@ public ulong[] Values() public static Temporal? In(string str) => MEOSFactory.WrapTemporal(Meos.TquadbinIn(str)); - public static Temporal? Make(ulong value, DateTime t) - => MEOSFactory.WrapTemporal(Meos.TquadbinMake(value, MEOSConvert.ToTimestampTz(t))); - } } diff --git a/MEOS.NET/Types/TQuadbinInst.g.cs b/MEOS.NET/Types/TQuadbinInst.g.cs index ca1d427..d436914 100644 --- a/MEOS.NET/Types/TQuadbinInst.g.cs +++ b/MEOS.NET/Types/TQuadbinInst.g.cs @@ -14,7 +14,7 @@ public class TQuadbinInst : TQuadbin { internal TQuadbinInst(IntPtr ptr) : base(ptr) { } - public new static Temporal? Make(ulong value, DateTime t) + public static Temporal? Make(ulong value, DateTime t) => MEOSFactory.WrapTemporal(Meos.TquadbininstMake(value, MEOSConvert.ToTimestampTz(t))); } diff --git a/MEOS.NET/Types/TRGeometry.g.cs b/MEOS.NET/Types/TRGeometry.g.cs index dcca1c7..7ca5018 100644 --- a/MEOS.NET/Types/TRGeometry.g.cs +++ b/MEOS.NET/Types/TRGeometry.g.cs @@ -92,11 +92,11 @@ public int AlwaysNe(TRGeometry temp2) public new Temporal? AsTinstant() => MEOSFactory.WrapTemporal(Meos.TrgeometryAsTinstant(this.Ptr)); - public new Temporal? AsTsequence(string interp_str) - => MEOSFactory.WrapTemporal(Meos.TrgeometryAsTsequence(this.Ptr, interp_str)); + public new Temporal? AsTsequence(string interp) + => MEOSFactory.WrapTemporal(Meos.TrgeometryAsTsequence(this.Ptr, Meos.InterptypeFromString(interp))); - public new Temporal? AsTsequenceset(string interp_str) - => MEOSFactory.WrapTemporal(Meos.TrgeometryAsTsequenceset(this.Ptr, interp_str)); + public new Temporal? AsTsequenceset(string interp) + => MEOSFactory.WrapTemporal(Meos.TrgeometryAsTsequenceset(this.Ptr, Meos.InterptypeFromString(interp))); public Temporal? AtGeom(Geo gs) => MEOSFactory.WrapTemporal(Meos.TrgeometryAtGeom(this.Ptr, gs.Ptr)); diff --git a/MEOS.NET/Types/TS2Cell.g.cs b/MEOS.NET/Types/TS2Cell.g.cs index 8c23cde..8ed5f08 100644 --- a/MEOS.NET/Types/TS2Cell.g.cs +++ b/MEOS.NET/Types/TS2Cell.g.cs @@ -16,7 +16,7 @@ internal TS2Cell(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Above(TS2Cell temp2) => Meos.AboveTspatialTspatial(this.Ptr, temp2.Ptr); @@ -84,9 +84,6 @@ public bool Left(TS2Cell temp2) public Temporal? MinusValue(ulong cell) => MEOSFactory.WrapTemporal(Meos.Ts2cellMinusValue(this.Ptr, cell)); - public string Out() - => Meos.Ts2cellOut(this.Ptr); - public bool Overabove(TS2Cell temp2) => Meos.OveraboveTspatialTspatial(this.Ptr, temp2.Ptr); @@ -223,8 +220,5 @@ public ulong[] Values() public static Temporal? In(string str) => MEOSFactory.WrapTemporal(Meos.Ts2cellIn(str)); - public static Temporal? Make(ulong value, DateTime t) - => MEOSFactory.WrapTemporal(Meos.Ts2cellMake(value, MEOSConvert.ToTimestampTz(t))); - } } diff --git a/MEOS.NET/Types/TS2CellInst.g.cs b/MEOS.NET/Types/TS2CellInst.g.cs index 85b44d1..e8069f3 100644 --- a/MEOS.NET/Types/TS2CellInst.g.cs +++ b/MEOS.NET/Types/TS2CellInst.g.cs @@ -14,7 +14,7 @@ public class TS2CellInst : TS2Cell { internal TS2CellInst(IntPtr ptr) : base(ptr) { } - public new static Temporal? Make(ulong value, DateTime t) + public static Temporal? Make(ulong value, DateTime t) => MEOSFactory.WrapTemporal(Meos.Ts2cellinstMake(value, MEOSConvert.ToTimestampTz(t))); } diff --git a/MEOS.NET/Types/TSpatial.g.cs b/MEOS.NET/Types/TSpatial.g.cs index 5f3249b..ba56d14 100644 --- a/MEOS.NET/Types/TSpatial.g.cs +++ b/MEOS.NET/Types/TSpatial.g.cs @@ -104,9 +104,6 @@ public bool Left(STBox box) public bool Left(TSpatial temp2) => Meos.LeftTspatialTspatial(this.Ptr, temp2.Ptr); - public string Out(int maxdd) - => Meos.TspatialOut(this.Ptr, maxdd); - public bool Overabove(STBox box) => Meos.OveraboveTspatialStbox(this.Ptr, box.Ptr); diff --git a/MEOS.NET/Types/TText.g.cs b/MEOS.NET/Types/TText.g.cs index a656926..ea6ff3f 100644 --- a/MEOS.NET/Types/TText.g.cs +++ b/MEOS.NET/Types/TText.g.cs @@ -16,7 +16,7 @@ internal TText(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool Adjacent(TText temp2) => Meos.AdjacentTemporalTemporal(this.Ptr, temp2.Ptr); @@ -60,8 +60,8 @@ public int AlwaysNe(Text txt) public int AlwaysNe(TText temp2) => Meos.AlwaysNeTemporalTemporal(this.Ptr, temp2.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public Temporal? AtValue(Text txt) => MEOSFactory.WrapTemporal(Meos.TtextAtValue(this.Ptr, txt.Ptr)); @@ -129,9 +129,6 @@ public int EverNe(TText temp2) public Temporal? MinusValue(Text txt) => MEOSFactory.WrapTemporal(Meos.TtextMinusValue(this.Ptr, txt.Ptr)); - public string Out() - => Meos.TtextOut(this.Ptr); - public bool Overafter(TText temp2) => Meos.OverafterTemporalTemporal(this.Ptr, temp2.Ptr); diff --git a/MEOS.NET/Types/Temporal.g.cs b/MEOS.NET/Types/Temporal.g.cs index 2fea298..c2ac2fd 100644 --- a/MEOS.NET/Types/Temporal.g.cs +++ b/MEOS.NET/Types/Temporal.g.cs @@ -286,6 +286,9 @@ public int NumSequences() public int NumTimestamps() => Meos.TemporalNumTimestamps(this.Ptr); + public string Out(int maxdd) + => Meos.TemporalOut(this.Ptr, maxdd); + public bool Overafter(TsTzSpan s) => Meos.OverafterTemporalTstzspan(this.Ptr, s.Ptr); @@ -295,6 +298,9 @@ public bool Overbefore(TsTzSpan s) public bool Overlaps(TsTzSpan s) => Meos.OverlapsTemporalTstzspan(this.Ptr, s.Ptr); + public Temporal? ReachabilityFilter(double maxspeed) + => MEOSFactory.WrapTemporal(Meos.TemporalReachabilityFilter(this.Ptr, maxspeed)); + public Temporal? Round(int maxdd) => MEOSFactory.WrapTemporal(Meos.TemporalRound(this.Ptr, maxdd)); diff --git a/MEOS.NET/Types/TextSet.g.cs b/MEOS.NET/Types/TextSet.g.cs index db26dd6..290f6d1 100644 --- a/MEOS.NET/Types/TextSet.g.cs +++ b/MEOS.NET/Types/TextSet.g.cs @@ -16,10 +16,10 @@ internal TextSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Contained(TextSet s2) => Meos.ContainedSetSet(this.Ptr, s2.Ptr); @@ -57,9 +57,6 @@ public bool Left(TextSet s2) public Set? Minus(TextSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.TextsetOut(this.Ptr); - public bool Overlaps(TextSet s2) => Meos.OverlapsSetSet(this.Ptr, s2.Ptr); diff --git a/MEOS.NET/Types/TsTzSet.g.cs b/MEOS.NET/Types/TsTzSet.g.cs index 9dccb04..c7ad5e1 100644 --- a/MEOS.NET/Types/TsTzSet.g.cs +++ b/MEOS.NET/Types/TsTzSet.g.cs @@ -16,13 +16,13 @@ internal TsTzSet(IntPtr ptr) : base(ptr) { } /// The text MEOS writes this value as. public override string ToString() - => this.Out(); + => this.Out(15); public bool After(DateTime t) => Meos.AfterSetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Before(DateTime t) => Meos.BeforeSetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); @@ -60,9 +60,6 @@ public bool Left(TsTzSet s2) public Set? Minus(TsTzSet s2) => MEOSFactory.WrapSet(Meos.MinusSetSet(this.Ptr, s2.Ptr)); - public string Out() - => Meos.TstzsetOut(this.Ptr); - public bool Overafter(DateTime t) => Meos.OverafterSetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); diff --git a/MEOS.NET/Types/TsTzSpan.g.cs b/MEOS.NET/Types/TsTzSpan.g.cs index f1e45f2..d90f161 100644 --- a/MEOS.NET/Types/TsTzSpan.g.cs +++ b/MEOS.NET/Types/TsTzSpan.g.cs @@ -14,10 +14,6 @@ public class TsTzSpan : Span { internal TsTzSpan(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(DateTime t) => Meos.AdjacentSpanTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); @@ -162,8 +158,8 @@ public bool After(TS2Cell temp) public bool After(TText temp) => Meos.AfterTstzspanTemporal(this.Ptr, temp.Ptr); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Before(DateTime t) => Meos.BeforeSpanTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); @@ -445,9 +441,6 @@ public DateTime Lower() public SpanSet? Minus(TsTzSpanSet ss) => MEOSFactory.WrapSpanSet(Meos.MinusSpanSpanset(this.Ptr, ss.Ptr)); - public string Out() - => Meos.TstzspanOut(this.Ptr); - public bool Overafter(DateTime t) => Meos.OverafterSpanTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); diff --git a/MEOS.NET/Types/TsTzSpanSet.g.cs b/MEOS.NET/Types/TsTzSpanSet.g.cs index 1cc6ef6..5ec9a76 100644 --- a/MEOS.NET/Types/TsTzSpanSet.g.cs +++ b/MEOS.NET/Types/TsTzSpanSet.g.cs @@ -14,10 +14,6 @@ public class TsTzSpanSet : SpanSet { internal TsTzSpanSet(IntPtr ptr) : base(ptr) { } - /// The text MEOS writes this value as. - public override string ToString() - => this.Out(); - public bool Adjacent(DateTime t) => Meos.AdjacentSpansetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); @@ -30,8 +26,8 @@ public bool Adjacent(TsTzSpanSet ss2) public bool After(DateTime t) => Meos.AfterSpansetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); - public string AsText() - => this.Out(); + public string AsText(int maxdd) + => this.Out(maxdd); public bool Before(DateTime t) => Meos.BeforeSpansetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); @@ -110,9 +106,6 @@ public DateTime Lower() public int NumTimestamps() => Meos.TstzspansetNumTimestamps(this.Ptr); - public string Out() - => Meos.TstzspansetOut(this.Ptr); - public bool Overafter(DateTime t) => Meos.OverafterSpansetTimestamptz(this.Ptr, MEOSConvert.ToTimestampTz(t)); diff --git a/tools/codegen.py b/tools/codegen.py index cf2d990..f0ea6fb 100755 --- a/tools/codegen.py +++ b/tools/codegen.py @@ -688,8 +688,15 @@ def _emit_outputs_wrapper(f: dict) -> list[str]: sig_types.append((ptype, pname)) ext_call_args.append(pname) - # Compose the return tuple type. + # Compose the return tuple type. A value MEOS answers beside the + # out-arrays, where no arrayReturn takes the return, is the first entry: + # `tpoint_as_mvtgeom` answers the geometry in the tile and writes the times + # of its points, as MEOS.js codegen/ObjectGenerator.ts reads it. + rt = csharp_return_type(f) + value_ret = not array_ret and rt not in ("void", "bool") ret_pieces: list[str] = [] + if value_ret: + ret_pieces.append(rt) if array_ret: ret_elem, _ = _csharp_array_element(f["returnType"]["canonical"], f"{name} return") ret_pieces.append(f"{ret_elem}[]") @@ -708,8 +715,11 @@ def _emit_outputs_wrapper(f: dict) -> list[str]: # `tpoint_as_mvtgeom` answers false for a trip with no representation in # the tile and writes nothing, so the wrapper answers null there rather # than reading a count MEOS never wrote. - answers_found = not array_ret and csharp_return_type(f) == "bool" - if answers_found: + # A pointer answered beside them is NULL for the same absence, and the + # wrapper answers null there too. + answers_found = not array_ret and rt == "bool" + answers_value = value_ret and rt == "IntPtr" + if answers_found or answers_value: ret_type += "?" user_params = ", ".join(sig_params) @@ -725,9 +735,17 @@ def _emit_outputs_wrapper(f: dict) -> list[str]: if array_ret: lines.append(f" IntPtr _resultPtr = SafeExecution(() => Native.{public_name(name)}({ext_args}));") else: - # Void or bool return with only outputs. - rt = csharp_return_type(f) - if rt == "void": + # A value, void or bool return beside the outputs. + if answers_value: + lines.append(f" IntPtr _value = SafeExecution(() => Native.{public_name(name)}({ext_args}));") + lines.append(" if (_value == IntPtr.Zero)") + lines.append(" {") + lines.append(" return null;") + lines.append(" }") + lines.append("") + elif value_ret: + lines.append(f" {rt} _value = SafeExecution<{rt}>(() => Native.{public_name(name)}({ext_args}));") + elif rt == "void": lines.append(f" SafeExecution(() => Native.{public_name(name)}({ext_args}));") elif answers_found: lines.append(f" if (!SafeExecution(() => Native.{public_name(name)}({ext_args})))") @@ -777,6 +795,8 @@ def _emit_outputs_wrapper(f: dict) -> list[str]: # Build return expression. return_pieces: list[str] = [] + if value_ret: + return_pieces.append("_value") if array_ret: return_pieces.append("_resultArr") for local, _, _, _ in output_locals: diff --git a/tools/objectgen.py b/tools/objectgen.py index 13846c6..1e07da4 100644 --- a/tools/objectgen.py +++ b/tools/objectgen.py @@ -387,7 +387,7 @@ def needs_a_body(self) -> bool: return bool(self.structs or self.arrays or self.scalar_arrays or self.contiguous or self.written or self.out_params or self.length_out or self.parallel - or (self.ret.startswith("(") and self.ret.endswith(")"))) + or (self.ret.startswith("(") and self.ret.rstrip("?").endswith(")"))) # The C# language's implicit numeric conversions (C# spec, section "Implicit @@ -483,7 +483,7 @@ def map_return(self, f: dict, wrapper_ret: str) -> tuple[str, str] | None: cls = self.m.class_for_ctype(c) if cls and wrapper_ret == "IntPtr": return (f"{cls}?", f"MEOSFactory.Wrap{cls}($)") - if wrapper_ret.startswith("(") and wrapper_ret.endswith(")"): + if wrapper_ret.startswith("(") and wrapper_ret.rstrip("?").endswith(")"): return self.map_tuple_return(f, wrapper_ret) if wrapper_ret == "IntPtr[]": # An array of MEOS values reaches the wrapper as an array of pointers, @@ -664,27 +664,55 @@ def map_tuple_return(self, f: dict, wrapper_ret: str) -> tuple[str, str] | None: an array of MEOS values wraps element by element, an array of instants reads as instants, and an array of plain scalars is handed on.""" shape = f.get("shape") or {} - element = ((shape.get("arrayReturn") or {}).get("element") or {}).get("canonical") + # A value MEOS answers beside the arrays it fills, with no array taking + # the return (`tpoint_as_mvtgeom`: the geometry in the tile, then the + # times of its points), is the first item, as codegen.py + # #_emit_outputs_wrapper hands it over; the wrapper answers null where + # MEOS answers NULL, and so does the method. + nullable = wrapper_ret.endswith("?") + tuple_ret = wrapper_ret.rstrip("?") + array_ret = shape.get("arrayReturn") + first = ((array_ret.get("element") or {}).get("canonical") if array_ret + else f["returnType"]["canonical"]) params = {p["name"]: p["canonical"] for p in f.get("params", [])} # `TYPE **bins` is an out-ARRAY of `TYPE`, so two stars come off: one # for the handle MEOS writes through, one for the array itself. - c_types = [element] + [ + c_types = [first] + [ clean(params.get(a["param"], "")).rstrip("* ").strip() for a in shape.get("outputArrays") or []] - pieces = [p.strip() for p in wrapper_ret[1:-1].split(",")] + pieces = [p.strip() for p in tuple_ret[1:-1].split(",")] if len(pieces) != len(c_types) or not all(c_types): return None + item = "$.Value.Item{}" if nullable else "$.Item{}" types, readers = [], [] for i, (piece, c_type) in enumerate(zip(pieces, c_types)): - mapped = self.map_array_item(piece, clean(c_type), f"$.Item{i + 1}") + if i == 0 and not array_ret: + mapped = self.map_value_item(piece, clean(c_type), item.format(1)) + else: + mapped = self.map_array_item(piece, clean(c_type), item.format(i + 1)) if mapped is None: return None types.append(mapped[0]) readers.append(mapped[1]) # The body evaluates the call once and reads each item off it, so the # template carries the two halves apart: the call, then the reads. - reads = ", ".join(r.replace("$", "_answered") for r in readers) - return (f"({', '.join(types)})", f"$|>({reads})") + reads = f"({', '.join(r.replace('$', '_answered') for r in readers)})" + if nullable: + return (f"({', '.join(types)})?", + f"$|>_answered is null ? null : {reads}") + return (f"({', '.join(types)})", f"$|>{reads}") + + def map_value_item(self, piece: str, c_type: str, + item: str) -> tuple[str, str] | None: + """The value item of an answered tuple, read as #map_return reads a + value of its own: a MEOS value wraps into its class, a scalar is handed + on.""" + if piece == "IntPtr": + cls = self.m.class_for_ctype(c_type) + return (f"{cls}?", f"MEOSFactory.Wrap{cls}({item})") if cls else None + if is_scalar(piece): + return (piece, item) + return None def map_array_item(self, piece: str, c_type: str, item: str) -> tuple[str, str] | None: