The most comprehensive technical interview questions for WebGIS development (30,000 words of dry information)

The most complete webgis 2D and 3D development interview questions (with answers), the full text is 30,000 words of useful information~

For the full PDF, please send a private message or click the link below:

Get the full version of the interview questions


The following is the text:

Interview process

1. Technical interview process:

  • Briefly introduce yourself

  • eight-part essay

  • For the project, ask about the business logic in the project and the technology stack used

2. Those with work experience

  • what did you do before

  • What projects have you worked on and what responsibilities did you undertake in the projects?

  • Choose the bright spots and talk about the difficulties you have overcome.

  • Make sure that what you write can be answered when the interviewer asks.

  • Introduce the key points of the project, sort out the requirements and clarify the business logic.

  • Those who are not in related majors must clearly explain their career plans.

3. Words used in interviews

Note: In technical interviews, do not use the word "like".

Self-introduction (for reference only):

Hello, I am a WebGIS development engineer with rich experience in WebGIS development. I am proficient in front-end technologies such as JavaScript, HTML, and CSS. I am familiar with open source GIS libraries such as ArcGIS API for JavaScript and Leaflet, and can quickly develop WebGIS applications.

I have extensive experience in GIS application development and can independently complete the entire development process from demand analysis, technology selection, development implementation, testing and deployment. I also have in-depth research and practice in GIS data processing, spatial analysis, visual display, etc.

I have good teamwork and communication skills, and can effectively collaborate with product managers, designers, back-end engineers, etc. to complete projects. At the same time, I have a strong interest in new technologies and new technologies, and can quickly learn and apply new technologies.

I look forward to joining a dynamic and innovative team to jointly realize more meaningful WebGIS applications. Thanks!

Basics of GIS eight-part essay

1、WebGIS

WebGIS is a geographic information system based on Web technology. It integrates geographic data and other related information into a website or application, allowing users to browse and query geographic data online. The following is an overview of the basics of developing maps with WebGIS:

1. Map projection: The surface of the earth is a three-dimensional sphere, but in order to display a map on a two-dimensional screen, projection must be used to map the three-dimensional sphere surface onto a two-dimensional plane. Different map projections have different characteristics and application scenarios.

2. Map zoom and roam: WebGIS map applications allow users to zoom and roam the map to view details of a specific area or location. The zoom operation can change the scale of the map, and the roaming operation can move the map's position.

3. Map data source: WebGIS map applications need to use map data sources, including linear data and raster data. Random data includes geographical features such as points, lines, and surfaces, while raster data is an image composed of pixels.

4. Map semiotics: WebGIS map applications use semiotics to represent map data, including colors, line widths, fill patterns, etc. Semiotics can be used to display different properties of geographic data.

5. Geospatial analysis: WebGIS map applications can also perform geospatial analysis, such as buffer analysis, network analysis, and geocoding. These analyzes can help users better understand and utilize geographic information.

6. WebGIS development tools: WebGIS map applications can be developed using a variety of development tools, such as ArcGIS API for JavaScript, OpenLayers, and Leaflet. These tools provide rich APIs and components to quickly create high-quality WebGIS applications.

2. What is dynamic projection?

In layman's terms: In GIS, Dynamic Projection is a technology for real-time visual display of geospatial data.

It can map geospatial data to screen space and dynamically display the changing trends of data at different points in time.

Through dynamic projection, users can better understand the evolution and trends of geospatial data, allowing for better geospatial analysis and decision-making.

Dynamic projection is often used in GIS to visualize time series geospatial data, such as meteorological data, traffic data, population data, etc. It can help users better understand the changing trends of these data and discover patterns and trends in the data.

In summary, dynamic projection is a very useful technique that can help GIS users better understand geospatial data and make more prepared and reliable decisions.

3. How to obtain server data in real time on the Web side

Ajax+timer

 

function send(){ 
$.ajax({ 
url: "/test", 
success: function(res){ //处理res 
} 
}) 
} 
setInterval(function(){ 
send() 
}, 2000) 

WebSocket technology:

