Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 20 characters in body; edited tags; edited title
Source Link
Taras
  • 34.1k
  • 4
  • 73
  • 148

Creating Polygonspolygons from Pointspoints in Carto

Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I'veI've included 3 photographs. 1st photograph of the points outlining the shape. the second photo is my desired result which I have drawn out by hand. The third photo is an attempt that doesntdoes not meet my desired result..

I am using the analysis tool provided by Carto, running a concave hull and have tried various target percent values and without the desired results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below

  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid
  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid

Shape Outline with Points

Desired Shapefile

Failed Attempt

Creating Polygons from Points in Carto

Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I've included 3 photographs. 1st photograph of the points outlining the shape. the second photo is my desired result which I have drawn out by hand. The third photo is an attempt that doesnt meet my desired result..

I am using the analysis tool provided by Carto, running a concave hull and have tried various target percent values and without the desired results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below

  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid

Shape Outline with Points

Desired Shapefile

Failed Attempt

Creating polygons from points in Carto

Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I've included 3 photographs. 1st photograph of the points outlining the shape. the second photo is my desired result which I have drawn out by hand. The third photo is an attempt that does not meet my desired result.

I am using the analysis tool provided by Carto, running a concave hull and have tried various target percent values and without the desired results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below

  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid

Shape Outline with Points

Desired Shapefile

Failed Attempt

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 83 characters in body
Source Link

Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I've included a3 photographs. 1st photograph of the points andoutlining the shape. the second photo is my desired result which I have drawn out by hand below, as well as. The third photo is an attempt that doesnt meet my failed attempts using concave hull methoddesired result..

I am using the analysis tool provided by Carto, running a concave hull withand have tried various target percent values and poorwithout the desired results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below

  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid

Shape Outline with Points

Desired Shapefile

Failed Attempt

Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I've included a photograph of the points and my desired result which I have drawn out by hand below, as well as my failed attempts using concave hull method.

I am using the analysis tool provided by Carto, running a concave hull with various target percent values and poor results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below

  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid

Shape Outline with Points

Desired Shapefile

Failed Attempt

Using Carto, I am trying to create shapefiles of regions using points(Link to Dataset in Carto ) with a shared column value to group by. I've included 3 photographs. 1st photograph of the points outlining the shape. the second photo is my desired result which I have drawn out by hand. The third photo is an attempt that doesnt meet my desired result..

I am using the analysis tool provided by Carto, running a concave hull and have tried various target percent values and without the desired results. For this example I've included a target percent of 80 and the result is shown in a photograph at the bottom. The code is provided below

  SELECT row_number() over() as cartodb_id,
         territoryid as category,
         ST_ConcaveHull(
             ST_Collect(the_geom), 
             0.8, 
             false
          ) AS the_geom,
         count(1) as count_vals
    FROM (
         SELECT *
           FROM ( SELECT * FROM "st-braund".bd_regions_1 ) _camshaft_category_filter
          WHERE territoryid IN (3)
         ) _analysis_source
GROUP BY territoryid

Shape Outline with Points

Desired Shapefile

Failed Attempt

change tags
Link
ramiroaznar
  • 4.4k
  • 2
  • 15
  • 29
fixed SQL query
Source Link
Jorge Sanz
  • 2.6k
  • 1
  • 16
  • 21
Loading
added 98 characters in body
Source Link
Loading
Source Link
Loading