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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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