Forum Discussion

anastasiyaG97's avatar
anastasiyaG97
Frequent Visitor
7 years ago

Create an ArcGIS map that contains both 1) base map 2) TopoJSON file

Hi Community, 

 

How to create an ArcGIS map with:

a) basemap containing worldmap

b) TopoJSON file that consists of polygon of regions (colored by neighborhood name)

How to visualize these regions and have details displayed within the map. 

2 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Icon for Community Support rankCommunity Support

    Hi anastasiyaG97 ,

     

    Firstly, you need to import a TopoJSON file.

    For example, I used this json file.

    {
       "type":"Topology",
       "objects":{
          "Espiras":{
             "type":"GeometryCollection",
             "geometries":[
                {
                   "type":"Point1",
                   "coordinates":[
                      538036,
                      487702
                   ],
                   "properties":{
                      "Elevation":8.29999999926,
                      "RefName":"(2012)",
                      "Text":"(2012)"
                   }
                },
                {
                   "type":"Point2",
                   "coordinates":[
                      500000,
                      400000
                   ],
                   "properties":{
                      "Elevation":8,
                      "RefName":"(2013)",
                      "Text":"(2013)"
                   }
                }
             ]
          }
       }
    }

    Then edit it in Query Editor. You may use power query to complete it. Don’t forget to click Close & Apply when you finish it.

    let
        Source = Json.Document(File.Contents("C:\Users\eadsc\Desktop\test.json")),
        objects = Source[objects],
        Espiras = objects[Espiras],
        geometries = Espiras[geometries],
        #"Converted to Table" = Table.FromList(geometries, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
        #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"type", "coordinates", "properties"}, {"Column1.type", "Column1.coordinates", "Column1.properties"}),
        #"Extracted Values" = Table.TransformColumns(#"Expanded Column1", {"Column1.coordinates", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
        #"Removed Columns" = Table.RemoveColumns(#"Extracted Values",{"Column1.properties"})
    in
        #"Removed Columns"

    Now you get a table with two fields, open the ArcGIS map visual and use these fields.

    Best Regards,

    Eads

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • anastasiyaG97's avatar
      anastasiyaG97
      Frequent Visitor

      Hi Eads, 

       

      Thank you for your fast response and explanation. One mor equestion, is it possible to achieve the similar TopoJSON file when you do not have point coordinates information.

      "type":"Point1",
                     "coordinates":[
                        538036,
                        487702]

       In my test case i can see polygon and type properties: 

      "type":"MultiPolygon","properties":{"Property_Name":"Southeast","Name_ID":"ABCD"}},{"arcs":[[-16,443,444,445,446]]}