);
}
- /*
- ** Serialize our lwgeom and set the geodetic flag so subsequent
- ** functions do the right thing.
- */
- lwgeom_set_geodetic(lwgeom, true);
-
- /* Recalculate the boxes after re-setting the geodetic bit */
- lwgeom_drop_bbox(lwgeom);
- lwgeom_add_bbox(lwgeom);
-
- g_ser = geography_serialize(lwgeom);
+
+ g_ser = gserialized_geography_from_lwgeom(lwgeom, -1);
/*
** Replace the unaligned lwgeom with a new aligned one based on GSERIALIZED.
/* Calculate the densified geometry */
lwgeom2 = lwgeom_segmentize_sphere(lwgeom1, max_seg_length);
- /*
- ** Set the geodetic flag so subsequent
- ** functions to do the right thing.
- */
- lwgeom_set_geodetic(lwgeom2, true);
-
- /* Recalculate the boxes after re-setting the geodetic bit */
- lwgeom_drop_bbox(lwgeom2);
- lwgeom_add_bbox(lwgeom2);
-
- g2 = geography_serialize(lwgeom2);
+ g2 = gserialized_geography_from_lwgeom(lwgeom2, -1);
/* Clean up */
lwgeom_free(lwgeom1);
NOTICE: SRID value -1 converted to the officially unknown SRID value 0
#1596.6|public.road_pg.roads_geom SRID changed to 0
#1596.7|0
-#1596|Point[BGS]
+#1596|Point[GS]
#1695|MULTIPOLYGON EMPTY
#1697.1|0
#1697.2|0
SELECT '#3300', ST_AsText(ST_SnapToGrid(Box2D('CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036,-71.4821 42.3036,-71.7821 42.7036,-71.0821 42.7036,-71.0821 42.3036),(-71.1821 42.4036,-71.3821 42.6036,-71.3821 42.4036,-71.1821 42.4036))'::Geometry)::geometry,0.0001));
+SELECT '#3355', ST_Intersects(
+ 'LINESTRING(124.983539 1.419224,91.181596 29.647798)'::geography
+ , ST_Segmentize('LINESTRING(124.983539 1.419224,91.181596 29.647798)'::geography, 47487290)::geography);
+
+SELECT '#3356', ST_Summary(wkt::geometry) As wkt_geom,
+ ST_Summary(wkt::geography) As wkt_geog,
+ ST_Summary(wkt::geometry::geography) As geom_geog
+FROM (VALUES (
+ 'LINESTRING(124.983539 1.419224,91.181596 29.647798)'::text ),
+ ('LINESTRING(124.983539 1.419224,91.181596 29.647798, 91.28 29.647)'::text ) ) As f(wkt)
+ORDER BY wkt;
+
-- Clean up
DELETE FROM spatial_ref_sys;
NOTICE: SRID value -1 converted to the officially unknown SRID value 0
#1596.6|public.road_pg.roads_geom SRID changed to 0
#1596.7|0
-#1596|Point[BGS]
+#1596|Point[GS]
#1695|MULTIPOLYGON EMPTY
#1697.1|0
#1697.2|0
#2956|t
#3172|LINESTRING M (0 0 1,0 0 2)
#3300|POLYGON((-71.7821 42.2622,-71.7821 42.9067,-71.029 42.9067,-71.029 42.2622,-71.7821 42.2622))
+#3355|t
+#3356|LineString[] with 2 points|LineString[GS] with 2 points|LineString[GS] with 2 points
+#3356|LineString[B] with 3 points|LineString[BGS] with 3 points|LineString[BGS] with 3 points