Jump to content

dil_bert

Members
  • Posts

    935
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by dil_bert

  1. dear phpFreaks Community,­čśë hello dear all; this is a slightly off-topic-question whats the most appropiate way and method to import the dataset (and the map) of a healthsites.io-request to wordpress: lets take for example the following request: https://healthsites.io/map?country=Italy should we do this via a shapefle note: A Line layer consists of two different types of OSM features, Ways and Nodes. ... sections of this plugin section according to their functionality (editing, identification, etc.). BTW - can i export the data of healthsits only in CSV formate - that means: what if i only want to gather the POI Then i can poulate the data in to a MySQL or PostGreSQL db is this doable too!? btw: i am also running https://healthsites.io/api/docs/#api-v2-facilities-list and I have an error 502. Healthsites API Version 2 https://healthsites.io/api/docs/#api-v2-facilities-list look forward to hear from you
  2. dear friends, and freaks dear Community today no talk about the latest MX-release, or Anaconda & Miniconda or tools like VScode / Spyder that i need. Also - no talk about Thunderbird and the Enigma or the latest Linux-kernel and things like that. And yes. Today also no question or posting regarding php or MySQL, here in this posting a little note about the fact that the WordPress version 5.8 was released in BETA 4 - for testing. note: The final relase is sheduled for the July 20th - stay tuned. - 215 tickets were adressed & gefixt in WordPress 5.8, - 88 new Features and improvements; see : many new Features in WordPress 5.8 in BETA 4: Direct Download of Beta Version here (zip): https://wordpress.org/wordpress-5.8-beta1.zip Alpha/Beta/RC Forum Feedback and bug reports report here please https://wordpress.org/support/forum/alphabeta/ more data, Infos, Links and Details here: WordPress 5.8 Beta 4 is now available for testing! https://wordpress.org/news/2021/06/wordpress-5-8-beta-1/ see vgl. https://wordpress.org/news/2021/06/wordpress-5-8-beta-1/ In addition to those changes, contributors have fixed 215 tickets in WordPress 5.8, 88 new features and enhancements, with more bug fixes on the way.
  3. dear PHP-Freaks first of all i hope youre well and every thinggoes well. I hope that your hometown is doing well and is able to manage all the covid 19 things. here i want to share some ideas on a installation of Miniconda on a MX-Linux-System. To write down these steps help me to learn. So i want to share with you the first steps in working with Miniconda on a linux box. My approach: i am currently installing Miniconda on a MX-Linux and i am doing this via Terminal (commandline) the first steps are the follwing first i am heading for the download of the latest shell script with the following line: wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh now we have the repo on the machine: Fine - but let us go ahead_ now we have to make the miniconda installation script executable chmod +x Miniconda3-latest-Linux-x86_64.sh This is a pretty important step: Next the installer will prompt us where we want to install Miniconda. We will be given exactly three different options or let us say: choices or methods. We need to decide the location where we want to install all that stuff: so here we go: We need to press the ENTER - button on the keyboard to accept the choosen default install location i.e. our $HOME directory. on a sidenote: even more important: if we don't want to install in the default location, we are of course free to press the following buttons on the keyboard CTRL+C to cancel the installation or mention an alternate installation directory. Note: if we want to go with the default installation path, which is /var/home/doctor_linux/miniconda3 then we can run the miniconda installation script to go ahead: creating and activating our so called conda environment. well this is one of the last steps: We now need to create and activate an so called conda environment on our machine. To create a conda environment, we need to run the following command - (see the conda-cheetsheet for more commands) we can also create the environment from a file like the so called environment.yml, and besides this we also are free to use the conda env create -f command: if you like conda: just see the conda-cheetsheet for more commands. for the fully fledged installation to take effect, we have to do some additional steps e.g. we have to do the following: close and re-open our Terminal. Alternatively, we re able to run the following command to get the changes immediately in effect - (in other words: to verify all that above steps): we will now see the so called prefix (base) in front of our shell prompt of our machine. It means that the conda's base environment is activated. And as mentioned above: if you like conda: just see the conda-cheetsheet for more commands. well so far so good: if you like conda: just see the conda-cheetsheet for more commands. but wait: there is even more: there is another option the so called Miniconda unattended (or let us say silent) installation . the Miniconda installer script comes with options to perform a so called unattended installation. 'This is somewhat fantastic since it doesn't require any manual intervention from the us - the user. it is also called a still-installation that runs in the background: great. to go this way we need to do some steps. First, we need to create a directory for Miniconda installation: Download the installer script: $ wget https://repo.anaconda.com/miniconda/Miniconda3-py39_3.1.2-Linux-x86_64.sh Btw: Wget is a famous way. See the beginning of the thread: we also have used this at the top - in the first approach. now we have to verify the checksum as shown above. And then we follow the steps of the so called silent installation to some more commands to install Miniconda in silent mode: well so far so good: if you like conda: just see the conda-cheetsheet for more commands. I hope you find this useful - if you have any ideas or comments on this approach i love to hear from you
  4. good day dear community, installing Miniconda on a Linux-Box: adding the vscode and Spyder to the whole system i have done lots of setups - for example i am running Anaconda both on Win and MX-Linux. well now i want to give conda a try: well i guess it is a bit more tricky: can we do it like so: we need a snippet that helps to create a directory to install miniconda into it, After we have set up this - then we can start to download the latest python 3 based install script for Linux 64 bit, Done so we an go ahead and try to execute or run the install script which helps us :- subsequently we can at the end delete the install script, Then - at this point we can do the adding and intializing of Conda: --a conda initialize to our bash or the so called zsh shell. That said: If we follow ths path then we at the can do a cool restart of the shell and conda will be ready to go. mkdir -p ~/miniconda3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh If we are here we can go ahead: # note: we just have done one important thing. We ve fetched Anaconda via wget that wen very nice. now we can do even more: the miniconda.sh has got some cool basic options. Most notably we can say that we just have used -b to be able to run the whole thing unattended, which means that all of the agreements are automatically accepted without user prompt. I like this option very very much. It is pretty cool. But there is even more. -u updates any existing installation in the directory of install if there is one. -p is the directory to install into. here i have a litte - lets say - cheat sheet that helps us with the usage: see more /root/miniconda3/miniconda.sh [options] Installs Miniconda - the version - see 3 4.6.14 -b run install in batch mode (without manual intervention), it is expected the license terms are agreed upon -f no error if install prefix already exists -h print this help message and exit -p PREFIX install prefix, defaults to /root/miniconda3, must not contain spaces. -s skip running pre/post-link/install scripts -u update an existing installation -t run package tests after installation (may install conda-build) at the end oft theday we have even more options Silent/Logged A quick and easy way to silence everything or to log it to a file during an automated install is to wrap the script into a bash function, or save it to its own file, and call the file. I like the function method since I can still copy it right into a terminal, or keep my install script as one single file. and besides that install_miniconda () { mkdir -p ~/miniconda3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh } normal But wait: What do we do now: note: now we need to have packages and all that things. how to do now more - a. the installation of all the packages b.. the installation of VSCode and Spyder and Jupyter notebook!? any idea or tipp!?
  5. Philwiss we follow you whereever you are. all of the folks here should know that you are a user from Linuxquestions.org - and they hate you over there: Your have not many friends over there. They know who you are. lets have a closer look at your fancy funny and dull postings: and at your terrible habits - and the user at Linuxquestions-they know him very well: they have beaten him - they do not like him over there. in Fact: they call him what he is: a troll with ugly nasty habbits. see ugly minded troll at linuxquestion. They treat him as a ugly Troll - see the threads https://www.linuxquestions.org/questions/linux-newbie-8/help-me-4175623526/page2.html https://www.linuxquestions.org/questions/linux-server-73/how-to-disable-directory-listing-for-specific-directories-in-apache-4175685395/page2.html https://www.linuxquestions.org/questions/linux-newbie-8/linux-shell-script-content-4175687413/page2.html https://www.linuxquestions.org/questions/linux-desktop-74/difficulties-w-19-1-a-4175647896/ and so forth poor guy - tbone... your lost now. we know you and we follow you
  6. hello dear all conda update spyder vs. pip-methods : some basic decisions i run Anaconda on MX-Linux and i love it. btw; my python version is python 3.8.4 my spyder is 4.0.1 vsCode 1.52.1 i want to update all these how can i do this!? note: see the spyder.-man.-pages for some details: https://docs.spyder-ide.org/5/installation.html While this installation method is a viable option for experienced users, installing Spyder (and other PyData-stack packages) with pip can lead to a number of tricky issues. While you are welcome to try this on your own, we unfortunately do not have the resources to help you if you do run into problems, except to recommend you use Anaconda instead. You can install Spyder with the pip package manager, which comes by default with most Python installations. Before installing Spyder itself by this method, you need to acquire the Python programming language. YouÔÇÖll first want to create and activate a virtual environment in which to install Spyder, via one of the following methods. With virtualenvwrapper: mkvirtualenv spyder-env workon spyder-env Otherwise, on macOS/Linux/Unix: python3 -m venv spyder-env source spyder-env/bin/activate (base) martin@mx:~ $ conda update spyder Collecting package metadata (current_repodata.json): done Solving environment: - Updating spyder is constricted by anaconda -> requires spyder==4.0.1=py37_0 If you are sure you want an update of your package either try `conda update --all` or install a specific version of the package you want using `conda install <pkg>=<version>` done # All requested packages already installed. (base) martin@mx:~ $ conda install spyder 5.00 Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. PackagesNotFoundError: The following packages are not available from current channels: - 5.00 Current channels: - https://repo.anaconda.com/pkgs/main/linux-64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/r/linux-64 - https://repo.anaconda.com/pkgs/r/noarch To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page. (base) martin@mx:~ $ conda update spyder Collecting package metadata (current_repodata.json): done Solving environment: - Updating spyder is constricted by anaconda -> requires spyder==4.0.1=py37_0 If you are sure you want an update of your package either try `conda update --all` or install a specific version of the package you want using `conda install <pkg>=<version>` done well - while doint the update - i got into abortion....see https://pastebin.com/bB16kKJp
  7. update: i have a closer look: in synaptic we have xrdp and other thigns. and yes: i also will consult the manpages to see how you should configure the inifile cf the following pages: man xrdp https://linux.die.net/man/8/xrdp man xrdp-sesman https://linux.die.net/man/8/xrdp-sesman man xrdp.ini https://www.mankier.com/5/xrdp.ini besides this - i have heard that some folks tend to look for for an GUI clients: remmina had a plugin for rdp, and IIRC vinagre supports rdp, and other things more
  8. dear community, How to Use Remote Desktop Connection in MX-Linux well - i need to get an idea how to use Remote Desktop Connection in mx-Linux: i need to connect to a remote server - the only instruction i have found so far is this How to Use Remote Desktop Connection in Ubuntu https://www.nakivo.com/blog/how-to-use-remote-desktop-connection-ubuntu-linux-walkthrough/ sudo apt-get install -y vim net-tools openssh-server the question is: In order to configure Ubuntu RDP connections, you need to install the RDP client or/and the RDP server, depending on the connection direction. well the question is - is it enough to run this command: sudo apt-get install -y vim net-tools openssh-server
  9. hello dear community, first of all : i hope that youre well and all goes well ! one question regarding google - calendar: - i want to add multiple events to each day. i have a large table with 365 quotes - for one day one row... see below: well i want to add these data to the g calendar - and i want to add the texts of the three colums to each day. that means: and each day contains all the three texts - that means a the question is: how to achive that!? with automated process i only have managed to do this manually if i t ry to do this automatically - look forward to hear from you regards
  10. update: tried to install all anaconda-things according the official instruction - went the hard way - on terminal: see these docs: https://docs.anaconda.com/anaconda/install/linux/ a quick walktrough through the steps ended up in fully-fledged installation of Anaconda3 next steps are shown here: https://docs.anaconda.com/anaconda/user-guide/getting-started/ Linux: Open a terminal window and type anaconda-navigator. voila - now Anaconda3 starts... conclusio: all is fine now.. have a great day
  11. update: tried to install all anaconda-things according the official instruction - went the hard way - on terminal: see these docs: https://docs.anaconda.com/anaconda/install/linux/ a quick walktrough through the steps ended up in fully-fledged installation of Anaconda3 next steps are shown here: https://docs.anaconda.com/anaconda/user-guide/getting-started/ Linux: Open a terminal window and type anaconda-navigator. voila - now Anaconda3 starts... conclusio: all is fine now.. have a great day
  12. due to some hints we are aware of risks that are combined with php mail cf https://blog.ripstech.com/2017/why-mail-is-dangerous-in-php/
  13. dear friends dear Jamesbrown - good day hope youre well and all goes all right at your hometown. Hope that your town is dealing well with the covic-19 things. i did some further tests: and i runned some scripts in order to test the the mail-functions oft he sever by the way and on a sidenote: i also checked some things in the php.ini: The php.ini has smtp_port = 25 set but this function - we do not need for our checks... at the moment. . below some of the tests - / note i tested some scripts -... all of them see below - with the results mailtest10.php: Test-results: email sent - but no mail received at my inbox taken from: https://conetix.com.au/support/simple-php-mail-test/ <?php ini_set( 'display_errors', 1 ); error_reporting( E_ALL ); $from = "My_testmai_adress_@mywebserver.com"; $to = "My_testmai_adress_@mywebserver.com"; $subject = "PHP Mail Test script"; $message = "This is a test to check the PHP Mail functionality"; $headers = "From:" . $from; mail($to,$subject,$message, $headers); echo "Test email sent"; ?> <<<<<<<<<<<<<<<<<< mailtest20.php: Test-results: Error: Message not accepted taken from: https://www.arclab.com/en/kb/php/how-to-test-and-fix-php-mail-function.html <?PHP $sender = 'My_testmai_adress_@mywebserver.com'; $recipient = 'My_testmai_adress_@mywebserver.com'; $subject = "php mail test"; $message = "php test message"; $headers = 'From:' . $sender; if (mail($recipient, $subject, $message, $headers)) { echo "Message accepted"; } else { echo "Error: Message not accepted"; } ?> <<<<<<<< mailtest30.php: Test-results: Testing PHP mail - this text was shown up taken from: https://tekeye.uk/html/php-mail-script-for-testing-email-sending <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>PHP Mail Test</title> </head> <body> <h1>Testing PHP mail</h1> <?php //Use your test email address $to = 'My_testmai_adress_@mywebserver.com'; //Use an appropriate email subject $subject = 'A Test Email'; $message = 'The quick brown fox jumped over the lazy dog. Then the fox jumped over the dog again.'; //wordwrap long content $message = wordwrap($message, 70, "\r\n"); $headers = 'From: some.body@example.com'; //Send the email if(mail($to, $subject, $message, $headers)) { echo 'Email sent out'; } else { echo '<pre>'; print_r(error_get_last()); echo '</pre>'; } ?> </body> </html> Well - now i will have a closer look at the server-conditions. btw - besides the various scripts i found some other ressoruces that cover the topic-mail-deliverability and sending mails from a server: here i found a with explanaitions - on a sidenote with explanaitions i found a great and a very interesting site that reveals lots of information for mail-deliverabilty see https://stackoverflow.com/questions/24644436/php-mail-function-doesnt-complete-sending-of-e-mail interesting points here are some of the following:
  14. dear comunity .... years later i am facing issues - with a new and fresh install, i guess that i have to recapitulate and to "revisite" the old taks - in order to get done all the steps to configure the settings - especially the e-mail-settings. pm a fresh installed wp - the newest version 5.6 i ve got an Error: background: with a new project i want to make sure, that works all propper and is set up correctly. so i just wanted to check the e-mail-setting of the server. i have heard that there are appropiate ways and methods to check mail functions. Well to check whether an email is sent out - we can do this with simple methods: a good and nice option is the following: we can do this by doing a password-reset-email: well, by far the :easiest method to check: if WordPress can send email is to request a password reset. To do this, we have to make sure to log out of the account on the site and go to the login page, e.g. like so: go the wordpress-page.il/wp-login.php if we arrive on that page we just click the following notion ÔÇťLost your password?ÔÇŁ text: then we will arrive on the next page, here we can add our e-mail address of the according user account and demand our new passwd: a texts pops up: ÔÇťGet New Password.ÔÇŁ last step: if get the new passwd - then the system works propperly. but i do not get any password mailed - instand of this i get the message: Error: The email could not be sent. Your site may not be correctly configured to send emails. Get support for resetting your password. further checks: to do more tests to check if wp_mail is working properly if i have configured the server correctly? in other words: i want to check whether an email is sent out using: what is important here: The php.ini has smtp_port = 25 set - this i have checked. What can i do now - what should i do - which steps should i take!?
  15. hi there - good day dear Gizmola, first of all: many thank­čśŐ these links reveal lot of information and show very interstings pathways to the topic of geospatial approach. many thanks for these great hints: Looking from a backend perspective i am at the point to work with stored geographic data of many locations. Working with these data is a important step. working out functions that calculate the distance between between two locations (to show how far the location is from another). Its all about working out an algorithm that suppots these geospatial work. Thank you for sharing these tutorials and study material. Well i am very happy that you have shown some tutorials in the field of MySQL; i am working with openstreetmap-data for many months now - in the last time i thought that need to have - not only requests to the endpoint of Openstreetmap API but more than that - - ability and capability to store the datasets in a db and to work with the data - to have internal procedures/functions to calculate & search locations in the database I am very happy dear Gizmola that you show my MySQL tutorials and study material since i am a bit familiar with MySQL. on a sidenote: many many of my friends have installed PostGreSQL and suggest PostGIS. but i need to have a lean start here - i only want to work with POI - and i do not want to work with full maps and Shapefiles at the moment. So i am happy to have these approaches and pathways that you have shown me. I look at all the datasets, materials and your shared stuff. Also many many thanks for sharing the study materials and tutorials regarding PostGIS and PostgreSQL. Thats a great addition to the MySQL-tutorial-stuff. And here some (many many!!) thank to you, and all the others that do such a great support. You, dear Gizmola, but also the others here namely: requinix and Barand but also Kicken, gw1500se - all of you do a superb job here. This is a great place to be. A place where programmers share ideas and help each other to grow. I love phpFreaks since it is an online community that supports sharing and discovering new ideas and pathways to solve issues in programming. I love this place for discussing computer topics - not only php-realted but also lots of others more. Many thanks for your support - that you are here. Many thanks for this place where we can have debates, and make friends. In the next few days i will have a closer look at all the stuff that you provided. have a great day regards Dil_bert­čśŐ
  16. good day dear freaks - good day dear Barand - and Gizmola, this is a myql-question i am trying to find a simple but effective solution in Geo Spatial Search on a datbase - how to perfomre i have some database things to solve: how to perform a geosort in dataset (eg.MySQL, Postgresql or others) to order by proximity and limit the search to a defined range. in other words: How to do that with (avoiding a) full-scaled table scan for such kind of queries, using (traditional) indexes on the latitude and longitude columns. to begin with the beginning; we can do such nearby searches that are based on openstreetmap-searches like so - and work on the overpass-api-level performing a overpass-turbo.eu request: [out:csv(::id,::type,::lon,::lat,amenity,name,"addr:postcode","addr:city","addr:street","addr:housenumber","contact:website",website,"contact:email")] [timeout:600]; rel[boundary=administrative][admin_level=6][name="M├╝nchen"] -> .city; (nwr[amenity=hospital][name](around.city:2000); nwr[amenity=school][name](around.city:2000);); out center; so we can use the following processes: a. Overpass API ( https://wiki.openstreetmap.org/wiki/Overpass_API ) to search for nearby POIs. b. Nominatim API ( https://wiki.openstreetmap.org/wiki/Nominatim ) c. and yes on Android we also can use osmdroid to perform queries against Overpass API and display the results as overlays on an OSM map. d. but if we have got - lets say 5000 records of openstreetmap-data in the myql-db then we can go ahead and perform a search on that table - see below regarding a and b : for more infos see the following links: a, https://wiki.openstreetmap.org/wiki/Overpass_API by the way: The overpass-turbo interface is also really a very nice, handy and powerful aproach for that kind of search. we can put key=amenity and value=toilets in the search box. It defaults to searching this data what is aimed: i am trying to find all places nearby a certain location - let us do this in lat_lng. What we have is the following dataset: a location (location='location'). assumed we ve got a key for the Google places API Web Service and Google Maps Geocoding API. Accoring to https://github.com/slimkrazy/python-google-places this should be enough. This is a code-approach: YOUR_API_KEY = 'API_KEY' google_places = GooglePlaces(YOUR_API_KEY) query_result = google_places.nearby_search( lat_lng='42.323417, 3.3456666666', radius=200, types=[types.TYPE_SCHOOL] or [types.TYPE_COLLEGE]) for place in query_result.places (##town-hotspot): ## we search in table "town-hotspot" place.get_details() print '%s %s %s' % (place.name, place.geo_location, place.types) according the man-pages we have got the following: https://github.com/slimkrazy/python-google-places from googleplaces import GooglePlaces, types, lang YOUR_API_KEY = 'Key-API-KEY-Key-API-KEY-Key-API-KEY- foo bar ' google_places = GooglePlaces(OUR_API_KEY) # You may prefer to use the text_search API, instead. query_result = google_places.nearby_search( location='Rome, Italy', keyword='Fish and Chips', radius=20000, types=[types.TYPE_FOOD]) # If types param contains only 1 item the request to Google Places API # will be send as type param to fullfil: # http://googlegeodevelopers.blogspot.com.au/2016/02/changes-and-quality-improvements-in_16.html if query_result.has_attributions: print query_result.html_attributions for place in query_result.places: # Returned places from a query are place summaries. print place.name print place.geo_location print place.place_id so we re able to do the following snippet of code for a town-hotspot table: query_result = google_places.nearby_search( ## first of all we need the geo-coordinates: lat_lng='42.323417, 3.3456666666', ## after the coordinates we need to set a value of radius radius=100, ## after the coordinates and the setting of a value of radius we need to choose a type types=[types.TYPE_SCHOOL] or [types.TYPE_COLLEGE]) To see the query_result of Colleges and Schools, we also can simply run the following snippet for a town-hotspot table: query_result.raw_response in tabel but wait: we can do it like so with the town-hotspot Order table by proximity to specific latitude/longitude (using MySQL+PHP) imagine if we have a MySQL table that looks like so: GEODATA more data of town-hotspot --------------------------------------|----- id | param| lat | lng | db-field-data --------------------------------------|----- 1 | a | 41.339563 | -126.3557893 |field 1 --------------------------------------|----- 2 | b | 39.150682 | -107.066214 |field 2 --------------------------------------|----- 3 | c | 49.897893 | -99.444765 |field 3 --------------------------------------|----- 4 | d | 41.327433 | -106.34535 |field 4 --------------------------------------|----- 4 | e | 4=.553133 | -101.24563 |field 5 how to proceed: We could do now is order the above mentioned list according to their proximity to the following dataset: (41.834527,-108.140625). we can do it like so for the search of the town-hotspot table: $a = mysql_query("SELECT * FROM table ORDER BY proximity DESC"); while($b = mysql_fetch_assoc($a)) { echo $b['url'].'<br />'; } but we can also do this like so: we also can perform the Geosorting directly on the database - this may help to find a simple but effective solution in Geo Spatial Search on a datbase. again: what is aimed: requirement: i want to display nearby places - good would be sorted in ascending order of distance from the current user. The places table is: CREATE TABLE town-hotspot ( id int(11) NOT NULL , category varchar(400), category_tag varchar (200), [amenity:] name varchar(400), address varchar(4000) , street varchar(200), city varchar(200) , state varchar(200) , zipcode varchar(40) , country varchar(200) , telephone varchar (100), fax Varchar (100), website varchar (200), mailadress varchar (200), latitude decimal(111,2) , longitude decimal(222,2) , PRIMARY KEY (id) ) note: i have approx 5000 records in a table. Having this above mentioned set of data - note a whole bunch of data - with all that latitude, longitude, address, city and country and others more. which options do i have to find nearby places in the table called "town-hotspot": well i could do the following a. well we could do a calculation of a min, max range of lat, lng in lets say 10-25 miles radius from a certain coordinate with a certain relation to Category and category tag... this would look like so SELECT * FROM town-hotspot WHERE (latitude between MINLAT and MAXLAT ) and (longitude between MINLNG and MAXLNG) and category = CATEGORY varchar(400) and category_tag = CATEGORY_TAG varchar (200) This could be done like so - well i guess that this means to have lots of calculations. what do you say?! i guess that the mysql-search (the last example in this very very long posting ) is a pretty effective solution in Geo Spatial Search on a datbase.
  17. hello Feaks hope youre all right and everything goes well in your home-town. Have a happy new year - and stay healthy. have a happy new year. ever wanted to work with WordPress multisite, but if so - you wanted to be able to use your own names. For example your main site is named example.com. If you want to add a new site to your multisite network it's gonna be called newsite.example.com: Suppose you want to be able to visit newsite.com without example. good news: there is a way to achieve this? first steps to achieve this: setup: https://codex.wordpress.org/Installing_WordPress configuring: https://codex.wordpress.org/Create_A_Network we have to configure the DNS Records (Nameservers) for the Custom Domain: some steps to do so: a. we need to make sure that our custom domain name points to our hosting server. b. for the setup of different domain and hosting accounts (recommendet), we to repeat the steps to set up the networkÔÇÖs main domain name (i.e. the primary domain on which we ve installed WordPress). it is pretty important that we configure the custom domainÔÇÖs DNS records manually. Note: There is no special single catch-all process, since the method will depend on which domain registrar hosting provider we are going to use. here is a sample configuration for the wp-config.php file in the base directory of the WordPress installation: /* Multisite */ define( 'WP_ALLOW_MULTISITE', true ); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); define( 'DOMAIN_CURRENT_SITE', 'www.primary-domain.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); here's the basic configuration for the .htaccess file as a subdomain configuration, in the base directory of the WordPress installation: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] # BoF WordPress cf: https://gist.github.com/domantasg/c68a3e8d180006efde3e5797a89e738f # EoF WordPress .....to get TLD's to work properly, we can do some additional configurations to the wp-config.php file like the following.,.. define( 'COOKIE_DOMAIN', '' ); define( 'ADMIN_COOKIE_PATH', '/' ); define( 'COOKIEPATH', '/' ); define( 'SITECOOKIEPATH', '/' ); cf: https://wordpress.stackexchange.com/questions/251116/how-to-use-wordpress-multisite-with-different-domain-names best practice: - one Apache Virtual Host for the primary domain in the network and then - configure that virtual host with alias domains. Each alias domain being one of the additional sites in the network. links for more infos: https://wordpress.org/support/article/multisite-network-administration/ https://wordpress.org/support/article/create-a-network/ https://www.wpbeginner.com/wp-tutorials/how-to-install-and-setup-wordpress-multisite-network/ https://gist.github.com/domantasg/c68a3e8d180006efde3e5797a89e738f https://kinsta.com/de/wissensdatenbank/wordpress-multisite-domain-mapping/ https://herothemes.com/blog/wordpress-multisite-domain-mapping-guide/ https://premium.wpmudev.org/blog/domain-mapping-wordpress-multisite/ https://wordpress.stackexchange.com/questions/251116/how-to-use-wordpress-multisite-with-different-domain-names[/quote]
  18. dear community, howdy freaks i am on Linux. i want to set up a Python development environment: i have several options: in fact: Lots of choices we have VSCode, Sublime, Eric or ATOM and yes also PyCharm or Anaconda and and lots of others more i have a bit Experience in ATOM which is neat and extensible. It also has a very nice Github-integration. We also can use PyCharm which is a fully flegded IDE with a great Python-support. VSCode is a very very large project on Github - in fact the biggest one. to install VSCode on MX is a bit tricky - there are several options. I describe some - and would be lucky if you add more. we can use Flatpack, since it is integrated into MXPI and it makes easier. some of my friends not use this (Fedora) packaging system, i can install codium as sugested on their web page: it is supposed to worked and we re keep getting updates if we install codium. Here are the steps we can use: (Codium is the same as Code, just removed Microsoft 'telemetry') VSCodium: https://github.com/VSCodium/vscodium/releases # Add the GPG key of the repository: wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | sudo apt-key add - # Add the repository: echo 'deb https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/debs/ vscodium main' | sudo tee --append /etc/apt/sources.list.d/vscodium.list # Update then install vscodium: sudo apt update && sudo apt install codium Anaconda: Btw, there is another option - Anaconda. If we install Anaconda, huge scientific package, many research labs use it, it comes with VS Code (well during installation we need to confirm that we want VS Code also installed) and then VSCode becomes integrated with it. Plus we furthermore get another IDE, simpler Spyder, plus Jypiter Notebook which I really like for certain things. We can check out Anaconda also. Although it is damned huge, some 12GB and after we start creating virtual environments in it, it will get even damned-bigger. Ah, yes, it is perfect for managing virtual environments, we can create them with mouse click, choose what version of python to use with it, which packages... all with mouse if we prefer GUI. Lots of choices we have VSCode :: ATOM :: PyCharm or Anaconda and sublime, Eric and lots of others more
  19. Hello dear PHP-Fellows - dear Freaks this thread covers some of my ideas regarding the Setting up venv on a linux box - my setup for a development-environment - using VSCode / ATOM / PyCharm and others more - well - first of all i am interested in setting up a python development-system.. - - this is my first choice - besides this - of course i am interested in all thing php and also other languages.. here we go: After dealing some time with the installation and the setup of a development-enviroment on a linux box. and besides that on a Win10 too. i currently figure out which things are most important to set up a development environment,. i have installed Python in a global mode and fashion. And i guess that this causes issues all along the way. BTW: guess that it surely is worth to look into docker (and perhaps into Anaconda too - since i guess that i might get rid of the hell of dependencies... note: i am installing all that stuff on both on ... a. on win 10 and b. on linux ? i have read some and have seen a whole bunch of tutorials on the setup virtual environment for Python - in VS Code - best practices for using Virtualenv - and besides for ATOM ... i am very very glad that you have posted and give me some important hints: So i guess that i have to using virtualenv to isolate my projects and then i store pip dependencies in requirements.txt. As we develop, we install, remove and upgrade packages, the list of dependencies in your project differs from requirements.txt but how can i do it right - how to setup venv the right way - a. on win 10 and b. on linux ? i have setup a python-development-environment on a Windows 10 machine and on a MX-Linux-machine. i guess that i set up the machine /ATOM badly - any and all help greatly appreciated. note: the setup of Python with global mode is weird so weird. regarding the set up and usage of virtual environment in VSCode I recently have read an article on using Virtual Environments for Python projects. https://towardsdatascience.com/python-virtual-environments-made-easy-fe0c603fe601 and this one Comparing Python Virtual Environment tools https://towardsdatascience.com/comparing-python-virtual-environment-tools-9a6543643a44 guess, that have to take care how i setup python on my linux-machine. Comparing installed pip packages with requirements.txt :: So if we are using virtualenv to isolate our projects and then subsequently we store pip dependencies in requirements.txt. As we develop, we install, remove and upgrade packages, the list of dependencies in your project differs from the so called requirements.txt Currently Installed Packages: To list what are the packages that are actually installed, we can run $ pip freeze Compare Differences: A simple comparison of requirements.txt and pip freeze will fail because the packages are in different order. sort both of the output then compare them with pip to sume up: some of the best Practices are the following: - Always make sure requirements.txt reflects the actual dependencies - Pin package dependencies - use the exact version - Preferably track only the top level dependencies in your requirements.txt - Update dependencies periodically - year but how - Consider using pip-compile and pip-sync to manage your dependencies. Use pur to automatically update your top level dependencies in requirements.txt I am starting to work on VS-Code using venv: In my project folder I guess that i have to create venv folder. python -m venv venv /path/to/new/virtual/environment but when i run in VS Code the command select python interpreter my venv folder is not shown. to make sure that i do all okay i try the following steps to make my virtual interpreter in VS Code visible? i 1. just go to File > preferences > Settings - afterwards i 2. click on Workspace settings. 3. Under Files: Association, we will find Edit in settings.json , Well i click on that. 4. Update "python.pythonPath": "my_venv_path/bin/python" under workspace settings. (For Windows): Update "python.pythonPath": "my_venv_path/Scripts/python.exe" under workspace settings. And subsequently 5. Restart VSCode incase if it still doesn't show the venv. another option to show virtual environments in vs code: go to the parent folder in which venv is there through command prompt. Type code . and Enter. [Working on both windows and linux for me.] That should also show the virtual environments present in that folder. In one workspace folder named Python need to adde all my other projects. to spell it out clearly: - I would have to have only one venv for the whole workspace folder Python. - i add each subfolder in Python folder as a workspace project like Project1, Project2, Project3, Project4, Project5, Project6 etc. In that Project folder I created venv environment and edited settings.json for workspace with this "python.venvPath": "venv" . Now, for every new project I will create new workspace and inside that folder goes venv folder which will be automatically recognized. +------------------------+ | | | | | python-workspace | | ....-folder | | | +----------+-------------+ | | | +----------------------+ | | | +--------------+ Project1 | | | | | +----------------------+ | | +----------------------+ | | | +--------------+ Project2 | | | | | +----------------------+ | | +----------------------+ | | | +--------------+ Project3 | | | | | +----------------------+ | | +----------------------+ | | | +--------------+ Project4 | | | | | +----------------------+ | | +----------------------+ | | | +--------------+ Project5 | | | | | +----------------------+ | | +----------------------+ | | | +--------------+ Project6 | | | +----------------------+ i think that this is a good idea.. some additional ideas: Attention: I was trying to make my project directory and the virtual environment one and the same - which isn't correct. I have a \Code\Python directory where I store all my Python projects. My Python 3 installation is on my Path. If I want to create a new Python project (Project1) with its own virtual environment, then I do this: python -m venv Code\Python\Project1\venv Then, simply opening the folder (Project1) in Visual Studio Code ensures that the correct virtual environment is used. some words about the creation of a new environment in VSCode we can create a new environment in VSCode, if were just running the following command ( well genearlly spoken we can use ÔÇť.envÔÇŁ as name of the environment): python -m venv .name_of_environment note: it is possible to use the PowerShell as terminal in VSCode, we are able to run the ps1 file. .\.name_of_environment\Scripts\activate.ps1 ther is another option: we also can use the command prompt as terminal in VSCode. If we doso then we can run the bat file. \.name_of_environment\Scripts\activate.bat the good thing: vscode shows up in the bottom left corner the progress: if we just click on the the Python 3.X.X and then we can see the active executable is pointing to the python.exe in our virtual environment folder. this is allmost in every case possible and doable. If not - then were able to select it from the dropdown. This should now be indicated in the bottom left of VS Code. one main goal is to ensure that the virtual environment has been created inside the folder from our workspace if - for the seldom case it happens that it was created outside the folder from our workspace, then we can rework this a bit. In this case, VS Code doesnÔÇÖt pick it up automatically we need to fix this. i will digg deeper and come back... yours - dilbert some good ressources: Python Tutorial: https://code.visualstudio.com/docs/python/python-tutorial virtual environment - the legendary hitchhiker-guide https://docs.python-guide.org/dev/virtualenvs/ Python Tutorial: VENV (Mac & Linux) - How to Use Virtual Environments with the Built-In venv Module a video by corey schafer: https://www.youtube.com/watch?v=Kg1Yvry_Ydk[/QUOTE]
  20. hello dear phpfreaks, running Algolia filter geolocation with radius - in a huge dataset i have a dataset - that looks like so
  21. update: the following code works good - with some renewed brackets [out:csv(::id,::type,::lon,::lat,amenity,name,"addr:postcode","addr:city","addr:street","addr:housenumber","contact:website",website,"contact:email")] [timeout:600]; rel[boundary=administrative][admin_level=6][name="M├╝nchen"] -> .city; ( nwr[amenity=hospital][name](around.city:200); nwr[amenity=school][name](around.city:200); nwr[amenity=childcare][name](around.city:200); nwr[amenity=kindergarten][name](around.city:200); nwr[amenity=nursing_home][name](around.city:200); nwr[amenity=college][name](around.city:200); ); out center;
  22. dear community with the following request via overpass-turbo.eu i have some issues only the last expression works - in other words only the very last expression will be performed : all the others are ignored [out:csv(::id,::type,::lon,::lat,amenity,name,"addr:postcode","addr:city","addr:street","addr:housenumber","contact:website",website,"contact:email")] [timeout:600]; rel[boundary=administrative][admin_level=6][name="M├╝nchen"] -> .city; (nwr[amenity=hospital][name](around.city:2000); nwr[amenity=school][name](around.city:2000);); nwr[amenity=childcare][name](around.city:2000); nwr[amenity=kindergarten][name](around.city:2000); nwr[amenity=nursing_home][name](around.city:2000); nwr[amenity=college][name](around.city:2000); out center; in fact: only this term will be executed: nwr[amenity=college][name](around.city:2000); this is given back: @id @type @lon @lat amenity name addr:postcode addr:city addr:street addr:housenumber contact:website website contact:email 2354666181 node 11.5557656 48.1274889 college EAM-Europa Akademie M├╝nchen - School Of International Business 80337 M├╝nchen Adlzreiterstra├če 6 3324407853 node 11.5551400 48.1264588 college Akademie Deutsche POP 80337 M├╝nchen Adlzreiterstra├če 18a http://www.deutsche-pop.de/standort/muenchen 3324407854 node 11.5713030 48.1285751 college Akademie Deutsche POP 80469 M├╝nchen Klenzestra├če 67 http://www.deutsche-pop.de/standort/muenchen 4379246720 node 11.5629942 48.1469822 college Hochschule f├╝r Politik M├╝nchen 80333 M├╝nchen Richard-Wagner-Stra├če 1 4448465264 node 11.4461165 48.1488143 college DEKRA Akademie GmbH https://www.dekra-akademie.de/de/muenchen/ 4984543723 node 11.5998193 48.1353510 college M├╝nchner Volkshochschule ÔÇô Einstein 28 81675 M├╝nchen Einsteinstra├če 28 https://www.mvhs.de/ueber-uns/standorte/gasteig-einstein-28-stadtbereich-mitte/ 5542020160 node 11.6368555 48.0790856 college Fakult├Ąt f├╝r Betriebswirtschaftf 5542020161 node 11.6348063 48.0806016 college Fakult├Ąt f├╝r Betriebswirtschaft 5542020162 node 11.6336959 48.0810352 college Fakult├Ąt f├╝r Betriebswirtschaft 18940172 way 11.4648639 48.1127381 college Haus A Genzentrum der LMU und Institut f├╝r Biochemie 81377 M├╝nchen Feodor-Lynen-Stra├če 25 https://www.genzentrum.lmu.de/ 19329687 way 11.5817581 48.1500346 college Herzogliches Georgianum 80539 M├╝nchen Professor-Huber-Platz 1 http://www.herzoglichesgeorgianum.de/Herzogliches_Georgianum/Home.html 27959435 way 11.5929977 48.1424114 college Bayerische EliteAkademie 80538 M├╝nchen Prinzregentenstra├če 7 http://www.eliteakademie.de 44615795 way 11.5806579 48.1550310 college Priesterseminar St. Johannes der T├Ąufer http://www.priesterseminar-muenchen.de/ 166433609 way 11.5888108 48.1304498 college Collegium Carolinum 867729755 way 11.6027411 48.1324959 college Katholische Stiftungshochschule M├╝nchen https://www.ksh-muenchen.de well i wonder - there must be missin something in the request
  23. at the first glance all that ideas look very interesting. - many many thanks. i found some ideas to do the job - also like so: [out:csv(::id,::type,::lon, ::lat, "name","addr:postcode","addr:city","addr:street","addr:housenumber","contact:website"," contact:email=*")][timeout:600]; rel[boundary=administrative][admin_level=6][name="M├╝nchen"] -> .city; (nwr[amenity=hospital](around.city:2000); nwr[amenity=school](around.city:2000);)/>; out center; see the output @id @type @lon @lat name addr:postcode addr:city addr:street addr:housenumber contact:website contact:email=* 60234799 node 11.5618175 48.1322485 Medizinische Klinik 80336 M├╝nchen Ziemssenstra├če 1 60235532 node 11.5605247 48.1310014 "Mund-, Kiefer-, Gesichtschirurgie" 80337 M├╝nchen Lindwurmstra├če 2a 60235905 node 11.5592053 48.1302821 Dr. von Haunersches Kinderspital 80337 M├╝nchen Lindwurmstra├če 4 60237053 node 11.5581961 48.1316760 Poliklinik Zahn├Ąrztliche Prothetik 80336 M├╝nchen Goethestra├če 70 60237068 node 11.5581921 48.1313295 Poliklinik Zahnerhaltung und Parodontologie 80336 M├╝nchen Goethestra├če 70 60237323 node 11.5581778 48.1309824 Poliklinik Kieferorthop├Ądie 80336 M├╝nchen Goethestra├če 70 60347733 node 11.5919091 48.1313181 M├╝nchner Volkshochschule 199521374 node 11.3744767 48.1874144 Bernhard-R├Â├čner-Grundschule Gr├Âbenzell 207230074 node 11.3616774 48.1785758 Grundschule am Gerner Platz 82178 Puchheim Gerner Platz 2 207231287 node 11.3614999 48.1791463 Mittelschule Puchheim 82178 Puchheim Lagerstra├če 26 257005653 node 11.5685660 48.2073080 Balthasar-Neumann-Realschule 269510209 node 11.4219190 48.1179807 Wolfartklinik 82166 Gr├Ąfelfing Waldstra├če 7 271226325 node 11.5619132 48.1409559 Medizinischer Bereitschaftsdienst Prielmayerstra├če 3 274617211 node 11.6000672 48.1343476 Schule zur Lernf├Ârderung 81675 M├╝nchen Kirchenstra├če 13 287819214 node 11.4237356 48.1353946 F├Ârderschule und Heilp├Ądagogische Tagesst├Ątte 81249 M├╝nchen K├Âferinger Stra├če 20 295434645 node 11.6410472 48.1924715 VHS Unterf├Âhring 85774 Unterf├Âhring M├╝nchner Stra├če 72 300673921 node 11.6390371 48.0907877 Volkshochschule M├╝nchen Perlach-S├╝d 81739 M├╝nchen Max-Reinhardt-Weg 29 312793352 node 11.5815046 48.1322045 Schulverbund M├╝nchen 80469 M├╝nchen Kohlstra├če 5 332544444 node 11.5602074 48.1420984 M├╝nchner Schmink und Kosmetikschule 332617267 node 11.5649428 48.1347820 Isar Medizin Zentrum 80331 M├╝nchen Sonnenstra├če 24 338723406 node 11.4742575 48.2083018 Waldklassenzimmer 342309527 node 11.5689469 48.2065680 Grundschule an der Hugo-Wolf-Stra├če 358171049 node 11.3574259 48.1813010 Realschule Puchheim 82178 Puchheim B├╝rgermeister-Ertl-Stra├če 9 439254427 node 11.5644958 48.1287555 Klinik Thalkirchner Stra├če 80337 M├╝nchen Thalkirchner Stra├če 48 443898649 node 11.6623555 48.0769996 Volkshochschule 539112865 node 11.6693667 48.2184675 Grundschule an der Camerloherstra├če 85737 Ismaning Camerloherstra├če 20 618659788 node 11.5596871 48.1332364 Institut f├╝r Rechtsmedizin 80336 M├╝nchen Nu├čbaumstra├če 26 619332417 node 11.6639514 48.0764239 Musikschule Neubiberg 656248222 node 11.5820112 48.1247064 Grundschule am Mariahilfplatz 81541 M├╝nchen Mariahilfplatz 18 ... and so forth and so forth.. mani. as allways this forum is so greta: i love it. the ideas here very helpful. have a great day greetings :bigsmile:/>
  24. at the first glance all that ideas look very interesting. . i found some ideas to do the job - also like so: [out:csv(::id,::type,::lon, ::lat, "name","addr:postcode","addr:city","addr:street","addr:housenumber","contact:website"," contact:email=*")][timeout:600]; rel[boundary=administrative][admin_level=6][name="M├╝nchen"] -> .city; (nwr[amenity=hospital](around.city:2000); nwr[amenity=school](around.city:2000);); out center; @id @type @lon @lat name addr:postcode addr:city addr:street addr:housenumber contact:website contact:email=* 60234799 node 11.5618175 48.1322485 Medizinische Klinik 80336 M├╝nchen Ziemssenstra├če 1 60235532 node 11.5605247 48.1310014 "Mund-, Kiefer-, Gesichtschirurgie" 80337 M├╝nchen Lindwurmstra├če 2a 60235905 node 11.5592053 48.1302821 Dr. von Haunersches Kinderspital 80337 M├╝nchen Lindwurmstra├če 4 60237053 node 11.5581961 48.1316760 Poliklinik Zahn├Ąrztliche Prothetik 80336 M├╝nchen Goethestra├če 70 60237068 node 11.5581921 48.1313295 Poliklinik Zahnerhaltung und Parodontologie 80336 M├╝nchen Goethestra├če 70 60237323 node 11.5581778 48.1309824 Poliklinik Kieferorthop├Ądie 80336 M├╝nchen Goethestra├če 70 60347733 node 11.5919091 48.1313181 M├╝nchner Volkshochschule 199521374 node 11.3744767 48.1874144 Bernhard-R├Â├čner-Grundschule Gr├Âbenzell 207230074 node 11.3616774 48.1785758 Grundschule am Gerner Platz 82178 Puchheim Gerner Platz 2 207231287 node 11.3614999 48.1791463 Mittelschule Puchheim 82178 Puchheim Lagerstra├če 26 257005653 node 11.5685660 48.2073080 Balthasar-Neumann-Realschule 269510209 node 11.4219190 48.1179807 Wolfartklinik 82166 Gr├Ąfelfing Waldstra├če 7 271226325 node 11.5619132 48.1409559 Medizinischer Bereitschaftsdienst Prielmayerstra├če 3 274617211 node 11.6000672 48.1343476 Schule zur Lernf├Ârderung 81675 M├╝nchen Kirchenstra├če 13 287819214 node 11.4237356 48.1353946 F├Ârderschule und Heilp├Ądagogische Tagesst├Ątte 81249 M├╝nchen K├Âferinger Stra├če 20 295434645 node 11.6410472 48.1924715 VHS Unterf├Âhring 85774 Unterf├Âhring M├╝nchner Stra├če 72 300673921 node 11.6390371 48.0907877 Volkshochschule M├╝nchen Perlach-S├╝d 81739 M├╝nchen Max-Reinhardt-Weg 29 312793352 node 11.5815046 48.1322045 Schulverbund M├╝nchen 80469 M├╝nchen Kohlstra├če 5 332544444 node 11.5602074 48.1420984 M├╝nchner Schmink und Kosmetikschule 332617267 node 11.5649428 48.1347820 Isar Medizin Zentrum 80331 M├╝nchen Sonnenstra├če 24 338723406 node 11.4742575 48.2083018 Waldklassenzimmer 342309527 node 11.5689469 48.2065680 Grundschule an der Hugo-Wolf-Stra├če 358171049 node 11.3574259 48.1813010 Realschule Puchheim 82178 Puchheim B├╝rgermeister-Ertl-Stra├če 9 439254427 node 11.5644958 48.1287555 Klinik Thalkirchner Stra├če 80337 M├╝nchen Thalkirchner Stra├če 48 443898649 node 11.6623555 48.0769996 Volkshochschule 539112865 node 11.6693667 48.2184675 Grundschule an der Camerloherstra├če 85737 Ismaning Camerloherstra├če 20 618659788 node 11.5596871 48.1332364 Institut f├╝r Rechtsmedizin 80336 M├╝nchen Nu├čbaumstra├če 26 619332417 node 11.6639514 48.0764239 Musikschule Neubiberg 656248222 node 11.5820112 48.1247064 Grundschule am Mariahilfplatz 81541 M├╝nchen Mariahilfplatz 18 ... and so forth and so forth.. many many thanks you guy that you run this forum here . as allways it is so helpful and i get many many ideas out of this forum thoughts are very helpful have a great day greetings :bigsmile:
  25. hope youre all right and everything goes well at your hometown. Hope youre well!! first of all - merry christmas. the question of today: multiple nearby Location by coordinates: finding multiple nearby POIs from current location in OpenStreetMap we can use Overpass API to search for nearby POIs. We can perform queries against Overpass API and display them as overlays on an OSM map: The question is: Is there any API for OpenStreetMap which allows me to obtain a list of (multiple) POIs within a certain distance (e.g. 50 kilometers) from a reference location: we take for example schools and hospitals. what is wanted: I want to query openstreetmaps api for amenitys near a specified city - lets Say M├╝nchen (/Munich) which is part of Bavaria (Bayern) in Germany. I want to find all hospitals and schools near Munich (M├╝nchen), within a radius of 50 km. some basics: The openstreetmaps API Documentation doesn't say some thing that might help here: [out:csv(::id,::type,::lon, ::lat, "name","addr:postcode","addr:city","addr:street","addr:housenumber","contact:website"," contact:email=*")][timeout:600]; area[name="M├╝nschen"]; nwr(around:10000)["amenity"="hospital"]; nwr(around:10000)["amenity"="school"]; out center; but this does not work - unfortunatly: For this kind of request, we generally are working with Overpass API ( https://wiki.openstreetmap.org/wiki/Overpass_API ), which is a read-only API that's designed for such queries (unlike the main OSM API, also known as Editing API, which is mostly useful for contributing to OSM). Overpass API supports an great and very very helpful around filter ( https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Relative_to_other_elements_.28around.29 ) our example ÔÇô hospitals in a 50 km radius around Munich ÔÇô might look like this. (This is a link to Overpass Turbo, which is a frontend that lets helps with building and testing Overpass API queries. Note that the Geocoding in the example is a convenience feature of Overpass Turbo. For regular Overpass API queries, we'll need to provide either the coordinates or OSM element(s) we want to filter around.) for our example- we take M├╝nchen: ( node["amenity"="hospital"](around:50000,{{geocodeCoords:M├╝nchen}}); way["amenity"="hospital"](around:50000,{{geocodeCoords:M├╝nchen}}); relation["amenity"="hospital"](around:50000,{{geocodeCoords:M├╝nchen}}); ); out; >; out; but why does this not work: [out:csv(::id,::type,::lon, ::lat, "name","addr:postcode","addr:city","addr:street","addr:housenumber","contact:website"," contact:email=*")][timeout:600]; area[name="M├╝nschen"]; nwr(around:10000)["amenity"="hospital"]; nwr(around:10000)["amenity"="school"]; out center; - well how to retrieve the data: how to retrieve the data out of a nearby search - with two entities - shools and hospitals. To build a query, we need to know which OpenStreetMap tags correspond to the feature types were actually interested in. The OpenStreetMap wiki provides documentation for most commonly used tags, e.g. amenity=hospital in this example. And yes: besides hospital, we use schools as a second tag. We can use Overpass API to search for nearby POIs. And yes - guess that we need to perform queries against Overpass API and display them as overlays on an OSM map. Overpass API supports an around filter( https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Relative_to_other_elements_.28around.29 ) The around filter selects all elements within a certain radius around the elements in the input set. If you provide coordinates, then these coordinates are used instead of the input set. The input set can be changed with an adapted prefix notation. As for all filters, the result set is specified by the whole statement, not the individual filter. A radius of 0 can be used for a way intersection test on outer/inner points. Syntax: It consists of an opening parenthesis. Then follows the keyword around. Then follows optionally an input set declaration. Then follows a single floating point number that denotes the radius in meters. The filter either ends with a closing parenthesis or is followed by two comma separated floating point numbers indicating latitude and longitude and then finally a closing parenthesis. amenity=hospital is used for hospitals : https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dhospital: amenity=hospital is used for hospitals, i.e. institutions for health care providing treatment by specialised staff and equipment, and typically providing nursing care for longer-term patient stays. In contrast, a medical centre with doctors for outpatient care only should be tagged amenity=clinic, and an individual doctor's office as amenity=doctors. the question:- well how to retrieve the data: how to retrieve the data out of a nearby search - with two entities - shools and hospitals.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.