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

  • Home
  • SEARCH
  • 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 7411957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:28:00+00:00 2026-05-29T06:28:00+00:00

Hi Stackoverflow people, I am working on an organisation registration, in which orgs can

  • 0

Hi Stackoverflow people,

I am working on an organisation registration, in which orgs can register their project areas (like all Nevada, entire US, or simply a city e.g. Boston) and users should find all organisations which are covered by the organisation according to their lat & lng.

What is the best way to connect the organisation information with the user searches?

Is the following process ok or do you have any suggestions:

  1. I load the shapefiles of all necessary states, counties , etc. in
    my postgis database
  2. If an organisation adds “New York state” to
    their coverage area, I would look up the polygon shape for the state
    (or the id to the shape) and save it in my coverage table
  3. When I search for the org coverage, I would find all projects where the
    user lat & lng is part of

Is that process above ok to connect the user information to the shapefile information?

How can I look up polygons in the shape files? Can I reference them with an ID?

How would the lookup work with cities, since most lists with city name, lat, lng only list the center point of the city? Or is there a table for even city boundaries?

Thank you for your help and suggestions!

  • 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-29T06:28:00+00:00Added an answer on May 29, 2026 at 6:28 am

    When you import a shp file to postgis with shp2pgsql, all the other columns (state name, city name, etc) are imported too, so you can search by name or any other property that the shp file has, or you can search by geometry, if you have a point and you want to search polygons or points(citys in your case) near that point, the query to the database is very simple:

    SELECT * from myTable where ST_DWithin(users_point, the_geom, 0.002);
    

    //the distance units of ST_DWithin are in the geometry units.

    PS shp2pgsql automatically creates a serial column(unique id)

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

Sidebar

Related Questions

Hi people stackoverflow. I'm working with MVVM, I have ViewModel call UserViewModel with a
Hi Stackoverflow people, I would like to change the m2m widget in the admin
Dear honorable people of stackoverflow, why is my textbox, which is my validated control,
I'm recently working on a project in which I need to port a portion
I'm working on a small Rails application in which I'd like users to be
First of all I am not asking for people to do my homework like
Hello wonderful people of stackoverflow! I have a problem. I am working on an
Hi Stackoverflow people, in my current project, I have the following model structure: class
Hello again Stackoverflow people! Assume I have these words: smartphones, smartphone I want to
Hello people of stackoverflow. I have a problem. I'm trying to set up my

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.