Skip to content

as_linestring() and likely other geometry transform functions can only be called from the process_way() function, not custom functions. #2173

Closed Answered by joto
mboeringa asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I think there is a misunderstanding here with the wording of the error message. You can call the as_* geometry creation functions from any function you want as long as that function is ultimately called from the correct osm2pgsql.process_node/way/relation() function. The issue isn't really about which function it is called from, but that the OSM object you call it on is of the correct type. I'll think about how to improve that error message.

I am pretty sure everything that could be done with add_row() can be done with insert(). If you can not get something to work, post a minimal working example here and we can have a look at it.

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mboeringa
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2171 on April 11, 2024 07:43.