mirror of
https://github.com/CartoDB/crankshaft.git
synced 2024-11-01 10:20:48 +08:00
cleaned
This commit is contained in:
parent
ce87379c6f
commit
8efeba5808
@ -1,35 +0,0 @@
|
||||
## Densify function
|
||||
|
||||
Iterative densification of a set of scattered points using Delaunay triangulation. The new points are located at the centroids of the grid cells and have as assigned value the barycentric average value of the cell's vertex.
|
||||
|
||||
### CDB_Densify(geomin geometry[], colin numeric[], iterations integer)
|
||||
|
||||
#### Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| geomin | geometry[] | Array of points geometries |
|
||||
| colin | numeric[] | Array of points' values |
|
||||
| iterations | integer | Number of iterations |
|
||||
|
||||
### Returns
|
||||
|
||||
Returns a table object
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| geomout | geometry | Geometries of new dataset of points|
|
||||
| colout | numeric | Values of points|
|
||||
|
||||
#### Example Usage
|
||||
|
||||
```sql
|
||||
with data as (
|
||||
select
|
||||
ARRAY[7.0,8.0,1.0,2.0,3.0,5.0,6.0,4.0] as colin,
|
||||
ARRAY[ST_GeomFromText('POINT(2.1744 41.4036)'),ST_GeomFromText('POINT(2.1228 41.3809)'),ST_GeomFromText('POINT(2.1511 41.3742)'),ST_GeomFromText('POINT(2.1528 41.4136)'),ST_GeomFromText('POINT(2.165 41.3917)'),ST_GeomFromText('POINT(2.1498 41.3713)'),ST_GeomFromText('POINT(2.1533 41.3683)'),ST_GeomFromText('POINT(2.131386 41.413998)')] as geomin
|
||||
)
|
||||
select CDB_Densify(geomin, colin, 2) from data;
|
||||
```
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
## TINMAP function
|
||||
|
||||
Generates a fake contour map, in the form of a TIN map, from a set of scattered points.Depends on **CDB_Densify**.
|
||||
|
||||
Its iterative nature let's the user smooth the final result as much as desired, but with a exponential time cost increase
|
||||
|
||||
### CDB_TINmap(geomin geometry[], colin numeric[], iterations integer)
|
||||
|
||||
#### Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| geomin | geometry[] | Array of points geometries |
|
||||
| colin | numeric[] | Array of points' values |
|
||||
| iterations | integer | Number of iterations |
|
||||
|
||||
### Returns
|
||||
|
||||
Returns a table object
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| geomout | geometry | Geometries of new dataset of polygons|
|
||||
| colout | numeric | Values of each cell|
|
||||
|
||||
#### Example Usage
|
||||
|
||||
```sql
|
||||
with data as (
|
||||
select
|
||||
ARRAY[7.0,8.0,1.0,2.0,3.0,5.0,6.0,4.0] as colin,
|
||||
ARRAY[ST_GeomFromText('POINT(2.1744 41.4036)'),ST_GeomFromText('POINT(2.1228 41.3809)'),ST_GeomFromText('POINT(2.1511 41.3742)'),ST_GeomFromText('POINT(2.1528 41.4136)'),ST_GeomFromText('POINT(2.165 41.3917)'),ST_GeomFromText('POINT(2.1498 41.3713)'),ST_GeomFromText('POINT(2.1533 41.3683)'),ST_GeomFromText('POINT(2.131386 41.413998)')] as geomin
|
||||
)
|
||||
select CDB_TINmap(geomin, colin, 2) from data;
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user