[Tile-serving] [osm2pgsql-dev/osm2pgsql] hstore not importing some tags? (Discussion #2192)

Marcos Dione notifications at github.com
Sun Jun 2 16:50:18 UTC 2024


Ok, here's a better query, just a rewrite of the one above, and I can confirm some data is duplicated:

```sql
select osm_id, boundary, admin_level, tags->'maritime' as maritime, ST_AsText(way) from planet_osm_roads where boundary = 'administrative' and admin_level = '2';
  osm_id   |    boundary    | admin_level | maritime |                                                                                                                                                                                                                        >
-----------+----------------+-------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------>
 176533407 | administrative | 2           |          | LINESTRING(825174.7388741678 5424005.540838931,825175.3845272146 5424001.997524651,825173.4253041764 5424000.811284956,825158.4528326647 5423995.711996581,825150.916503138 5423994.001963949,825142.6454649721 5423996>
  37811853 | administrative | 2           |          | LINESTRING(825178.0673269426 5424477.060268598,825175.8298051775 5424473.008358785,825176.9207361874 5424455.3679356715,825168.4047951417 5424443.96715614,825143.2131943752 5424425.833783129,825137.5025044975 542442>
  -1124039 | administrative | 2           |          | LINESTRING(828124.7276440877 5426682.842113642,828044.0210132627 5426740.121963693,828042.3734847989 5426741.863326018,828041.1823662475 5426743.9437150685,828040.1693588811 5426746.239848712,828039.5237058346 54267>
  -2202162 | administrative | 2           |          | LINESTRING(828124.7276440877 5426682.842113642,828044.0210132627 5426740.121963693,828042.3734847989 5426741.863326018,828041.1823662475 5426743.9437150685,828040.1693588811 5426746.239848712,828039.5237058346 54267>
  37794471 | administrative | 2           |          | LINESTRING(826965.1904321377 5426221.549643595,826960.5706732698 5426207.850680935,826957.8433457454 5426208.405419183,826946.7336605643 5426179.898080082,826946.1993270084 5426161.345242933,826949.4832519869 542615>
 212810311 | administrative | 2           |          | LINESTRING(825104.6966505608 5423460.302399664,825137.4245808539 5423436.656051399,825151.328385254 5423425.749482522,825244.7477019278 5423356.489990072,825304.158914164 5423314.497054519,825502.0515729473 5423178.>
 398372186 | administrative | 2           |          | LINESTRING(827870.2512881343 5427130.73471893,827857.6276578784 5427082.54484401,827921.1020315287 5427033.322698925,827949.2102029539 5427022.381055523,827814.0126813855 5426880.5415459685,827769.3179058322 5426834>
  37794470 | administrative | 2           |          | LINESTRING(828040.1693588811 5426746.239848712,828039.5237058346 5426747.673006246,828038.5774901628 5426751.756735914,828038.1099483015 5426756.426059223,828038.2880594868 5426761.603925461,828039.5459697328 542676>
 770774507 | administrative | 2           |          | LINESTRING(828124.7276440877 5426682.842113642,828044.0210132627 5426740.121963693,828042.3734847989 5426741.863326018,828041.1823662475 5426743.9437150685,828040.1693588811 5426746.239848712)
  -2202162 | administrative | 2           |          | LINESTRING(825178.0673269426 5424477.060268598,825175.8298051775 5424473.008358785,825176.9207361874 5424455.3679356715,825168.4047951417 5424443.96715614,825143.2131943752 5424425.833783129,825137.5025044975 542442>
  -1124039 | administrative | 2           |          | LINESTRING(825178.0673269426 5424477.060268598,825175.8298051775 5424473.008358785,825176.9207361874 5424455.3679356715,825168.4047951417 5424443.96715614,825143.2131943752 5424425.833783129,825137.5025044975 542442>
  30837497 | administrative | 2           | yes      | LINESTRING(825826.2473259845 5422946.473967987,825921.0136084969 5422612.938286177,826015.7687590601 5422279.414659127,826110.5350415724 5421945.872280919,826205.3013240846 5421612.341956996,826300.056474648 5421278>
(12 rows)
```

As for why my thing is not matching, the original query is filtering out:

* non relations (`osm_id < 0`); and
* only `boundary = 'administrative'`

so in my case, I have:

* a non relation with `tags->'maritime => 'yes'`; and
* a relation that instead has `boundary = 'maritime'`

so that's why I don 't get anything in my query.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2192#discussioncomment-9639617
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/2192/comments/9639617 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240602/1bf5d33a/attachment-0001.htm>


More information about the Tile-serving mailing list