WebSocket technology can establish a two-way communication channel between the client and the server to achieve real-time data transmission. When the server-side data changes, the data can be pushed directly to the client through WebSocket to achieve real-time updates.

//创建webSocket 
const socket = new WebSocket('ws://localhost:8080'); // 链接成功 
socket.addEventListener('open', function (event) { socket.send('Hello Server!'); 
}); 
// 接受消息 
socket.addEventListener('message', function (event) { console.log('Message from server ', event.data); 
}); 
//发送消息 
socket.send("你好") 

Server: node

//先npm install ws 
var WebSocketServer = require('ws').Server, 
wss = new WebSocketServer({ port: 8080 });//服务端⼝8080 wss.on('connection', function (ws) { 
console.log('服务端:客户端已连接'); 
ws.on('message', function (message) { 
//打印客户端监听的消息 
console.log(message); 
ws.send('我也很好'); 
}); 
}); 

5. What kinds of services does OGC have?

1. WMS (Web Map Service): map service

Used to obtain map images for display on the Web. WMS services usually allow users to retrieve map images in various formats (such as PNG, JPEG, etc.).

2. WFS (Web Feature Service): vector service

Used to obtain geospatial data for analysis and query on the Web, WFS services usually allow users to retrieve geospatial data in multiple formats (such as GML, JSON, etc.).

Specific code presentation layer: such as loading geojson data

3. WCS (Web Coverage Service): Grid service

Used to obtain remote sensing data and other coverage data. The WCS service allows users to retrieve remote sensing data in various formats (such as GeoTIFF, NetCDF, etc.).

4. WMTS (Web Map Tile Service): map tile service

It is a service of OGC that provides map images that have been cut into small tiles for display on the web. Unlike WMS, WMTS does not dynamically generate map images. Instead, the map is pre-cut into fixed-size tiles and stored on the server. Clients can request specific tiles at specific levels and coordinates without requesting the entire map image. This improves the efficiency and speed of map display, especially when working with large-scale maps.

6. Tile Pyramid

tiles

It refers to cutting a map within a certain range into a square grid picture with rows and columns according to a certain size and format, according to the zoom level or scale, and then cutting the square grid in half. The tiles are vividly called tiles.

7. What types of maps are loaded by WebGIS?

WebGIS refers to a geographic information system based on Web technology that can load various types of map data. Here are some common map types:

1. Quantum map: Quantum map is a map composed of various geometric figures (such as points, lines, surfaces, etc.), which is usually used to represent natural and human geographical phenomena. Vector maps can be scaled and rotated without distortion, so they are widely used in WebGIS.

2. Raster map: A raster map is a map composed of pixels, usually used in satellite images and remote sensing images. Raster maps usually have higher resolution, but may suffer distortion when zoomed and rotated.

3. Three-dimensional map: A three-dimensional map refers to a three-dimensional map that can display high-level information on geographical elements such as buildings, mountains, and rivers. Three-dimensional maps usually require the use of special software to create and display.

4. Real-time map: Real-time map can display real-time traffic, weather, flights and other real-time data. These maps typically require the use of real-time data interfaces and web services to obtain data.

5. Hybrid map: Hybrid map combines the advantages of vector map, raster map and three-dimensional map, and can display different types of data on the same map at the same time. Hybrid maps can provide users with more comprehensive and rich geographical information.

In addition to the map types listed above, WebGIS can also load map data in various formats, such as terrain data, meteorological data, watershed data, etc.

8. Common map reference systems

1. Geographic coordinate system: Also known as the geodetic coordinate system, a coordinate system based on longitude and latitude measurements on the Earth's ellipsoid.

2. Projected coordinate system: A coordinate system that maps points on the earth's surface to a flat map. Common projection methods include Mercator projection, Lambert projection, equiangular conic projection, etc.

3. CGCS2000 uses Gauss-Krüger projection

In WebGIS applications, to ensure data accuracy and consistency, the same map reference system as the geographic data source should be used. If you need to convert coordinates between different map reference systems, you can use a dedicated map projection tool to perform the conversion.

