I am trying to work with the geospatial functions with a GeoJSON file with areas (Polygons). What formatting is required to get this to work? Here is a simple example of the data. The first line would effectively have the data as-is in a WKT format, the second could be applied with a UDF to clean that up. But either way it is showing null for GEOGRAPHY_AREA or GEOGRAPHY_LENGTH.
select (COORD1 ) SHAPE1
,GEOGRAPHY_AREA(COORD1) GEOGRAPHY_AREA1
,GEOGRAPHY_LENGTH(COORD1) GEOGRAPHY_LENGTH1
,(COORD2) SHAPE2
,GEOGRAPHY_AREA(COORD2 ) GEOGRAPHY_AREA2
,GEOGRAPHY_LENGTH(COORD2) GEOGRAPHY_LENGTH2
from (
select ‘[[[-73.8610986495631,40.7636727481715],[-73.8599307846902,40.7622085727497],[-73.8618102932818,40.7645529790088],[-73.8610986495631,40.7636727481715]]]’ coord1
,’“POLYGON((-73.8610986495631 40.7636727481715,-73.8599307846902 40.7622085727497,-73.8618102932818 40.7645529790088,-73.8610986495631 40.7636727481715))”’ coord2) a