VIYA LTS 2022.1
Can anyone advise how can I create the geography role for Geo line object?
I saw very interesting examples in VA Galery (https://communities.sas.com/t5/SAS-Visual-Analytics-Gallery/tkb-p/vagallery) but not many details in the documentation about how to create this role. So far I found how to use the geo map objects (https://documentation.sas.com/doc/en/vacdc/v_017/vaobj/n14ezqxeg2a195n1au1q980gbkte.htm)
and how to create the geography data items
Thank you for your help.
In general you will need to perform these high-level steps:
1. Obtain or create a table or Esri shapefile that contains polyline data.
2. Load that data either into CAS or into an Esri feature service.
3. In VA, create your geographic data item, which will entail defining a geographic provider unless one already exists.
Do you already have your polyline data?
Esri shapefiles are easiest way to get started. You can import shapefiles into CAS rather than host it on an Esri feature service.
I seem to remember there was a SAS Global Forum paper on this topic (polylines), but I can't seem to find it. I'll keep looking.
Making your own data, you need to have data like this:
That is, you need these columns:
Hopefully that will help you get started. To define the geographic provider, you need to have special permissions. Usually it is easiest to just log in as an admin if you such a login available to you. Otherwise you could ask your administrator to grant you Create, Delete, and Update permissions for the
Let us know how it goes!
Thank you for your answer.
Unfortunately, no success so far.
I have converted the shp file NC_RoadLink.shp (all the SHP related files are in the zip file attached NC_RoadLink.zip) using %shpimprt like below:
%shpimprt(shapefilepath=/folder1/folder2/NC_RoadLink.shp, id=identifier, outtable=road_links, cashost=controller.address, casport=5570, caslib='casuser');
This has created the table road_links in CASUSER caslib.
I have created a new Geography provider using the settings from "Edit_Geographic_Data_provider.zip" and the Geography data item using the settings from "Edit_geography_item.zip".
Unfortunately, even if I selected "Polyline" Geometry Type the output created is made of points rather than links. The points created follow very well existing roads, as it can be seen in the results "Output_zoom_out.zip" and "Output_zoom_in.zip".
Can anyone advise way points are created instead of links?
Sorry you are having trouble, but it looks like you have completed the more difficult steps successfully.
Can you show what the road_links table looks like? You could put it in a list table object and make a screen capture, or export to CSV. I don't have the tools handy to visualize the shapefile directly.
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.