9. The difference between CGCS2000 and WGS:84

CGCS2000 is China Geodetic Coordinate System 2000, a geodetic coordinate system released by the China National Geodetic Survey in 2000. It is based on the earth's center of mass, adopts the spatial coordinate system of the International Terrestrial Reference System (ITRS), and uses the International System of Units (SI) to define geodetic coordinates. CGCS2000 has been widely used in mainland China and its adjacent areas, such as map mapping, GPS navigation, earthquake monitoring, engineering surveying and other fields.

WGS 84 is the geodetic coordinate system used by the Global Positioning System (GPS). It is developed by the U.S. Department of Defense and the National Geospatial-Intelligence Agency

(NGA) jointly released in 1984, it is based on the earth's center of mass, adopts the spatial coordinate system of the International Terrestrial Reference System (ITRS), and uses the International System of Units (SI) to define geodetic coordinates. WGS 84 is widely used in GPS positioning, map drawing, navigation, aviation, surveying and mapping and other fields.

The main difference between the two is the difference in their reference ellipsoids. The reference ellipsoid used by CGCS2000 is GRS80 (Geodetic Reference System 1980), while the reference ellipsoid used by WGS 84 is the WGS84 reference ellipsoid. Although both reference ellipsoids are based on the same Earth model, their parameters are slightly different, so there may be slight differences in different applications. In addition, the coordinate origins of the two geodetic coordinate systems are not exactly the same, so you need to pay attention to the difference when using them.

Tips: In the Openlayers code, there is basically no difference in performance between the two.

10. How to convert CGCS2000 to WGS:84 in Openlayers

// 定义CGCS2000和WGS84的投影信息 
var cgcs2000Proj = new ol.proj.Projection({ 
code: 'EPSG:4490', 
units: 'm' 
}); 
var wgs84Proj = new ol.proj.Projection({ 
code: 'EPSG:4326', 
units: 'degrees' 
}); 
// 定义⼀个坐标点(以经纬度为例) 
var point = ol.proj.fromLonLat([116.38, 39.9], cgcs2000Proj); 
// 将坐标点从CGCS2000转换为WGS84 
var wgs84Point = ol.proj.transform(point, cgcs2000Proj, wgs84Proj); // 打印转换后的坐标点 
console.log(wgs84Point); 

If it is data in a GIS platform, it is more convenient to perform coordinate conversion directly in the desktop software.

11. Differences in map projection types and how to classify them

Map projection is the process of mapping the three-dimensional earth surface onto a two-dimensional flat map. Since the earth is a three-dimensional sphere, the spherical map needs to be converted into a flat map. However, due to changes in the shape and size of the Earth during this process, it is impossible to map it perfectly onto a flat map. Therefore, different map projection types have different advantages and disadvantages and are suitable for different map usage scenarios.

Map projections can be divided into the following types:

1. Equal Area Projection: This type of projection will keep the area proportions on the map unchanged, but will cause distortion in shape and direction. Commonly used equal-area projections include Cato and Lamberto projections.

2. Conformal Projection: This type of projection will keep the angle on the map unchanged, but will cause area and length deformation. Commonly used isometric projections include Mercator projection and epigraphic projection.

3. Equidistant Projection: This type of projection will keep the distance ratio on the map unchanged, but will cause area and shape distortion. Common equidistant projections include orthogonal equidistant projection and orthogonal equidistant projection.

4. Composite Projection: This projection type is a combination of the above three projection types. Comprehensive projections are often used for maps that need to balance multiple factors, such as shape, area, and distance.

Different map projection types are suitable for different application scenarios. When choosing a map projection type, you need to consider factors such as the type of information that needs to be expressed, the size and shape of the map area, and the purpose of the map.

12. What parameters need to be set when raster cutting?

Raster slicing refers to dividing a large raster dataset into multiple small raster datasets for easier storage, processing, and analysis. When performing raster slicing, you usually need to set the following parameters:

1. Slicing method: Raster data can be sliced ​​according to rows, columns, rectangles, sizes, quantities, etc. Different slicing methods correspond to different parameter settings.

