Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6112917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:47:58+00:00 2026-05-23T14:47:58+00:00

I want to be able to do the following: Select a Polygon and a

  • 0

I want to be able to do the following:

Select a Polygon and a point and see if the point lies within the polygon…I thought I could do this with MySQL but after a whole day of research it is simply not possible.

I have seen I need to use postgres and postgis, I have never used postgres before.

I have managed to install postgres and postpgadmin and it looks like I have created a database and got it up and running. Now I apparently need to add postgis to the database in order to use the functions? arent they just part of the postgres library? and why are people saying I need to add tables to the database to use the functions?

How do I add postgis to my database?

Can anyone give me any simple clear examples of a query to see if a point is in a polygon?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:47:59+00:00Added an answer on May 23, 2026 at 2:47 pm

    For purely geometrical queries you won’t need postgis. Postgis is required when you want to mess with geographical data.

    For an example of checking if a point is inside a polygon, this query should make it clear to you:

    postgres=# select '((0,0), (1,1), (1,0))'::polygon @> '(.5, .5)'::point;  
    

    This will print true, meaning that the triangle formed by the points (0,0), (1,1) and (1,0) contains the point (.5, .5).

    For more info check: http://www.postgresql.org/docs/9.0/interactive/datatype-geometric.html and http://www.postgresql.org/docs/9.0/interactive/functions-geometry.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to do the following: $normal_array = array(); $array_of_arrayrefs =
I want to be able to parse the following times using ParseExact() function: 01:02:03
I want to be able to do the following: get '/:slug' do haml :page
I want to be able to initialize a CArticle having the following properties: Private
I have the following migration and I want to be able to check if
I have the following table in a database. I want to be able to
In following code I only able to open compose SMS..... I want to open
I want to be able to do the following: I have a model and
I have the following query in mysql 5.1.41: select distinct table_schema from information_schema.tables where
In T-SQL you can do following SELECT SUBSTRING(COLUMN1, 1, 3), * FROM TABLE1 But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.