-
Notifications
You must be signed in to change notification settings - Fork 395
Open
Labels
Description
Based on https://trac.osgeo.org/postgis/ticket/2181
Expected that buffer of linestring is a polygon by @dr-jts in https://lists.osgeo.org/pipermail/postgis-users/2013-January/036342.html.
Examples:
22:25:25 [kom] > SELECT 'ticket2181-linestring', GeometryType(ST_Buffer(
'LINESTRING(640770.332537465 216785.425146015,640770.356311913 216785.560172686,640770.475488952 216786.226162019,640770.647396495 216787.800152365,640770.658978918 216789.268376902,640770.447752096 216792.399898366,640769.98018796 216795.624688816,640769.110287021 216798.527305023,640767.648768098 216801.891389348,640766.02448565 216804.805892778,640764.74005588 216807.134569434,640763.337363474 216809.560477487,640761.650901703 216812.246990061,640759.955600712 216815.327305019,640758.482499366 216817.868732504,640757.383693167 216819.548488661,640756.238862077 216821.226720821,640754.01503683 216824.434442434,640751.366929134 216828.435255234,640749.204368809 216832.450088865,640747.25516891 216836.227787618,640746.014020829 216838.801219168,640745.393751588 216840.360274284,640744.315976633 216842.854457673,640743.400050801 216844.65704848,640742.582575565 216846.277673322,640741.52491745 216848.478638524,640740.503835408 216850.705816576,640739.787553975 216852.270967708,640739.053289307 216853.851968469,640738.173025147 216855.546355058,640737.55488951 216856.568961104,640736.817272035 216857.822910812,640735.910795021 216859.35697228,640734.77510795 216861.236982439,640733.832969266 216862.938074642,640732.814325629 216865.039674844,640731.225095251 216869.012141189,640729.979984761 216871.879095724,640729.445974092 216873.02148841,640729.002794006 216873.679857725,640728.952197105 216873.745389857,640728.676962154 216874.089814544)',
100));
┌───────────────────────┬──────────────┐
│ ?column? │ geometrytype │
├───────────────────────┼──────────────┤
│ ticket2181-linestring │ MULTIPOLYGON │
└───────────────────────┴──────────────┘
(1 row)
Time: 0,691 ms
22:25:27 [kom] > SELECT ST_GeometryType(ST_AsText(ST_Buffer(ST_GeomFromText('POLYGON((19.4994 56.0304, 19.2074 56.0271, 18.9318 56.0205, 18.8957 57.9268, 20.5001 57.9498, 20.0079 56.0369, 19.7389 56.0304, 19.4994 56.0304))'), 42.0)));
┌─────────────────┐
│ st_geometrytype │
├─────────────────┤
│ ST_MultiPolygon │
└─────────────────┘
(1 row)
Time: 0,351 ms
22:25:25 [kom] > SELECT 'ticket2181-linestring', GeometryType(ST_Buffer(
'LINESTRING(640770.332537465 216785.425146015,640770.356311913 216785.560172686,640770.475488952 216786.226162019,640770.647396495 216787.800152365,640770.658978918 216789.268376902,640770.447752096 216792.399898366,640769.98018796 216795.624688816,640769.110287021 216798.527305023,640767.648768098 216801.891389348,640766.02448565 216804.805892778,640764.74005588 216807.134569434,640763.337363474 216809.560477487,640761.650901703 216812.246990061,640759.955600712 216815.327305019,640758.482499366 216817.868732504,640757.383693167 216819.548488661,640756.238862077 216821.226720821,640754.01503683 216824.434442434,640751.366929134 216828.435255234,640749.204368809 216832.450088865,640747.25516891 216836.227787618,640746.014020829 216838.801219168,640745.393751588 216840.360274284,640744.315976633 216842.854457673,640743.400050801 216844.65704848,640742.582575565 216846.277673322,640741.52491745 216848.478638524,640740.503835408 216850.705816576,640739.787553975 216852.270967708,640739.053289307 216853.851968469,640738.173025147 216855.546355058,640737.55488951 216856.568961104,640736.817272035 216857.822910812,640735.910795021 216859.35697228,640734.77510795 216861.236982439,640733.832969266 216862.938074642,640732.814325629 216865.039674844,640731.225095251 216869.012141189,640729.979984761 216871.879095724,640729.445974092 216873.02148841,640729.002794006 216873.679857725,640728.952197105 216873.745389857,640728.676962154 216874.089814544)',
100));
┌───────────────────────┬──────────────┐
│ ?column? │ geometrytype │
├───────────────────────┼──────────────┤
│ ticket2181-linestring │ MULTIPOLYGON │
└───────────────────────┴──────────────┘
(1 row)
Time: 0,691 ms
22:25:27 [kom] > SELECT ST_GeometryType(ST_AsText(ST_Buffer(ST_GeomFromText('POLYGON((19.4994 56.0304, 19.2074 56.0271, 18.9318 56.0205, 18.8957 57.9268, 20.5001 57.9498, 20.0079 56.0369, 19.7389 56.0304, 19.4994 56.0304))'), 42.0)));
┌─────────────────┐
│ st_geometrytype │
├─────────────────┤
│ ST_MultiPolygon │
└─────────────────┘
(1 row)
Time: 0,351 ms