I have access to a database here (description of the columns are also available) containing spatial data in text format and with WGS84-EPSG:4326 coordinates.

I would like to only select data in my country (Czech Republic) and save them to our database. Is there any easy way to do this without need to import it to spatial DB and then filter it out?

I am thinking about very simple calculation using simple conditions etc. Is there a better solution than to draw a rectangle in QGIS covering whole country and then use it to define range for longitude and latitude and use it as condition for filtering?


  • Just curious, what's stopping you from using a GIS or a spatial database btw?
    – R.K.
    Sep 26, 2012 at 12:43
  • R.K.: just because we need to simply and automatically download it and put in a CSV file using a simple script. GIS etc. will come later for data processing and analyses.
    – Juhele
    Sep 26, 2012 at 12:53
  • with php or python you can automatically download and create a csv file and put that in the [GIS]database.
    – Mapperz
    Sep 26, 2012 at 13:38

1 Answer 1


On a simple level, if you define a bounding box for the Czech Republic you can construct an SQL query to test if the X and Y coordinates are within the maximum and minimum coordinates of the bounding box.

The query would be something like:


Of course this will result in some data outwith the Czech Republic, as the country is not a perfect rectangle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.