BookmarkSubscribeRSS Feed
kimmygzc
Obsidian | Level 7

How to check if a location(latitude, longitude) in a map area(district/city/province)?

 

Have mapsgfk.china

 

input (lat, long)

 

want city name

 

Since proc gmap choro illustrates the map with color pretty nice, I guess there's a way to check if a point is in that color set, which refers to an area.

 

Thanks in advance! 

3 REPLIES 3
ballardw
Super User

Easy : check if a point is inside map region (district/province/whatever) when you have a point coordinates in the same coordinate system the map uses and the boundaries of the area are in the map: Proc Ginside.

 

Since that map set you reference does not have anything I recognize as a city then it doesn't really help much if that is what you want.

 

If you have a source of city point coordinates you might investigate find the minimum distance to cities using the GEODIST function. This topic has also been discussed on the forum a few times.

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2406 views
  • 4 likes
  • 4 in conversation