2. Slice size: The size of each small piece into which the raster dataset is cut can be set in pixels or geographical units (such as degrees or meters).

3. Slice number: For each slice, you need to specify a unique identifier, such as the slice's row number, slice name, etc.

4. Coordinate system: The coordinate system of the raster dataset can be set according to the actual situation.

5. Output path: The storage path of the sliced ​​data set. Usually you need to specify a directory, where each slice will be saved as a separate file.

6. Compression format: The sliced ​​data set can be compressed in different formats, such as zip, tar, gz, etc. The choice of compression format usually needs to be determined based on actual needs and storage limitations.

The specific parameter settings of raster slicing are also related to the slicing tool used. For example, the slicing tool in ArcGIS and the slicing tool in GDAL may have different parameter settings.

13. Briefly describe the difference between sliced ​​map service and dynamic map service and the loading method

Cut map service and dynamic map service are two common types of Web map services. They have the following differences:

1. Data format: The sliced ​​map service is a map service based on tile (Tile) data. The map data is pre-cut into small pieces and stored on the server. The user only needs to load the required tiles when using it. Data is enough; the dynamic map service is a map service based on vector data, and the map data needs to be rendered in real time on the client.

2. Loading method: The data of the sliced ​​map service is preprocessed into a series of tile data, so the required tile data can be directly requested when loading, and the loading speed is faster; while the dynamic map service needs to be processed on the client For real-time rendering, all data needs to be requested when loading, so the loading speed is slow.

3. Rendering effect: The rendering effect of the sliced ​​map service is relatively fixed and can only display existing data; while the dynamic map service can be rendered in real time through the client, so the rendering effect is more flexible and can be more customized. operate.

As for the loading method, slice map services can use standard Web map service protocols (such as WMS, WMTS), or use JavaScript libraries (such as Leaflet, OpenLayers) to load; dynamic map services usually use RESTful APIs To load, for example, Esri ArcGIS Server's REST API.

In short, both sliced ​​map services and dynamic map services have their own advantages and disadvantages, and developers should choose the appropriate map service type based on actual needs.

14. What are the common spatial databases?

In GIS development, common spatial databases include:

1. PostgreSQL/PostGIS: PostgreSQL is an open source object-relational database management system, and PostGIS is a spatial database extension for PostgreSQL that can be used to store, query, and analyze spatial data.

2. Oracle Spatial: Oracle Spatial is an extension of Oracle database. It provides functions for storing and querying spatial data, including geometric object types, spatial indexes and spatial query operations.

3. SQL Server Spatial: SQL Server Spatial is an extension of the Microsoft SQL Server database. It provides functions for storing and querying spatial data, including geometric object types, spatial indexes, and spatial query operations.

4. SQLite/SpatiaLite: SQLite is a lightweight embedded relational database management system, while SpatiaLite is a spatial database extension for SQLite that can be used to store, query and analyze spatial data.

5. MongoDB: MongoDB is a NoSQL database that can store various types of data, including spatial data. MongoDB stores spatial data in GeoJSON format and provides some spatial query operations.

6. MySQL Spatial: MySQL Spatial is an extension of the MySQL database. It provides functions for storing and querying spatial data, including geometric object types, spatial indexes and spatial query operations.

The above are common spatial databases. Each database has its unique advantages and applicable scenarios. Developers should choose the appropriate spatial database according to specific needs.

openlayers graphics drawing

Geodetic coordinate system

EPSG:4326

Mercator

EPSG:3857

Gauss-Glück CGCS2000

EPSG:4490

1. How Openlayers implements interactive drawing

  • Create a vector layer and a vector data source - Create a canvas

  • Create a brush

  • Activate brush

2. Does the drawing component encapsulate a drawing component separately, or does it use a method?

3. How to load the sky map, set the center point and display level

