Recovering an old MediaWiki Database

Written by charlie   
Friday, 15 January 2016 15:56
In 2011, I permanently shut down the Wetland Wiki, as the workload of constantly editing and updating the pages became onerous, and Wikipedia had much of the same, if less detailed, information. Before shutting it down, I copied the Mediawiki (Version 1.13.1) database for posterity, and occasionally thought that some of the pages/articles I wrote should not have just disappeared, but been shared in some other fashion. 5 years later, almost to the day, I tried importing the database, and ran into many unforeseen errors, primarily due to depreciated syntax and changes in MySQL - my database hadn’t changed, but the MySQL has changed enough to make importing the database impossible without some updates.

Below are the errors I encountered while importing them into PhpMyAdmin, and how I fixed them; maybe someone else will find them useful. These few changes allowed me to import the 25MB database with approximately 200,000 lines successfully. The first error I encountered was:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=MyISAM' at line 8.

'TYPE=MyISAM' is depreciated, so I searched and replaced over 20 occurrences with "ENGINE=MyISAM". In a closely related error, 'TYPE=InnoDB" was also replaced with "ENGINE=InnoDB".

At this point about 20% of the database was imported successfully until the following error:

#1426 - Too big precision 14 specified for 'cl_timestamp'. Maximum is 6. which was easily corrected to timestamp(6) CREATE TABLE `categorylinks` (
`cl_from` int(8) unsigned NOT NULL default '0',
`cl_to` varchar(255) binary NOT NULL default '',
`cl_sortkey` varchar(86) binary NOT NULL default '',
`cl_timestamp` timestamp(14) NOT NULL,
UNIQUE KEY `cl_from` (`cl_from`,`cl_to`),
KEY `cl_timestamp` (`cl_to`,`cl_timestamp`),
KEY `cl_sortkey` (`cl_to`,`cl_sortkey`,`cl_from`)
) ENGINE=InnoDB

The last error recieved was, #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=HEAP MAX_ROWS=25000' at line 3. Which I updated to 'ENGINE=HEAP MAX_ROWS=25000'

Additionally, PhpMyAdmin had been timing out while importing the database after a few minutes. To lengthen the amount of time available for the import, I added the following line $cfg['ExecTimeLimit'] = 6000; to config.inc.php and restarted Apache.

After all this, the entire 25MB database was imported successfully. Now all I have to do is extract the articles, but that’s for another post!
Last Updated on Friday, 15 January 2016 16:39
 
 

GIS Presentations

Written by charlie   
Thursday, 14 January 2016 19:44
I found the following Open Source GIS related presentations written by GreenWood map over the past 2 years informative, especially the Parcel Mapping complexities found in Wyoming.
  • Skeletonizing Polygons Using PostGIS
  • Cartography and Topology
  • Parcel Mapping WyGEO Meeting
  • Simplifying Geomoetries Using Open Source Tools
The presentations are available on the Greenwood website.
Last Updated on Thursday, 14 January 2016 19:48
 

Wetlands in Connecticut

Written by charlie   
Wednesday, 13 January 2016 18:25
Despite being published in 1991, the 130 page compendium, "Wetlands of Connecticut" is a natural primer on the importance of wetlands and how the states relationship and attention towards these important natural features has changed considerably over time. Written by the Fish and Wildlife Service (USFWS) and Ralph Tiner, the author of many wetland related books, it’s a solid reference.

For some background, the USFWS and the Connecticut Department of Environmental Protection (CT DEEP) joined together in 1980 to conduct a wetlands inventory for Connecticut, as a part of the larger National Wetlands lnventory Project. Using aerial photos, almost 173,000 acres of wetlands, equaling approximately five percent of the states land mass, and 86,500 acres of deepwater habitat, including bays, reservoirs, streams and rivers. In comparison, it is estimated that the state totaled 15 to 20 percent wetlands 200 years ago.

Despite differences in the process used to define and identify wetlands between the FWS and the State of Connecticut, in the end, the mapping is generally In comparison with the FWS wetlands definition, the state of Connecticut, solely defines a wetland by soil type, but according to the report, correlate closely on the ground.

Of this total, 18,828 acres of estuarine wetlands, roughly 12,000 acres are considered salt or brackish marsh, of which approximately 8,000 (!) acres have been ditched for mosquito control, generally during the Depression, dewatering entire marshes. I had known many salt water marshes had been ditched, but didn’t realize the extent. After a quick Google search, it appears that Delaware‘s wetland have had a corresponding percentage of coastal wetlands ditched in the familiar grid pattern, and other East Coast states have likely been similarly affected. Almost unnoticed, the report indirectly identifies the results of climate change, and indicates that between Cape Cod and Cape Hatteras, at the time of the report, sea levels have risen 3.5 mm per year; and the period between 1964-1793, saw a larger rise of 4.5mm per year. For contrast, the previously recorded sea rise average of over the last century is 2.5mm/yr, threatening low lying and coastal areas.
 
 
More Articles...

Page 7 of 51

<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Twitter Feed