This is a migrated thread and some comments may be shown as answers.

Problem While Displaying Heat Map Using Shape File

4 Answers 106 Views
Map
This is a migrated thread and some comments may be shown as answers.
Susan
Top achievements
Rank 1
Susan asked on 09 Sep 2011, 05:09 AM

Hi Telerik Team

While working with telerik heat map I got stuck in a problem. I need to show heat map in my application.

I successfully achieved this functionality for USA map. I used the essri file usa_states which was there in demo code samples provided by you. It is working very well and thanks for providing such usefull demos.

Now my requirement is to show same maps for UK locations. I searched for UK shape files and found these :

1. UK Geographic Boudary Regions - GBR_adm2.shp
2. uK Government Office Regions - Regions.shp

My application is running very well for GBR_admm2.shp file. But if I use the second shape file instead of first one It thorws exception. With regions.shp I am able to
get shapes collection on suitable map events, i am able to set colorizer etc, but at the very last moment exception is thrown which is caught at application level.
Exception details are :
System.Argument Exception : Value does not fall with in the expected range.


Thanks

4 Answers, 1 is accepted

Sort by
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 13 Sep 2011, 01:50 PM
Hello Susan,

Not sure whether anyone will be able to help based on the provided information so far...
Could you elaborate a bit more or link the files themselves -- what is the size of these shapefiles, what is the underlying projection?

Maybe if the shapefiles are too large, you can simplify them with this online tool here? Also, based on this help article here if you are loading shapefiles created for OSGB36 (National Grid UK) or EPSG:900913 (Mercator, meters), you also need to set the EmptyProvider.Projection property to OSGB1936Projection or EPSG900913Projection respectively.


Greetings,
Bart.
0
Susan
Top achievements
Rank 1
answered on 14 Sep 2011, 09:47 AM
Hi

I have a sample for my problem. It clears my question and problem very well.
But I am not able to upload the sample (zipped also) as there is 2MB upload size limit.

Even my shape file size is more than 2MB.


Thanks

0
Susan
Top achievements
Rank 1
answered on 15 Sep 2011, 08:49 AM
Hi Telerik Team

Can you please help me that how can I set the property "EmptyProvider.Projection".
and how can I come to know who has created my shapefile like is it created by OSGB36 (National Grid UK) or EPSG:900913 (Mercator, meters).

Thanks
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 16 Sep 2011, 02:35 PM
Hello Susan,

You can check the MapWindow tool -- I'm not 100% sure whether this tool will do the job, but I think it provides support for re-projecting shapefiles. You can also review the forum there as well: http://www.mapwindow.org/phorum/.

As for your current file projection -- generally, it should be described somewhere by its author (or in separate proj file), did you check the site where you got the UK shapefile in the first place?


Greetings,
Bart.
Tags
Map
Asked by
Susan
Top achievements
Rank 1
Answers by
Bartholomeo Rocca
Top achievements
Rank 1
Susan
Top achievements
Rank 1
Share this question
or