const TianDiMap_cva = new ol.layer.Tile({ 
title:"天地图⽮量注记图层", 
source:new ol.source.XYZ({ 
url:'http://t0.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=' + '8a5c2b00e94b49659861e064c37f778d', 
wrapX:false 
}) 
}) 
const map = new ol.Map({ 
target:'map_container', 
layers:[TianDiMap_vec,TianDiMap_cva], view:new ol.View({ 
projection:'EPSG:4326', 
center:[0,0], 
zoom:1 
}) 
}) 

4. How to implement layer switching

const layers = map.getLayers().getArray(); 
map.addLayer(); 
map.removeLayer(); 
map.getLayers().item(index).setVisible(boolean) //实现图层的显示和隐藏

Part 2

1. What is oblique photography technology?

Oblique photography technology is equipped with multiple sensors on the walking platform to simultaneously collect images from different angles such as one vertical and four side views. We can understand it as an evolved photogrammetry technology. It has four more oblique shooting angles than traditional photogrammetry, so that it can obtain richer side texture and other information.

2. Collection of oblique images

The collection of oblique images is mainly divided into two processes. The first is equipment preparation, and the second is route design and actual shooting.

**Equipment preparation:** Equipment for oblique image collection includes aircraft and oblique cameras. The aircraft can be manned or unmanned. Manned aircraft are mostly used for oblique photography of particularly large areas, such as the domestically produced Yun-Twelve and Yun-5. Unmanned helicopters can be used for medium-scale operations, such as the Seven-Dimensional Aerial Survey Unmanned Aerial Vehicle. For small-scale operations, multi-rotor drones can be used, such as Hongpeng drones and DJI drones. As for tilt cameras, most tilt cameras use five lenses: downward, front, rear, left, and right to obtain oblique images of ground objects. The more common ones are the Leica RCD30 tilt camera and the four-dimensional telescope SWDC. -5 tilt cameras, Hongpeng micro tilt cameras, etc.

**Designed route and actual shooting: **The route design of oblique photography is designed using special route design software, and its relative altitude, ground resolution and physical pixel size satisfy the three-angle relationship. After the equipment is assembled and the route is planned, aerial photography is performed to obtain multi-angle images with a certain degree of overlap. The oblique image collection part is completed.

3. Commonly used coordinate systems in China

1. WGS-84 coordinate system: geocentric coordinate system, GPS original coordinate system

In China, no map product is allowed to use GPS coordinates, reportedly for confidentiality reasons.

2. GCJ-02 coordinate system: National Survey Bureau coordinates, Mars coordinate system

1) The coordinate system released by the National Survey Bureau in 2002 is an encryption algorithm for longitude and latitude data, which adds random deviations.

2) Internet maps in China must use at least GCJ-02 for initial encryption. Direct use of geographic data in WGS-84 coordinates is not allowed. At the same time, any coordinate system cannot be converted to WGS-84 coordinates.

3) It is the most widely used coordinate system in China, and is used by AutoNavi, Tencent, and Google China Maps.

3. CGCS2000 coordinate system: National Geodetic Coordinate System

This coordinate system is a geodetic coordinate system established through the China GPS continuous operation base station, the space geodetic control network, and the joint adjustment of the astronomical geodetic network and the space geodetic network.

4. BD-09 coordinate system

The coordinate system used by Baidu China Map is obtained by further offset algorithm using GCJ-02.

5. Sogou coordinate system

The coordinate system used by Sogou Map is obtained by further offset algorithm using GCJ-02.

6. Tuba coordinate system

The coordinate system used by Tuba map is obtained by further offset algorithm of GCJ-02.

4. Introduction to the coordinate system used by domestic map software

1. Baidu Map

1) Domestic (including Hong Kong, Macao and Taiwan): BD09

a. Encrypt again based on the GCJ-02 coordinate system

b. Supports the conversion of WGS-84 and GCJ-02 into BD09, but the reverse is not supported, and there is a limit on the number of batch conversions at one time 2) Overseas: WGS-84

2. Amap:

1) Domestic: GCJ-02

a. WGS-84——>GCJ-02 (Gode has an interface to provide it, but not vice versa)

2) Overseas: Not supported yet

