Exemplo n.º 1
0
        public datacontract.municipality getMunicipalitiy(int NIScode, CRS srs, capakeyGeometryType geomType)
        {
            qryValues.Add("srs", Convert.ToString((int)srs));
            if (geomType == capakeyGeometryType.no)
            {
                qryValues.Add("geometry", "no");
            }
            else if (geomType == capakeyGeometryType.bbox)
            {
                qryValues.Add("geometry", "bbox");
            }
            else if (geomType == capakeyGeometryType.full)
            {
                qryValues.Add("geometry", "full");
            }

            client.QueryString = qryValues;
            Uri    gipodUri = new Uri(baseUri + "Municipality/" + NIScode.ToString());
            string json     = client.DownloadString(gipodUri);

            datacontract.municipality response = JsonConvert.DeserializeObject <datacontract.municipality>(json);

            client.QueryString.Clear();
            return(response);
        }
Exemplo n.º 2
0
        public datacontract.municipality getMunicipalitiy(int NIScode, CRS srs, capakeyGeometryType geomType)
        {
            qryValues.Add("srs", Convert.ToString((int)srs));
            if (geomType == capakeyGeometryType.no) qryValues.Add("geometry", "no");
            else if (geomType == capakeyGeometryType.bbox) qryValues.Add("geometry", "bbox");
            else if (geomType == capakeyGeometryType.full) qryValues.Add("geometry", "full");

            client.QueryString = qryValues;
            Uri gipodUri = new Uri(baseUri + "Municipality/" + NIScode.ToString() );
            string json = client.DownloadString(gipodUri);
            datacontract.municipality response = JsonConvert.DeserializeObject<datacontract.municipality>(json);

            client.QueryString.Clear();
            return response;
        }
Exemplo n.º 3
0
        public datacontract.parcel getParcel(int NIScode, int departmentCode, string sectie, string perceelsNr, CRS srs, capakeyGeometryType geomType)
        {
            qryValues.Add("srs", Convert.ToString((int)srs));
            if (geomType == capakeyGeometryType.no)
            {
                qryValues.Add("geometry", "no");
            }
            else if (geomType == capakeyGeometryType.bbox)
            {
                qryValues.Add("geometry", "bbox");
            }
            else if (geomType == capakeyGeometryType.full)
            {
                qryValues.Add("geometry", "full");
            }

            client.QueryString = qryValues;
            Uri    gipodUri = new Uri(baseUri + "Municipality/" + NIScode.ToString() + "/department/" + departmentCode.ToString() + "/section/" + sectie + "/parcel/" + perceelsNr);
            string json     = client.DownloadString(gipodUri);

            datacontract.parcel response = JsonConvert.DeserializeObject <datacontract.parcel>(json);

            client.QueryString.Clear();
            return(response);
        }
Exemplo n.º 4
0
        public datacontract.parcel getParcel(int NIScode, int departmentCode, string sectie, string perceelsNr, CRS srs, capakeyGeometryType geomType)
        {
            qryValues.Add("srs", Convert.ToString((int)srs));
            if (geomType == capakeyGeometryType.no) qryValues.Add("geometry", "no");
            else if (geomType == capakeyGeometryType.bbox) qryValues.Add("geometry", "bbox");
            else if (geomType == capakeyGeometryType.full) qryValues.Add("geometry", "full");

            client.QueryString = qryValues;
            Uri gipodUri = new Uri(baseUri + "Municipality/" + NIScode.ToString() + "/department/" + departmentCode.ToString() + "/section/" + sectie + "/parcel/"+ perceelsNr);
            string json = client.DownloadString(gipodUri);
            datacontract.parcel response = JsonConvert.DeserializeObject<datacontract.parcel>(json);

            client.QueryString.Clear();
            return response;
        }