I am very new to this topic and after a long time of research I didn't find a solution. I want a query that I can use on my PostGIS database performing a radiussearch.. I inserted the Open Street Map Data from Geofarbik covering whole Austria. The Input parameters are a point in lng,lat notation, like Point(16 48) ~ some point in Vienna and as second parameter the radius in m.
For a reason I don't know the lat lon values in the db are somewhat different. On the internet I found people talking about different types of SRID, but I really don't know which SRID I should use and how it could be useful to me to compare the input data with the data in the database. I added a column geom, because the command ST_Within(geom, geom) needs a geom. Now the data is even less readable, so I cleary don't know what to do with the input data for comparing and knowing it was done the right way. I can't look behind the concept of the SRID in this moment.
SELECT * mytable node WHERE node.tags @> ARRAY['subway', 'station', 'uic_ref'] and ST_DWithin(geom, st_makepoint(mylon, mylat), radius) = true
My query would look like this, but I doesn't work yet. If someone could give me some advices how to speed up queries like this it would be great to.