3) AMap is AutoNavi Map, which is the name used by AutoNavi Maps to be listed on Nasdaq. It mainly provides free API services to Internet companies or individuals.

4) MapABC is a Tumeng company under the Gaode Group. It mainly targets mass enterprises or government agencies and provides paid services.

5) Amap and MapABC share data and services, so it is normal for Mapabc to use Amap’s API.

3. google map

1) Domestic: GCJ-02

a. The data comes from Gaode, and the two are interoperable 2) Overseas: WGS-84

4. Map of the sky

Global unification: CGCS2000

5. Tencent map: soso map territory: GCJ02

6. Microsoft Bing Map: BingMap

Global harmonization: WGS-84

7. Sogou Map

Domestic: Sogou coordinate system

a. Encrypt again based on the GCJ-02 coordinate system

b. Supports conversion of WGS-84, GCJ-02, and BD09 into Sogou coordinates, but the reverse is not supported.

8. MapBar map: MapBar

Within the territory: Tuba coordinate system

a. Encrypt again based on the GCJ-02 coordinate system

9. Alibaba Cloud Map

Domestic: GCJ-02

10. Lingtu map: 51ditu

Domestic: GCJ-02

5. Commonly used coordinate conversion software

Coordinate conversion software is a tool used to convert between different coordinate systems. The following are several open source coordinate conversion software.

1. PROJ: PROJ is a widely used open source geographical reference system library that can be used for various spatial data operations, such as coordinate conversion, map projection conversion, etc. PROJ supports the conversion of many coordinate systems, including latitude and longitude, UTM, state plane coordinates, national grid, etc.

2. GDAL/OGR: GDAL/OGR is a powerful open source geospatial data processing library that provides tools and APIs for reading, writing, and converting data in various formats. GDAL/OGR supports the conversion of a variety of commonly used coordinate systems.

3. GEOS: GEOS is a C++ library that provides tools for various data analysis and operations, such as buffer analysis, convex hull analysis and topology analysis. GEOS also includes tools for transforming coordinate systems.

4. Proj4j: Proj4j is a Java transplanted version of PROJ.4 and can perform various coordinate conversions.

5. PyProj: PyProj is a Python library that provides an encapsulation of the PROJ library and can be used for spatial data operations, such as coordinate conversion, map projection conversion, etc.

6. OpenLayers: OpenLayers is a JavaScript library used to create interactive maps in a web browser. OpenLayers supports multiple coordinate systems and projection methods and can be converted.

These software provide open source tools and APIs that can perform commonly used coordinate conversion operations. You can choose the coordinate conversion software that suits you according to your needs.

6. There are many elements on the map and it is slow to load. Have you ever encountered crashes? How can the front end be alleviated?

When the front end processes a large number of elements, it may indeed encounter problems such as slow loading, lags, and crashes. Here are some ways to mitigate these issues:

1. Data optimization: Filter out unnecessary data and load only necessary data. For example, if you only need to display certain areas or points on the map, you can filter by zooming or other methods to load only these features. This reduces data volume and speeds up loading.

2. Layer classification: Classify the map layer by layer. Each layer only displays specific elements, reducing the number of elements in one layer. Multiple layers can be superimposed through the cascading effect to form a complete map effect. This can reduce the number of renderings of a single layer and improve performance.

3. Background optimization: Data is trimmed and compressed through the background to reduce the size of data transmission. Data can also be divided into blocks and loaded in segments in the background to reduce the burden on the front end.

4. Tile map: Divide the map into tiles and display only the tiles within the visible range of the current screen, reducing unnecessary data loading. This technology can greatly reduce loading speed, especially when concurrent user requests for large maps are very high.

5. Front-end optimization: Optimize front-end performance through caching, preloading and other technologies. For example, you can cache some frequently used data to improve the response speed. You can also preload the next page that is about to enter when the user browses a page to improve the user's response time. experience.

In short, in map applications that handle a large number of features, optimizing data, grading and tiles maps, using tile maps, compressing and trimming data in the background, and optimizing front-end are all ways to ease map loading. An effective method to prevent slowness, lag, and crashes.

