Page 1 of 4

Possible problem with roads on italy map

Posted: Mon 28 Jan 2008 6:15 am
by DD_Friar
Hi,

We are experiencing problems with moving vehicles on some of the roads around the Monte Cassino area.
It may be that, as we have found some errors with airfields on the map that there are a few bugs with the road network as well.

From what I understand of the seow database, each road is mapped with a co-ordinate at a change of direction, is this correct?

I am willing to check the routes out if someone could point me in the right direction to the tables concerned.

My plan would be to plot a vehicle movement in the game fmb and then compare that to the database.

Would that be the right way to go about it?

If not perhaps a way of checking the database could be suggested

Cheers
DD_Friar

Posted: Mon 28 Jan 2008 8:18 am
by IV/JG7_4Shades
Hi Frior (or is it Friar?),

Each SEOW Map in the MP consists of a folder with a stack of .php files in it. Most of these files have the following general contents format:

Code: Select all

<?php
  session_start();

// asp2php (vbscript) converted

//If the session variable is False or does not exist then redirect the user to the unauthorised user page
if ($_SESSION["CommanderGood_session"] != true) {
		header("Location: ../Scripts/default.php");
}

//Set page specific variables
// Sector B Italy.
$CampaignMap="Italy";
$pageTitle="Scorched Earth Mission HQ"; //Title bar text
$pageName="Italy - District B"; //Title in top left corner of page
$GeographicMapImage="Italy_District_B.jpg"; //Bitmap of geographic area
$maxpX=1024; //Size of map image in pixels in x direction
$mincX=0; //Min longitude of image in FB coords
$maxcX=159999; //Max longitude of image in FB coords
$maxpY=729; //Size of map image in pixels in y direction
$mincY=300; //Max latitude of image in FB coords
$maxcY=114000; //Min latitude of image in FB coords
$mapOffsetX=0.0; //FB longitude offset of map origin
$mapdivoffsetX=250; //Pixel offset of left edge of map image DIV 
$mapOffsetY=0.0; //FB latitude offset of map origin
$mapdivoffsetY=0; //Pixel offset of top edge of map image DIV 
$ShowRoads=false; //Turns on display of pre-defined road routes
$ShowRoadWP=false; //Turns on display of pre-defined road route waypoints
$ShowRailways=false; //Turns on display of pre-defined rail routes
$ShowRailwayWP=false; //Turns on display of pre-defined rail route waypoints

include '../Scripts/MP-BuildPage.php';

?>
Down near the end you will see some variables called $ShowRoads and $ShowRoadWP, both set to false in this example. If you edit these files and change these values to true and refresh the corresponding MP page, you will see the road drawn in place over the map. Mousing over the orange dots along the roads will show you the corresponding route number and X-Y coordinates, as read by the MP from the Highways table of the database. The Highways table contains all the road information. The Highway_Intersections table is derived from the Highways table. Route numbers are allocated for each stretch of road between two intersections.

It would be great if you could check out the Italy highways.

Cheers,
4Shades

Posted: Mon 28 Jan 2008 3:20 pm
by DD_Friar
Ok, I will see what I can do.

As to the name....When I first joined the dogz (www.dangerdogz.com) I made the schoolboy mistake of spelling it Frior, after quite a long time I decided to corrct this error and changed it to Friar. So thats what i am called now, although on TS on a good night with the dogz, I answer to a lot worse!

Posted: Thu 31 Jan 2008 4:48 pm
by JAGD_RC
Frior

I pm'd you a link to the original capture data I used for that sector. Hopefully that helps you. Let me know if there's more italy info you need, I think I still have everything.

I will look for the mission file so you can see what I did. I know there was an issue with some of the airfields. They were part of the new airfields included in a 1C patch but were not yet supported by SEOW. So I used the closest airfields I could find.

RC

Posted: Thu 31 Jan 2008 4:56 pm
by JAGD_RC
Ok, I did have the orignal .mis file and added to that .zip, same link will get it for you.

RC

Italy Moves

Posted: Wed 06 Feb 2008 2:44 pm
by doubletap
I did not see this before posting on another thread about this very issue.

If we were to change the DB to show this on the SEOW map, would it impact anything with the ongoing campaign?

I would be more than willing to try and discover which routes are "broken".

Doubletap

Posted: Wed 06 Feb 2008 9:10 pm
by IV/JG7_4Shades
You can substitute new Highways and Highway_Intersections tables during a campaign without breaking anything. Just for info, I will post later the SQL query that generates the Highway_Intersections table from the Highways table, so people can see the changes from modifying the Highways table themselves.

Cheers,
4Shades

Posted: Sat 27 Jun 2009 5:36 am
by EJGr.Ost_Chamel
We have been facing problems with routes on the Italy map too. So I have redone the highways and now I have generated a highway_intersections table with the help of a spreadsheet. But as I would like to double check the results, could you , 4Shades, please post the announced sql query for automatically generating the intersections from the highways table?

Thanks in advance for this and even more for all your work for SEOW!!

Chamel

Posted: Sat 27 Jun 2009 8:42 am
by IV/JG7_4Shades
Hi Chamel,

Here it is:

Code: Select all

