Problem While Displaying Heat Map Using Shape File

5 posts, 0 answers
  1. Susan
    Susan avatar
    6 posts
    Member since:
    Jul 2010

    Posted 09 Sep 2011 Link to this post

    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

  2. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 13 Sep 2011 Link to this post

    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.
  3. DevCraft banner
  4. Susan
    Susan avatar
    6 posts
    Member since:
    Jul 2010

    Posted 14 Sep 2011 Link to this post

    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

  5. Susan
    Susan avatar
    6 posts
    Member since:
    Jul 2010

    Posted 15 Sep 2011 Link to this post

    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
  6. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 16 Sep 2011 Link to this post

    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.
Back to Top
DevCraft banner