7. The difference between two-dimensional and three-dimensional:

The most significant difference between two dimensions and three dimensions is the dimensions of the objects they describe.

Two dimensions refer to a plane, usually an image or a plane geometry described by two coordinate axes (x-axis and y-axis). For example, a piece of paper, a painting, a map or a 2D barcode are all 2D objects.

Three-dimensional refers to space, an object or shape usually described by three coordinate axes (x-axis, y-axis, and z-axis). For example, a sphere, a cube, a car or a building are all three-dimensional objects.

Because three-dimensional space has additional dimensions such as depth, height, and width, it can more accurately describe objects and scenes in reality, allowing us to better understand and simulate things in the real world. Two-dimensional space is more suitable for image processing, computer graphics, and other graphic design applications.

8. The difference between mapbox and cesium

Mapbox and Cesium are both open source tools in the WebGIS field. They both provide rich map display and data visualization functions, but they differ in some aspects.

1. Different positioning:

Mapbox pays more attention to the production and display of static maps and dynamic maps, especially in terms of implementation in mobile devices and web applications. It provides a powerful map rendering engine and tools to quickly build interactive maps.

Cesium focuses more on the visualization and analysis of real-time earth and space data. It has functions such as three-dimensional scene rendering, dynamic earth and virtual earth. It is mainly used for advanced earth science research, military intelligence analysis, aerospace fields and virtual reality applications. aspect.

2. Different data sources:

Mapbox's map data mainly comes from its own data processing and developer community, and it also supports the use of open source data such as OpenStreetMap.

Cesium's map data mainly comes from data providers such as NASA, OpenStreetMap, and Bing Maps.

3. Different technical implementations:

Mapbox mainly uses web technologies such as HTML5, CSS3 and JavaScript for development and deployment.

Cesium uses technologies such as WebGL and JavaScript to achieve high-performance 3D scene rendering and data visualization.

In short, Mapbox and Cesium are both powerful WebGIS tools, but they have different focuses. You can choose the appropriate tool according to specific application needs.

9. The geographical coordinate system of the sky map, the difference between the projected coordinate system and the geographical coordinate system

Tiantu is an online map service provider that supports a variety of map projections and coordinate systems. When using sky maps, you need to understand the differences between geographic coordinate systems, projected coordinate systems, and geographic coordinate systems.

A geographic coordinate system is a coordinate system used to represent the location of points on the earth's surface, usually expressed in terms of longitude and latitude. The geographical coordinate system is a three-dimensional coordinate system with the earth's center of mass as the origin and the earth's celestial plane and a fixed point (such as the North Pole) as the datum.

The projected coordinate system projects the longitude and latitude on the earth's surface onto a plane to facilitate display on a two-dimensional map. Projected coordinate systems are usually two-dimensional, with units of meters or feet. Different projection methods can produce different projection coordinate systems, such as Mercator projection, Gauss-Krüger projection, etc.

In sky maps, common projection coordinate systems include Mercator projection (EPSG:3857) and Gauss-Krüger projection.

(EPSG:4490)。

The tile data provided by Tiantu uses the Mercator projection coordinate system, which is a cylindrical isometric projection that has high accuracy and is widely used. The tile data of the sky map is cut according to this projected coordinate system.

In the development documents of Tiandi, the geographical coordinate system used is WGS84 (EPSG:4326), which is commonly known as the latitude and longitude coordinate system. When using Sky Map, you need to convert the longitude and latitude coordinates of the WGS84 coordinate system into the Mercator projection coordinate system used by Sky Map, and then the map can be displayed correctly.

In general, the geographical coordinate system and the projected coordinate system are both coordinate systems that represent the position on the earth's surface, but the geographical coordinate system is a three-dimensional coordinate system, and the projected coordinate system is a two-dimensional coordinate system. When using a sky map, you need to understand the coordinate system used and perform correct coordinate conversion in order to display the map correctly.

10. What information is needed for openlayer to load raster services?

To load a raster service, you need to provide the following information:

