1

I have stored my geojson data on mongodb. which contains properties and polygon of a area.

{

"type": "FeatureCollection",

"features": [

{

  "type": "Feature",

  "properties": {

    "Year": 2015,

    "High_Temperature": 32,

    "Low_Temperature": 22,

    "Precipitation_In_mm": 3.5,
    "Snow_In_cm": 0,
    "Average_High_Temperature": 31,
    "Average_Low_Temperature": 21,
    "Season": "Kharif",
    "CROP": "PADDY",
    "DISTRICT": "PUNE",
    "TALUKA": "HAVELI",
    "CIRCLE": "URALIKANCHAN",
    "AY05": "",
    "AY06": 1383.9,
    "AY07": 1914.7,
    "AY08": 1952.5,
    "AY09": 1028.5,
    "AY10": 1805.5,
    "AY11": 1146.1,
    "AY12": 1043,
    "AY13": 1315.1,
    "AY14": 2267.6,
    "AY15": 1428.2,
    "Area_In_Hector": 553,
    "SI_2012_2013_In_Rs": "",
    "Premium_2012_2013": "",
    "SI_2013_2014_In_Rs": "",
    "Premium_2013_2014": "",
    "SI_2014_2015_In_Rs": "",
    "Premium_2014_2015": "",
    "SI_2015_2016_In_Rs": "",
    "Premium_2015_2016": "",
    "SI_2016_2017_In_Rs": 39000,
    "Sum_Insured_2011_to_2015": "",
    "Compensation_Paid_In_lakh": "",
    "Farmer": ""
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          74.129992,
          18.505494
        ],
        [
          74.129047,
          18.505494
        ],
        [
          74.128275,
          18.504436
        ],
        [
          74.127588,
          18.503052
        ],
        [
          74.123125,
          18.496622
        ],
        [
          74.122095,
          18.496378
        ],
        [
          74.121151,
          18.496459
        ],
        [
          74.119692,
          18.496703
        ],
        [
          74.118319,
          18.49711
        ],
        [
          74.117117,
          18.497517
        ],
        [
          74.115744,
          18.498006
        ],
        [
          74.114971,
          18.49825
        ],
        [
          74.114456,
          18.498331
        ],
        [
          74.113941,
          18.498331
        ],
        [
          74.113512,
          18.49768
        ],
        [
          74.112997,
          18.496378
        ],
        [
          74.11274,
          18.495157
        ],
        [
          74.112482,
          18.493773
        ],
        [
          74.112053,
          18.491494
        ],
        [
          74.111624,
          18.48954
        ],
        [
          74.11128,
          18.487994
        ],
        [
          74.111109,
          18.487505
        ],
        [
          74.111452,
          18.486691
        ],
        [
          74.111881,
          18.485552
        ],
        [
          74.114714,
          18.480912
        ],
        [
          74.116945,
          18.477818
        ],
        [
          74.118919,
          18.475783
        ],
        [
          74.12055,
          18.47354
        ],
        [
          74.121666,
          18.471875
        ],
        [
          74.128103,
          18.467072
        ],
        [
          74.129734,
          18.466747
        ],
        [
          74.143381,
          18.467316
        ],
        [
          74.143553,
          18.4687
        ],
        [
          74.143724,
          18.473992
        ],
        [
          74.144497,
          18.474888
        ],
        [
          74.145269,
          18.476027
        ],
        [
          74.15617,
          18.486854
        ],
        [
          74.155912,
          18.488319
        ],
        [
          74.145956,
          18.502564
        ],
        [
          74.14278,
          18.503866
        ],
        [
          74.129992,
          18.505412
        ],
        [
          74.129992,
          18.505494
        ]
      ]
    ]
  }
}

] }

Now I want to display that data on browser using mongoengine and Django rest api. I have already connect my other data with Django using mongoengine but I don't know how to connect geojson data and how to display it on browser using Django and mongoengine. I don't know what to write in models,settings and views file for this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.