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.

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 1553 views
  • 4 likes
  • 4 in conversation