1. Service URL: This is the access address of the grid service, usually a URL starting with http or https.

2. The name or ID of the layer: The raster service may contain multiple layers. Each layer has a name or ID. You need to specify the name or ID of the layer to be loaded.

3. Projection information of the layer: Each layer in the raster service has a projection information, which is used to define the coordinate system and data range of the layer. When loading a layer, you need to specify the correct projection information, otherwise the layer may be displayed incorrectly or cannot be displayed.

4. Layer style information (optional): Each layer in the raster service may have some style information, such as color, transparency, etc. The display effect of the layer can be controlled by specifying style information.

In OpenLayers, you can use the ol.layer.Tile class to load the raster layer, and you need to pass a parameter object containing the above information to the constructor. For example:

var layer = new ol.layer.Tile({ source: new ol.source.TileWMS({ 
url: 'http://example.com/wms', params: {'LAYERS': 'mylayer'}, projection: 'EPSG:4326' 
}) 
}); 

Among them, url represents the URL address of the service, params contains parameters such as layer name, and projection represents the projection information of the layer. The raster service is loaded by adding the layer to the map.

11、geojson

1. Concept

GeoJSON is a geospatial data exchange format based on JSON (JavaScript Object Notation) format, used to represent geospatial data. It encodes geospatial data and related non-spatial attribute information (such as name, description, etc.), and uses JSON format for storage and transmission.

GeoJSON supports multiple types of spatial data objects, including points, lines, surfaces, etc., and also supports composite objects, such as geometry collections (GeometryCollection) and feature collections (FeatureCollection). GeoJSON uses longitude and latitude (i.e.

) to represent spatial positions, and also supports projected coordinate systems and geographical coordinate systems.

GeoJSON is a simple, lightweight, easy to understand and process data format that has been widely used in Web GIS applications, such as in map libraries such as Leaflet, Mapbox, and OpenLayers, as well as in various geographic information systems ( GIS) application.

2. Code

{
type:"FeatureCollection", 
features:[ 
{ 
type:"Feature", 
geometry:{ 
type:"Point", 
coordinates:[114.407, 30.4645] }, 
properties:{ 
name:"新中地" 
} 
} 
] 

3. Geojson API in Openlayer

3-1. Load local data

var source = new ol.source.Vector({ 
/* 将geojson数据设置给实例数据源 */ 
features: new ol.format.GeoJSON().readFeatures(data) }) 
 
 

3-2. Network data

 
 
const source = new ol.source.Vector({ 
url: 'https://geo.datav.aliyun.com/areas_v3/bound/geojson?code=420100', format: new ol.format.GeoJSON() 
}) 
const layer = new ol.layer.Vector({ 
source 
}) 
map.addLayer(layer) 

Common spatial databases

1. ArcGIS Esri geodatabase

2、MapGIS GDB

3. PostGIS is one of the most well-known and complete spatial databases. It is an extension of the open source database PostgreSQL.

4、Oracle

5. Microsoft SQL Server

6. Amazon Aurora

Amazon Aurora is a cloud-based spatial database. It can run MySQL or PostgreSQL open source databases. You can easily migrate your database to the Amazon Aurora platform and take advantage of its full set of tools.

How does a geographical coordinate system measure distance?

1. Explanation from a theoretical perspective

According to the projection type (Mercator projection), geographical coordinates are converted into plane coordinates, and the distance between two points is measured according to a certain algorithm.

2. Explain from the code perspective

<script src="https://lib.baomitu.com/Turf.js/latest/turf.min.js"></script> 

1. Measurement between two points

var from = turf.point([-75.343, 39.984]); 
var to = turf.point([-75.534, 39.123]); 
var options = { units: 'miles' }; 
var distance = turf.distance(from, to, options); console.log(distance) 

2. Measure the length of the line segment

 
 
var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]] ); 
var length = turf.length(line, { units: 'miles' }); 
console.log(length) 

For the full version, please click:

Get the full version of GIS 2D and 3D development interview questions

Guess you like

Origin blog.csdn.net/jdjxbsus/article/details/130927857