
GIS Developer Test
Authored by AGSRT Assessment
Professional Development
Professional Development
Used 9+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
45 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Given the following JavaScript code snippet using Mapbox GL JS, identify the error that would prevent the map from displaying.
javascript
mapboxgl.accessToken = 'your.access.token';
var map = new mapboxgl.Map({
container: 'map', // container ID
style: 'mapbox://styles/mapbox/streets-v11', // style URL
center: [-74.50, 40], // starting position [lng, lat]
zoom: 9 // starting zoom
});
The `accessToken` is incorrectly set.
The `container` ID does not exist in the HTML.
The `style` URL is incorrectly formatted.
There are no errors in the code.
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You need to make a server-side call using Node.js to GeoServer to retrieve all features from a layer called 'cities'. How would you structure your HTTP request using the `fetch` API?
javascript
.then(response => response.json())
.then(data => console.log(data));
The URL is missing authentication parameters.
The `outputFormat` should be set to `text/xml` instead of `application/json`.
The request is correctly structured for the described purpose.
The `fetch` API is not available in Node.js by default.
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following SQL query intended to find all parks within 500 meters of a given point. What is wrong with the query?
sql
SELECT park_name FROM parks
WHERE ST_DWithin(geom, ST_SetSRID(ST_MakePoint(-73.9851, 40.7589), 4326), 500);
The function `ST_DWithin` is not suitable for geometry types.
The SRID 4326 implies degrees, not meters.
`ST_MakePoint` coordinates are in the wrong order.
The query is correctly structured.
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In a React application, you are using Leaflet to create a map. After the component mounts, you initialize the map. However, you notice that the map tiles fail to load properly on first render but appear fine after resizing the window. What is the most likely cause?
javascript
useEffect(() => {
const map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
}, []);
The map container size is not set before the map initializes.
The `useEffect` hook does not correctly clean up after itself.
The tile layer URL is incorrect.
React's virtual DOM does not support Leaflet.
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
. In MongoDB, you want to query documents in a 'locations' collection where the GeoJSON 'place' field is within a certain radius from a point. Which MongoDB query achieves this?
javascript
db.locations.find({
place: {
$nearSphere: {
$geometry: {
type: "Point",
coordinates: [-73.97, 40.77]
},
$maxDistance: 1000
}
}
});
The query is incorrect because `$nearSphere` cannot be used with GeoJSON data.
The `$maxDistance` is incorrectly set in meters without specifying the unit.
The query should use `$geoWithin` instead of `$nearSphere`.
The query is structured correctly for the described purpose.
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In a React application using Maplibre GL JS, the map does not update when the component's state changes. What is a likely solution to this issue?
Use `componentDidUpdate` to update the map.
Make sure the map instance is created inside the `render` method.
Redefine the map instance inside the state object.
Use the `useEffect` hook to update the map when the state changes.
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
How can you use Node.js to periodically update GIS data from a PostgreSQL database with PostGIS extensions?
Using the `setTimeout` function in a loop.
Using the `setInterval` function.
Node.js cannot interact with PostgreSQL.
Using an external cron job to run the Node.js script.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?