drop table if exists Highway_Intersections;
CREATE TABLE `Highway_Intersections` (
`Map` varchar(50) default NULL,
`Intersection_X_Axis` int(11) default NULL,
`Intersection_Y_Axis` int(11) default NULL,
`Route` int(11) default NULL,
`Waypoint_Number` int(11) default NULL
) TYPE=InnoDB;
INSERT INTO Highway_Intersections SELECT DISTINCT * FROM (SELECT Map, X_Axis as Intersection_X_Axis, Y_Axis AS Intersection_Y_Axis, Route, Waypoint_Number FROM Highways, (SELECT Map AS Junction_Map, X_Axis AS Junction_X_Axis, Y_Axis AS Junction_Y_Axis, COUNT(Route) AS Exits FROM Highways GROUP BY CONCAT(Map,'^',X_Axis,'^',Y_Axis) HAVING COUNT(Route)>1) AS Junctions WHERE Map=Junctions.Junction_Map AND X_Axis=Junctions.Junction_X_Axis AND Y_Axis=Junction_Y_Axis ORDER BY X_Axis, Y_Axis, Route) AS Table_With_Dups;

And here is the corresponding query for railways:

Code: Select all

drop table if exists Railway_Intersections;
CREATE TABLE `Railway_Intersections` (
`Map` varchar(50) default NULL,
`Intersection_X_Axis` int(11) default NULL,
`Intersection_Y_Axis` int(11) default NULL,
`Route` int(11) default NULL,
`Waypoint_Number` int(11) default NULL
) TYPE=InnoDB;
INSERT INTO Railway_Intersections SELECT DISTINCT * FROM (SELECT Map, X_Axis as Intersection_X_Axis, Y_Axis AS Intersection_Y_Axis, Route, Waypoint_Number FROM Railway_Waypoints, (SELECT Map AS Junction_Map, X_Axis AS Junction_X_Axis, Y_Axis AS Junction_Y_Axis, COUNT(Route) AS Exits FROM Railway_Waypoints GROUP BY CONCAT(Map,'^',X_Axis,'^',Y_Axis) HAVING COUNT(Route)>1) AS Junctions WHERE Map=Junctions.Junction_Map AND X_Axis=Junctions.Junction_X_Axis AND Y_Axis=Junction_Y_Axis ORDER BY X_Axis, Y_Axis, Route) AS Table_With_Dups;
Cheers,
4Shades

Posted: Mon 29 Jun 2009 7:01 pm
by EJGr.Ost_Chamel
My reworked tables for the Highways and Highway_Intersections on the Italy map are ready. I have just sent them to 4shades for possible inclusion into the next SEOW version/update.
If anyone here is actually flying a campaign on the Italy map and wants to have the data, PM me your mail address.

Greetings
Chamel

Posted: Sun 24 Jan 2010 3:46 pm
by EJGr.Ost_Chamel
@4Shades (or anyone else with solid SQL-knowledge):
Is there a script to extract the Bridges data from the Highways / Railway_Waypoints tables? Would be kind to post it here ... if exists! :wink:

Greetings
Chamel

Posted: Sun 24 Jan 2010 6:59 pm
by Goanna
Hi Chamel,
All the bridge data in those two tables have a negative orientation figure so you could use these sql statements to extract;

SELECT * FROM `highways` WHERE `Orientation` <0
SELECT * FROM `railway_waypoints` WHERE `Orientation` <0

Cheers

Goanna

Posted: Sun 24 Jan 2010 7:47 pm
by IV/JG7_4Shades
Cheers Goanna.

Chamel, the negative orientation value maps into the BridgeID according to the following formula:

Code: Select all

BridgeID = -Orientation - 1
So if bridge orientation = -23 then BridgeID = 22.

You will notice that each negative orientation in Highways or Railway_Waypoints occurs twice (two records). These two records give the start and end coordinates of the bridge. In the Bridges table, the bridges are located by midpoint.

Cheers,
4Shades

Posted: Tue 26 Jan 2010 11:56 am
by PA-Dore
SEOW_Routes_Tool is a easy way for:
- Highways
- Railways
- Bridges

Then use 4Shades sql request for Highways&Railways_Intersections

Bridges table for Iasi incorrect?

Posted: Tue 26 Jan 2010 7:02 pm
by EJGr.Ost_Chamel
Hi Dore + others,

I first tried to find a way to get waypoint and bridges data without the SEOW_Routes_Tool because I currently have no Excel installed on my home PC. OpenOffice-Calc can open the Tool-file, but doesn't unerstand the macros.
But now I mistrust the Routes-Tool, because I think that the current bridges data for the Iasi map in the SEDB32E are not correct!
Some quick examples (all from Iasi map):
  • In the DB there are 90 railway bridges while I can only find 46
  • In the DB there are railway bridges at 14900/269900 (x/y) and at 15300/218500 . But in the Iasi map there is only a railway line at these points without any bridge!
  • The Obj_Names/Bridge_IDs in the DB completely differ from my results! For example in the DB the bridge at 15700/155100 has the name/ID 19 while I think it has to be 4
Maybe I am doing something terribly wrong here - but I don't think so as have checked all my results carefully. So could you - Dore - please check the results that you have apparently determined with the help of the Routes_Tool? I think something is wrong here.

Thanks in advance
Chamel