BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vallsas
Pyrite | Level 9

Hi All,

 

I have a question on esri map shape file with polygon map in va.

 

i have a shape file and imported into va cas and then I tried to create a new polygon  by selecting the new Geography item -> under geography data: -> Geographic data provider (but I found from other sas technical papers instead of this option New polygon provider ) and then creating the polygon.

 

after creating the geoiteam and tried to create Geocoordinate map but only x and y points are plotted which are from shape file not polygon .

 

can you please share any views on the how to create custom map with polygon layers in sas viya visual analytics .

 

 

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
FalkoSchulz
SAS Employee

Hi,

Polygon data can be imported into CAS using related %SHPIMPRT macro. There are more information about the steps required at https://go.documentation.sas.com/doc/en/calcdc/3.5/caldatamgmtcas/p1dwawsidsczlpn121j0glleicxp.htm

Once imported - you will need to logon as administrator in order to register new geographic data providers. Standard users won't see related 'new provider' option in the geographic item editor. More details including information about required permissions are covered in https://go.documentation.sas.com/doc/en/vacdc/8.5/vareportdata/p031vp9uc5y5iun0zipy3c1trkqn.htm#p1a7...

If you have a geographical item based on custom geographic data provider - you will need to use a Geo Region visual. Only this visualization is able to render geographical boundaries/regions.

Hope this helps! Falko

View solution in original post

11 REPLIES 11
FalkoSchulz
SAS Employee

Hi,

Polygon data can be imported into CAS using related %SHPIMPRT macro. There are more information about the steps required at https://go.documentation.sas.com/doc/en/calcdc/3.5/caldatamgmtcas/p1dwawsidsczlpn121j0glleicxp.htm

Once imported - you will need to logon as administrator in order to register new geographic data providers. Standard users won't see related 'new provider' option in the geographic item editor. More details including information about required permissions are covered in https://go.documentation.sas.com/doc/en/vacdc/8.5/vareportdata/p031vp9uc5y5iun0zipy3c1trkqn.htm#p1a7...

If you have a geographical item based on custom geographic data provider - you will need to use a Geo Region visual. Only this visualization is able to render geographical boundaries/regions.

Hope this helps! Falko

RobbyP
SAS Employee

I notice in your description you indicate that you're using the Geo Coordinate object. To render regions on a map in SAS Visual Analytics, you need to use either the Geo Region or the multi-layer Geo Region-Coordinate map object. If you use the Geo Coordinate object in Visual Analytics to show regions, the visualization will plot the centroid for each region - which sounds like what you are experiencing.

 

Also, note that as of the SAS Viya July 2021 release, 2021.1.3, you can also import geo shapefiles using the SAS Viya CLI

 

 

vallsas
Pyrite | Level 9
Hi RobbyP, thanks for your reply.

But in my input file doesn't have the region values , my shape file contains only ,x,y,segment,name of the places.

pleas suggest how to create a polygon, as we dont have access to web url, so it should be internal gis map but our base map does not have the layers, our requirement is need layers like polygons.

thanks
vallsas
Pyrite | Level 9
Hi Falko,

Thanks for the details info.

I have done the first part where as i have successfully imported the shape file into sas viva va and found that the there is no geo id or object id which i received the file , but I have created just dummy object id = 1001 and sequence number as well.

the second step , when I create the map of geo coordinate i have assinged the new geography iteam but only x and y values are plotted but not polygon. I want the polygon to be highlighted in my map.
FalkoSchulz
SAS Employee

As mentioned - Geo Coordinate only plots individual data points (markers). For regional areas use the Geo Region object instead.

 

Note, that Geo Region requires a geographical data item which supports regional polygons. It can be an item using the provided built-in lookup tables (e.g. Country, States, etc.) or an item based on a custom geographical provider given the imported shape files as explained earlier. Also note, that Esri shape files come in different types e.g. Polygon, Polyline or Point. Only the type Polygon supports regional areas.

 

You may also use tools such as ArcGIS ArcMap or open-source tools such as QGIS to validate shape files. It typically helps to identify things like geographical IDs and potential custom coordinates spaces.

 

Hope this helps.

Falko

vallsas
Pyrite | Level 9
Hi Falco ,

I got it the polygon shapes in the data, where as from my shape file the area of two columns missing and I received only x and y not the aread values of other two columns.

Finally i created the polygon, thank you for your documents are really helpful.

Now I want the to create the layers of the polygon in one map of different areas. if any links please..
thanks
FalkoSchulz
SAS Employee

SAS Visual Analytics only ships with a few pre-built geo visualizations. There are multi-overlay visuals such as Geo region+coordinate allowing you to overlay regional map with a coordinate (scatter) visual. If you need something different, e.g. region+region (to overlay more than one regional map), you can use SAS Graph Builder to build such template. A good general guide on how to build such template is here https://communities.sas.com/t5/SAS-Communities-Library/SAS-Graph-Builder-Custom-Line-Chart-with-Refe... and the official doc here https://go.documentation.sas.com/doc/en/vacdc/8.5/grbldrug/titlepage.htm.

Hope this helps. Falko

Nigel_Pain
Lapis Lazuli | Level 10

Hi @FalkoSchulz, are geo maps only available in the Graph Builder in Viya? I've not used it before but went to check it out and there were no geo map elements available, VA 7.5 on SAS 9.4M7.

 

Thanks,

Nigel

FalkoSchulz
SAS Employee

Hi @Nigel_Pain  - yes, support for geo map based templates got added to Visual Analytics 8.x. Unfortunately not available in VA 7.x.

Cheers, Falko

Nigel_Pain
Lapis Lazuli | Level 10
Damn! Thanks Falco, helpful as always.
vallsas
Pyrite | Level 9
yes, thank you !
in my case geo map based templates not available 🙂

Thanks

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 2139 views
  • 2 likes
  • 4 in conversation