Bing Maps development extension 2: Spatial data analysis based on Oracle Spatial

Source: Internet
Author: User
The previous article Bing Maps development extension 1: Spatial Data Rendering of Oracle Spatial describes how to render Spatial data in Oracle databases, the spatial data in Oracle can be rendered in a basic graphical interface. We can also perform spatial analysis based on the data. For example, if we want to eat, are there any restaurants in a certain geographical space? In this scenario, we can use Oracle's spatial data analysis. To use Oracle spatial analysis, many preconditions need to be completed, as shown below: 1. Register metadata to register metadata is actually to insert a data entry into the system table USER_SDO_GEOM_METADATA, you must register a field that marks a table. Insert into USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('table name', 'field name ',
SDO_DIM_ARRAY
(SDO_DIM_ELEMENT ('longyun',-180.0, 180.0, 0.5 ),
SDO_DIM_ELEMENT ('latitude ',-90.0, 90.0, 0.5 )),
8307); 2. create a spatial index create index name on table name (Spatial Field name) indextype is mdsys. SPATIAL_INDEX; 3. Oracle built-in functions are used to implement spatial analysis and query. Many spatial analysis functions are provided in Oracle. Here we will not introduce them one by one. A small example will briefly introduce the usage of one function. For example, the data of all geographic names in the range of 121.497081 meters near the specified coordinate (31.239569, 100) is queried. SELECT * FROM GeoInfo n
WHERE SDO_WITHIN_DISTANCE (n. location,
Sdo_geometry( 2001,
8307,
SDO_POINT_TYPE (121.497081, 31.239569, 0 ),
NULL,
NULL ),
'Distance = 100 UNIT = meter ') = 'true' the data in the desired space can be analyzed using the built-in Oracle functions of SQL statements, convert the spatial data to WKT format and publish it to the BingMap client using WCF. The client obtains the data of the Spatial analysis result. To render and present the data on the map, follow the implementation method in Bing Maps development extension 1: Oracle Spatial Space Data Rendering. Related Resources

[1], NetTopologySuite: http://code.google.com/p/nettopologysuite

[2], WKT: http://www.opengis.org/techno/specs.htm

[3]. [Silverlight] Bing Maps articles Description

This document is a learning note and is intended to be shared with people with lofty ideals. You are welcome to repost this article. To save the author's Creative Enthusiasm, mark the original article connection in a prominent position.

Author: Beniao

Article Source: http://beniao.cnblogs.com/or http://www.cnblogs.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.