Commit 77ec1ad8 authored by maa676's avatar maa676

senden

parent 650b7f4c
--3. Ändern Sie das Attribut name der Tabelle countries vom Wert "United States" in "USA"
update countries set name='USA' where name='United States';
--4. Fügen Sie eine Geometrie-Spalte zur Tabelle regions hinzu, die Koordinaten des Ortes der (Sales) regions aufnehmen kann. Wählen Sie einen sinnvollen Geometrie-Datentyp.
select addgeometrycolumn('regions','headquarter_coor',4326,'Point',2);
--5. Fügen Sie per SQL/PostGIS für die vier Orte die Koordinaten von Wikipedia ein, x und y müssen getauscht werden.
update regions set headquarter_coor = ST_SetSRID(st_makepoint(13.4083,52.5186),4326) where region_headquarter_city='Mainz';
update regions set headquarter_coor = ST_SetSRID(st_makepoint(-3.7039,40.4125),4326) where region_headquarter_city='Madrid';
update regions set headquarter_coor = ST_SetSRID(st_makepoint(-80.2242,25.7878),4326) where region_headquarter_city='Miami';
update regions set headquarter_coor = ST_SetSRID(st_makepoint(-43.1964,-22.9083),4326) where region_headquarter_city='Rio de Janeiro';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment