Reading UTM Shapefile in WPF display

1 Answer 117 Views
Data Virtualization Map
ALI
Top achievements
Rank 1
ALI asked on 17 Sep 2021, 11:07 AM

Hi, I have a shapefile from iran in UTM coordinates, I need to add the shape file to WPF, I added the shape file to my C# and XAML but it did not display. how can I resolve this problem ? if I should change the coordinate system, which coordinate system must be choose in Arc Map(GIS)?

C#

        public MainWindow()
        {
            InitializeComponent();
            fillData();
            this.MouseLeftButtonDown += delegate { this.DragMove(); };
            d_table2.ItemsSource = Dmus;
            d_table.ItemsSource = Dmus;
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            xShapeReader.Source = new Uri("shp9/Export_Output_9.shp", UriKind.Relative);
            xShapeReader.DataSource = new Uri("shp9/Export_Output_9.dbf", UriKind.Relative);
        }

XAML

                        <Grid x:Name="LayoutRoot">
                            <telerik:RadMap x:Name="radMap">
                                <telerik:RadMap.Provider>
                                    <telerik:EmptyProvider/>
                                </telerik:RadMap.Provider>
                                <telerik:InformationLayer x:Name="xInfo">
                                    <telerik:InformationLayer.Reader>
                                        <telerik:MapShapeReader x:Name="xShapeReader"/>
                                    </telerik:InformationLayer.Reader>
                                </telerik:InformationLayer>
                            </telerik:RadMap>

                        </Grid>

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 22 Sep 2021, 06:27 AM

Hello ALI,

The RadMap control works with the Standard Mercator projection (EPSG:4326). In order to show the shapes from the file their locations should use EPSG:4326 coordinates. Alternatively, you can use a coordinate converter

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Data Virtualization Map
Asked by
ALI
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or