Index: BlobExplorer.cpp ================================================================== --- BlobExplorer.cpp +++ BlobExplorer.cpp @@ -1,10 +1,10 @@ /* / BlobExplorer.cpp / a dialog to explore a BLOB value / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -26,763 +26,808 @@ #include "Classdef.h" #include "wx/mstream.h" #include "wx/clipbrd.h" -BlobExplorerDialog::BlobExplorerDialog (MyFrame * parent, int blob_size, - unsigned char *blob) +BlobExplorerDialog::BlobExplorerDialog(MyFrame * parent, int blob_size, + unsigned char *blob) { // // constructor; just calls Create() // - Create (parent, blob_size, blob); + Create(parent, blob_size, blob); } -bool -BlobExplorerDialog::Create (MyFrame * parent, int blob_size, - unsigned char *blob) +bool BlobExplorerDialog::Create(MyFrame * parent, int blob_size, + unsigned char *blob) { // // creating the dialog // - MainFrame = parent; - BlobSize = blob_size; - Blob = blob; - BlobType = MainFrame->GuessBlobType (BlobSize, Blob); - Geometry = NULL; - Image = NULL; - if (BlobType == MyFrame::BLOB_GEOMETRY) - Geometry = gaiaFromSpatiaLiteBlobWkb (Blob, BlobSize); - if (BlobType == MyFrame::BLOB_JPEG || BlobType == MyFrame::BLOB_PNG - || BlobType == MyFrame::BLOB_GIF) - { - ::wxInitAllImageHandlers (); - wxMemoryInputStream reader (Blob, BlobSize); - Image = new wxImage (reader); - } - if (wxPropertySheetDialog::Create - (parent, wxID_ANY, wxT ("BLOB explorer"), wxDefaultPosition, - wxDefaultSize, - wxDEFAULT_DIALOG_STYLE | (int) wxPlatform::IfNot (wxOS_WINDOWS_CE, - wxRESIZE_BORDER)) - == false) - return false; - wxBookCtrlBase *book = GetBookCtrl (); + MainFrame = parent; + BlobSize = blob_size; + Blob = blob; + BlobType = gaiaGuessBlobType(Blob, BlobSize); + Geometry = NULL; + Image = NULL; + if (BlobType == GAIA_GEOMETRY_BLOB) + Geometry = gaiaFromSpatiaLiteBlobWkb(Blob, BlobSize); + if (BlobType == GAIA_JPEG_BLOB || BlobType == GAIA_EXIF_BLOB + || BlobType == GAIA_EXIF_GPS_BLOB || BlobType == GAIA_PNG_BLOB + || BlobType == GAIA_GIF_BLOB) + { + ::wxInitAllImageHandlers(); + wxMemoryInputStream reader(Blob, BlobSize); + Image = new wxImage(reader); + } + if (wxPropertySheetDialog::Create(parent, wxID_ANY, wxT("BLOB explorer")) == + false) + return false; + wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels - wxPanel *hexadecimal = CreateHexadecimalPage (book); - book->AddPage (hexadecimal, wxT ("Hexadecimal dump"), true); - if (BlobType == MyFrame::BLOB_GEOMETRY) - { - wxPanel *geometry = CreateGeometryPage (book); - book->AddPage (geometry, wxT ("Geometry explorer"), false); - } - if (BlobType == MyFrame::BLOB_JPEG || BlobType == MyFrame::BLOB_PNG - || BlobType == MyFrame::BLOB_GIF) - { - wxPanel *image = CreateImagePage (book); - book->AddPage (image, wxT ("Image"), false); - } - CreateButtons (wxOK); - LayoutDialog (); + wxPanel *hexadecimal = CreateHexadecimalPage(book); + book->AddPage(hexadecimal, wxT("Hexadecimal dump"), true); + if (BlobType == GAIA_GEOMETRY_BLOB) + { + wxPanel *geometry = CreateGeometryPage(book); + book->AddPage(geometry, wxT("Geometry explorer"), false); + } + if (BlobType == GAIA_JPEG_BLOB || BlobType == GAIA_EXIF_BLOB + || BlobType == GAIA_EXIF_GPS_BLOB || BlobType == GAIA_PNG_BLOB + || BlobType == GAIA_GIF_BLOB) + { + wxPanel *image = CreateImagePage(book); + book->AddPage(image, wxT("Image"), false); + } + CreateButtons(wxOK); + LayoutDialog(); // appends event handler for TAB/PAGE changing - Connect (wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, - (wxObjectEventFunction) & BlobExplorerDialog::OnPageChanged); + Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, + (wxObjectEventFunction) & BlobExplorerDialog::OnPageChanged); // appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & BlobExplorerDialog::OnOk); + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & BlobExplorerDialog::OnOk); // centers the dialog window - Centre (); - UpdateHexadecimalPage (); - return true; + Centre(); + UpdateHexadecimalPage(); + return true; } -wxPanel * -BlobExplorerDialog::CreateHexadecimalPage (wxWindow * parent) +wxPanel *BlobExplorerDialog::CreateHexadecimalPage(wxWindow * parent) { // // creating the HEXADECIMAL page // - wxPanel *panel = new wxPanel (parent, ID_PANE_HEXADECIMAL); - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - panel->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER | wxALL, 5); + wxPanel *panel = new wxPanel(parent, ID_PANE_HEXADECIMAL); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + panel->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the hexadecimal dump - wxBoxSizer *hexSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (hexSizer, 0, wxALIGN_LEFT | wxALL, 0); - MyHexList *hexCtrl = new MyHexList (this, Blob, BlobSize, panel, - ID_HEX, wxDefaultPosition, - wxSize (560, - 320), - wxLC_REPORT | wxLC_VIRTUAL); - wxFont font (9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL); - hexCtrl->SetFont (font); - wxListItem column0; - hexCtrl->InsertColumn (0, wxT ("Address")); - hexCtrl->SetColumnWidth (0, 90); - hexCtrl->InsertColumn (1, wxT ("Hexadecimal")); - hexCtrl->SetColumnWidth (1, 340); - hexCtrl->InsertColumn (2, wxT ("ASCII")); - hexCtrl->SetColumnWidth (2, 90); - hexSizer->Add (hexCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - panel->SetSizer (topSizer); - topSizer->Fit (panel); - return panel; -} - -wxPanel * -BlobExplorerDialog::CreateGeometryPage (wxWindow * parent) + wxBoxSizer *hexSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(hexSizer, 0, wxALIGN_LEFT | wxALL, 0); + MyHexList *hexCtrl = new MyHexList(this, Blob, BlobSize, panel, + ID_HEX, wxDefaultPosition, + wxSize(620, 320), + wxLC_REPORT | wxLC_VIRTUAL); + wxFont font(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); + hexCtrl->SetFont(font); + wxListItem column0; + hexCtrl->InsertColumn(0, wxT("Address")); + hexCtrl->SetColumnWidth(0, 90); + hexCtrl->InsertColumn(1, wxT("Hexadecimal")); + hexCtrl->SetColumnWidth(1, 370); + hexCtrl->InsertColumn(2, wxT("ASCII")); + hexCtrl->SetColumnWidth(2, 130); + hexSizer->Add(hexCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + panel->SetSizer(topSizer); + topSizer->Fit(panel); + return panel; +} + +wxPanel *BlobExplorerDialog::CreateGeometryPage(wxWindow * parent) { // // creating the GEOMETRY page // - wxPanel *panel = new wxPanel (parent, ID_PANE_HEXADECIMAL); - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - panel->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER | wxALL, 5); + wxPanel *panel = new wxPanel(parent, ID_PANE_HEXADECIMAL); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + panel->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the geometry as a text table - wxBoxSizer *geomSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (geomSizer, 0, wxALIGN_LEFT | wxALL, 0); - wxTextCtrl *geomCtrl = new wxTextCtrl (panel, ID_GEOM_TABLE, wxT (""), - wxDefaultPosition, wxSize (270, - 320), - wxTE_MULTILINE | wxTE_RICH | - wxTE_READONLY | wxHSCROLL); - geomSizer->Add (geomCtrl, 0, wxALIGN_LEFT | wxALL, 5); + wxBoxSizer *geomSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(geomSizer, 0, wxALIGN_LEFT | wxALL, 0); + wxTextCtrl *geomCtrl = new wxTextCtrl(panel, ID_GEOM_TABLE, wxT(""), + wxDefaultPosition, wxSize(270, + 320), + wxTE_MULTILINE | wxTE_RICH | + wxTE_READONLY | wxHSCROLL); + geomSizer->Add(geomCtrl, 0, wxALIGN_LEFT | wxALL, 5); // creating a control to show the geometry in a graphical fashion - wxStaticBox *exBox = new wxStaticBox (panel, wxID_STATIC, - wxT ("Geometry preview"), - wxDefaultPosition, wxDefaultSize); - wxBoxSizer *exampleSizer = new wxStaticBoxSizer (exBox, wxHORIZONTAL); - geomSizer->Add (exampleSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - DrawGeometry (270, 270); - GraphicsGeometry *geomGraph = - new GraphicsGeometry (this, panel, ID_GEOM_GRAPH, - GeomPreview, wxSize (270, 270)); - exampleSizer->Add (geomGraph, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); - panel->SetSizer (topSizer); - topSizer->Fit (panel); - return panel; + wxStaticBox *exBox = new wxStaticBox(panel, wxID_STATIC, + wxT("Geometry preview"), + wxDefaultPosition, wxDefaultSize); + wxBoxSizer *exampleSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); + geomSizer->Add(exampleSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + DrawGeometry(300, 300); + GraphicsGeometry *geomGraph = new GraphicsGeometry(this, panel, ID_GEOM_GRAPH, + GeomPreview, wxSize(300, + 300)); + exampleSizer->Add(geomGraph, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + panel->SetSizer(topSizer); + topSizer->Fit(panel); + return panel; } -wxPanel * -BlobExplorerDialog::CreateImagePage (wxWindow * parent) +wxPanel *BlobExplorerDialog::CreateImagePage(wxWindow * parent) { // // creating the IMAGE page // - wxPanel *panel = new wxPanel (parent, ID_PANE_IMAGE); - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - panel->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER | wxALL, 5); + wxPanel *panel = new wxPanel(parent, ID_PANE_IMAGE); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + panel->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the image title - wxBoxSizer *imgSizer = new wxBoxSizer (wxVERTICAL); - boxSizer->Add (imgSizer, 0, wxALIGN_TOP | wxALL, 0); - wxStaticText *imageTitle = new wxStaticText (panel, ID_IMAGE_TITLE, - wxT ("Image"), - wxDefaultPosition, - wxSize (560, - 10)); - imgSizer->Add (imageTitle, 0, wxALIGN_LEFT | wxALL, 5); + wxBoxSizer *imgSizer = new wxBoxSizer(wxVERTICAL); + boxSizer->Add(imgSizer, 0, wxALIGN_TOP | wxALL, 0); + wxStaticText *imageTitle = new wxStaticText(panel, ID_IMAGE_TITLE, + wxT("Image"), + wxDefaultPosition, + wxSize(560, + 10)); + imgSizer->Add(imageTitle, 0, wxALIGN_LEFT | wxALL, 5); // creating a control to show the image - wxStaticBox *exBox = new wxStaticBox (panel, ID_IMG_BOX, - wxT ("Image preview"), - wxDefaultPosition, wxDefaultSize); - wxBoxSizer *exampleSizer = new wxStaticBoxSizer (exBox, wxHORIZONTAL); - imgSizer->Add (exampleSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - ImageShow *imgShow = new ImageShow (this, panel, ID_IMAGE, - wxBitmap (), wxSize (560, 300)); - exampleSizer->Add (imgShow, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); - panel->SetSizer (topSizer); - topSizer->Fit (panel); - return panel; + wxStaticBox *exBox = new wxStaticBox(panel, ID_IMG_BOX, + wxT("Image preview"), + wxDefaultPosition, wxDefaultSize); + wxBoxSizer *exampleSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); + imgSizer->Add(exampleSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + ImageShow *imgShow = new ImageShow(this, panel, ID_IMAGE, + wxBitmap(), wxSize(560, 300)); + exampleSizer->Add(imgShow, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + panel->SetSizer(topSizer); + topSizer->Fit(panel); + return panel; } -void -BlobExplorerDialog::OnPageChanged (wxNotebookEvent & event) +void BlobExplorerDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // - switch (event.GetSelection ()) - { + switch (event.GetSelection()) + { case 0: - UpdateHexadecimalPage (); - break; + UpdateHexadecimalPage(); + break; case 1: - if (BlobType == MyFrame::BLOB_GEOMETRY) - UpdateGeometryPage (); - else - UpdateImagePage (); - break; - }; + if (BlobType == GAIA_GEOMETRY_BLOB) + UpdateGeometryPage(); + else + UpdateImagePage(); + break; + }; } -void -BlobExplorerDialog::UpdateHexadecimalPage () +void BlobExplorerDialog::UpdateHexadecimalPage() { // // updating the HEXADECIMAL page // - MyHexList *hexCtrl = (MyHexList *) FindWindow (ID_HEX); - hexCtrl->EnsureVisible (0); + MyHexList *hexCtrl = (MyHexList *) FindWindow(ID_HEX); + hexCtrl->EnsureVisible(0); } -void -BlobExplorerDialog::UpdateGeometryPage () +void BlobExplorerDialog::UpdateGeometryPage() { // // updating the GEOMETRY page // - gaiaPointPtr pt; - gaiaLinestringPtr ln; - gaiaPolygonPtr pg; - gaiaRingPtr rng; - int points = 0; - int linestrings = 0; - int polygons = 0; - int ib; - wxString strValue; - wxTextAttr attrBold (wxColour (0, 0, 0), wxColour (255, 255, 255), - wxFont (9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_BOLD)); - wxTextAttr attrNorm (wxColour (0, 0, 0), wxColour (255, 255, 255), - wxFont (9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - wxTextCtrl *geomCtrl = (wxTextCtrl *) FindWindow (ID_GEOM_TABLE); - if (geomCtrl->GetValue ().Len () < 1) - { - ::wxBeginBusyCursor (); - pt = Geometry->FirstPoint; - while (pt) - { - // counting how many points are into this Geometry - points++; - pt = pt->Next; - } - ln = Geometry->FirstLinestring; - while (ln) - { - // counting how many linestrings are into this Geometry - linestrings++; - ln = ln->Next; - } - pg = Geometry->FirstPolygon; - while (pg) - { - // counting how many polygons are into this Geometry - polygons++; - pg = pg->Next; - } - // determining the Geometry type - geomCtrl->SetDefaultStyle (attrNorm); - geomCtrl->AppendText (wxT ("SRID: ")); - geomCtrl->SetDefaultStyle (attrBold); - strValue.Printf (wxT ("%d"), Geometry->Srid); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - geomCtrl->AppendText (wxT ("\n\n")); - strValue = wxT ("UNKNOWN GEOMETRY TYPE"); - if (points == 1 && linestrings == 0 && polygons == 0) - strValue = wxT ("POINT"); - else if (points == 0 && linestrings == 1 && polygons == 0) - strValue = wxT ("LINESTRING"); - else if (points == 0 && linestrings == 0 && polygons == 1) - strValue = wxT ("POLYGON"); - else if (points > 1 && linestrings == 0 && polygons == 0) - strValue = wxT ("MULTIPOINT"); - else if (points == 0 && linestrings > 1 && polygons == 0) - strValue = wxT ("MULTILINESTRING"); - else if (points == 0 && linestrings == 0 && polygons > 1) - strValue = wxT ("MULTIPOLYGON"); - else - strValue = wxT ("GEOMETRYCOLLECTION"); - geomCtrl->SetDefaultStyle (attrNorm); - geomCtrl->AppendText (wxT ("Geometry type: ")); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - geomCtrl->AppendText (wxT ("\n\n")); - if (points) - { - // printing the Points list - strValue.Printf (wxT ("#%d POINT"), points); - if (points > 1) - strValue += wxT ("s:"); - else - strValue += wxT (":"); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - pt = Geometry->FirstPoint; - points = 0; - while (pt) - { - // printing each Point - points++; - strValue.Printf (wxT ("\n %d) "), points); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - strValue.Printf (wxT ("%1.4lf %1.4lf"), pt->X, pt->Y); - geomCtrl->AppendText (strValue); - pt = pt->Next; - } - geomCtrl->AppendText (wxT ("\n\n\n")); - } - if (linestrings) - { - // printing the Linestrings list - strValue.Printf (wxT ("#%d LINESTRING"), linestrings); - if (linestrings > 1) - strValue += wxT ("s:"); - else - strValue += wxT (":"); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - ln = Geometry->FirstLinestring; - linestrings = 0; - while (ln) - { - // printing each Linestring - linestrings++; - strValue.Printf (wxT ("\n %d) "), linestrings); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - strValue.Printf (wxT ("%d vertices"), ln->Points); - geomCtrl->AppendText (strValue); - ln = ln->Next; - } - geomCtrl->AppendText (wxT ("\n\n\n")); - } - if (polygons) - { - // printing the Polygons list - strValue.Printf (wxT ("#%d POLYGON"), polygons); - if (polygons > 1) - strValue += wxT ("s:"); - else - strValue += wxT (":"); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - pg = Geometry->FirstPolygon; - polygons = 0; - while (pg) - { - // printing each Polygon - polygons++; - strValue.Printf (wxT ("\n %d) exterior ring"), - polygons); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - rng = pg->Exterior; - strValue.Printf (wxT (": %d vertices"), rng->Points); - geomCtrl->AppendText (strValue); - for (ib = 0; ib < pg->NumInteriors; ib++) - { - // printing each interior ring - strValue.Printf (wxT ("\n %d.%d) "), polygons, - ib + 1); - geomCtrl->SetDefaultStyle (attrBold); - geomCtrl->AppendText (strValue); - geomCtrl->SetDefaultStyle (attrNorm); - rng = pg->Interiors + ib; - strValue.Printf (wxT - (" interior ring: %d vertices"), - rng->Points); - geomCtrl->AppendText (strValue); - } - pg = pg->Next; - } - geomCtrl->AppendText (wxT ("\n\n\n")); - } - ::wxEndBusyCursor (); - } - GraphicsGeometry *geomGraph = - (GraphicsGeometry *) FindWindow (ID_GEOM_GRAPH); - geomGraph->SetBitmap (GeomPreview); + gaiaPointPtr pt; + gaiaLinestringPtr ln; + gaiaPolygonPtr pg; + gaiaRingPtr rng; + int points = 0; + int linestrings = 0; + int polygons = 0; + int ib; + wxString strValue; + char dummy[1024]; + wxTextAttr attrBold(wxColour(0, 0, 0), wxColour(255, 255, 255), + wxFont(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_BOLD)); + wxTextAttr attrNorm(wxColour(0, 0, 0), wxColour(255, 255, 255), + wxFont(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_NORMAL)); + wxTextCtrl *geomCtrl = (wxTextCtrl *) FindWindow(ID_GEOM_TABLE); + if (geomCtrl->GetValue().Len() < 1) + { + ::wxBeginBusyCursor(); + pt = Geometry->FirstPoint; + while (pt) + { + // counting how many points are into this Geometry + points++; + pt = pt->Next; + } + ln = Geometry->FirstLinestring; + while (ln) + { + // counting how many linestrings are into this Geometry + linestrings++; + ln = ln->Next; + } + pg = Geometry->FirstPolygon; + while (pg) + { + // counting how many polygons are into this Geometry + polygons++; + pg = pg->Next; + } + // determining the Geometry type + geomCtrl->SetDefaultStyle(attrNorm); + geomCtrl->AppendText(wxT("SRID: ")); + geomCtrl->SetDefaultStyle(attrBold); + sprintf(dummy, "%d", Geometry->Srid); + strValue = wxString::FromUTF8(dummy); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + geomCtrl->AppendText(wxT("\n\n")); + strValue = wxT("UNKNOWN GEOMETRY TYPE"); + if (points == 1 && linestrings == 0 && polygons == 0) + { + if (Geometry->DeclaredType == GAIA_MULTIPOINT) + strValue = wxT("MULTIPOINT"); + else if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) + strValue = wxT("GEOMETRYCOLLECTION"); + else + strValue = wxT("POINT"); + } else if (points == 0 && linestrings == 1 && polygons == 0) + { + if (Geometry->DeclaredType == GAIA_MULTILINESTRING) + strValue = wxT("MULTILINESTRING"); + else if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) + strValue = wxT("GEOMETRYCOLLECTION"); + else + strValue = wxT("LINESTRING"); + } else if (points == 0 && linestrings == 0 && polygons == 1) + { + if (Geometry->DeclaredType == GAIA_MULTIPOLYGON) + strValue = wxT("MULTIPOLYGON"); + else if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) + strValue = wxT("GEOMETRYCOLLECTION"); + else + strValue = wxT("POLYGON"); + } else if (points > 1 && linestrings == 0 && polygons == 0) + { + if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) + strValue = wxT("GEOMETRYCOLLECTION"); + else + strValue = wxT("MULTIPOINT"); + } else if (points == 0 && linestrings > 1 && polygons == 0) + { + if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) + strValue = wxT("GEOMETRYCOLLECTION"); + else + strValue = wxT("MULTILINESTRING"); + } else if (points == 0 && linestrings == 0 && polygons > 1) + { + if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) + strValue = wxT("GEOMETRYCOLLECTION"); + else + strValue = wxT("MULTIPOLYGON"); + } else + strValue = wxT("GEOMETRYCOLLECTION"); + geomCtrl->SetDefaultStyle(attrNorm); + geomCtrl->AppendText(wxT("Geometry type: ")); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + geomCtrl->AppendText(wxT("\n\n")); + if (points) + { + // printing the Points list + sprintf(dummy, "#%d POINT", points); + strValue = wxString::FromUTF8(dummy); + if (points > 1) + strValue += wxT("s:"); + else + strValue += wxT(":"); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + pt = Geometry->FirstPoint; + points = 0; + while (pt) + { + // printing each Point + points++; + sprintf(dummy, "\n %d) ", points); + strValue = wxString::FromUTF8(dummy); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + sprintf(dummy, "%1.4lf %1.4lf", pt->X, pt->Y); + strValue = wxString::FromUTF8(dummy); + geomCtrl->AppendText(strValue); + pt = pt->Next; + } + geomCtrl->AppendText(wxT("\n\n\n")); + } + if (linestrings) + { + // printing the Linestrings list + sprintf(dummy, "#%d LINESTRING", linestrings); + strValue = wxString::FromUTF8(dummy); + if (linestrings > 1) + strValue += wxT("s:"); + else + strValue += wxT(":"); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + ln = Geometry->FirstLinestring; + linestrings = 0; + while (ln) + { + // printing each Linestring + linestrings++; + sprintf(dummy, "\n %d) ", linestrings); + strValue = wxString::FromUTF8(dummy); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + sprintf(dummy, "%d vertices", ln->Points); + strValue = wxString::FromUTF8(dummy); + geomCtrl->AppendText(strValue); + ln = ln->Next; + } + geomCtrl->AppendText(wxT("\n\n\n")); + } + if (polygons) + { + // printing the Polygons list + sprintf(dummy, "#%d POLYGON", polygons); + strValue = wxString::FromUTF8(dummy); + if (polygons > 1) + strValue += wxT("s:"); + else + strValue += wxT(":"); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + pg = Geometry->FirstPolygon; + polygons = 0; + while (pg) + { + // printing each Polygon + polygons++; + sprintf(dummy, "\n %d) exterior ring", polygons); + strValue = wxString::FromUTF8(dummy); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + rng = pg->Exterior; + sprintf(dummy, ": %d vertices", rng->Points); + strValue = wxString::FromUTF8(dummy); + geomCtrl->AppendText(strValue); + for (ib = 0; ib < pg->NumInteriors; ib++) + { + // printing each interior ring + sprintf(dummy, "\n %d.%d) ", polygons, ib + 1); + strValue = wxString::FromUTF8(dummy); + geomCtrl->SetDefaultStyle(attrBold); + geomCtrl->AppendText(strValue); + geomCtrl->SetDefaultStyle(attrNorm); + rng = pg->Interiors + ib; + sprintf(dummy, " interior ring: %d vertices", rng->Points); + strValue = wxString::FromUTF8(dummy); + geomCtrl->AppendText(strValue); + } + pg = pg->Next; + } + geomCtrl->AppendText(wxT("\n\n\n")); + } + ::wxEndBusyCursor(); + } + GraphicsGeometry *geomGraph = (GraphicsGeometry *) FindWindow(ID_GEOM_GRAPH); + geomGraph->SetBitmap(GeomPreview); } -void -BlobExplorerDialog::UpdateImagePage () +void BlobExplorerDialog::UpdateImagePage() { // // updating the IMAGE page // - double horz; - double vert; - wxImage scaledImg; - wxSize sz; - wxSize box; - int boxX; - int boxY; - int posX; - int posY; - wxString title = wxT ("Invalid Image"); - wxStaticBox *imgBox = (wxStaticBox *) FindWindow (ID_IMG_BOX); - ImageShow *imgShow = (ImageShow *) FindWindow (ID_IMAGE); - wxStaticText *imageTitle = (wxStaticText *) FindWindow (ID_IMAGE_TITLE); - if (Image) - { - ::wxBeginBusyCursor (); - if (Image->IsOk () == true) - { - horz = Image->GetWidth (); - vert = Image->GetHeight (); - sz = imgShow->GetSize (); - box = imgBox->GetSize (); - while (horz > sz.GetWidth () || vert > sz.GetHeight ()) - { - horz *= 0.9; - vert *= 0.9; - } - if (horz == Image->GetWidth () && vert == Image->GetHeight ()) - scaledImg = Image->Copy (); - else - scaledImg = - Image->Scale ((int) horz, (int) vert, - wxIMAGE_QUALITY_HIGH); - wxBitmap bmp (scaledImg); - imgBox->GetPosition (&boxX, &boxY); - posX = (box.GetWidth () - (int) horz) / 2; - posY = (box.GetHeight () - (int) vert) / 2; - imgShow->SetSize (boxX + posX, boxY + posY, (int) horz, - (int) vert); - imgShow->SetBitmap (bmp); - imgShow->Show (true); - switch (BlobType) - { - case MyFrame::BLOB_JPEG: - title.Printf (wxT - ("JPEG image resolution: %d x %d %d bytes"), - Image->GetWidth (), Image->GetHeight (), - BlobSize); - break; - case MyFrame::BLOB_PNG: - title.Printf (wxT - ("PNG image resolution: %d x %d %d bytes"), - Image->GetWidth (), Image->GetHeight (), - BlobSize); - break; - case MyFrame::BLOB_GIF: - title.Printf (wxT - ("GIF image resolution: %d x %d %d bytes"), - Image->GetWidth (), Image->GetHeight (), - BlobSize); - break; - } - } - ::wxEndBusyCursor (); - } - imageTitle->SetLabel (title); + double horz; + double vert; + wxImage scaledImg; + wxSize sz; + wxSize box; + int boxX; + int boxY; + int posX; + int posY; + char latlong[1024]; + char dummy[1024]; + wxString ll; + wxString title = wxT("Invalid Image"); + wxStaticBox *imgBox = (wxStaticBox *) FindWindow(ID_IMG_BOX); + ImageShow *imgShow = (ImageShow *) FindWindow(ID_IMAGE); + wxStaticText *imageTitle = (wxStaticText *) FindWindow(ID_IMAGE_TITLE); + if (Image) + { + ::wxBeginBusyCursor(); + if (Image->IsOk() == true) + { + horz = Image->GetWidth(); + vert = Image->GetHeight(); + sz = imgShow->GetSize(); + box = imgBox->GetSize(); + while (horz > sz.GetWidth() || vert > sz.GetHeight()) + { + horz *= 0.9; + vert *= 0.9; + } + if (horz == Image->GetWidth() && vert == Image->GetHeight()) + scaledImg = Image->Copy(); + else + scaledImg = + Image->Scale((int) horz, (int) vert, wxIMAGE_QUALITY_HIGH); + wxBitmap bmp(scaledImg); + imgBox->GetPosition(&boxX, &boxY); + posX = (box.GetWidth() - (int) horz) / 2; + posY = (box.GetHeight() - (int) vert) / 2; + imgShow->SetSize(boxX + posX, boxY + posY, (int) horz, (int) vert); + imgShow->SetBitmap(bmp); + imgShow->Show(true); + switch (BlobType) + { + case GAIA_JPEG_BLOB: + sprintf(dummy, + "JPEG image resolution: %d x %d %d bytes", + Image->GetWidth(), Image->GetHeight(), BlobSize); + title = wxString::FromUTF8(dummy); + break; + case GAIA_EXIF_BLOB: + sprintf(dummy, + "EXIF image resolution: %d x %d %d bytes", + Image->GetWidth(), Image->GetHeight(), BlobSize); + title = wxString::FromUTF8(dummy); + break; + case GAIA_EXIF_GPS_BLOB: + if (gaiaGetGpsLatLong(Blob, BlobSize, latlong, 1024)) + ll = wxString::FromUTF8(latlong); + else + ll = wxT("NOT AVAILABLE"); + sprintf(dummy, + "EXIF-GPS image resolution: %d x %d %d bytes GPS: ", + Image->GetWidth(), Image->GetHeight(), BlobSize); + title = wxString::FromUTF8(dummy); + title += ll; + break; + case GAIA_PNG_BLOB: + sprintf(dummy, + "PNG image resolution: %d x %d %d bytes", + Image->GetWidth(), Image->GetHeight(), BlobSize); + title = wxString::FromUTF8(dummy); + break; + case GAIA_GIF_BLOB: + sprintf(dummy, + "GIF image resolution: %d x %d %d bytes", + Image->GetWidth(), Image->GetHeight(), BlobSize); + title = wxString::FromUTF8(dummy); + break; + } + } + ::wxEndBusyCursor(); + } + imageTitle->SetLabel(title); } -void -BlobExplorerDialog::OnOk (wxCommandEvent & event) +void BlobExplorerDialog::OnOk(wxCommandEvent & event) { // // all done: exiting // - wxDialog::EndModal (wxID_OK); + wxDialog::EndModal(wxID_OK); } -void -BlobExplorerDialog::DrawGeometry (int horz, int vert) +void BlobExplorerDialog::DrawGeometry(int horz, int vert) { // // drawing graphic representation for current Geometry // - gaiaPointPtr pt; - gaiaLinestringPtr ln; - gaiaPolygonPtr pg; - gaiaRingPtr rng; - double minx; - double miny; - double maxx; - double maxy; - double ext_x; - double ext_y; - double cx; - double cy; - double pixelRatioX; - double pixelRatioY; - double pixelRatio; - double span_x; - double span_y; - double baseX; - double baseY; - double x; - double y; - double xx; - double yy; - int iv; - int ib; - int pts; - int *borders; - wxPoint *points; - GeomPreview.Create (horz, vert); - wxMemoryDC dc (GeomPreview); + gaiaPointPtr pt; + gaiaLinestringPtr ln; + gaiaPolygonPtr pg; + gaiaRingPtr rng; + double minx; + double miny; + double maxx; + double maxy; + double ext_x; + double ext_y; + double cx; + double cy; + double pixelRatioX; + double pixelRatioY; + double pixelRatio; + double span_x; + double span_y; + double baseX; + double baseY; + double x; + double y; + double xx; + double yy; + int iv; + int ib; + int pts; + int *borders; + wxPoint *points; + GeomPreview.Create(horz, vert); + wxMemoryDC dc(GeomPreview); // // background filling // - dc.SetBrush (wxBrush (wxColour (255, 255, 255))); - dc.DrawRectangle (0, 0, horz, vert); + dc.SetBrush(wxBrush(wxColour(255, 255, 255))); + dc.DrawRectangle(0, 0, horz, vert); // // prepearing the drawing pen and brush // - dc.SetBrush (wxBrush (wxColour (240, 240, 192))); - dc.SetPen (wxPen (wxColour (64, 64, 192), 1)); + dc.SetBrush(wxBrush(wxColour(240, 240, 192))); + dc.SetPen(wxPen(wxColour(64, 64, 192), 1)); // // computing the pixel ratio, center position and so on // - minx = Geometry->MinX; - miny = Geometry->MinY; - maxx = Geometry->MaxX; - maxy = Geometry->MaxY; - ext_x = maxx - minx; - ext_y = maxy - miny; - if (ext_x < 1.0) - ext_x = 1.0; - if (ext_y < 1.0) - ext_y = 1.0; - minx = Geometry->MinX - (ext_x / 20.0); - miny = Geometry->MinY - (ext_y / 20.0); - maxx = Geometry->MaxX + (ext_x / 20.0); - maxy = Geometry->MaxY + (ext_y / 20.0); - ext_x = maxx - minx; - ext_y = maxy - miny; - cx = minx + (ext_x / 2.0); - cy = miny + (ext_y / 2.0); - pixelRatioX = ext_x / horz; - pixelRatioY = ext_y / vert; - if (pixelRatioX > pixelRatioY) - pixelRatio = pixelRatioX; - else - pixelRatio = pixelRatioY; + minx = Geometry->MinX; + miny = Geometry->MinY; + maxx = Geometry->MaxX; + maxy = Geometry->MaxY; + ext_x = maxx - minx; + ext_y = maxy - miny; + if (ext_x < 1.0) + ext_x = 1.0; + if (ext_y < 1.0) + ext_y = 1.0; + minx = Geometry->MinX - (ext_x / 20.0); + miny = Geometry->MinY - (ext_y / 20.0); + maxx = Geometry->MaxX + (ext_x / 20.0); + maxy = Geometry->MaxY + (ext_y / 20.0); + ext_x = maxx - minx; + ext_y = maxy - miny; + cx = minx + (ext_x / 2.0); + cy = miny + (ext_y / 2.0); + pixelRatioX = ext_x / horz; + pixelRatioY = ext_y / vert; + if (pixelRatioX > pixelRatioY) + pixelRatio = pixelRatioX; + else + pixelRatio = pixelRatioY; // // centering the Y axis // - span_y = vert * pixelRatio; - baseY = cy - (span_y / 2.0); + span_y = vert * pixelRatio; + baseY = cy - (span_y / 2.0); // // centering the X axis // - span_x = horz * pixelRatio; - baseX = cx - (span_x / 2.0); - pg = Geometry->FirstPolygon; - while (pg) - { - // - // drawing polygons - // - pts = pg->Exterior->Points; - for (ib = 0; ib < pg->NumInteriors; ib++) - { - rng = pg->Interiors + ib; - pts += rng->Points; - } - borders = new int[pg->NumInteriors + 1]; - points = new wxPoint[pts]; - pts = 0; - rng = pg->Exterior; - borders[0] = rng->Points; - for (iv = 0; iv < rng->Points; iv++) - { - gaiaGetPoint (rng->Coords, iv, &x, &y); - xx = (x - baseX) / pixelRatio; - yy = (y - baseY) / pixelRatio; - yy = vert - yy; - points[pts].x = (int) xx; - points[pts].y = (int) yy; - pts++; - } - for (ib = 0; ib < pg->NumInteriors; ib++) - { - rng = pg->Interiors + ib; - borders[1 + ib] = rng->Points; - for (iv = 0; iv < rng->Points; iv++) - { - gaiaGetPoint (rng->Coords, iv, &x, &y); - xx = (x - baseX) / pixelRatio; - yy = (y - baseY) / pixelRatio; - yy = vert - yy; - points[pts].x = (int) xx; - points[pts].y = (int) yy; - pts++; - } - } - dc.DrawPolyPolygon (pg->NumInteriors + 1, borders, points); - delete[]points; - delete[]borders; - pg = pg->Next; - } - ln = Geometry->FirstLinestring; - while (ln) - { - // - // drawing linestrings - // - points = new wxPoint[ln->Points]; - for (iv = 0; iv < ln->Points; iv++) - { - gaiaGetPoint (ln->Coords, iv, &x, &y); - xx = (x - baseX) / pixelRatio; - yy = (y - baseY) / pixelRatio; - yy = vert - yy; - points[iv].x = (int) xx; - points[iv].y = (int) yy; - } - dc.DrawLines (ln->Points, points); - delete[]points; - ln = ln->Next; - } - pt = Geometry->FirstPoint; - while (pt) - { - // - // drawing points - // - xx = (pt->X - baseX) / pixelRatio; - yy = (pt->Y - baseY) / pixelRatio; - yy = vert - yy; - dc.DrawCircle ((int) xx, (int) yy, 2); - pt = pt->Next; - } + span_x = horz * pixelRatio; + baseX = cx - (span_x / 2.0); + pg = Geometry->FirstPolygon; + while (pg) + { + // + // drawing polygons + // + pts = pg->Exterior->Points; + for (ib = 0; ib < pg->NumInteriors; ib++) + { + rng = pg->Interiors + ib; + pts += rng->Points; + } + borders = new int[pg->NumInteriors + 1]; + points = new wxPoint[pts]; + pts = 0; + rng = pg->Exterior; + borders[0] = rng->Points; + for (iv = 0; iv < rng->Points; iv++) + { + gaiaGetPoint(rng->Coords, iv, &x, &y); + xx = (x - baseX) / pixelRatio; + yy = (y - baseY) / pixelRatio; + yy = vert - yy; + points[pts].x = (int) xx; + points[pts].y = (int) yy; + pts++; + } + for (ib = 0; ib < pg->NumInteriors; ib++) + { + rng = pg->Interiors + ib; + borders[1 + ib] = rng->Points; + for (iv = 0; iv < rng->Points; iv++) + { + gaiaGetPoint(rng->Coords, iv, &x, &y); + xx = (x - baseX) / pixelRatio; + yy = (y - baseY) / pixelRatio; + yy = vert - yy; + points[pts].x = (int) xx; + points[pts].y = (int) yy; + pts++; + } + } + dc.DrawPolyPolygon(pg->NumInteriors + 1, borders, points); + delete[]points; + delete[]borders; + pg = pg->Next; + } + ln = Geometry->FirstLinestring; + while (ln) + { + // + // drawing linestrings + // + points = new wxPoint[ln->Points]; + for (iv = 0; iv < ln->Points; iv++) + { + gaiaGetPoint(ln->Coords, iv, &x, &y); + xx = (x - baseX) / pixelRatio; + yy = (y - baseY) / pixelRatio; + yy = vert - yy; + points[iv].x = (int) xx; + points[iv].y = (int) yy; + } + dc.DrawLines(ln->Points, points); + delete[]points; + ln = ln->Next; + } + pt = Geometry->FirstPoint; + while (pt) + { + // + // drawing points + // + xx = (pt->X - baseX) / pixelRatio; + yy = (pt->Y - baseY) / pixelRatio; + yy = vert - yy; + dc.DrawCircle((int) xx, (int) yy, 2); + pt = pt->Next; + } +} + +GraphicsGeometry::GraphicsGeometry(BlobExplorerDialog * parent, + wxWindow * panel, wxWindowID id, + const wxBitmap & bmp, + const wxSize & size):wxStaticBitmap(panel, + id, bmp, + wxDefaultPosition, + size) +{ + Parent = parent; +} + +ImageShow::ImageShow(BlobExplorerDialog * parent, wxWindow * panel, + wxWindowID id, const wxBitmap & bmp, + const wxSize & size):wxStaticBitmap(panel, id, bmp, + wxDefaultPosition, + size) +{ + Parent = parent; +// appends event handler + Connect(ID_IMAGE, wxEVT_RIGHT_DOWN, + (wxObjectEventFunction) & ImageShow::OnRightClick); + Connect(Image_Copy, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & ImageShow::OnCmdCopy); } -GraphicsGeometry::GraphicsGeometry (BlobExplorerDialog * parent, - wxWindow * panel, wxWindowID id, - const wxBitmap & bmp, const wxSize & size): -wxStaticBitmap (panel, id, bmp, wxDefaultPosition, size) -{ - Parent = parent; -} - -ImageShow::ImageShow (BlobExplorerDialog * parent, wxWindow * panel, - wxWindowID id, const wxBitmap & bmp, const wxSize & size): -wxStaticBitmap (panel, id, bmp, wxDefaultPosition, size) -{ - Parent = parent; -// appends event handler - Connect (ID_IMAGE, wxEVT_RIGHT_DOWN, - (wxObjectEventFunction) & ImageShow::OnRightClick); - Connect (Image_Copy, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & ImageShow::OnCmdCopy); -} - -void -ImageShow::OnRightClick (wxMouseEvent & event) +void ImageShow::OnRightClick(wxMouseEvent & event) { // // right click on the Image // - wxMenu menu; - wxMenuItem *menuItem; - wxImage *Image = Parent->GetImage (); - if (Image) - { - if (Image->IsOk () == true) - { - wxPoint pt = event.GetPosition (); - menuItem = new wxMenuItem (&menu, Image_Copy, wxT ("&Copy")); - menu.Append (menuItem); - PopupMenu (&menu, pt); - } - } + wxMenu *menu = new wxMenu(); + wxMenuItem *menuItem; + wxImage *Image = Parent->GetImage(); + if (Image) + { + if (Image->IsOk() == true) + { + wxPoint pt = event.GetPosition(); + menuItem = new wxMenuItem(menu, Image_Copy, wxT("&Copy")); + menu->Append(menuItem); + PopupMenu(menu, pt); + } + } } -void -ImageShow::OnCmdCopy (wxCommandEvent & event) +void ImageShow::OnCmdCopy(wxCommandEvent & event) { // // copying the Image into the clipboard // - wxImage *Image = Parent->GetImage (); - if (wxTheClipboard->Open ()) - { - wxTheClipboard->SetData (new wxBitmapDataObject (*Image)); - wxTheClipboard->Close (); - } + wxImage *Image = Parent->GetImage(); + if (wxTheClipboard->Open()) + { + wxTheClipboard->SetData(new wxBitmapDataObject(*Image)); + wxTheClipboard->Close(); + } } -MyHexList::MyHexList (BlobExplorerDialog * parent, unsigned char *blob, - int blob_size, wxWindow * panel, wxWindowID id, - const wxPoint & pos, const wxSize & size, long style): -wxListCtrl (panel, id, pos, size, style) +MyHexList::MyHexList(BlobExplorerDialog * parent, unsigned char *blob, + int blob_size, wxWindow * panel, wxWindowID id, + const wxPoint & pos, const wxSize & size, + long style):wxListCtrl(panel, id, pos, size, style) { // constructor - the blob hexadecimal dump - int i = 0; - int rows = 0; - Parent = parent; - Blob = blob; - BlobSize = blob_size; - while (i < BlobSize) - { - // counting how many rows are there - rows++; - i += 16; - } - SetItemCount (rows); + int i = 0; + int rows = 0; + Parent = parent; + Blob = blob; + BlobSize = blob_size; + while (i < BlobSize) + { + // counting how many rows are there + rows++; + i += 16; + } + SetItemCount(rows); } -MyHexList::~MyHexList () +MyHexList::~MyHexList() { // does nothing } -wxString MyHexList::OnGetItemText (long item, long column) const +wxString MyHexList::OnGetItemText(long item, long column) const { // return a column value - int - i; - int - c; - int - base = item * 16; - wxString - value; - wxString - hex; - if (column == 0) - value.Printf (wxT ("%08xd"), base); - else if (column == 1) - { - // prepearing the hex-dump - c = 0; - for (i = base; i < BlobSize; i++) - { - if (c >= 16) - break; - hex.Printf (wxT ("%02x"), *(Blob + i)); - if (c == 8) - value += wxT (" "); - else - value += wxT (" "); - value += hex; - c++; - } - } - else - { - // prepearing the ascii dump - c = 0; - for (i = base; i < BlobSize; i++) - { - if (c >= 16) - break; - if (isprint (*(Blob + i))) - hex.Printf (wxT ("%c"), *(Blob + i)); - else - hex = wxT ("."); - value += hex; - c++; - } - } - return value; + int i; + int c; + int base = item * 16; + wxString value; + char dummy[64]; + wxString hex; + if (column == 0) + { + sprintf(dummy, "%08xd", base); + value = wxString::FromUTF8(dummy); + } else if (column == 1) + { + // prepearing the hex-dump + c = 0; + for (i = base; i < BlobSize; i++) + { + if (c >= 16) + break; + sprintf(dummy, "%02x", *(Blob + i)); + hex = wxString::FromUTF8(dummy); + if (c == 8) + value += wxT(" "); + else + value += wxT(" "); + value += hex; + c++; + } + } else + { + // prepearing the ascii dump + c = 0; + for (i = base; i < BlobSize; i++) + { + if (c >= 16) + break; + if (isprint(*(Blob + i))) + { + sprintf(dummy, "%c", *(Blob + i)); + hex = wxString::FromUTF8(dummy); + } else + hex = wxT("."); + value += hex; + c++; + } + } + return value; } ADDED COPYING Index: COPYING ================================================================== --- COPYING +++ COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. Index: Classdef.h ================================================================== --- Classdef.h +++ Classdef.h @@ -26,1048 +26,2091 @@ #include "wx/wx.h" #include "wx/aui/aui.h" #include "wx/treectrl.h" #include "wx/grid.h" #include "wx/listctrl.h" +#include "wx/textctrl.h" #include "wx/propdlg.h" #include "wx/generic/propdlg.h" +#include "wx/timer.h" #include #define OMIT_GEOS 0 #define OMIT_PROJ 0 +#include +#include #include +#include + +// +// functions for QSORT / BSEARCH +// +int cmp_prenodes_code(const void *p1, const void *p2); +int cmp_prenodes_id(const void *p1, const void *p2); +int cmp_nodes2_code(const void *p1, const void *p2); +int cmp_nodes2_id(const void *p1, const void *p2); +int cmp_nodes1_code(const void *p1, const void *p2); +int cmp_nodes1_id(const void *p1, const void *p2); enum { // control IDs for main window and tree list control - ID_Connect = 1, - ID_CreateNew, - ID_Disconnect, - ID_Vacuum, - ID_SqlScript, - ID_LoadShp, - ID_LoadTxt, - ID_VirtualShp, - ID_VirtualTxt, - ID_Srids, - ID_Charset, - ID_Help, - Tree_NewTable, - Tree_NewView, - Tree_NewIndex, - Tree_NewTrigger, - Tree_NewColumn, - Tree_Show, - Tree_Drop, - Tree_Rename, - Tree_Select, - Tree_Refresh, - Tree_SpatialIndex, - Tree_MbrCache, - Tree_ShowSql, - Tree_Recover, - Tree_CheckGeometry, - Tree_SetSrid, - Tree_DumpShp, - Tree_DumpTxtTab, - Tree_DumpCsv, - Tree_DumpHtml, - Tree_Edit, - Grid_Clear, - Grid_All, - Grid_Column, - Grid_Row, - Grid_Copy, - Grid_Blob, - Grid_Delete, - Grid_Insert, - Grid_Abort, - Grid_BlobIn, - Grid_BlobOut, - Grid_BlobNull, - Image_Copy, + ID_Connect = 1, + ID_CreateNew, + ID_Disconnect, + ID_MemoryDbLoad, + ID_MemoryDbNew, + ID_MemoryDbClock, + ID_MemoryDbSave, + ID_Vacuum, + ID_SqlScript, + ID_LoadShp, + ID_LoadTxt, + ID_VirtualShp, + ID_VirtualTxt, + ID_Network, + ID_Exif, + ID_Srids, + ID_Charset, + ID_Help, + Tree_NewTable, + Tree_NewView, + Tree_NewIndex, + Tree_NewTrigger, + Tree_NewColumn, + Tree_Show, + Tree_Drop, + Tree_Rename, + Tree_Select, + Tree_Refresh, + Tree_SpatialIndex, + Tree_MbrCache, + Tree_RebuildTriggers, + Tree_ShowSql, + Tree_Recover, + Tree_CheckGeometry, + Tree_SetSrid, + Tree_DumpShp, + Tree_DumpTxtTab, + Tree_DumpCsv, + Tree_DumpHtml, + Tree_Edit, + Grid_Clear, + Grid_All, + Grid_Column, + Grid_Row, + Grid_Copy, + Grid_Blob, + Grid_Delete, + Grid_Insert, + Grid_Abort, + Grid_BlobIn, + Grid_BlobOut, + Grid_BlobNull, + Image_Copy, }; enum { // control IDs for dialogs - ID_SQL = 10000, - ID_SQL_GO, - ID_HISTORY_BACK, - ID_HISTORY_FORWARD, - ID_RS_FIRST, - ID_RS_LAST, - ID_RS_NEXT, - ID_RS_PREVIOUS, - ID_REFRESH, - ID_RS_BLOCK, - ID_PANE_HEXADECIMAL, - ID_PANE_GEOMETRY, - ID_PANE_IMAGE, - ID_HEX, - ID_GEOM_TABLE, - ID_GEOM_GRAPH, - ID_GEOM_BOX, - ID_IMAGE_TITLE, - ID_IMG_BOX, - ID_IMAGE, - ID_VIRTSHP_TABLE, - ID_VIRTSHP_SRID, - ID_VIRTSHP_CHARSET, - ID_VIRTTXT_TABLE, - ID_VIRTTXT_CHARSET, - ID_VIRTTXT_TITLES, - ID_VIRTTXT_SEPARATOR, - ID_VIRTTXT_CHARSEPARATOR, - ID_VIRTTXT_QUOTE, - ID_VIRTTXT_POINT, - ID_LDSHP_TABLE, - ID_LDSHP_COLUMN, - ID_LDSHP_SRID, - ID_LDSHP_CHARSET, - ID_LDTXT_TABLE, - ID_LDTXT_CHARSET, - ID_LDTXT_TITLES, - ID_LDTXT_SEPARATOR, - ID_LDTXT_CHARSEPARATOR, - ID_LDTXT_QUOTE, - ID_LDTXT_POINT, - ID_DMPSHP_CHARSET, - ID_DMPTXT_CHARSET, - ID_DFLT_CHARSET, - ID_DFLT_ASK, - ID_SCRIPT_CHARSET, - ID_RCVR_SRID, - ID_RCVR_TYPE, - ID_SRID_OLD, - ID_SRID_SRID, - ID_SEARCH, + ID_SQL = 10000, + ID_SQL_GO, + ID_HISTORY_BACK, + ID_HISTORY_FORWARD, + ID_RS_FIRST, + ID_RS_LAST, + ID_RS_NEXT, + ID_RS_PREVIOUS, + ID_REFRESH, + ID_RS_BLOCK, + ID_PANE_HEXADECIMAL, + ID_PANE_GEOMETRY, + ID_PANE_IMAGE, + ID_HEX, + ID_GEOM_TABLE, + ID_GEOM_GRAPH, + ID_GEOM_BOX, + ID_IMAGE_TITLE, + ID_IMG_BOX, + ID_IMAGE, + ID_VIRTSHP_TABLE, + ID_VIRTSHP_SRID, + ID_VIRTSHP_CHARSET, + ID_VIRTTXT_TABLE, + ID_VIRTTXT_CHARSET, + ID_VIRTTXT_TITLES, + ID_VIRTTXT_SEPARATOR, + ID_VIRTTXT_CHARSEPARATOR, + ID_VIRTTXT_QUOTE, + ID_VIRTTXT_POINT, + ID_LDSHP_TABLE, + ID_LDSHP_COLUMN, + ID_LDSHP_SRID, + ID_LDSHP_CHARSET, + ID_LDTXT_TABLE, + ID_LDTXT_CHARSET, + ID_LDTXT_TITLES, + ID_LDTXT_SEPARATOR, + ID_LDTXT_CHARSEPARATOR, + ID_LDTXT_QUOTE, + ID_LDTXT_POINT, + ID_DMPSHP_CHARSET, + ID_DMPTXT_CHARSET, + ID_NET_TABLE, + ID_NET_FROM, + ID_NET_TO, + ID_NET_GEOM, + ID_NET_LENGTH, + ID_NET_COST, + ID_NET_BIDIR, + ID_NET_ONEWAY, + ID_NET_FROM_TO, + ID_NET_TO_FROM, + ID_EXIF_PATH, + ID_EXIF_FOLDER, + ID_EXIF_SINGLE, + ID_EXIF_METADATA, + ID_EXIF_GPS_ONLY, + ID_DFLT_CHARSET, + ID_DFLT_ASK, + ID_SCRIPT_CHARSET, + ID_RCVR_SRID, + ID_RCVR_TYPE, + ID_SRID_OLD, + ID_SRID_SRID, + ID_SEARCH, + ID_HELP_HTML, + ID_AUTO_SAVE_PATH, + ID_AUTO_SAVE_INTERVAL, + ID_AUTO_SAVE_CHANGE_PATH, }; enum { // tree item data types - MY_TABLE = 0, - MY_VTABLE, - MY_VIEW, - MY_COLUMN, - MY_GEOMETRY, - MY_GEOMETRY_INDEX, - MY_GEOMETRY_CACHED, - MY_INDEX, - MY_TRIGGER, - MY_INT_VARIANT, - MY_DBL_VARIANT, - MY_TXT_VARIANT, - MY_BLOB_VARIANT, - MY_NULL_VARIANT, + MY_TABLE = 0, + MY_VTABLE, + MY_VIEW, + MY_COLUMN, + MY_GEOMETRY, + MY_GEOMETRY_INDEX, + MY_GEOMETRY_CACHED, + MY_INDEX, + MY_TRIGGER, + MY_INT_VARIANT, + MY_DBL_VARIANT, + MY_TXT_VARIANT, + MY_BLOB_VARIANT, + MY_NULL_VARIANT, +}; + +enum +{ +// control IDs for timers + ID_AUTO_SAVE_TIMER = 20000, }; class MyObject:public wxTreeItemData { // // a class to store TreeItemData // - private: - int Type; // the object type - wxString Name; // the object name - wxString Column; // the column name [optional] - public: - MyObject (int type, wxString & name); - MyObject (int type, wxString & name, wxString & column); - virtual ~ MyObject () { ; } - int GetType () { return Type; } - wxString & GetName () { return Name; } - wxString & GetColumn () { return Column; } +private: + int Type; // the object type + wxString Name; // the object name + wxString Column; // the column name [optional] +public: + MyObject(int type, wxString & name); + MyObject(int type, wxString & name, wxString & column); + virtual ~ MyObject() + {; + } + int GetType() + { + return Type; + } + wxString & GetName() + { + return Name; + } + wxString & GetColumn() + { + return Column; + } }; class MyColumnInfo { // // a class to store a DB column // - private: - wxString Name; // the column name - bool PrimaryKey; // Primary Key column - bool Geometry; // Geometry column - bool GeometryIndex; // Geometry column + SpatialIndex - bool MbrCache; // Geometry column + MbrCache - MyColumnInfo *Next; // pointer to next element into the linked list - public: - MyColumnInfo (wxString & name, bool pkey); - ~MyColumnInfo () { ; } - wxString & GetName () { return Name; } - bool IsPrimaryKey () { return PrimaryKey; } - void SetGeometry () { Geometry = true; } - bool IsGeometry () { return Geometry; } - void SetGeometryIndex () { GeometryIndex = true; } - bool IsGeometryIndex () { return GeometryIndex; } - void SetMbrCache () { MbrCache = true; } - bool IsMbrCache () { return MbrCache; } - void SetNext (MyColumnInfo * next) { Next = next; } - MyColumnInfo *GetNext () { return Next; } +private: + wxString Name; // the column name + bool PrimaryKey; // Primary Key column + bool Geometry; // Geometry column + bool GeometryIndex; // Geometry column + SpatialIndex + bool MbrCache; // Geometry column + MbrCache + MyColumnInfo *Next; // pointer to next element into the linked list +public: + MyColumnInfo(wxString & name, bool pkey); + ~MyColumnInfo() + {; + } + wxString & GetName() + { + return Name; + } + bool IsPrimaryKey() + { + return PrimaryKey; + } + void SetGeometry() + { + Geometry = true; + } + bool IsGeometry() + { + return Geometry; + } + void SetGeometryIndex() + { + GeometryIndex = true; + } + bool IsGeometryIndex() + { + return GeometryIndex; + } + void SetMbrCache() + { + MbrCache = true; + } + bool IsMbrCache() + { + return MbrCache; + } + void SetNext(MyColumnInfo * next) + { + Next = next; + } + MyColumnInfo *GetNext() + { + return Next; + } }; class MyIndexInfo { // // a class to store a DB index // - private: - wxString Name; // the index name - MyIndexInfo *Next; // pointer to next element into the linked list - public: - MyIndexInfo (wxString & name); - ~MyIndexInfo () { ; } - wxString & GetName () { return Name; } - void SetNext (MyIndexInfo * next) { Next = next; } - MyIndexInfo *GetNext () { return Next; } +private: + wxString Name; // the index name + MyIndexInfo *Next; // pointer to next element into the linked list +public: + MyIndexInfo(wxString & name); + MyIndexInfo() + {; + } + wxString & GetName() + { + return Name; + } + void SetNext(MyIndexInfo * next) + { + Next = next; + } + MyIndexInfo *GetNext() + { + return Next; + } }; class MyTriggerInfo { // // a class to store a DB trigger // - private: - wxString Name; // the trigger name - MyTriggerInfo *Next; // pointer to next element into the linked list - public: - MyTriggerInfo (wxString & name); - ~MyTriggerInfo () { ; } - wxString & GetName () { return Name; } - void SetNext (MyTriggerInfo * next) { Next = next; } - MyTriggerInfo *GetNext () { return Next; } +private: + wxString Name; // the trigger name + MyTriggerInfo *Next; // pointer to next element into the linked list +public: + MyTriggerInfo(wxString & name); + ~MyTriggerInfo() + {; + } + wxString & GetName() + { + return Name; + } + void SetNext(MyTriggerInfo * next) + { + Next = next; + } + MyTriggerInfo *GetNext() + { + return Next; + } }; class MyTableInfo { // // a class to store DB table columns // - private: - MyColumnInfo * FirstColumn; // first element into the columns linked list - MyColumnInfo *LastColumn; // last element into the columns linked list - MyIndexInfo *FirstIndex; // first element into the indices linked list - MyIndexInfo *LastIndex; // last element into the indices linked list - MyTriggerInfo *FirstTrigger; // first element into the triggers linked list - MyTriggerInfo *LastTrigger; // last element into the triggers linked list - public: - MyTableInfo () { FirstColumn = NULL; LastColumn = NULL; - FirstIndex = NULL; LastIndex = NULL; FirstTrigger = NULL; - LastTrigger = NULL; } - ~MyTableInfo (); - void AddColumn (wxString & name, bool pkey); - void SetGeometry (wxString & name, bool index, bool cached); - void AddIndex (wxString & name); - void AddTrigger (wxString & name); - MyColumnInfo *GetFirstColumn () { return FirstColumn; } - MyIndexInfo *GetFirstIndex () { return FirstIndex; } - MyTriggerInfo *GetFirstTrigger () { return FirstTrigger; } +private: + MyColumnInfo * FirstColumn; // first element into the columns linked list + MyColumnInfo *LastColumn; // last element into the columns linked list + MyIndexInfo *FirstIndex; // first element into the indices linked list + MyIndexInfo *LastIndex; // last element into the indices linked list + MyTriggerInfo *FirstTrigger; // first element into the triggers linked list + MyTriggerInfo *LastTrigger; // last element into the triggers linked list +public: + MyTableInfo() + { + FirstColumn = NULL; + LastColumn = NULL; + FirstIndex = NULL; + LastIndex = NULL; + FirstTrigger = NULL; + LastTrigger = NULL; + } + ~MyTableInfo(); + void AddColumn(wxString & name, bool pkey); + void SetGeometry(wxString & name, bool index, bool cached); + void AddIndex(wxString & name); + void AddTrigger(wxString & name); + MyColumnInfo *GetFirstColumn() + { + return FirstColumn; + } + MyIndexInfo *GetFirstIndex() + { + return FirstIndex; + } + MyTriggerInfo *GetFirstTrigger() + { + return FirstTrigger; + } }; class MyViewInfo { // // a class to store DB view columns // - private: - MyColumnInfo * First; // first element into the columns linked list - MyColumnInfo *Last; // last element into the columns linked list - public: - MyViewInfo () { First = NULL; Last = NULL; } - ~MyViewInfo (); - void AddColumn (wxString & name); - MyColumnInfo *GetFirst () { return First; } +private: + MyColumnInfo * First; // first element into the columns linked list + MyColumnInfo *Last; // last element into the columns linked list +public: + MyViewInfo() + { + First = NULL; + Last = NULL; + } + ~MyViewInfo(); + void AddColumn(wxString & name); + MyColumnInfo *GetFirst() + { + return First; + } }; class MyVariant { // // a class to store Variant-Type values // - private: - int Type; // the Variant-Type - int IntValue; // the Integer value - double DblValue; // the Double value - wxString TxtValue; // the Text value - unsigned char *Blob; // the BLOB value - int BlobSize; // the BLOB size - public: - MyVariant () { Type = MY_NULL_VARIANT; Blob = NULL; } - ~MyVariant () { if (Blob) delete Blob; } - void Clear () { if (Blob) delete Blob; Blob = NULL; - Type = MY_NULL_VARIANT; } - void Set (int value) { Type = MY_INT_VARIANT; - IntValue = value; } - void Set (double value) { Type = MY_DBL_VARIANT; - DblValue = value; } - void Set (const unsigned char *text); - void Set (wxString & string) { Type = MY_TXT_VARIANT; - TxtValue = string; } - void Set (const void *blob, int size); - void Copy (MyVariant * other); - int GetType () { return Type; } - int GetIntValue () { return IntValue; } - double GetDblValue () { return DblValue; } - wxString & GetTxtValue () { return TxtValue; } - int GetBlobSize () { return BlobSize; } - unsigned char *GetBlob () { return Blob; } +private: + int Type; // the Variant-Type + sqlite3_int64 IntValue; // the Integer value + double DblValue; // the Double value + wxString TxtValue; // the Text value + unsigned char *Blob; // the BLOB value + int BlobSize; // the BLOB size +public: + MyVariant() + { + Type = MY_NULL_VARIANT; + Blob = NULL; + } + ~MyVariant() + { + if (Blob) + delete Blob; + } + void Clear() + { + if (Blob) + delete Blob; + Blob = NULL; + Type = MY_NULL_VARIANT; + } + void Set(sqlite3_int64 value) + { + Type = MY_INT_VARIANT; + IntValue = value; + } + void Set(double value) + { + Type = MY_DBL_VARIANT; + DblValue = value; + } + void Set(const unsigned char *text); + void Set(wxString & string) + { + Type = MY_TXT_VARIANT; + TxtValue = string; + } + void Set(const void *blob, int size); + void Copy(MyVariant * other); + int GetType() + { + return Type; + } + sqlite3_int64 GetIntValue() + { + return IntValue; + } + double GetDblValue() + { + return DblValue; + } + wxString & GetTxtValue() + { + return TxtValue; + } + int GetBlobSize() + { + return BlobSize; + } + unsigned char *GetBlob() + { + return Blob; + } }; class MyRowVariant { // // a class to store a row composed of Variant-Type values // - private: - int NumCols; // number of columns - MyVariant *ColumnArray; // the column as an array - bool Deleted; // switch to mark row deletion - MyRowVariant *Next; // pointer to next element into the linked list - public: - MyRowVariant () { NumCols = 0; ColumnArray = NULL; - Deleted = false; Next = NULL; } - MyRowVariant (int cols) { NumCols = cols; - ColumnArray = new MyVariant[cols]; Next = NULL; } - ~MyRowVariant () { if (ColumnArray) delete[]ColumnArray; } - void Create (int cols); - int GetNumCols () { return NumCols; } - void Set (int col, int value); - void Set (int col, double value); - void Set (int col, const unsigned char *text); - void Set (int col, const void *blob, int size); - MyVariant *GetColumn (int col); - void SetDeleted () { Deleted = true; } - bool IsDeleted () { return Deleted; } - void SetNext (MyRowVariant * next) { Next = next; } - MyRowVariant *GetNext () { return Next; } +private: + int NumCols; // number of columns + MyVariant *ColumnArray; // the column as an array + bool Deleted; // switch to mark row deletion + MyRowVariant *Next; // pointer to next element into the linked list +public: + MyRowVariant() + { + NumCols = 0; + ColumnArray = NULL; + Deleted = false; + Next = NULL; + } + MyRowVariant(int cols) + { + NumCols = cols; + ColumnArray = new MyVariant[cols]; + Next = NULL; + } + ~MyRowVariant() + { + if (ColumnArray) + delete[]ColumnArray; + } + void Create(int cols); + int GetNumCols() + { + return NumCols; + } + void Set(int col, sqlite3_int64 value); + void Set(int col, double value); + void Set(int col, const unsigned char *text); + void Set(int col, const void *blob, int size); + MyVariant *GetColumn(int col); + void SetDeleted() + { + Deleted = true; + } + bool IsDeleted() + { + return Deleted; + } + void SetNext(MyRowVariant * next) + { + Next = next; + } + MyRowVariant *GetNext() + { + return Next; + } }; class MyVariantList { // // a class to store a whole result set // - private: - int NumCols; // number of columns - wxString *ColumnName; // the column names - MyRowVariant *First; // first element into the linked list - MyRowVariant *Last; // last element into the linked list - public: - MyVariantList (); - ~MyVariantList (); - MyRowVariant *Add (int columns); - void SetColumnName (int col, const char *colName); - MyRowVariant *GetFirst () { return First; } - int GetRows (); - int GetColumns () { return NumCols; } - wxString & GetColumnName (int col); +private: + int NumCols; // number of columns + wxString *ColumnName; // the column names + MyRowVariant *First; // first element into the linked list + MyRowVariant *Last; // last element into the linked list +public: + MyVariantList(); + ~MyVariantList(); + MyRowVariant *Add(int columns); + void SetColumnName(int col, const char *colName); + MyRowVariant *GetFirst() + { + return First; + } + int GetRows(); + int GetColumns() + { + return NumCols; + } + wxString & GetColumnName(int col); }; class MyBlobs { // // a class to store BLOBs // - private: - int NumRows; // the number of rows - int NumCols; // the number of columns - MyRowVariant *Rows; // pointer to an array of rows - public: - MyBlobs (int rows, int cols); - ~MyBlobs (); - void SetBlob (int row, int col, MyVariant * blobVar); - MyVariant *GetBlob (int row, int col); +private: + int NumRows; // the number of rows + int NumCols; // the number of columns + MyRowVariant *Rows; // pointer to an array of rows +public: + MyBlobs(int rows, int cols); + ~MyBlobs(); + void SetBlob(int row, int col, MyVariant * blobVar); + MyVariant *GetBlob(int row, int col); }; class MyValues { // // a class to store column values for editing // - private: - int NumRows; // the number of rows - int NumCols; // the number of columns - MyRowVariant *Rows; // pointer to an array of rows - public: - MyValues (int rows, int cols); - ~MyValues (); - void SetValue (int row, int col, int value); - void SetValue (int row, int col, double value); - void SetValue (int row, int col, wxString & string); - MyRowVariant *GetRow (int row); - MyVariant *GetValue (int row, int col); +private: + int NumRows; // the number of rows + int NumCols; // the number of columns + MyRowVariant *Rows; // pointer to an array of rows +public: + MyValues(int rows, int cols); + ~MyValues(); + void SetValue(int row, int col, sqlite3_int64 value); + void SetValue(int row, int col, double value); + void SetValue(int row, int col, wxString & string); + MyRowVariant *GetRow(int row); + MyVariant *GetValue(int row, int col); }; class MySqlQuery { // // a class to store an SQL query - history // - private: - wxString Sql; - MySqlQuery *Prev; - MySqlQuery *Next; - public: - MySqlQuery (wxString & sql) { Sql = sql; Prev = NULL; - Next = NULL; } - ~MySqlQuery () { ; } - wxString & GetSql () { return Sql; } - void SetPrev (MySqlQuery * prev) { Prev = prev; } - MySqlQuery *GetPrev () { return Prev; } - void SetNext (MySqlQuery * next) { Next = next; } - MySqlQuery *GetNext () { return Next; } +private: + wxString Sql; + MySqlQuery *Prev; + MySqlQuery *Next; +public: + MySqlQuery(wxString & sql) + { + Sql = sql; + Prev = NULL; + Next = NULL; + } + ~MySqlQuery() + {; + } + wxString & GetSql() + { + return Sql; + } + void SetPrev(MySqlQuery * prev) + { + Prev = prev; + } + MySqlQuery *GetPrev() + { + return Prev; + } + void SetNext(MySqlQuery * next) + { + Next = next; + } + MySqlQuery *GetNext() + { + return Next; + } }; class MySqlHistory { // // a class supporting SQL queries history // - private: - MySqlQuery * First; - MySqlQuery *Last; - MySqlQuery *Current; - public: - MySqlHistory () { First = NULL; Last = NULL; - Current = NULL; } - ~MySqlHistory (); - void Add (wxString & sql); - MySqlQuery *GetCurrent () { return Current; } - MySqlQuery *GetNext (); - MySqlQuery *GetPrev (); - bool TestNext (); - bool TestPrev (); +private: + MySqlQuery * First; + MySqlQuery *Last; + MySqlQuery *Current; +public: + MySqlHistory() + { + First = NULL; + Last = NULL; + Current = NULL; + } + ~MySqlHistory(); + void Add(wxString & sql); + MySqlQuery *GetCurrent() + { + return Current; + } + MySqlQuery *GetNext(); + MySqlQuery *GetPrev(); + bool TestNext(); + bool TestPrev(); }; class MyApp:public wxApp { // // the main APP // - virtual bool OnInit (); + virtual bool OnInit(); }; class MyTableTree:public wxTreeCtrl { // // a tree-control used for SQLite DB tables // - private: - class MyFrame * MainFrame; - wxTreeItemId Root; // the root node - wxImageList *Images; // the images list - wxTreeItemId CurrentItem; // the tree item holding the current context menu - public: - MyTableTree () { ; } - MyTableTree (MyFrame * parent, wxWindowID id = wxID_ANY); - virtual ~ MyTableTree () { ; } - void SetPath (wxString & path) { SetItemText (Root, path); } - void FlushAll () { DeleteChildren (Root); } - void AddTable (wxString & tableName, bool virtualTable); - void AddView (wxString & viewName); - void ExpandRoot () { Expand (Root); } - void ShowMenu (wxTreeItemId & item, wxPoint & pt); - void OnSelChanged (wxTreeEvent & event); - void OnRightClick (wxTreeEvent & event); - void OnCmdNewTable (wxCommandEvent & event); - void OnCmdNewView (wxCommandEvent & event); - void OnCmdNewIndex (wxCommandEvent & event); - void OnCmdNewTrigger (wxCommandEvent & event); - void OnCmdNewColumn (wxCommandEvent & event); - void OnCmdShow (wxCommandEvent & event); - void OnCmdDrop (wxCommandEvent & event); - void OnCmdRename (wxCommandEvent & event); - void OnCmdSelect (wxCommandEvent & event); - void OnCmdRefresh (wxCommandEvent & event); - void OnCmdRecover (wxCommandEvent & event); - void OnCmdShowSql (wxCommandEvent & event); - void OnCmdSpatialIndex (wxCommandEvent & event); - void OnCmdMbrCache (wxCommandEvent & event); - void OnCmdCheckGeometry (wxCommandEvent & event); - void OnCmdSetSrid (wxCommandEvent & event); - void OnCmdDumpShp (wxCommandEvent & event); - void OnCmdDumpTxtTab (wxCommandEvent & event); - void OnCmdDumpCsv (wxCommandEvent & event); - void OnCmdDumpHtml (wxCommandEvent & event); - void OnCmdEdit (wxCommandEvent & event); +private: + class MyFrame * MainFrame; + wxTreeItemId Root; // the root node + wxImageList *Images; // the images list + wxTreeItemId CurrentItem; // the tree item holding the current context menu +public: + MyTableTree() + {; + } + MyTableTree(class MyFrame * parent, wxWindowID id = wxID_ANY); + virtual ~ MyTableTree() + {; + } + void SetPath(wxString & path) + { + SetItemText(Root, path); + } + void FlushAll() + { + DeleteChildren(Root); + } + void AddTable(wxString & tableName, bool virtualTable); + void AddView(wxString & viewName); + void ExpandRoot() + { + Expand(Root); + } + void ShowMenu(wxTreeItemId & item, wxPoint & pt); + void OnSelChanged(wxTreeEvent & event); + void OnRightClick(wxTreeEvent & event); + void OnCmdNewTable(wxCommandEvent & event); + void OnCmdNewView(wxCommandEvent & event); + void OnCmdNewIndex(wxCommandEvent & event); + void OnCmdNewTrigger(wxCommandEvent & event); + void OnCmdNewColumn(wxCommandEvent & event); + void OnCmdShow(wxCommandEvent & event); + void OnCmdDrop(wxCommandEvent & event); + void OnCmdRename(wxCommandEvent & event); + void OnCmdSelect(wxCommandEvent & event); + void OnCmdRefresh(wxCommandEvent & event); + void OnCmdRecover(wxCommandEvent & event); + void OnCmdShowSql(wxCommandEvent & event); + void OnCmdSpatialIndex(wxCommandEvent & event); + void OnCmdMbrCache(wxCommandEvent & event); + void OnCmdRebuildTriggers(wxCommandEvent & event); + void OnCmdCheckGeometry(wxCommandEvent & event); + void OnCmdSetSrid(wxCommandEvent & event); + void OnCmdDumpShp(wxCommandEvent & event); + void OnCmdDumpTxtTab(wxCommandEvent & event); + void OnCmdDumpCsv(wxCommandEvent & event); + void OnCmdDumpHtml(wxCommandEvent & event); + void OnCmdEdit(wxCommandEvent & event); +}; + +class MyResultSetView:public wxPanel +{ +// +// a panel to be used for SQL Queries +// +private: + class MyFrame * MainFrame; + wxBitmapButton *BtnRsFirst; + wxBitmapButton *BtnRsLast; + wxBitmapButton *BtnRsNext; + wxBitmapButton *BtnRsPrevious; + wxBitmapButton *BtnRefresh; + wxStaticText *RsCurrentBlock; + int RsBlock; + int RsBeginRow; + int RsEndRow; + int RsMaxRow; + int CurrentEvtRow; + int CurrentEvtColumn; + MyVariant *CurrentBlob; + wxGrid *TableView; + MyBlobs *TableBlobs; + MyValues *TableValues; + bool ReadOnly; + sqlite3_int64 *RowIds; + int PrimaryKeys[1024]; + int BlobColumns[1024]; + wxString TableName; + bool InsertPending; + MyRowVariant *InsertRow; + wxString SqlErrorMsg; +public: + MyResultSetView() + {; + } + MyResultSetView(MyFrame * parent, wxWindowID id = wxID_ANY); + virtual ~ MyResultSetView(); + void HideControls(); + void ShowControls(); + wxString & GetSqlErrorMsg() + { + return SqlErrorMsg; + } + bool IsPrimaryKey(int column); + bool IsBlobColumn(int column); + void EditTable(wxString & sql, int *primaryKeys, int *blobCols, + wxString & tableName); + void CreateGrid(int rows, int cols); + bool ExecuteSql(wxString & sql, int from, bool read_only); + void ResizeView(); + void DoInsert(bool confirmed); + void HexBlobValue(unsigned char *blob, int size, wxString & hex); + void OnSize(wxSizeEvent & event); + void OnRsFirst(wxCommandEvent & event); + void OnRsLast(wxCommandEvent & event); + void OnRsNext(wxCommandEvent & event); + void OnRsPrevious(wxCommandEvent & event); + void OnRefresh(wxCommandEvent & event); + void OnCellSelected(wxGridEvent & event); + void OnRightClick(wxGridEvent & event); + void OnCellChanged(wxGridEvent & event); + void OnCmdDelete(wxCommandEvent & event); + void OnCmdInsert(wxCommandEvent & event); + void OnCmdAbort(wxCommandEvent & event); + void OnCmdClearSelection(wxCommandEvent & event); + void OnCmdSelectAll(wxCommandEvent & event); + void OnCmdSelectRow(wxCommandEvent & event); + void OnCmdSelectColumn(wxCommandEvent & event); + void OnCmdCopy(wxCommandEvent & event); + void OnCmdBlob(wxCommandEvent & event); + void OnCmdBlobIn(wxCommandEvent & event); + void OnCmdBlobOut(wxCommandEvent & event); + void OnCmdBlobNull(wxCommandEvent & event); +}; + +class MySqlControl:public wxTextCtrl +{ +// +// the SQL text control +// +private: + class MyQueryView * Parent; +public: + MySqlControl(MyQueryView * parent, wxWindowID id, const wxString & value, + const wxPoint & pos, const wxSize & size, long style); + virtual ~ MySqlControl() + {; + } + void OnSqlMousePosition(wxMouseEvent & event); + void OnSqlArrowPosition(wxKeyEvent & event); +}; + +class SqlTokenizer +{ +// +// a class used for tokenizing SQL statements +// +private: + wxString ** TokenList; + int Block; + int Max; + int Index; + void Expand(); + void Insert(wxString * token); + wxString CurrentToken; +public: + SqlTokenizer(wxString & sql); + ~SqlTokenizer(); + bool HasMoreTokens(); + wxString & GetNextToken(); }; class MyQueryView:public wxPanel { // // a panel to be used for SQL Queries // - private: - class MyFrame * MainFrame; - MySqlHistory History; - wxTextCtrl *SqlCtrl; - wxBitmapButton *BtnSqlGo; - wxBitmapButton *BtnHistoryBack; - wxBitmapButton *BtnHistoryForward; - wxBitmapButton *BtnRsFirst; - wxBitmapButton *BtnRsLast; - wxBitmapButton *BtnRsNext; - wxBitmapButton *BtnRsPrevious; - wxBitmapButton *BtnRefresh; - wxStaticText *RsCurrentBlock; - int RsBlock; - int RsBeginRow; - int RsEndRow; - int RsMaxRow; - int CurrentEvtRow; - int CurrentEvtColumn; - MyVariant *CurrentBlob; - wxString SqlErrorMsg; - wxGrid *TableView; - MyBlobs *TableBlobs; - MyValues *TableValues; - bool ReadOnly; - int *RowIds; - int PrimaryKeys[1024]; - int BlobColumns[1024]; - wxString TableName; - bool InsertPending; - MyRowVariant *InsertRow; - public: - MyQueryView () { ; } - MyQueryView (MyFrame * parent, wxWindowID id = wxID_ANY); - virtual ~ MyQueryView () { if (RowIds) delete[]RowIds; - if (InsertRow) delete InsertRow; } - void HideControls (); - void HideRsControls (); - void ShowSqlControls (); - void ShowRsControls (); - bool IsPrimaryKey (int column); - bool IsBlobColumn (int column); - void EditTable (wxString & sql, int *primaryKeys, int *blobCols, - wxString & tableName); - void SetSql (wxString & sql, bool execute); - bool ExecuteSql (wxString & sql, int from); - void CreateGrid (int rows, int cols); - void ResizeTableView (); - void SetHistoryStates (); - void DoInsert (bool confirmed); - void HexBlobValue (unsigned char *blob, int size, wxString & hex); - void OnSize (wxSizeEvent & event); - void OnSqlGo (wxCommandEvent & event); - void OnHistoryBack (wxCommandEvent & event); - void OnHistoryForward (wxCommandEvent & event); - void OnRsFirst (wxCommandEvent & event); - void OnRsLast (wxCommandEvent & event); - void OnRsNext (wxCommandEvent & event); - void OnRsPrevious (wxCommandEvent & event); - void OnRefresh (wxCommandEvent & event); - void OnCellSelected (wxGridEvent & event); - void OnRightClick (wxGridEvent & event); - void OnCellChanged (wxGridEvent & event); - void OnCmdDelete (wxCommandEvent & event); - void OnCmdInsert (wxCommandEvent & event); - void OnCmdAbort (wxCommandEvent & event); - void OnCmdClearSelection (wxCommandEvent & event); - void OnCmdSelectAll (wxCommandEvent & event); - void OnCmdSelectRow (wxCommandEvent & event); - void OnCmdSelectColumn (wxCommandEvent & event); - void OnCmdCopy (wxCommandEvent & event); - void OnCmdBlob (wxCommandEvent & event); - void OnCmdBlobIn (wxCommandEvent & event); - void OnCmdBlobOut (wxCommandEvent & event); - void OnCmdBlobNull (wxCommandEvent & event); +private: + class MyFrame * MainFrame; + MySqlHistory History; + MySqlControl *SqlCtrl; + wxBitmapButton *BtnSqlGo; + wxBitmapButton *BtnHistoryBack; + wxBitmapButton *BtnHistoryForward; + int BracketStart; + int BracketEnd; + bool IgnoreEvent; +public: + MyQueryView() + {; + } + MyQueryView(MyFrame * parent, wxWindowID id = wxID_ANY); + virtual ~ MyQueryView() + {; + } + void HideControls(); + void ShowControls(); + bool IsSqliteExtra(wxString & str); + bool IsSqlString(wxString & str); + bool IsSqlNumber(wxString & str); + bool IsSqlFunction(wxString & str, char next_c); + bool IsSqlGeoFunction(wxString & str, char next_c); + bool IsIgnoreEvent() + { + return IgnoreEvent; + } + void EventBrackets(); + bool CheckBrackets(int pos, bool reverse_direction, int *on, int *off); + void EvidBrackets(int on, int off); + void DoSqlSyntaxColor(); + wxTextCtrl *GetSqlCtrl() + { + return SqlCtrl; + } + void SetSql(wxString & sql, bool execute); + void SetHistoryStates(); + void OnSize(wxSizeEvent & event); + void OnSqlGo(wxCommandEvent & event); + void OnHistoryBack(wxCommandEvent & event); + void OnHistoryForward(wxCommandEvent & event); + void OnSqlSyntaxColor(wxCommandEvent & event); + void AddToHistory(wxString & sql); }; class MyFrame:public wxFrame { // // the main GUI frame // - private: - unsigned char Jpeg1Signature[2]; - unsigned char Jpeg2Signature[2]; - unsigned char Jpeg3Signature[4]; - unsigned char JfifSignature[4]; - unsigned char ExifSignature[4]; - unsigned char PngSignature[8]; - unsigned char ZipSignature[4]; - wxAuiManager Manager; // the GUI manager - MyTableTree *TableTree; // the tables tree list - MyQueryView *QueryView; // the QueryResult panel - bool HelpPane; // is the HELP pane already opened ? - sqlite3 *SqliteHandle; // handle for SQLite DB - wxString SqlitePath; // path of SQLite DB - wxString LastDirectory; // path of directory used - int CharsetsLen; // # charsets defined - wxString *Charsets; // table of charsets [code only] - wxString *CharsetsNames; // table of charsets [whith description] - wxString LocaleCharset; // locale charset - wxString DefaultCharset; // default charset - bool AskCharset; // switch to set default charset for every output - wxBitmap *BtnCreateNew; // button icon for DB CREATE&CONNECT - wxBitmap *BtnConnect; // button icon for DB CONNECT - wxBitmap *BtnDisconnect; // button icon for DB DISCONNECT - wxBitmap *BtnVacuum; // button icon for DB VACUUM - wxBitmap *BtnSqlScript; // button icon for Execute SQL SCRIPT - wxBitmap *BtnCharset; // button icon for Default CHARSET - wxBitmap *BtnLoadShp; // button icon for LOAD SHP - wxBitmap *BtnLoadTxt; // button icon for LOAD TXT/CSV - wxBitmap *BtnVirtualShp; // button icon for VIRTUAL SHP - wxBitmap *BtnVirtualTxt; // button icon for VIRTUAL TXT/CSV - wxBitmap *BtnSrids; // button icon for SEARCH SRIDs - wxBitmap *BtnHelp; // button icon for HELP - wxBitmap *BtnAbout; // button icon for ABOUT - wxBitmap *BtnExit; // button icon for EXIT - public: - enum - { - BLOB_NULL = 0, - BLOB_HEX, - BLOB_GEOMETRY, - BLOB_JPEG, - BLOB_JFIF, - BLOB_EXIF, - BLOB_PNG, - BLOB_GIF, - BLOB_PDF, - BLOB_ZIP, - }; - MyFrame (const wxString & title, const wxPoint & pos, const wxSize & size, - wxString & path); - virtual ~ MyFrame (); - - void UpdateStatusBar (); - bool IsConnected () { if (SqliteHandle) return true; - else return false; - } - static void CleanSql (char *str); - void CleanTxtTab (char *str); - void CleanCsv (char *str); - void CleanHtml (char *str); - sqlite3 *GetSqlite () { return SqliteHandle; } - void CloseHelpPane () { HelpPane = false; } - void OpenHelpPane () { HelpPane = true; } - - bool OpenDB (); - bool CreateDB (); - void CloseDB (); - void InitTableTree (); - void ClearTableTree (); - void GetTableColumns (wxString & tableName, MyTableInfo * list); - void GetTableIndices (wxString & tableName, MyTableInfo * list); - void GetTableTriggers (wxString & tableName, MyTableInfo * list); - void GetViewColumns (wxString & viewName, MyViewInfo * list); - void EditTable (wxString & sql, int *primaryKeys, int *blobCols, - wxString & table) - { QueryView->EditTable (sql, primaryKeys, blobCols, table); } - void SetSql (wxString & sql, bool execute) - { QueryView->SetSql (sql, execute); } - int GuessBlobType (int blob_size, unsigned char *blob); - bool ExecuteSql (const char *sql, int rowNo); - void Rollback (); - bool TableAlreadyExists (wxString & name); - bool SridNotExists (int srid); - bool CheckMetadata (); - void CleanSqlString (char *sql); - wxString *GetCharsets () { return Charsets; } - wxString *GetCharsetsNames () { return CharsetsNames; } - int GetCharsetsLen () { return CharsetsLen; } - gaiaDbfFieldPtr GetDbfField (gaiaDbfListPtr list, char *name); - void LoadShapefile (wxString & path, wxString & table, int srid, - wxString & column, wxString & charset); - void DumpShapefile (wxString & path, wxString & table, wxString & column, - wxString & charset); - void LoadText (wxString & path, wxString & table, wxString & charset, bool first_titles, char decimal_separator, - char separator, char text_separator); - void DumpTxtTab (wxString & path, wxString & table, wxString & charset); - void DumpCsv (wxString & path, wxString & table, wxString & charset); - void DumpHtml (wxString & path, wxString & table, wxString & charset); - void GetHelp (wxString & html); - wxString *GetColumnNames (wxString & table, int *columns); - void SetLastDirectory (wxString & path) { LastDirectory = path; } - wxString & GetLastDirectory () { return LastDirectory; } - wxString & GetLocaleCharset () { return LocaleCharset; } - wxString & GetDefaultCharset () { return DefaultCharset; } - wxString & GetCharsetName (wxString & charset); - int GetCharsetIndex (wxString & charset); - bool IsSetAskCharset () { return AskCharset; } - char * ReadSqlLine(FILE *fl, int *len, int *eof); - - void OnQuit (wxCommandEvent & event); - void OnAbout (wxCommandEvent & event); - void OnConnect (wxCommandEvent & event); - void OnCreateNew (wxCommandEvent & event); - void OnDisconnect (wxCommandEvent & event); - void OnVacuum (wxCommandEvent & event); - void OnSqlScript (wxCommandEvent & event); - void OnCharset (wxCommandEvent & event); - void OnLoadShp (wxCommandEvent & event); - void OnLoadTxt (wxCommandEvent & event); - void OnVirtualShp (wxCommandEvent & event); - void OnVirtualTxt (wxCommandEvent & event); - void OnSrids (wxCommandEvent & event); - void OnHelp (wxCommandEvent & event); - void OnMouseMove (wxMouseEvent & event); +private: + wxString AutoFDOmsg; + bool SpatiaLiteMetadata; + wxAuiManager Manager; // the GUI manager + wxString ConfigLayout; // PERSISTENCY - the layout configuration + int ConfigPaneX; // PERSISTENCY - the main pane screen origin X + int ConfigPaneY; // PERSISTENCY - the main pane screen origin Y + int ConfigPaneWidth; // PERSISTENCY - the main pane screen width + int ConfigPaneHeight; // PERSISTENCY - the main pane screen height + wxString ConfigDbPath; // PERSISTENCY - the last opend DB path + wxString ConfigDir; //PERSISTENCY - the last used directory + MyTableTree *TableTree; // the tables tree list + MyQueryView *QueryView; // the QueryResult panel + MyResultSetView *RsView; // the QueryResult panel + bool HelpPane; // is the HELP pane already opened ? + sqlite3 *SqliteHandle; // handle for SQLite DB + wxString SqlitePath; // path of SQLite DB + wxString ExternalSqlitePath; // path of external SQLite DB [LOAD/SAVE MEMORY database] + bool MemoryDatabase; // TRUE if we are currently working on the MEMORY database + wxString LastDirectory; // path of directory used + int CharsetsLen; // # charsets defined + wxString *Charsets; // table of charsets [code only] + wxString *CharsetsNames; // table of charsets [with description] + wxString LocaleCharset; // locale charset + wxString DefaultCharset; // default charset + bool AskCharset; // switch to set default charset for every output + int TablesLen; // # tables defined + wxString *TableNames; // array of tables + wxBitmap *BtnCreateNew; // button icon for DB CREATE&CONNECT + wxBitmap *BtnConnect; // button icon for DB CONNECT + wxBitmap *BtnDisconnect; // button icon for DB DISCONNECT + wxBitmap *BtnMemDbLoad; // button icon for MEMORY DB LOAD + wxBitmap *BtnMemDbNew; // button icon for MEMORY DB NEW + wxBitmap *BtnMemDbClock; // button icon for MEMORY DB CLOCK + wxBitmap *BtnMemDbSave; // button icon for MEMORY DB SAVE + wxBitmap *BtnVacuum; // button icon for DB VACUUM + wxBitmap *BtnSqlScript; // button icon for Execute SQL SCRIPT + wxBitmap *BtnCharset; // button icon for Default CHARSET + wxBitmap *BtnLoadShp; // button icon for LOAD SHP + wxBitmap *BtnLoadTxt; // button icon for LOAD TXT/CSV + wxBitmap *BtnVirtualShp; // button icon for VIRTUAL SHP + wxBitmap *BtnVirtualTxt; // button icon for VIRTUAL TXT/CSV + wxBitmap *BtnNetwork; // button icon for BUILD NETWORK + wxBitmap *BtnExif; // button icon for EXIF LOAD + wxBitmap *BtnSrids; // button icon for SEARCH SRIDs + wxBitmap *BtnHelp; // button icon for HELP + wxBitmap *BtnAbout; // button icon for ABOUT + wxBitmap *BtnExit; // button icon for EXIT +// AutoSave timer + int AutoSaveInterval; + int LastTotalChanges; + wxTimer *TimerAutoSave; +public: + MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size, + wxString & path); + virtual ~ MyFrame(); + + void UpdateStatusBar(); + bool IsConnected() + { + if (SqliteHandle) + return true; + else + return false; + } + static void CleanSql(char *str); + void CleanTxtTab(char *str); + void CleanCsv(char *str); + void CleanHtml(char *str); + wxString & GetExternalSqlitePath() + { + return ExternalSqlitePath; + } + void SetExternalSqlitePath(wxString & path) + { + ExternalSqlitePath = path; + } + sqlite3 *GetSqlite() + { + return SqliteHandle; + } + void CloseHelpPane() + { + HelpPane = false; + } + void OpenHelpPane() + { + HelpPane = true; + } + + bool OpenDB(); + bool CreateDB(); + void CloseDB(); + bool CreateSpatialMetaData(); + void AutoFDOStart(); + void AutoFDOStop(); + void InitTableTree(); + void ClearTableTree(); + void GetTableColumns(wxString & tableName, MyTableInfo * list); + void GetTableIndices(wxString & tableName, MyTableInfo * list); + void GetTableTriggers(wxString & tableName, MyTableInfo * list); + void GetViewColumns(wxString & viewName, MyViewInfo * list); + void EditTable(wxString & sql, int *primaryKeys, int *blobCols, + wxString & table) + { + RsView->EditTable(sql, primaryKeys, blobCols, table); + } + void SetSql(wxString & sql, bool execute) + { + QueryView->SetSql(sql, execute); + } + bool ExecuteSql(const char *sql, int rowNo); + void Rollback(); + bool TableAlreadyExists(wxString & name); + bool SridNotExists(int srid); + bool CheckMetadata(); + void CleanSqlString(char *sql); + void SaveConfig(); + void LoadConfig(); + wxString *GetCharsets() + { + return Charsets; + } + wxString *GetCharsetsNames() + { + return CharsetsNames; + } + int GetCharsetsLen() + { + return CharsetsLen; + } + gaiaDbfFieldPtr GetDbfField(gaiaDbfListPtr list, char *name); + void LoadShapefile(wxString & path, wxString & table, int srid, + wxString & column, wxString & charset); + void DumpShapefile(wxString & path, wxString & table, wxString & column, + wxString & charset); + void LoadText(wxString & path, wxString & table, wxString & charset, + bool first_titles, char decimal_separator, char separator, + char text_separator); + void DumpTxtTab(wxString & path, wxString & table, wxString & charset); + void DumpCsv(wxString & path, wxString & table, wxString & charset); + void DumpHtml(wxString & path, wxString & table, wxString & charset); + void GetHelp(wxString & html); + wxString *GetColumnNames(wxString & table, int *columns); + void SetLastDirectory(wxString & path) + { + LastDirectory = path; + } + wxString & GetLastDirectory() + { + return LastDirectory; + } + wxString & GetLocaleCharset() + { + return LocaleCharset; + } + wxString & GetDefaultCharset() + { + return DefaultCharset; + } + wxString & GetCharsetName(wxString & charset); + int GetCharsetIndex(wxString & charset); + bool IsSetAskCharset() + { + return AskCharset; + } + char *ReadSqlLine(FILE * fl, int *len, int *eof); + MyQueryView *GetQueryView() + { + return QueryView; + } + MyResultSetView *GetRsView() + { + return RsView; + } + wxString *GetTables(int *cnt); + void BuildNetwork(wxString & table, wxString & from, wxString & to, + wxString & geometry, bool cost_length, wxString & cost, + bool bidirectional, bool one_way, + wxString & one_way_from_to, wxString & one_way_to_from); + bool CreateNetwork(class Network * net, wxString & table, wxString & from, + wxString & to, wxString & geometry); + void ImportExifPhotos(wxString & path, bool folder, bool metadata, + bool gps_only); + void OutputNetNode(unsigned char *auxbuf, int *size, int ind, bool node_code, + int max_node_length, class NetNode * pN, int endian_arch); + bool CheckExifTables(); + int ExifLoadDir(wxString & path, bool gps_only, bool metadata); + int ExifLoadFile(wxString & path, bool gps_only, bool metadata); + bool UpdateExifTables(unsigned char *blob, int sz, + gaiaExifTagListPtr tag_list, bool metadata, + wxString & path); + bool IsExifGps(gaiaExifTagListPtr tag_list); + void GetMake(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); + void GetModel(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); + void GetGpsTimestamp(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); + void GetDate(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); + double GetGpsDirection(gaiaExifTagListPtr tag_list, bool * ok); + void GetGpsSatellites(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); + void GetGpsCoords(gaiaExifTagListPtr tag_list, double *longitude, + double *latitude, bool * ok); + sqlite3_int64 GetPixelX(gaiaExifTagListPtr tag_list, bool * ok); + sqlite3_int64 GetPixelY(gaiaExifTagListPtr tag_list, bool * ok); + + bool MemoryDbSave(); + void LastDitchMemoryDbSave(); + + void OnQuit(wxCommandEvent & event); + void OnAbout(wxCommandEvent & event); + void OnConnect(wxCommandEvent & event); + void OnCreateNew(wxCommandEvent & event); + void OnDisconnect(wxCommandEvent & event); + void OnMemoryDbLoad(wxCommandEvent & event); + void OnMemoryDbNew(wxCommandEvent & event); + void OnMemoryDbClock(wxCommandEvent & event); + void OnMemoryDbSave(wxCommandEvent & event); + void OnVacuum(wxCommandEvent & event); + void OnSqlScript(wxCommandEvent & event); + void OnCharset(wxCommandEvent & event); + void OnLoadShp(wxCommandEvent & event); + void OnLoadTxt(wxCommandEvent & event); + void OnVirtualShp(wxCommandEvent & event); + void OnVirtualTxt(wxCommandEvent & event); + void OnNetwork(wxCommandEvent & event); + void OnImportExifPhotos(wxCommandEvent & event); + void OnSrids(wxCommandEvent & event); + void OnHelp(wxCommandEvent & event); + void OnMouseMove(wxMouseEvent & event); + void OnTimerAutoSave(wxTimerEvent & event); }; class HelpDialog:public wxDialog { // // the help dialog // - private: - MyFrame * MainFrame; - public: - HelpDialog () { MainFrame = NULL; } - HelpDialog (MyFrame * parent) { Create (parent); } - bool Create (MyFrame * parent); - virtual ~ HelpDialog () { ; } - void CreateControls (); - void OnClose (wxCloseEvent & event); +private: + MyFrame * MainFrame; +public: + HelpDialog() + { + MainFrame = NULL; + } + HelpDialog(MyFrame * parent) + { + Create(parent); + } + bool Create(MyFrame * parent); + virtual ~ HelpDialog() + {; + } + void CreateControls(); + void OnClose(wxCloseEvent & event); + void OnSize(wxSizeEvent & event); }; class SearchSridDialog:public wxDialog { // // a dialog preparing a Search SRID by name // - private: - MyFrame * MainFrame; - wxString String; // required search string - public: - SearchSridDialog () { ; } - SearchSridDialog (MyFrame * parent); - bool Create (MyFrame * parent); - virtual ~ SearchSridDialog () { ; } - void CreateControls (); - wxString & GetString () { return String; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString String; // required search string +public: + SearchSridDialog() + {; + } + SearchSridDialog(MyFrame * parent); + bool Create(MyFrame * parent); + virtual ~ SearchSridDialog() + {; + } + void CreateControls(); + wxString & GetString() + { + return String; + } + void OnOk(wxCommandEvent & event); }; class SetSridDialog:public wxDialog { // // a dialog preparing a SET SRID // - private: - MyFrame * MainFrame; - wxString Table; // the table's name - wxString Column; // the column's name to be recovered - int OldSrid; // SRID to substitute - int Srid; // required SRID - public: - SetSridDialog () { ; } - SetSridDialog (MyFrame * parent, wxString & table, wxString & column); - bool Create (MyFrame * parent, wxString & table, wxString & column); - virtual ~ SetSridDialog () { ; } - void CreateControls (); - int GetOldSrid () { return OldSrid; } - int GetSrid () { return Srid; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Table; // the table's name + wxString Column; // the column's name to be recovered + int OldSrid; // SRID to substitute + int Srid; // required SRID +public: + SetSridDialog() + {; + } + SetSridDialog(MyFrame * parent, wxString & table, wxString & column); + bool Create(MyFrame * parent, wxString & table, wxString & column); + virtual ~ SetSridDialog() + {; + } + void CreateControls(); + int GetOldSrid() + { + return OldSrid; + } + int GetSrid() + { + return Srid; + } + void OnOk(wxCommandEvent & event); }; class RecoverDialog:public wxDialog { // // a dialog preparing a RECOVER GEOMETRY // - private: - MyFrame * MainFrame; - wxString Table; // the table's name - wxString Column; // the column's name to be recovered - int Srid; // required SRID - wxString Type; // required Geometry Type - public: - RecoverDialog () { ; } - RecoverDialog (MyFrame * parent, wxString & table, wxString & column); - bool Create (MyFrame * parent, wxString & table, wxString & column); - virtual ~ RecoverDialog () { ; } - void CreateControls (); - wxString & GetType () { return Type; } - int GetSrid () { return Srid; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Table; // the table's name + wxString Column; // the column's name to be recovered + int Srid; // required SRID + wxString Type; // required Geometry Type +public: + RecoverDialog() + {; + } + RecoverDialog(MyFrame * parent, wxString & table, wxString & column); + bool Create(MyFrame * parent, wxString & table, wxString & column); + virtual ~ RecoverDialog() + {; + } + void CreateControls(); + wxString & GetType() + { + return Type; + } + int GetSrid() + { + return Srid; + } + void OnOk(wxCommandEvent & event); }; class VirtualShpDialog:public wxDialog { // // a dialog preparing a CREATE VIRTUAL SHAPE // - private: - MyFrame * MainFrame; - wxString Path; // the SHP base path - wxString Table; // the table name - wxString Default; // the default charset - wxString Charset; // the SHP charset - int Srid; // the SRID - public: - VirtualShpDialog () { ; } - VirtualShpDialog (MyFrame * parent, wxString & path, wxString & table, wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & table, wxString & defCs); - virtual ~ VirtualShpDialog () { ; } - void CreateControls (); - wxString & GetTable() { return Table; } - wxString & GetCharset () { return Charset; } - int GetSrid () { return Srid; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the SHP base path + wxString Table; // the table name + wxString Default; // the default charset + wxString Charset; // the SHP charset + int Srid; // the SRID +public: + VirtualShpDialog() + {; + } + VirtualShpDialog(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs); + virtual ~ VirtualShpDialog() + {; + } + void CreateControls(); + wxString & GetTable() + { + return Table; + } + wxString & GetCharset() + { + return Charset; + } + int GetSrid() + { + return Srid; + } + void OnOk(wxCommandEvent & event); }; class VirtualTxtDialog:public wxDialog { // // a dialog preparing a CREATE VIRTUAL TEXT // - private: - MyFrame * MainFrame; - wxString Path; // the CSV/TXT base path - wxString Table; // the table name - wxString Default; // the default charset - wxString Charset; // the CSV/TXT charset - bool FirstLineTitles; // TRUE if first line stores column titles - char Separator; // the character to be used as field separator - char TextSeparator; // the character to be used as text separator - bool DecimalPointIsComma; // TRUE if decimal separator is COMMA - public: - VirtualTxtDialog () { ; } - VirtualTxtDialog (MyFrame * parent, wxString & path, wxString & table, wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & table, wxString & defCs); - virtual ~ VirtualTxtDialog () { ; } - void CreateControls (); - wxString & GetTable() { return Table; } - wxString & GetCharset () { return Charset; } - bool IsFirstLineTitles() { return FirstLineTitles; } - char GetSeparator() { return Separator; } - char GetTextSeparator() { return TextSeparator; } - bool IsDecimalPointComma() { return DecimalPointIsComma; } - void OnSeparator (wxCommandEvent & event); - void OnDecimalSeparator (wxCommandEvent & event); - void OnQuote (wxCommandEvent & event); - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the CSV/TXT base path + wxString Table; // the table name + wxString Default; // the default charset + wxString Charset; // the CSV/TXT charset + bool FirstLineTitles; // TRUE if first line stores column titles + char Separator; // the character to be used as field separator + char TextSeparator; // the character to be used as text separator + bool DecimalPointIsComma; // TRUE if decimal separator is COMMA +public: + VirtualTxtDialog() + {; + } + VirtualTxtDialog(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs); + virtual ~ VirtualTxtDialog() + {; + } + void CreateControls(); + wxString & GetTable() + { + return Table; + } + wxString & GetCharset() + { + return Charset; + } + bool IsFirstLineTitles() + { + return FirstLineTitles; + } + char GetSeparator() + { + return Separator; + } + char GetTextSeparator() + { + return TextSeparator; + } + bool IsDecimalPointComma() + { + return DecimalPointIsComma; + } + void OnSeparator(wxCommandEvent & event); + void OnDecimalSeparator(wxCommandEvent & event); + void OnQuote(wxCommandEvent & event); + void OnOk(wxCommandEvent & event); }; class LoadShpDialog:public wxDialog { // // a dialog preparing a LOAD SHAPE // - private: - MyFrame * MainFrame; - wxString Path; // the SHP base path - wxString Table; // the table's name to be created - wxString Column; // the column's name for Geometry - wxString Default; // the default charset - wxString Charset; // the SHP charset - int Srid; // the SRID - public: - LoadShpDialog () { ; } - LoadShpDialog (MyFrame * parent, wxString & path, wxString & table, - int srid, wxString & column, wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & table, int srid, - wxString & column, wxString & defCs); - virtual ~ LoadShpDialog () { ; } - void CreateControls (); - wxString & GetTable () { return Table; } - wxString & GetColumn () { return Column; } - wxString & GetCharset () { return Charset; } - int GetSrid () { return Srid; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the SHP base path + wxString Table; // the table's name to be created + wxString Column; // the column's name for Geometry + wxString Default; // the default charset + wxString Charset; // the SHP charset + int Srid; // the SRID +public: + LoadShpDialog() + {; + } + LoadShpDialog(MyFrame * parent, wxString & path, wxString & table, int srid, + wxString & column, wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & table, int srid, + wxString & column, wxString & defCs); + virtual ~ LoadShpDialog() + {; + } + void CreateControls(); + wxString & GetTable() + { + return Table; + } + wxString & GetColumn() + { + return Column; + } + wxString & GetCharset() + { + return Charset; + } + int GetSrid() + { + return Srid; + } + void OnOk(wxCommandEvent & event); }; class DumpShpDialog:public wxDialog { // // a dialog preparing a DUMP SHAPE // - private: - MyFrame * MainFrame; - wxString Path; // the SHP base path - wxString Table; // the table's name to be created - wxString Column; // the column's name for Geometry - wxString Default; // the default charset - wxString Charset; // the SHP charset - public: - DumpShpDialog () { ; } - DumpShpDialog (MyFrame * parent, wxString & path, wxString & table, - wxString & column, wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & table, - wxString & column, wxString & defCs); - virtual ~ DumpShpDialog () { ; } - void CreateControls (); - wxString & GetCharset () { return Charset; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the SHP base path + wxString Table; // the table's name to be created + wxString Column; // the column's name for Geometry + wxString Default; // the default charset + wxString Charset; // the SHP charset +public: + DumpShpDialog() + {; + } + DumpShpDialog(MyFrame * parent, wxString & path, wxString & table, + wxString & column, wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & table, + wxString & column, wxString & defCs); + virtual ~ DumpShpDialog() + {; + } + void CreateControls(); + wxString & GetCharset() + { + return Charset; + } + void OnOk(wxCommandEvent & event); }; class LoadTxtDialog:public wxDialog { // // a dialog preparing a LOAD TXT/CSV // - private: - MyFrame * MainFrame; - wxString Path; // the CSV/TXT base path - wxString Table; // the table name - wxString Default; // the default charset - wxString Charset; // the CSV/TXT charset - bool FirstLineTitles; // TRUE if first line stores column titles - char Separator; // the character to be used as field separator - char TextSeparator; // the character to be used as text separator - bool DecimalPointIsComma; // TRUE if decimal separator is COMMA - public: - LoadTxtDialog () { ; } - LoadTxtDialog (MyFrame * parent, wxString & path, wxString & table, wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & table, wxString & defCs); - virtual ~ LoadTxtDialog () { ; } - void CreateControls (); - wxString & GetTable() { return Table; } - wxString & GetCharset () { return Charset; } - bool IsFirstLineTitles() { return FirstLineTitles; } - char GetSeparator() { return Separator; } - char GetTextSeparator() { return TextSeparator; } - bool IsDecimalPointComma() { return DecimalPointIsComma; } - void OnSeparator (wxCommandEvent & event); - void OnDecimalSeparator (wxCommandEvent & event); - void OnQuote (wxCommandEvent & event); - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the CSV/TXT base path + wxString Table; // the table name + wxString Default; // the default charset + wxString Charset; // the CSV/TXT charset + bool FirstLineTitles; // TRUE if first line stores column titles + char Separator; // the character to be used as field separator + char TextSeparator; // the character to be used as text separator + bool DecimalPointIsComma; // TRUE if decimal separator is COMMA +public: + LoadTxtDialog() + {; + } + LoadTxtDialog(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs); + virtual ~ LoadTxtDialog() + {; + } + void CreateControls(); + wxString & GetTable() + { + return Table; + } + wxString & GetCharset() + { + return Charset; + } + bool IsFirstLineTitles() + { + return FirstLineTitles; + } + char GetSeparator() + { + return Separator; + } + char GetTextSeparator() + { + return TextSeparator; + } + bool IsDecimalPointComma() + { + return DecimalPointIsComma; + } + void OnSeparator(wxCommandEvent & event); + void OnDecimalSeparator(wxCommandEvent & event); + void OnQuote(wxCommandEvent & event); + void OnOk(wxCommandEvent & event); }; class DumpTxtDialog:public wxDialog { // // a dialog preparing a DUMP generic text // - private: - MyFrame * MainFrame; - wxString Path; // the SHP base path - wxString Default; // the default charset - wxString Charset; // the target charset - public: - DumpTxtDialog () { ; } - DumpTxtDialog (MyFrame * parent, wxString & path, wxString & target, - wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & target, - wxString & defCs); - virtual ~ DumpTxtDialog () { ; } - void CreateControls (); - wxString & GetCharset () { return Charset; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the SHP base path + wxString Default; // the default charset + wxString Charset; // the target charset +public: + DumpTxtDialog() + {; + } + DumpTxtDialog(MyFrame * parent, wxString & path, wxString & target, + wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & target, + wxString & defCs); + virtual ~ DumpTxtDialog() + {; + } + void CreateControls(); + wxString & GetCharset() + { + return Charset; + } + void OnOk(wxCommandEvent & event); +}; + +class NetworkDialog:public wxDialog +{ +// +// a dialog preparing a BUILD NETWORK +// +private: + MyFrame * MainFrame; + wxString TableName; // the table name + wxString FromColumn; // the NodeFrom column name + wxString ToColumn; // the NodeTo column name + wxString GeomColumn; // the Geometry column name + bool GeomLength; // Cost is Geometry Length + wxString CostColumn; // the Cost column name + bool Bidirectional; // Bidirectional arcs + bool OneWays; // OneWays columns supported + wxString OneWayToFrom; // the OneWay To-From column + wxString OneWayFromTo; // the OneWay From-To column +public: + NetworkDialog() + {; + } + NetworkDialog(MyFrame * parent); + bool Create(MyFrame * parent); + virtual ~ NetworkDialog() + {; + } + void CreateControls(); + wxString & GetTableName() + { + return TableName; + } + wxString & GetFromColumn() + { + return FromColumn; + } + wxString & GetToColumn() + { + return ToColumn; + } + wxString & GetGeomColumn() + { + return GeomColumn; + } + bool IsGeomLength() + { + return GeomLength; + } + wxString & GetCostColumn() + { + return CostColumn; + } + bool IsBidirectional() + { + return Bidirectional; + } + bool IsOneWays() + { + return OneWays; + } + wxString & GetOneWayFromTo() + { + return OneWayFromTo; + } + wxString & GetOneWayToFrom() + { + return OneWayToFrom; + } + void OnTable(wxCommandEvent & event); + void OnDirection(wxCommandEvent & event); + void OnCost(wxCommandEvent & event); + void OnOneWay(wxCommandEvent & event); + void OnOk(wxCommandEvent & event); +}; + +class ExifDialog:public wxDialog +{ +// +// a dialog preparing an IMPORT EXIF PHOTOS +// +private: + MyFrame * MainFrame; + wxString ImgPath; // the file name + wxString DirPath; // the folder path + bool Folder; // import a whole folder + bool Metadata; // feed Metadata tables + bool GpsOnly; // import only if GpsExif present +public: + ExifDialog() + {; + } + ExifDialog(MyFrame * parent, wxString & dir_path, wxString & img_path); + bool Create(MyFrame * parent, wxString & dir_path, wxString & img_path); + virtual ~ ExifDialog() + {; + } + void CreateControls(); + wxString & GetImgPath() + { + return ImgPath; + } + wxString & GetDirPath() + { + return DirPath; + } + bool IsFolder() + { + return Folder; + } + bool IsMetadata() + { + return Metadata; + } + bool IsGpsOnly() + { + return GpsOnly; + } + void OnFolder(wxCommandEvent & event); + void OnMetadata(wxCommandEvent & event); + void OnGpsOnly(wxCommandEvent & event); + void OnOk(wxCommandEvent & event); }; class SqlScriptDialog:public wxDialog { // // a dialog preparing an SQL SCRIPT execute // - private: - MyFrame * MainFrame; - wxString Path; // the SHP base path - wxString Default; // the default charset - wxString Charset; // the target charset - public: - SqlScriptDialog () { ; } - SqlScriptDialog (MyFrame * parent, wxString & path, wxString & defCs); - bool Create (MyFrame * parent, wxString & path, wxString & defCs); - virtual ~ SqlScriptDialog () { ; } - void CreateControls (); - wxString & GetCharset () { return Charset; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Path; // the SHP base path + wxString Default; // the default charset + wxString Charset; // the target charset +public: + SqlScriptDialog() + {; + } + SqlScriptDialog(MyFrame * parent, wxString & path, wxString & defCs); + bool Create(MyFrame * parent, wxString & path, wxString & defCs); + virtual ~ SqlScriptDialog() + {; + } + void CreateControls(); + wxString & GetCharset() + { + return Charset; + } + void OnOk(wxCommandEvent & event); }; class DefaultCharsetDialog:public wxDialog { // // a dialog for selecting DEFAULT CHARSET // - private: - MyFrame * MainFrame; - wxString Charset; // the default charset - bool AskCharset; // true / false - public: - DefaultCharsetDialog () { ; } - DefaultCharsetDialog (MyFrame * parent, wxString & charset, bool ask); - bool Create (MyFrame * parent, wxString & charset, bool ask); - virtual ~ DefaultCharsetDialog () { ; } - void CreateControls (); - wxString & GetCharset () { return Charset; } - bool IsSetAskCharset () { return AskCharset; } - void OnOk (wxCommandEvent & event); +private: + MyFrame * MainFrame; + wxString Charset; // the default charset + bool AskCharset; // true / false +public: + DefaultCharsetDialog() + {; + } + DefaultCharsetDialog(MyFrame * parent, wxString & charset, bool ask); + bool Create(MyFrame * parent, wxString & charset, bool ask); + virtual ~ DefaultCharsetDialog() + {; + } + void CreateControls(); + wxString & GetCharset() + { + return Charset; + } + bool IsSetAskCharset() + { + return AskCharset; + } + void OnOk(wxCommandEvent & event); }; - class BlobExplorerDialog:public wxPropertySheetDialog { // // a dialog to explore a BLOB value // - private: - MyFrame * MainFrame; - int BlobSize; // the BLOB size - unsigned char *Blob; // the BLOB value - int BlobType; // the BLOB type - gaiaGeomCollPtr Geometry; // the geometry [optional] - wxImage *Image; // the image [optional] - wxBitmap GeomPreview; // the geometry preview - public: - BlobExplorerDialog () - {; - } - BlobExplorerDialog (MyFrame * parent, int blob_size, unsigned char *blob); - bool Create (MyFrame * parent, int blob_size, unsigned char *blob); - virtual ~ BlobExplorerDialog () { if (Geometry) gaiaFreeGeomColl (Geometry); - if (Image) delete Image; } - void DrawGeometry (int horz, int vert); - wxPanel *CreateHexadecimalPage (wxWindow * book); - wxPanel *CreateGeometryPage (wxWindow * book); - wxPanel *CreateImagePage (wxWindow * book); - void UpdateHexadecimalPage (); - void UpdateGeometryPage (); - void UpdateImagePage (); - gaiaGeomCollPtr GetGeometry () { return Geometry; } - wxImage *GetImage () { return Image; } - int GetBlobType () { return BlobType; } - void OnOk (wxCommandEvent & event); - void OnPageChanged (wxNotebookEvent & event); +private: + MyFrame * MainFrame; + int BlobSize; // the BLOB size + unsigned char *Blob; // the BLOB value + int BlobType; // the BLOB type + gaiaGeomCollPtr Geometry; // the geometry [optional] + wxImage *Image; // the image [optional] + wxBitmap GeomPreview; // the geometry preview +public: + BlobExplorerDialog() + {; + } + BlobExplorerDialog(MyFrame * parent, int blob_size, unsigned char *blob); + bool Create(MyFrame * parent, int blob_size, unsigned char *blob); + virtual ~ BlobExplorerDialog() + { + if (Geometry) + gaiaFreeGeomColl(Geometry); + if (Image) + delete Image; + } + void DrawGeometry(int horz, int vert); + wxPanel *CreateHexadecimalPage(wxWindow * book); + wxPanel *CreateGeometryPage(wxWindow * book); + wxPanel *CreateImagePage(wxWindow * book); + void UpdateHexadecimalPage(); + void UpdateGeometryPage(); + void UpdateImagePage(); + gaiaGeomCollPtr GetGeometry() + { + return Geometry; + } + wxImage *GetImage() + { + return Image; + } + int GetBlobType() + { + return BlobType; + } + void OnOk(wxCommandEvent & event); + void OnPageChanged(wxNotebookEvent & event); }; class GraphicsGeometry:public wxStaticBitmap { // // a window to show some Geometry in a graphical fashion // - private: - BlobExplorerDialog * Parent; - public: - GraphicsGeometry (BlobExplorerDialog * parent, wxWindow * panel, - wxWindowID id, const wxBitmap & bmp, wxSize const &size); - virtual ~ GraphicsGeometry () { ; } +private: + BlobExplorerDialog * Parent; +public: + GraphicsGeometry(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, + const wxBitmap & bmp, wxSize const &size); + virtual ~ GraphicsGeometry() + {; + } }; class ImageShow:public wxStaticBitmap { // // a window to show some Image [Jpeg-Png-Gif] // - private: - BlobExplorerDialog * Parent; - public: - ImageShow (BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, - const wxBitmap & bmp, const wxSize & size); - virtual ~ ImageShow () { ; } - void OnRightClick (wxMouseEvent & event); - void OnCmdCopy (wxCommandEvent & event); +private: + BlobExplorerDialog * Parent; +public: + ImageShow(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, + const wxBitmap & bmp, const wxSize & size); + virtual ~ ImageShow() + {; + } + void OnRightClick(wxMouseEvent & event); + void OnCmdCopy(wxCommandEvent & event); }; class MyHexList:public wxListCtrl { // // a class for Hexdecimal dumps // - private: - BlobExplorerDialog * Parent; - int BlobSize; // the BLOB size - unsigned char *Blob; // the BLOB value - public: - MyHexList (BlobExplorerDialog * parent, unsigned char *blob, - int blob_size, wxWindow * panel, wxWindowID id, - const wxPoint & pos = wxDefaultPosition, const wxSize & size = - wxDefaultSize, long style = 0); - virtual ~ MyHexList (); - virtual wxString OnGetItemText (long item, long column) const; +private: + BlobExplorerDialog * Parent; + int BlobSize; // the BLOB size + unsigned char *Blob; // the BLOB value +public: + MyHexList(BlobExplorerDialog * parent, unsigned char *blob, + int blob_size, wxWindow * panel, wxWindowID id, + const wxPoint & pos = wxDefaultPosition, const wxSize & size = + wxDefaultSize, long style = 0); + virtual ~ MyHexList(); + virtual wxString OnGetItemText(long item, long column) const; +}; + +class NetNodePre +{ +// +// a class to store a temporary node for Network +// +private: + int Id; + wxString Code; + NetNodePre *Next; +public: + NetNodePre(int id); + NetNodePre(const char *code); + ~NetNodePre() + {; + } + int GetId() + { + return Id; + } + wxString & GetCode() + { + return Code; + } + void SetNext(NetNodePre * next) + { + Next = next; + } + NetNodePre *GetNext() + { + return Next; + } +}; + +class NetNode +{ +// +// a class to store a final node for Network +// +private: + int InternalIndex; + int Id; + wxString Code; + double X; + double Y; + class NetArcRef *First; + class NetArcRef *Last; + NetNode *Next; +public: + NetNode(int id); + NetNode(wxString & code); + ~NetNode(); + int GetInternalIndex() + { + return InternalIndex; + } + void SetInternalIndex(int idx) + { + InternalIndex = idx; + } + int GetId() + { + return Id; + } + wxString & GetCode() + { + return Code; + } + double GetX() + { + return X; + } + void SetX(double x) + { + X = x; + } + double GetY() + { + return Y; + } + void SetY(double y) + { + Y = y; + } + void AddOutcoming(class NetArc * pA); + NetArcRef *GetFirst() + { + return First; + } + NetArc **PrepareOutcomings(int *count); + void SetNext(NetNode * next) + { + Next = next; + } + NetNode *GetNext() + { + return Next; + } +}; + +class NetArc +{ +// +// a class to store an arc for Network +// +private: + int RowId; + NetNode *From; + NetNode *To; + double Cost; + NetArc *Next; +public: + NetArc(int rowid, NetNode * from, NetNode * to, double cost); + ~NetArc() + {; + } + int GetRowId() + { + return RowId; + } + NetNode *GetFrom() + { + return From; + } + NetNode *GetTo() + { + return To; + } + double GetCost() + { + return Cost; + } + void SetNext(NetArc * next) + { + Next = next; + } + NetArc *GetNext() + { + return Next; + } +}; + +class NetArcRef +{ +// +// a class to store a reference to an arc for Network +// +private: + NetArc * Reference; + NetArcRef *Next; +public: + NetArcRef(NetArc * arc) + { + Reference = arc; + Next = NULL; + } + ~NetArcRef() + {; + } + NetArc *GetReference() + { + return Reference; + } + void SetNext(NetArcRef * next) + { + Next = next; + } + NetArcRef *GetNext() + { + return Next; + } +}; + +class Network +{ +// +// a class representing a Network +// +private: + NetNodePre * FirstPre; + NetNodePre *LastPre; + int NumPreNodes; + NetNodePre **SortedPreNodes; + NetArc *FirstArc; + NetArc *LastArc; + NetNode *FirstNode; + NetNode *LastNode; + int NumNodes; + NetNode **SortedNodes; + bool Error; + bool NodeCode; + int MaxCodeLength; +public: + Network(); + ~Network(); + void CleanPreNodes(); + void InsertNode(int id); + void InsertNode(const char *code); + void AddNode(int id); + void AddNode(wxString & code); + NetNode *ProcessNode(int id, double x, double y, NetNode ** pOther); + NetNode *ProcessNode(wxString & code, double x, double y, NetNode ** pOther); + void Sort(); + NetNode *Find(int id); + NetNode *Find(wxString & code); + NetNode *GetSortedNode(int x); + void AddArc(int rowid, int id_from, int id_to, double node_from_x, + double node_from_y, double node_to_x, double node_to_y, + double cost); + void AddArc(int rowid, const char *code_from, const char *code_to, + double node_from_x, double node_from_y, double node_to_x, + double node_to_y, double cost); + void InitNodes(); + void SetError() + { + Error = true; + } + bool IsError() + { + return Error; + } + void SetNodeCode(bool mode) + { + NodeCode = mode; + } + bool IsNodeCode() + { + return NodeCode; + } + int GetNumNodes() + { + return NumNodes; + } + int GetMaxCodeLength() + { + return MaxCodeLength; + } +}; + +class AutoFDOTable +{ +private: + char *Name; + AutoFDOTable *Next; +public: + AutoFDOTable(const char *name, const int len) + { + Name = new char[len]; + strcpy(Name, name); + Next = NULL; + } + ~AutoFDOTable() + { + if (Name) + delete[]Name; + } + char *GetName() + { + return Name; + } + void SetNext(AutoFDOTable * next) + { + Next = next; + } + AutoFDOTable *GetNext() + { + return Next; + } +}; + +class AutoFDOTables +{ +private: + AutoFDOTable * First; + AutoFDOTable *Last; +public: + AutoFDOTables() + { + First = NULL; + Last = NULL; + } + ~AutoFDOTables(); + void Add(const char *name, const int len); + AutoFDOTable *GetFirst() + { + return First; + } +}; + +class AutoSaveDialog:public wxDialog +{ +// +// a dialog to manage AutoSave +// +private: + MyFrame * MainFrame; + wxString Path; // the path to save + int Seconds; // interval + wxRadioBox *IntervalCtrl; + wxTextCtrl *PathCtrl; +public: + AutoSaveDialog() + {; + } + AutoSaveDialog(MyFrame * parent, wxString & path, int secs); + bool Create(MyFrame * parent, wxString & path, int secs); + virtual ~ AutoSaveDialog() + {; + } + void CreateControls(); + int GetSeconds() + { + return Seconds; + } + void OnOk(wxCommandEvent & event); + wxString & GetPath() + { + return Path; + } + void OnIntervalChanged(wxCommandEvent & event); + void OnChangePath(wxCommandEvent & event); }; Index: Dialogs.cpp ================================================================== --- Dialogs.cpp +++ Dialogs.cpp @@ -1,10 +1,10 @@ /* / Dialogs.cpp / various dialog classes / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -27,1724 +27,2343 @@ #include "wx/spinctrl.h" #include "wx/listctrl.h" #include "wx/html/htmlwin.h" -bool -VirtualShpDialog::Create (MyFrame * parent, wxString & path, wxString & table, - wxString & defCs) -{ -// -// creating the dialog -// - MainFrame = parent; - Path = path; - Table = table; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Creating Virtual Shapefile")) - == false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -VirtualShpDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +bool VirtualShpDialog::Create(MyFrame * parent, wxString & path, + wxString & table, wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Table = table; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("Creating Virtual Shapefile")) == + false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void VirtualShpDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Shapefile path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, ID_VIRTSHP_TABLE, Table, - wxDefaultPosition, wxSize (350, - 22)); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_VIRTSHP_TABLE, Table, + wxDefaultPosition, wxSize(350, + 22)); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: SRID - wxBoxSizer *sridSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticText *sridLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&SRID:")); - sridSizer->Add (sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxSpinCtrl *sridCtrl = new wxSpinCtrl (this, ID_VIRTSHP_SRID, wxEmptyString, - wxDefaultPosition, wxSize (80, 20), - wxSP_ARROW_KEYS, - -1, 40000, -1); - sridSizer->Add (sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); + sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_VIRTSHP_SRID, wxEmptyString, + wxDefaultPosition, wxSize(80, 20), + wxSP_ARROW_KEYS, + -1, 40000, -1); + sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: CHARSET - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - sridSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_VIRTSHP_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & VirtualShpDialog::OnOk); -} - -void -VirtualShpDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow (ID_VIRTSHP_TABLE); - Table = tableCtrl->GetValue (); - if (Table.Len () < 1) - { - wxMessageBox (wxT ("You must specify the TABLE NAME !!!"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - if (MainFrame->TableAlreadyExists (Table) == true) - { - wxMessageBox (wxT ("a table name '") + Table + - wxT ("' already exists"), wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, this); - return; - } - if (gaiaIllegalSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (Table.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + Table + - wxT - ("' is an invalid TABLE NAME\n\nillegal name or reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow (ID_VIRTSHP_SRID); - Srid = sridCtrl->GetValue (); - if (Srid == -1) - ; - else if (MainFrame->SridNotExists (Srid) == true) - { - wxMessageBox (wxT ("invalid SRID value"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_VIRTSHP_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxDialog::EndModal (wxID_OK); -} - -bool -VirtualTxtDialog::Create (MyFrame * parent, wxString & path, wxString & table, - wxString & defCs) -{ -// -// creating the dialog -// - MainFrame = parent; - Path = path; - Table = table; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Creating Virtual CSV/TXT")) - == false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -VirtualTxtDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - FirstLineTitles = true; - Separator = '\t'; - TextSeparator = '"'; - DecimalPointIsComma = false; - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + sridSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_VIRTSHP_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & VirtualShpDialog::OnOk); +} + +void VirtualShpDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_VIRTSHP_TABLE); + Table = tableCtrl->GetValue(); + if (Table.Len() < 1) + { + wxMessageBox(wxT("You must specify the TABLE NAME !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + if (MainFrame->TableAlreadyExists(Table) == true) + { + wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_VIRTSHP_SRID); + Srid = sridCtrl->GetValue(); + if (Srid == -1) + ; + else if (MainFrame->SridNotExists(Srid) == true) + { + wxMessageBox(wxT("invalid SRID value"), wxT("spatialite-gui"), + wxOK | wxICON_WARNING, this); + return; + } + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_VIRTSHP_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxDialog::EndModal(wxID_OK); +} + +bool VirtualTxtDialog::Create(MyFrame * parent, wxString & path, + wxString & table, wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Table = table; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("Creating Virtual CSV/TXT")) == + false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void VirtualTxtDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + FirstLineTitles = true; + Separator = '\t'; + TextSeparator = '"'; + DecimalPointIsComma = false; + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the CSV/TXT path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, ID_VIRTTXT_TABLE, Table, - wxDefaultPosition, wxSize (350, - 22)); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_VIRTTXT_TABLE, Table, + wxDefaultPosition, wxSize(350, + 22)); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: OPTIONS - wxBoxSizer *optSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxBoxSizer *modeSizer = new wxBoxSizer (wxVERTICAL); - optSizer->Add (modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); - wxBoxSizer *mode1Sizer = new wxBoxSizer (wxHORIZONTAL); - modeSizer->Add (mode1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxCheckBox *titleCtrl = new wxCheckBox (this, ID_VIRTTXT_TITLES, - wxT - ("First line contains column names"), - wxDefaultPosition, wxDefaultSize); - titleCtrl->SetValue (true); - mode1Sizer->Add (titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxStaticBox *sepBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Separators"), - wxDefaultPosition, wxDefaultSize); - wxBoxSizer *sepSizer = new wxStaticBoxSizer (sepBox, wxVERTICAL); - modeSizer->Add (sepSizer, 0, wxALIGN_LEFT | wxALL, 0); - wxBoxSizer *mode2Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode2Sizer, 0, wxALIGN_LEFT | wxALL, 0); - wxString quotes[2]; - quotes[0] = wxT ("&Double \""); - quotes[1] = wxT ("&Single '"); - wxRadioBox *textSeparatorBox = new wxRadioBox (this, ID_VIRTTXT_QUOTE, - wxT - ("&Text separator: quotes"), - wxDefaultPosition, - wxDefaultSize, 2, - quotes, 2, - wxRA_SPECIFY_COLS); - mode2Sizer->Add (textSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxBoxSizer *mode3Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode3Sizer, 0, wxALIGN_LEFT | wxALL, 0); - wxString separators[6]; - separators[0] = wxT ("&Tab"); - separators[1] = wxT ("&Space"); - separators[2] = wxT ("Co&mma ,"); - separators[3] = wxT ("&Colon :"); - separators[4] = wxT ("S&emicolon ;"); - separators[5] = wxT ("&Other"); - wxRadioBox *separatorBox = new wxRadioBox (this, ID_VIRTTXT_SEPARATOR, - wxT ("&Column separator"), - wxDefaultPosition, wxDefaultSize, - 6, - separators, 2, - wxRA_SPECIFY_COLS); - mode3Sizer->Add (separatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxBoxSizer *mode4Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticText *charSeparatorLabel = new wxStaticText (this, wxID_STATIC, - wxT - ("&Custom separator:"), - wxDefaultPosition, - wxDefaultSize, 0); - mode4Sizer->Add (charSeparatorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *dummy = - new wxTextCtrl (this, ID_VIRTTXT_CHARSEPARATOR, wxT ("Dummy Text pq"), - wxDefaultPosition, - wxDefaultSize, 0); - wxSize sz = dummy->GetSize (); - delete dummy; - sz.SetWidth (40); - wxTextCtrl *charSeparatorCtrl = - new wxTextCtrl (this, ID_VIRTTXT_CHARSEPARATOR, wxT ("TAB"), - wxDefaultPosition, sz, 0); - charSeparatorCtrl->SetMaxLength (1); - charSeparatorCtrl->Enable (false); - mode4Sizer->Add (charSeparatorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxBoxSizer *mode5Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode5Sizer, 0, wxALIGN_LEFT | wxALL, 0); - wxString points[2]; - points[0] = wxT ("&Point ."); - points[1] = wxT ("&Comma ,"); - wxRadioBox *decimalSeparatorBox = new wxRadioBox (this, ID_VIRTTXT_POINT, - wxT - ("&Decimal separator"), - wxDefaultPosition, - wxDefaultSize, 2, - points, 2, - wxRA_SPECIFY_COLS); - mode5Sizer->Add (decimalSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, - 5); + wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxBoxSizer *modeSizer = new wxBoxSizer(wxVERTICAL); + optSizer->Add(modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxBoxSizer *mode1Sizer = new wxBoxSizer(wxHORIZONTAL); + modeSizer->Add(mode1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxCheckBox *titleCtrl = new wxCheckBox(this, ID_VIRTTXT_TITLES, + wxT + ("First line contains column names"), + wxDefaultPosition, wxDefaultSize); + titleCtrl->SetValue(true); + mode1Sizer->Add(titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxStaticBox *sepBox = new wxStaticBox(this, wxID_STATIC, + wxT("Separators"), + wxDefaultPosition, wxDefaultSize); + wxBoxSizer *sepSizer = new wxStaticBoxSizer(sepBox, wxVERTICAL); + modeSizer->Add(sepSizer, 0, wxALIGN_LEFT | wxALL, 0); + wxBoxSizer *mode2Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode2Sizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString quotes[2]; + quotes[0] = wxT("&Double \""); + quotes[1] = wxT("&Single '"); + wxRadioBox *textSeparatorBox = new wxRadioBox(this, ID_VIRTTXT_QUOTE, + wxT("&Text separator: quotes"), + wxDefaultPosition, + wxDefaultSize, 2, + quotes, 2, + wxRA_SPECIFY_COLS); + mode2Sizer->Add(textSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *mode3Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode3Sizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString separators[6]; + separators[0] = wxT("&Tab"); + separators[1] = wxT("&Space"); + separators[2] = wxT("Co&mma ,"); + separators[3] = wxT("&Colon :"); + separators[4] = wxT("S&emicolon ;"); + separators[5] = wxT("&Other"); + wxRadioBox *separatorBox = new wxRadioBox(this, ID_VIRTTXT_SEPARATOR, + wxT("&Column separator"), + wxDefaultPosition, wxDefaultSize, + 6, + separators, 2, + wxRA_SPECIFY_COLS); + mode3Sizer->Add(separatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *mode4Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticText *charSeparatorLabel = new wxStaticText(this, wxID_STATIC, + wxT("&Custom separator:"), + wxDefaultPosition, + wxDefaultSize, 0); + mode4Sizer->Add(charSeparatorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *dummy = + new wxTextCtrl(this, ID_VIRTTXT_CHARSEPARATOR, wxT("Dummy Text pq"), + wxDefaultPosition, + wxDefaultSize, 0); + wxSize sz = dummy->GetSize(); + delete dummy; + sz.SetWidth(40); + wxTextCtrl *charSeparatorCtrl = + new wxTextCtrl(this, ID_VIRTTXT_CHARSEPARATOR, wxT("TAB"), + wxDefaultPosition, sz, 0); + charSeparatorCtrl->SetMaxLength(1); + charSeparatorCtrl->Enable(false); + mode4Sizer->Add(charSeparatorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *mode5Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode5Sizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString points[2]; + points[0] = wxT("&Point ."); + points[1] = wxT("&Comma ,"); + wxRadioBox *decimalSeparatorBox = new wxRadioBox(this, ID_VIRTTXT_POINT, + wxT("&Decimal separator"), + wxDefaultPosition, + wxDefaultSize, 2, + points, 2, + wxRA_SPECIFY_COLS); + mode5Sizer->Add(decimalSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: CHARSET - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - optSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_VIRTTXT_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & VirtualTxtDialog::OnOk); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + optSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_VIRTTXT_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & VirtualTxtDialog::OnOk); // appends event handler for radioboxes - Connect (ID_VIRTTXT_QUOTE, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction) & VirtualTxtDialog::OnQuote); - Connect (ID_VIRTTXT_SEPARATOR, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction) & VirtualTxtDialog::OnSeparator); - Connect (ID_VIRTTXT_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction) & VirtualTxtDialog::OnDecimalSeparator); + Connect(ID_VIRTTXT_QUOTE, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & VirtualTxtDialog::OnQuote); + Connect(ID_VIRTTXT_SEPARATOR, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & VirtualTxtDialog::OnSeparator); + Connect(ID_VIRTTXT_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & VirtualTxtDialog::OnDecimalSeparator); } -void -VirtualTxtDialog::OnDecimalSeparator (wxCommandEvent & event) +void VirtualTxtDialog::OnDecimalSeparator(wxCommandEvent & event) { // // POINT selection changed // - wxRadioBox *decimalSeparatorCtrl = - (wxRadioBox *) FindWindow (ID_VIRTTXT_POINT); - switch (decimalSeparatorCtrl->GetSelection ()) - { + wxRadioBox *decimalSeparatorCtrl = + (wxRadioBox *) FindWindow(ID_VIRTTXT_POINT); + switch (decimalSeparatorCtrl->GetSelection()) + { case 0: - DecimalPointIsComma = false; - break; + DecimalPointIsComma = false; + break; case 1: - DecimalPointIsComma = true; - break; - }; + DecimalPointIsComma = true; + break; + }; } -void -VirtualTxtDialog::OnQuote (wxCommandEvent & event) +void VirtualTxtDialog::OnQuote(wxCommandEvent & event) { // // QUOTE selection changed // - wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow (ID_VIRTTXT_QUOTE); - switch (separatorCtrl->GetSelection ()) - { + wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_QUOTE); + switch (separatorCtrl->GetSelection()) + { case 0: - TextSeparator = '"'; - break; + TextSeparator = '"'; + break; case 1: - TextSeparator = '\''; - break; - }; + TextSeparator = '\''; + break; + }; } -void -VirtualTxtDialog::OnSeparator (wxCommandEvent & event) +void VirtualTxtDialog::OnSeparator(wxCommandEvent & event) { // // SEPARATOR selection changed // - wxTextCtrl *charSeparatorCtrl = - (wxTextCtrl *) FindWindow (ID_VIRTTXT_CHARSEPARATOR); - wxRadioBox *separatorCtrl = - (wxRadioBox *) FindWindow (ID_VIRTTXT_SEPARATOR); - switch (separatorCtrl->GetSelection ()) - { + wxTextCtrl *charSeparatorCtrl = + (wxTextCtrl *) FindWindow(ID_VIRTTXT_CHARSEPARATOR); + wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_SEPARATOR); + switch (separatorCtrl->GetSelection()) + { case 0: - Separator = '\t'; - charSeparatorCtrl->SetValue (wxT ("TAB")); - break; + Separator = '\t'; + charSeparatorCtrl->SetValue(wxT("TAB")); + break; case 1: - Separator = ' '; - charSeparatorCtrl->SetValue (wxT ("SP")); - break; + Separator = ' '; + charSeparatorCtrl->SetValue(wxT("SP")); + break; case 2: - Separator = ','; - charSeparatorCtrl->SetValue (wxT (",")); - break; + Separator = ','; + charSeparatorCtrl->SetValue(wxT(",")); + break; case 3: - Separator = ':'; - charSeparatorCtrl->SetValue (wxT (":")); - break; + Separator = ':'; + charSeparatorCtrl->SetValue(wxT(":")); + break; case 4: - Separator = ';'; - charSeparatorCtrl->SetValue (wxT (";")); - break; + Separator = ';'; + charSeparatorCtrl->SetValue(wxT(";")); + break; case 5: - Separator = '|'; - charSeparatorCtrl->SetValue (wxT ("|")); - break; - }; - if (separatorCtrl->GetSelection () == 5) - charSeparatorCtrl->Enable (true); - else - charSeparatorCtrl->Enable (false); -} - -void -VirtualTxtDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow (ID_VIRTTXT_TABLE); - Table = tableCtrl->GetValue (); - if (Table.Len () < 1) - { - wxMessageBox (wxT ("You must specify the TABLE NAME !!!"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - if (MainFrame->TableAlreadyExists (Table) == true) - { - wxMessageBox (wxT ("a table name '") + Table + - wxT ("' already exists"), wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, this); - return; - } - if (gaiaIllegalSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (Table.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + Table + - wxT - ("' is an invalid TABLE NAME\n\nillegal name or reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_VIRTTXT_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxRadioBox *separatorCtrl = - (wxRadioBox *) FindWindow (ID_VIRTTXT_SEPARATOR); - if (separatorCtrl->GetSelection () == 5) - { - wxTextCtrl *charSeparatorCtrl = - (wxTextCtrl *) FindWindow (ID_VIRTTXT_CHARSEPARATOR); - wxString separator = charSeparatorCtrl->GetValue (); - if (separator.Len () != 1) - { - wxMessageBox (wxT - ("you must specificy a single char as Custom Column Separator"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, - this); - return; - } - char dummy[64]; - strcpy (dummy, separator.ToUTF8 ()); - Separator = *dummy; - } - wxDialog::EndModal (wxID_OK); -} - -bool -LoadTxtDialog::Create (MyFrame * parent, wxString & path, wxString & table, - wxString & defCs) -{ -// -// creating the dialog -// - MainFrame = parent; - Path = path; - Table = table; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Load CSV/TXT")) == false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -LoadTxtDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - FirstLineTitles = true; - Separator = '\t'; - TextSeparator = '"'; - DecimalPointIsComma = false; - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + Separator = '|'; + charSeparatorCtrl->SetValue(wxT("|")); + break; + }; + if (separatorCtrl->GetSelection() == 5) + charSeparatorCtrl->Enable(true); + else + charSeparatorCtrl->Enable(false); +} + +void VirtualTxtDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_VIRTTXT_TABLE); + Table = tableCtrl->GetValue(); + if (Table.Len() < 1) + { + wxMessageBox(wxT("You must specify the TABLE NAME !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + if (MainFrame->TableAlreadyExists(Table) == true) + { + wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_VIRTTXT_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_SEPARATOR); + if (separatorCtrl->GetSelection() == 5) + { + wxTextCtrl *charSeparatorCtrl = + (wxTextCtrl *) FindWindow(ID_VIRTTXT_CHARSEPARATOR); + wxString separator = charSeparatorCtrl->GetValue(); + if (separator.Len() != 1) + { + wxMessageBox(wxT + ("you must specificy a single char as Custom Column Separator"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + char dummy[64]; + strcpy(dummy, separator.ToUTF8()); + Separator = *dummy; + } + wxDialog::EndModal(wxID_OK); +} + +bool LoadTxtDialog::Create(MyFrame * parent, wxString & path, wxString & table, + wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Table = table; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("Load CSV/TXT")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void LoadTxtDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + FirstLineTitles = true; + Separator = '\t'; + TextSeparator = '"'; + DecimalPointIsComma = false; + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the CSV/TXT path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, ID_LDTXT_TABLE, Table, - wxDefaultPosition, wxSize (350, - 22)); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_LDTXT_TABLE, Table, + wxDefaultPosition, wxSize(350, + 22)); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: OPTIONS - wxBoxSizer *optSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxBoxSizer *modeSizer = new wxBoxSizer (wxVERTICAL); - optSizer->Add (modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); - wxBoxSizer *mode1Sizer = new wxBoxSizer (wxHORIZONTAL); - modeSizer->Add (mode1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxCheckBox *titleCtrl = new wxCheckBox (this, ID_LDTXT_TITLES, - wxT - ("First line contains column names"), - wxDefaultPosition, wxDefaultSize); - titleCtrl->SetValue (true); - mode1Sizer->Add (titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxStaticBox *sepBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Separators"), - wxDefaultPosition, wxDefaultSize); - wxBoxSizer *sepSizer = new wxStaticBoxSizer (sepBox, wxVERTICAL); - modeSizer->Add (sepSizer, 0, wxALIGN_LEFT | wxALL, 0); - wxBoxSizer *mode2Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode2Sizer, 0, wxALIGN_LEFT | wxALL, 0); - wxString quotes[2]; - quotes[0] = wxT ("&Double \""); - quotes[1] = wxT ("&Single '"); - wxRadioBox *textSeparatorBox = new wxRadioBox (this, ID_LDTXT_QUOTE, - wxT - ("&Text separator: quotes"), - wxDefaultPosition, - wxDefaultSize, 2, - quotes, 2, - wxRA_SPECIFY_COLS); - mode2Sizer->Add (textSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxBoxSizer *mode3Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode3Sizer, 0, wxALIGN_LEFT | wxALL, 0); - wxString separators[6]; - separators[0] = wxT ("&Tab"); - separators[1] = wxT ("&Space"); - separators[2] = wxT ("Co&mma ,"); - separators[3] = wxT ("&Colon :"); - separators[4] = wxT ("S&emicolon ;"); - separators[5] = wxT ("&Other"); - wxRadioBox *separatorBox = new wxRadioBox (this, ID_LDTXT_SEPARATOR, - wxT ("&Column separator"), - wxDefaultPosition, wxDefaultSize, - 6, - separators, 2, - wxRA_SPECIFY_COLS); - mode3Sizer->Add (separatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxBoxSizer *mode4Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticText *charSeparatorLabel = new wxStaticText (this, wxID_STATIC, - wxT - ("&Custom separator:"), - wxDefaultPosition, - wxDefaultSize, 0); - mode4Sizer->Add (charSeparatorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *dummy = - new wxTextCtrl (this, ID_LDTXT_CHARSEPARATOR, wxT ("Dummy Text pq"), - wxDefaultPosition, - wxDefaultSize, 0); - wxSize sz = dummy->GetSize (); - delete dummy; - sz.SetWidth (40); - wxTextCtrl *charSeparatorCtrl = - new wxTextCtrl (this, ID_LDTXT_CHARSEPARATOR, wxT ("TAB"), - wxDefaultPosition, sz, 0); - charSeparatorCtrl->SetMaxLength (1); - charSeparatorCtrl->Enable (false); - mode4Sizer->Add (charSeparatorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxBoxSizer *mode5Sizer = new wxBoxSizer (wxHORIZONTAL); - sepSizer->Add (mode5Sizer, 0, wxALIGN_LEFT | wxALL, 0); - wxString points[2]; - points[0] = wxT ("&Point ."); - points[1] = wxT ("&Comma ,"); - wxRadioBox *decimalSeparatorBox = new wxRadioBox (this, ID_LDTXT_POINT, - wxT - ("&Decimal separator"), - wxDefaultPosition, - wxDefaultSize, 2, - points, 2, - wxRA_SPECIFY_COLS); - mode5Sizer->Add (decimalSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, - 5); + wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxBoxSizer *modeSizer = new wxBoxSizer(wxVERTICAL); + optSizer->Add(modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxBoxSizer *mode1Sizer = new wxBoxSizer(wxHORIZONTAL); + modeSizer->Add(mode1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxCheckBox *titleCtrl = new wxCheckBox(this, ID_LDTXT_TITLES, + wxT + ("First line contains column names"), + wxDefaultPosition, wxDefaultSize); + titleCtrl->SetValue(true); + mode1Sizer->Add(titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxStaticBox *sepBox = new wxStaticBox(this, wxID_STATIC, + wxT("Separators"), + wxDefaultPosition, wxDefaultSize); + wxBoxSizer *sepSizer = new wxStaticBoxSizer(sepBox, wxVERTICAL); + modeSizer->Add(sepSizer, 0, wxALIGN_LEFT | wxALL, 0); + wxBoxSizer *mode2Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode2Sizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString quotes[2]; + quotes[0] = wxT("&Double \""); + quotes[1] = wxT("&Single '"); + wxRadioBox *textSeparatorBox = new wxRadioBox(this, ID_LDTXT_QUOTE, + wxT("&Text separator: quotes"), + wxDefaultPosition, + wxDefaultSize, 2, + quotes, 2, + wxRA_SPECIFY_COLS); + mode2Sizer->Add(textSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *mode3Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode3Sizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString separators[6]; + separators[0] = wxT("&Tab"); + separators[1] = wxT("&Space"); + separators[2] = wxT("Co&mma ,"); + separators[3] = wxT("&Colon :"); + separators[4] = wxT("S&emicolon ;"); + separators[5] = wxT("&Other"); + wxRadioBox *separatorBox = new wxRadioBox(this, ID_LDTXT_SEPARATOR, + wxT("&Column separator"), + wxDefaultPosition, wxDefaultSize, + 6, + separators, 2, + wxRA_SPECIFY_COLS); + mode3Sizer->Add(separatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *mode4Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticText *charSeparatorLabel = new wxStaticText(this, wxID_STATIC, + wxT("&Custom separator:"), + wxDefaultPosition, + wxDefaultSize, 0); + mode4Sizer->Add(charSeparatorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *dummy = + new wxTextCtrl(this, ID_LDTXT_CHARSEPARATOR, wxT("Dummy Text pq"), + wxDefaultPosition, + wxDefaultSize, 0); + wxSize sz = dummy->GetSize(); + delete dummy; + sz.SetWidth(40); + wxTextCtrl *charSeparatorCtrl = + new wxTextCtrl(this, ID_LDTXT_CHARSEPARATOR, wxT("TAB"), + wxDefaultPosition, sz, 0); + charSeparatorCtrl->SetMaxLength(1); + charSeparatorCtrl->Enable(false); + mode4Sizer->Add(charSeparatorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *mode5Sizer = new wxBoxSizer(wxHORIZONTAL); + sepSizer->Add(mode5Sizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString points[2]; + points[0] = wxT("&Point ."); + points[1] = wxT("&Comma ,"); + wxRadioBox *decimalSeparatorBox = new wxRadioBox(this, ID_LDTXT_POINT, + wxT("&Decimal separator"), + wxDefaultPosition, + wxDefaultSize, 2, + points, 2, + wxRA_SPECIFY_COLS); + mode5Sizer->Add(decimalSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: CHARSET - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - optSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_LDTXT_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + optSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_LDTXT_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & LoadTxtDialog::OnOk); + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & LoadTxtDialog::OnOk); // appends event handler for radioboxes - Connect (ID_LDTXT_QUOTE, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction) & LoadTxtDialog::OnQuote); - Connect (ID_LDTXT_SEPARATOR, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction) & LoadTxtDialog::OnSeparator); - Connect (ID_LDTXT_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction) & LoadTxtDialog::OnDecimalSeparator); + Connect(ID_LDTXT_QUOTE, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & LoadTxtDialog::OnQuote); + Connect(ID_LDTXT_SEPARATOR, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & LoadTxtDialog::OnSeparator); + Connect(ID_LDTXT_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & LoadTxtDialog::OnDecimalSeparator); } -void -LoadTxtDialog::OnDecimalSeparator (wxCommandEvent & event) +void LoadTxtDialog::OnDecimalSeparator(wxCommandEvent & event) { // // POINT selection changed // - wxRadioBox *decimalSeparatorCtrl = - (wxRadioBox *) FindWindow (ID_LDTXT_POINT); - switch (decimalSeparatorCtrl->GetSelection ()) - { + wxRadioBox *decimalSeparatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_POINT); + switch (decimalSeparatorCtrl->GetSelection()) + { case 0: - DecimalPointIsComma = false; - break; + DecimalPointIsComma = false; + break; case 1: - DecimalPointIsComma = true; - break; - }; + DecimalPointIsComma = true; + break; + }; } -void -LoadTxtDialog::OnQuote (wxCommandEvent & event) +void LoadTxtDialog::OnQuote(wxCommandEvent & event) { // // QUOTE selection changed // - wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow (ID_LDTXT_QUOTE); - switch (separatorCtrl->GetSelection ()) - { + wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_QUOTE); + switch (separatorCtrl->GetSelection()) + { case 0: - TextSeparator = '"'; - break; + TextSeparator = '"'; + break; case 1: - TextSeparator = '\''; - break; - }; + TextSeparator = '\''; + break; + }; } -void -LoadTxtDialog::OnSeparator (wxCommandEvent & event) +void LoadTxtDialog::OnSeparator(wxCommandEvent & event) { // // SEPARATOR selection changed // - wxTextCtrl *charSeparatorCtrl = - (wxTextCtrl *) FindWindow (ID_LDTXT_CHARSEPARATOR); - wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow (ID_LDTXT_SEPARATOR); - switch (separatorCtrl->GetSelection ()) - { + wxTextCtrl *charSeparatorCtrl = + (wxTextCtrl *) FindWindow(ID_LDTXT_CHARSEPARATOR); + wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_SEPARATOR); + switch (separatorCtrl->GetSelection()) + { case 0: - Separator = '\t'; - charSeparatorCtrl->SetValue (wxT ("TAB")); - break; + Separator = '\t'; + charSeparatorCtrl->SetValue(wxT("TAB")); + break; case 1: - Separator = ' '; - charSeparatorCtrl->SetValue (wxT ("SP")); - break; + Separator = ' '; + charSeparatorCtrl->SetValue(wxT("SP")); + break; case 2: - Separator = ','; - charSeparatorCtrl->SetValue (wxT (",")); - break; + Separator = ','; + charSeparatorCtrl->SetValue(wxT(",")); + break; case 3: - Separator = ':'; - charSeparatorCtrl->SetValue (wxT (":")); - break; + Separator = ':'; + charSeparatorCtrl->SetValue(wxT(":")); + break; case 4: - Separator = ';'; - charSeparatorCtrl->SetValue (wxT (";")); - break; + Separator = ';'; + charSeparatorCtrl->SetValue(wxT(";")); + break; case 5: - Separator = '|'; - charSeparatorCtrl->SetValue (wxT ("|")); - break; - }; - if (separatorCtrl->GetSelection () == 5) - charSeparatorCtrl->Enable (true); - else - charSeparatorCtrl->Enable (false); -} - -void -LoadTxtDialog::OnOk (wxCommandEvent & event) + Separator = '|'; + charSeparatorCtrl->SetValue(wxT("|")); + break; + }; + if (separatorCtrl->GetSelection() == 5) + charSeparatorCtrl->Enable(true); + else + charSeparatorCtrl->Enable(false); +} + +void LoadTxtDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_LDTXT_TABLE); + Table = tableCtrl->GetValue(); + if (Table.Len() < 1) + { + wxMessageBox(wxT("You must specify the TABLE NAME !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + if (MainFrame->TableAlreadyExists(Table) == true) + { + wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_LDTXT_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_SEPARATOR); + if (separatorCtrl->GetSelection() == 5) + { + wxTextCtrl *charSeparatorCtrl = + (wxTextCtrl *) FindWindow(ID_LDTXT_CHARSEPARATOR); + wxString separator = charSeparatorCtrl->GetValue(); + if (separator.Len() != 1) + { + wxMessageBox(wxT + ("you must specificy a single char as Custom Column Separator"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + char dummy[64]; + strcpy(dummy, separator.ToUTF8()); + Separator = *dummy; + } + wxDialog::EndModal(wxID_OK); +} + +bool LoadShpDialog::Create(MyFrame * parent, wxString & path, wxString & table, + int srid, wxString & column, wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Table = table; + Srid = srid; + Column = column; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("Load Shapefile")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void LoadShpDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: the Shapefile path + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: TABLE name + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_LDSHP_TABLE, Table, + wxDefaultPosition, wxSize(350, + 22)); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// third row: GEOMETRY COLUMN name + wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *colLabel = + new wxStaticText(this, wxID_STATIC, wxT("&GeomColumn name:")); + colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *colCtrl = new wxTextCtrl(this, ID_LDSHP_COLUMN, Column, + wxDefaultPosition, wxSize(350, 22)); + colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// fourth row: SRID + wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); + sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_LDSHP_SRID, wxEmptyString, + wxDefaultPosition, wxSize(80, 20), + wxSP_ARROW_KEYS, + -1, 40000, Srid); + sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// fifth row: CHARSET + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + sridSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_LDSHP_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & LoadShpDialog::OnOk); +} + +void LoadShpDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_LDSHP_TABLE); + Table = tableCtrl->GetValue(); + if (Table.Len() < 1) + { + wxMessageBox(wxT("You must specify the TABLE NAME !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + if (MainFrame->TableAlreadyExists(Table) == true) + { + wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxTextCtrl *columnCtrl = (wxTextCtrl *) FindWindow(ID_LDSHP_COLUMN); + Column = columnCtrl->GetValue(); + if (Column.Len() < 1) + { + wxMessageBox(wxT("You must specify the GEOMETRY COLUMN NAME !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_LDSHP_SRID); + Srid = sridCtrl->GetValue(); + if (MainFrame->SridNotExists(Srid) == true) + { + wxMessageBox(wxT("invalid SRID value"), wxT("spatialite-gui"), + wxOK | wxICON_WARNING, this); + return; + } + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_LDSHP_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxDialog::EndModal(wxID_OK); +} + +bool DumpShpDialog::Create(MyFrame * parent, wxString & path, wxString & table, + wxString & column, wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Table = table; + Column = column; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("Dump Shapefile")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void DumpShpDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: the Shapefile path + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: TABLE name + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_STATIC, Table, + wxDefaultPosition, wxSize(350, + 22)); + tableCtrl->Enable(false); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// third row: GEOMETRY COLUMN name + wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *colLabel = + new wxStaticText(this, wxID_STATIC, wxT("&GeomColumn name:")); + colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_STATIC, Column, + wxDefaultPosition, wxSize(350, 22)); + colCtrl->Enable(false); + colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// fourth row: CHARSET + wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_DMPSHP_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & DumpShpDialog::OnOk); +} + +void DumpShpDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_DMPSHP_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxDialog::EndModal(wxID_OK); +} + +bool DumpTxtDialog::Create(MyFrame * parent, wxString & path, wxString & target, + wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("Dump ") + target) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void DumpTxtDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: the Shapefile path + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: CHARSET + wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_DMPTXT_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & DumpTxtDialog::OnOk); +} + +void DumpTxtDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_DMPTXT_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxDialog::EndModal(wxID_OK); +} + +bool SqlScriptDialog::Create(MyFrame * parent, wxString & path, + wxString & defCs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Default = defCs; + if (wxDialog::Create(parent, wxID_ANY, wxT("SQL script execute")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void SqlScriptDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: the SQL script path + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, + Path, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: CHARSET + wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Charset Encoding"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); + csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_SCRIPT_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Default); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & SqlScriptDialog::OnOk); +} + +void SqlScriptDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_SCRIPT_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT("you must select some Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxDialog::EndModal(wxID_OK); +} + +bool DefaultCharsetDialog::Create(MyFrame * parent, wxString & charset, + bool ask) +{ +// +// creating the dialog +// + MainFrame = parent; + Charset = charset; + AskCharset = ask; + if (wxDialog::Create(parent, wxID_ANY, wxT("Charset settings")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void DefaultCharsetDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: the DEFAULT CHARSET + wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(csSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, + wxT("Default Output Charset"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxVERTICAL); + csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *charsetCtrl = new wxListBox(this, ID_DFLT_CHARSET, + wxDefaultPosition, wxDefaultSize, + MainFrame->GetCharsetsLen(), + MainFrame->GetCharsetsNames(), + wxLB_SINGLE); + charsetCtrl-> + SetFont(wxFont + (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + int idSel = MainFrame->GetCharsetIndex(Charset); + if (idSel != wxNOT_FOUND) + charsetCtrl->SetSelection(idSel); + charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// second row: the ASK CHARSET + wxBoxSizer *askSizer = new wxBoxSizer(wxHORIZONTAL); + charsetSizer->Add(askSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxCheckBox *askCtrl = new wxCheckBox(this, ID_DFLT_ASK, + wxT("Ask output charset every time"), + wxDefaultPosition, wxDefaultSize); + askCtrl->SetValue(AskCharset); + askSizer->Add(askCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & DefaultCharsetDialog::OnOk); +} + +void DefaultCharsetDialog::OnOk(wxCommandEvent & event) { // // all done: // - wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow (ID_LDTXT_TABLE); - Table = tableCtrl->GetValue (); - if (Table.Len () < 1) - { - wxMessageBox (wxT ("You must specify the TABLE NAME !!!"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - if (MainFrame->TableAlreadyExists (Table) == true) - { - wxMessageBox (wxT ("a table name '") + Table + - wxT ("' already exists"), wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, this); - return; - } - if (gaiaIllegalSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (Table.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + Table + - wxT - ("' is an invalid TABLE NAME\n\nillegal name or reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_LDTXT_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow (ID_LDTXT_SEPARATOR); - if (separatorCtrl->GetSelection () == 5) - { - wxTextCtrl *charSeparatorCtrl = - (wxTextCtrl *) FindWindow (ID_LDTXT_CHARSEPARATOR); - wxString separator = charSeparatorCtrl->GetValue (); - if (separator.Len () != 1) - { - wxMessageBox (wxT - ("you must specificy a single char as Custom Column Separator"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, - this); - return; - } - char dummy[64]; - strcpy (dummy, separator.ToUTF8 ()); - Separator = *dummy; - } - wxDialog::EndModal (wxID_OK); -} - -bool -LoadShpDialog::Create (MyFrame * parent, wxString & path, wxString & table, - int srid, wxString & column, wxString & defCs) + wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_DFLT_CHARSET); + int idSel = charsetCtrl->GetSelection(); + if (idSel == wxNOT_FOUND) + { + wxMessageBox(wxT + ("you must select some Default Charset Encoding from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxString *charsets = MainFrame->GetCharsets(); + Charset = *(charsets + idSel); + wxCheckBox *askCtrl = (wxCheckBox *) FindWindow(ID_DFLT_ASK); + AskCharset = askCtrl->GetValue(); + wxDialog::EndModal(wxID_OK); +} + +bool RecoverDialog::Create(MyFrame * parent, wxString & table, + wxString & column) { // // creating the dialog // - MainFrame = parent; - Path = path; - Table = table; - Srid = srid; - Column = column; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Load Shapefile")) == false) - return false; + MainFrame = parent; + Table = table; + Column = column; + Srid = -1; + if (wxDialog::Create(parent, wxID_ANY, wxT("Recover Geometry Column")) == + false) + return false; // populates individual controls - CreateControls (); + CreateControls(); // sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); // centers the dialog window - Centre (); - return true; + Centre(); + return true; } -void -LoadShpDialog::CreateControls () +void RecoverDialog::CreateControls() { // // creating individual control and setting initial values // - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// first row: the Shapefile path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); -// second row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, ID_LDSHP_TABLE, Table, - wxDefaultPosition, wxSize (350, - 22)); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// third row: GEOMETRY COLUMN name - wxBoxSizer *colSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (colSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *colLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&GeomColumn name:")); - colSizer->Add (colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *colCtrl = new wxTextCtrl (this, ID_LDSHP_COLUMN, Column, - wxDefaultPosition, wxSize (350, 22)); - colSizer->Add (colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// fourth row: SRID - wxBoxSizer *sridSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticText *sridLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&SRID:")); - sridSizer->Add (sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxSpinCtrl *sridCtrl = new wxSpinCtrl (this, ID_LDSHP_SRID, wxEmptyString, - wxDefaultPosition, wxSize (80, 20), - wxSP_ARROW_KEYS, - -1, 40000, Srid); - sridSizer->Add (sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// fifth row: CHARSET - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - sridSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_LDSHP_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// First row: TABLE name + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, + wxDefaultPosition, wxSize(350, 22), + wxTE_READONLY); + tableCtrl->Enable(false); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: GEOMETRY COLUMN name + wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *colLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); + colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, + wxDefaultPosition, wxSize(350, 22), + wxTE_READONLY); + colCtrl->Enable(false); + colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// third row: SRID + wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); + sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_RCVR_SRID, wxEmptyString, + wxDefaultPosition, wxSize(80, 20), + wxSP_ARROW_KEYS, + -1, 40000, Srid); + sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// fourth row: GEOMETRY TYPE + wxStaticBox *typeBox = new wxStaticBox(this, wxID_STATIC, + wxT("Geometry Type"), + wxDefaultPosition, wxDefaultSize); + wxBoxSizer *typeSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL); + sridSizer->Add(typeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxString types[7]; + types[0] = wxT("POINT"); + types[1] = wxT("MULTIPOINT"); + types[2] = wxT("LINESTRING"); + types[3] = wxT("MULTILINESTRING"); + types[4] = wxT("POLYGON"); + types[5] = wxT("MULTIPOLYGON"); + types[6] = wxT("GEOMETRYCOLLECTION"); + wxListBox *geomType = new wxListBox(this, ID_RCVR_TYPE, + wxDefaultPosition, wxDefaultSize, 7, + types, wxLB_SINGLE); + typeSizer->Add(geomType, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & LoadShpDialog::OnOk); + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & RecoverDialog::OnOk); } -void -LoadShpDialog::OnOk (wxCommandEvent & event) +void RecoverDialog::OnOk(wxCommandEvent & event) { // // all done: // - wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow (ID_LDSHP_TABLE); - Table = tableCtrl->GetValue (); - if (Table.Len () < 1) - { - wxMessageBox (wxT ("You must specify the TABLE NAME !!!"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - if (MainFrame->TableAlreadyExists (Table) == true) - { - wxMessageBox (wxT ("a table name '") + Table + - wxT ("' already exists"), wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, this); - return; - } - if (gaiaIllegalSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (Table.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (Table.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + Table + - wxT - ("' is an invalid TABLE NAME\n\nillegal name or reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxTextCtrl *columnCtrl = (wxTextCtrl *) FindWindow (ID_LDSHP_COLUMN); - Column = columnCtrl->GetValue (); - if (Column.Len () < 1) - { - wxMessageBox (wxT ("You must specify the GEOMETRY COLUMN NAME !!!"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - if (gaiaIllegalSqlName (Column.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (Column.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (Column.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + Column + - wxT - ("' is an invalid COLUMN NAME\n\nsame as SQL reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow (ID_LDSHP_SRID); - Srid = sridCtrl->GetValue (); - if (MainFrame->SridNotExists (Srid) == true) - { - wxMessageBox (wxT ("invalid SRID value"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_LDSHP_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxDialog::EndModal (wxID_OK); -} - -bool -DumpShpDialog::Create (MyFrame * parent, wxString & path, wxString & table, - wxString & column, wxString & defCs) + wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_RCVR_SRID); + wxListBox *geomType = (wxListBox *) FindWindow(ID_RCVR_TYPE); + Srid = sridCtrl->GetValue(); + if (MainFrame->SridNotExists(Srid) == true) + { + wxMessageBox(wxT("invalid SRID value"), wxT("spatialite-gui"), + wxOK | wxICON_WARNING, this); + return; + } + Type = geomType->GetStringSelection(); + if (Type.Len() < 1) + { + wxMessageBox(wxT("you must select some Geometry Type from the list"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxDialog::EndModal(wxID_OK); +} + +bool SetSridDialog::Create(MyFrame * parent, wxString & table, + wxString & column) { // // creating the dialog // - MainFrame = parent; - Path = path; - Table = table; - Column = column; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Dump Shapefile")) == false) - return false; + MainFrame = parent; + Table = table; + Column = column; + OldSrid = -1; + Srid = -1; + if (wxDialog::Create(parent, wxID_ANY, wxT("Changing SRID")) == false) + return false; // populates individual controls - CreateControls (); + CreateControls(); // sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); // centers the dialog window - Centre (); - return true; + Centre(); + return true; } -void -DumpShpDialog::CreateControls () +void SetSridDialog::CreateControls() { // // creating individual control and setting initial values // - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// first row: the Shapefile path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); -// second row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, wxID_STATIC, Table, - wxDefaultPosition, wxSize (350, - 22)); - tableCtrl->Enable (false); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// third row: GEOMETRY COLUMN name - wxBoxSizer *colSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (colSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *colLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&GeomColumn name:")); - colSizer->Add (colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *colCtrl = new wxTextCtrl (this, wxID_STATIC, Column, - wxDefaultPosition, wxSize (350, 22)); - colCtrl->Enable (false); - colSizer->Add (colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// fourth row: CHARSET - wxBoxSizer *csSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - csSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_DMPSHP_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// First row: TABLE name + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *tableLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); + tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, + wxDefaultPosition, wxSize(350, 22), + wxTE_READONLY); + tableCtrl->Enable(false); + tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: GEOMETRY COLUMN name + wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *colLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); + colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, + wxDefaultPosition, wxSize(350, 22), + wxTE_READONLY); + colCtrl->Enable(false); + colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// third row: SRID + wxBoxSizer *mySizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(mySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxBoxSizer *oldSridSizer = new wxBoxSizer(wxHORIZONTAL); + mySizer->Add(oldSridSizer, 0, wxALIGN_LEFT | wxALL, 0); + wxStaticText *oldSridLabel = + new wxStaticText(this, wxID_STATIC, wxT("&old SRID:")); + oldSridSizer->Add(oldSridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxSpinCtrl *oldSridCtrl = new wxSpinCtrl(this, ID_SRID_OLD, wxEmptyString, + wxDefaultPosition, wxSize(80, + 20), + wxSP_ARROW_KEYS, + -1, 40000, OldSrid); + oldSridSizer->Add(oldSridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// fourth row: SRID + wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); + mySizer->Add(sridSizer, 0, wxALIGN_RIGHT | wxLEFT, 20); + wxStaticText *sridLabel = + new wxStaticText(this, wxID_STATIC, wxT("&new SRID:")); + sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_SRID_SRID, wxEmptyString, + wxDefaultPosition, wxSize(80, 20), + wxSP_ARROW_KEYS, + -1, 40000, Srid); + sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & DumpShpDialog::OnOk); + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & SetSridDialog::OnOk); } -void -DumpShpDialog::OnOk (wxCommandEvent & event) +void SetSridDialog::OnOk(wxCommandEvent & event) { // // all done: // - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_DMPSHP_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxDialog::EndModal (wxID_OK); + wxSpinCtrl *oldSridCtrl = (wxSpinCtrl *) FindWindow(ID_SRID_OLD); + wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_SRID_SRID); + OldSrid = oldSridCtrl->GetValue(); + Srid = sridCtrl->GetValue(); + wxDialog::EndModal(wxID_OK); } -bool -DumpTxtDialog::Create (MyFrame * parent, wxString & path, - wxString & target, wxString & defCs) +bool SearchSridDialog::Create(MyFrame * parent) { // // creating the dialog // - MainFrame = parent; - Path = path; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Dump ") + target) == false) - return false; + MainFrame = parent; + if (wxDialog::Create(parent, wxID_ANY, wxT("Searching a SRID by its name")) == + false) + return false; // populates individual controls - CreateControls (); + CreateControls(); // sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); // centers the dialog window - Centre (); - return true; -} - -void -DumpTxtDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// first row: the Shapefile path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); -// second row: CHARSET - wxBoxSizer *csSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - csSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_DMPTXT_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & DumpTxtDialog::OnOk); -} - -void -DumpTxtDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_DMPTXT_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxDialog::EndModal (wxID_OK); -} - -bool -SqlScriptDialog::Create (MyFrame * parent, wxString & path, wxString & defCs) -{ -// -// creating the dialog -// - MainFrame = parent; - Path = path; - Default = defCs; - if (wxDialog::Create (parent, wxID_ANY, wxT ("SQL script execute")) == - false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -SqlScriptDialog::CreateControls () + Centre(); + return true; +} + +void SearchSridDialog::CreateControls() { // // creating individual control and setting initial values // - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// first row: the SQL script path - wxBoxSizer *pathSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *pathLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Path:")); - pathSizer->Add (pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *pathValue = new wxTextCtrl (this, wxID_STATIC, - Path, wxDefaultPosition, - wxSize (350, 22), wxTE_READONLY); - pathSizer->Add (pathValue, 0, wxALIGN_RIGHT | wxALL, 5); -// second row: CHARSET - wxBoxSizer *csSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Charset Encoding"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxHORIZONTAL); - csSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_SCRIPT_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Default); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// First row: SEARCH string + wxBoxSizer *searchSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(searchSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *searchLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Search:")); + searchSizer->Add(searchLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxTextCtrl *searchCtrl = new wxTextCtrl(this, ID_SEARCH, wxT(""), + wxDefaultPosition, wxSize(150, + 22)); + searchSizer->Add(searchCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & SqlScriptDialog::OnOk); + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & SearchSridDialog::OnOk); } -void -SqlScriptDialog::OnOk (wxCommandEvent & event) +void SearchSridDialog::OnOk(wxCommandEvent & event) { // // all done: // - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_SCRIPT_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxDialog::EndModal (wxID_OK); + wxTextCtrl *searchCtrl = (wxTextCtrl *) FindWindow(ID_SEARCH); + String = searchCtrl->GetValue(); + if (String.Len() < 1) + { + wxMessageBox(wxT("You must specify a string to search for !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxDialog::EndModal(wxID_OK); } -bool -DefaultCharsetDialog::Create (MyFrame * parent, wxString & charset, bool ask) +bool HelpDialog::Create(MyFrame * parent) { // // creating the dialog // - MainFrame = parent; - Charset = charset; - AskCharset = ask; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Charset settings")) == false) - return false; + MainFrame = parent; + if (wxDialog::Create(parent, wxID_ANY, wxT("SQLite + SpatiaLite help"), + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) == false) + return false; // populates individual controls - CreateControls (); + CreateControls(); // sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); // centers the dialog window - Centre (); - return true; -} - -void -DefaultCharsetDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// first row: the DEFAULT CHARSET - wxBoxSizer *csSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (csSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticBox *charsetBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Default Output Charset"), - wxDefaultPosition, - wxDefaultSize); - wxBoxSizer *charsetSizer = new wxStaticBoxSizer (charsetBox, wxVERTICAL); - csSizer->Add (charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxListBox *charsetCtrl = new wxListBox (this, ID_DFLT_CHARSET, - wxDefaultPosition, wxDefaultSize, - MainFrame->GetCharsetsLen (), - MainFrame->GetCharsetsNames (), - wxLB_SINGLE); - charsetCtrl->SetFont (wxFont - (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL)); - int idSel = MainFrame->GetCharsetIndex (Charset); - if (idSel != wxNOT_FOUND) - charsetCtrl->SetSelection (idSel); - charsetSizer->Add (charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); -// second row: the ASK CHARSET - wxBoxSizer *askSizer = new wxBoxSizer (wxHORIZONTAL); - charsetSizer->Add (askSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxCheckBox *askCtrl = new wxCheckBox (this, ID_DFLT_ASK, - wxT ("Ask output charset every time"), - wxDefaultPosition, wxDefaultSize); - askCtrl->SetValue (AskCharset); - askSizer->Add (askCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & DefaultCharsetDialog::OnOk); -} - -void -DefaultCharsetDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxListBox *charsetCtrl = (wxListBox *) FindWindow (ID_DFLT_CHARSET); - int idSel = charsetCtrl->GetSelection (); - if (idSel == wxNOT_FOUND) - { - wxMessageBox (wxT - ("you must select some Default Charset Encoding from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxString *charsets = MainFrame->GetCharsets (); - Charset = *(charsets + idSel); - wxCheckBox *askCtrl = (wxCheckBox *) FindWindow (ID_DFLT_ASK); - AskCharset = askCtrl->GetValue (); - wxDialog::EndModal (wxID_OK); -} - -bool -RecoverDialog::Create (MyFrame * parent, wxString & table, wxString & column) -{ -// -// creating the dialog -// - MainFrame = parent; - Table = table; - Column = column; - Srid = -1; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Recover Geometry Column")) == - false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -RecoverDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// First row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, wxID_ANY, Table, - wxDefaultPosition, wxSize (350, 22), - wxTE_READONLY); - tableCtrl->Enable (false); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// second row: GEOMETRY COLUMN name - wxBoxSizer *colSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (colSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *colLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Column name:")); - colSizer->Add (colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *colCtrl = new wxTextCtrl (this, wxID_ANY, Column, - wxDefaultPosition, wxSize (350, 22), - wxTE_READONLY); - colCtrl->Enable (false); - colSizer->Add (colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// third row: SRID - wxBoxSizer *sridSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxStaticText *sridLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&SRID:")); - sridSizer->Add (sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxSpinCtrl *sridCtrl = new wxSpinCtrl (this, ID_RCVR_SRID, wxEmptyString, - wxDefaultPosition, wxSize (80, 20), - wxSP_ARROW_KEYS, - -1, 40000, Srid); - sridSizer->Add (sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// fourth row: GEOMETRY TYPE - wxStaticBox *typeBox = new wxStaticBox (this, wxID_STATIC, - wxT ("Geometry Type"), - wxDefaultPosition, wxDefaultSize); - wxBoxSizer *typeSizer = new wxStaticBoxSizer (typeBox, wxHORIZONTAL); - sridSizer->Add (typeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxString types[7]; - types[0] = wxT ("POINT"); - types[1] = wxT ("MULTIPOINT"); - types[2] = wxT ("LINESTRING"); - types[3] = wxT ("MULTILINESTRING"); - types[4] = wxT ("POLYGON"); - types[5] = wxT ("MULTIPOLYGON"); - types[6] = wxT ("GEOMETRYCOLLECTION"); - wxListBox *geomType = new wxListBox (this, ID_RCVR_TYPE, - wxDefaultPosition, wxDefaultSize, 7, - types, wxLB_SINGLE); - typeSizer->Add (geomType, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & RecoverDialog::OnOk); -} - -void -RecoverDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow (ID_RCVR_SRID); - wxListBox *geomType = (wxListBox *) FindWindow (ID_RCVR_TYPE); - Srid = sridCtrl->GetValue (); - if (MainFrame->SridNotExists (Srid) == true) - { - wxMessageBox (wxT ("invalid SRID value"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - Type = geomType->GetStringSelection (); - if (Type.Len () < 1) - { - wxMessageBox (wxT - ("you must select some Geometry Type from the list"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxDialog::EndModal (wxID_OK); -} - -bool -SetSridDialog::Create (MyFrame * parent, wxString & table, wxString & column) -{ -// -// creating the dialog -// - MainFrame = parent; - Table = table; - Column = column; - OldSrid = -1; - Srid = -1; - if (wxDialog::Create (parent, wxID_ANY, wxT ("Changing SRID")) == false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -SetSridDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// First row: TABLE name - wxBoxSizer *tableSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *tableLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Table name:")); - tableSizer->Add (tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *tableCtrl = new wxTextCtrl (this, wxID_ANY, Table, - wxDefaultPosition, wxSize (350, 22), - wxTE_READONLY); - tableCtrl->Enable (false); - tableSizer->Add (tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// second row: GEOMETRY COLUMN name - wxBoxSizer *colSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (colSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *colLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Column name:")); - colSizer->Add (colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *colCtrl = new wxTextCtrl (this, wxID_ANY, Column, - wxDefaultPosition, wxSize (350, 22), - wxTE_READONLY); - colCtrl->Enable (false); - colSizer->Add (colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// third row: SRID - wxBoxSizer *mySizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (mySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxBoxSizer *oldSridSizer = new wxBoxSizer (wxHORIZONTAL); - mySizer->Add (oldSridSizer, 0, wxALIGN_LEFT | wxALL, 0); - wxStaticText *oldSridLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&old SRID:")); - oldSridSizer->Add (oldSridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxSpinCtrl *oldSridCtrl = new wxSpinCtrl (this, ID_SRID_OLD, wxEmptyString, - wxDefaultPosition, wxSize (80, - 20), - wxSP_ARROW_KEYS, - -1, 40000, OldSrid); - oldSridSizer->Add (oldSridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// fourth row: SRID - wxBoxSizer *sridSizer = new wxBoxSizer (wxHORIZONTAL); - mySizer->Add (sridSizer, 0, wxALIGN_RIGHT | wxLEFT, 20); - wxStaticText *sridLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&new SRID:")); - sridSizer->Add (sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxSpinCtrl *sridCtrl = new wxSpinCtrl (this, ID_SRID_SRID, wxEmptyString, - wxDefaultPosition, wxSize (80, 20), - wxSP_ARROW_KEYS, - -1, 40000, Srid); - sridSizer->Add (sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & SetSridDialog::OnOk); -} - -void -SetSridDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxSpinCtrl *oldSridCtrl = (wxSpinCtrl *) FindWindow (ID_SRID_OLD); - wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow (ID_SRID_SRID); - OldSrid = oldSridCtrl->GetValue (); - Srid = sridCtrl->GetValue (); - wxDialog::EndModal (wxID_OK); -} - -bool -SearchSridDialog::Create (MyFrame * parent) -{ -// -// creating the dialog -// - MainFrame = parent; - if (wxDialog::Create (parent, wxID_ANY, - wxT ("Searching a SRID by its name")) == false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - Centre (); - return true; -} - -void -SearchSridDialog::CreateControls () -{ -// -// creating individual control and setting initial values -// - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); -// First row: SEARCH string - wxBoxSizer *searchSizer = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (searchSizer, 0, wxALIGN_RIGHT | wxALL, 0); - wxStaticText *searchLabel = - new wxStaticText (this, wxID_STATIC, wxT ("&Search:")); - searchSizer->Add (searchLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxTextCtrl *searchCtrl = new wxTextCtrl (this, ID_SEARCH, wxT (""), - wxDefaultPosition, wxSize (150, - 22)); - searchSizer->Add (searchCtrl, 0, wxALIGN_RIGHT | wxALL, 5); -// OK - CANCEL buttons - wxBoxSizer *okCancelBox = new wxBoxSizer (wxHORIZONTAL); - boxSizer->Add (okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); - wxButton *ok = new wxButton (this, wxID_OK, wxT ("&OK")); - okCancelBox->Add (ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); - wxButton *cancel = new wxButton (this, wxID_CANCEL, wxT ("&Cancel")); - okCancelBox->Add (cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); -// appends event handler for OK button - Connect (wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & SearchSridDialog::OnOk); -} - -void -SearchSridDialog::OnOk (wxCommandEvent & event) -{ -// -// all done: -// - wxTextCtrl *searchCtrl = (wxTextCtrl *) FindWindow (ID_SEARCH); - String = searchCtrl->GetValue (); - if (String.Len () < 1) - { - wxMessageBox (wxT ("You must specify a string to search for !!!"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); - return; - } - wxDialog::EndModal (wxID_OK); -} - -bool -HelpDialog::Create (MyFrame * parent) -{ -// -// creating the dialog -// - MainFrame = parent; - if (wxDialog::Create (parent, wxID_ANY, wxT ("SQLite + SpatiaLite help")) == - false) - return false; -// populates individual controls - CreateControls (); -// sets dialog sizer - GetSizer ()->Fit (this); - GetSizer ()->SetSizeHints (this); -// centers the dialog window - MainFrame->OpenHelpPane (); - Centre (); + MainFrame->OpenHelpPane(); + Centre(); // setting up an event handler [dialog closing] - Connect (wxID_ANY, wxEVT_CLOSE_WINDOW, - (wxObjectEventFunction) & HelpDialog::OnClose); - return true; + Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, + (wxObjectEventFunction) & HelpDialog::OnClose); + return true; } -void -HelpDialog::OnClose (wxCloseEvent & event) +void HelpDialog::OnClose(wxCloseEvent & event) { // // this window has been closed // - MainFrame->CloseHelpPane (); - Destroy (); -} - -void -HelpDialog::CreateControls () + MainFrame->CloseHelpPane(); + Destroy(); +} + +void HelpDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxHtmlWindow *helpWin = new wxHtmlWindow(this, ID_HELP_HTML, + wxDefaultPosition, wxSize(400, + 200)); + wxString html; + MainFrame->GetHelp(html); + helpWin->SetPage(html); + topSizer->Add(helpWin, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & HelpDialog::OnSize); +} + +void HelpDialog::OnSize(wxSizeEvent & event) +{ +// +// this window has changed its size +// + wxSize sz = GetClientSize(); + wxHtmlWindow *helpWin = (wxHtmlWindow *) FindWindow(ID_HELP_HTML); + helpWin->SetSize(sz.GetWidth() - 6, sz.GetHeight() - 6); +} + +bool NetworkDialog::Create(MyFrame * parent) +{ +// +// creating the dialog +// + MainFrame = parent; + FromColumn = wxT(""); + ToColumn = wxT(""); + GeomColumn = wxT(""); + GeomLength = true; + CostColumn = wxT(""); + Bidirectional = true; + OneWays = false; + OneWayFromTo = wxT(""); + OneWayToFrom = wxT(""); + if (wxDialog::Create(parent, wxID_ANY, wxT("Build Network")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void NetworkDialog::CreateControls() +{ +// +// creating individual control and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxBoxSizer *row0Sizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(row0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: first column: the Main TABLE + wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); + row0Sizer->Add(tableSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); + wxStaticBox *tableBox = new wxStaticBox(this, wxID_STATIC, + wxT("Base Table [graph]"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *tableNameSizer = new wxStaticBoxSizer(tableBox, wxVERTICAL); + tableSizer->Add(tableNameSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + int nTables; + wxString *tables = MainFrame->GetTables(&nTables); + wxListBox *tableCtrl = new wxListBox(this, ID_NET_TABLE, + wxDefaultPosition, wxDefaultSize, + nTables, tables, wxLB_SINGLE); + delete[]tables; + tableNameSizer->Add(tableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxSize size = tableCtrl->GetSize(); + size.SetHeight(size.GetHeight() / 2); +// first row: second column: the NodeFrom COLUMN + wxBoxSizer *netSizer = new wxBoxSizer(wxHORIZONTAL); + row0Sizer->Add(netSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *netBox = new wxStaticBox(this, wxID_STATIC, + wxT("Network configuration"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *colSizer = new wxStaticBoxSizer(netBox, wxVERTICAL); + netSizer->Add(colSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxBoxSizer *row1Sizer = new wxBoxSizer(wxHORIZONTAL); + colSizer->Add(row1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxBoxSizer *fromSizer = new wxBoxSizer(wxHORIZONTAL); + row1Sizer->Add(fromSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *fromBox = new wxStaticBox(this, wxID_STATIC, + wxT("NodeFrom Column"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *fromColSizer = new wxStaticBoxSizer(fromBox, wxVERTICAL); + fromSizer->Add(fromColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *fromCtrl = new wxListBox(this, ID_NET_FROM, + wxDefaultPosition, size, + 0, NULL, wxLB_SINGLE); + fromCtrl->Enable(false); + fromColSizer->Add(fromCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// first row: third column: the NodeTo COLUMN + wxBoxSizer *toSizer = new wxBoxSizer(wxHORIZONTAL); + row1Sizer->Add(toSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *toBox = new wxStaticBox(this, wxID_STATIC, + wxT("NodeTo Column"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *toColSizer = new wxStaticBoxSizer(toBox, wxVERTICAL); + toSizer->Add(toColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *toCtrl = new wxListBox(this, ID_NET_TO, + wxDefaultPosition, size, + 0, NULL, wxLB_SINGLE); + toCtrl->Enable(false); + toColSizer->Add(toCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// first row: fourth column: the Geometry COLUMN + wxBoxSizer *geoSizer = new wxBoxSizer(wxHORIZONTAL); + row1Sizer->Add(geoSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *geoBox = new wxStaticBox(this, wxID_STATIC, + wxT("Geometry Column"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *geoColSizer = new wxStaticBoxSizer(geoBox, wxVERTICAL); + toSizer->Add(geoColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *geoCtrl = new wxListBox(this, ID_NET_GEOM, + wxDefaultPosition, size, + 0, NULL, wxLB_SINGLE); + geoCtrl->Enable(false); + geoColSizer->Add(geoCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// second row: first column: UNIDIRECTIONAL / BIDIRECTIONAL + wxBoxSizer *row2Sizer = new wxBoxSizer(wxHORIZONTAL); + colSizer->Add(row2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxString dirs[2]; + dirs[0] = wxT("&Uni-Directional"); + dirs[1] = wxT("&Bi-Directional"); + wxRadioBox *dirSel = new wxRadioBox(this, ID_NET_BIDIR, + wxT("&Arc connections"), + wxDefaultPosition, + wxDefaultSize, 2, + dirs, 2, + wxRA_SPECIFY_ROWS); + dirSel->SetSelection(1); + dirSel->Enable(false); + row2Sizer->Add(dirSel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// second row: second column: the COST is GLenth selection + wxString costs[2]; + costs[0] = wxT("&Using GLength(Geometry) as Cost"); + costs[1] = wxT("&Using Cost Column"); + wxRadioBox *costSel = new wxRadioBox(this, ID_NET_LENGTH, + wxT("&Cost type"), + wxDefaultPosition, + wxDefaultSize, 2, + costs, 2, + wxRA_SPECIFY_ROWS); + costSel->SetSelection(0); + costSel->Enable(false); + row2Sizer->Add(costSel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// second row: third column: the COST COLUMN + wxBoxSizer *costSizer = new wxBoxSizer(wxHORIZONTAL); + row2Sizer->Add(costSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *costBox = new wxStaticBox(this, wxID_STATIC, + wxT("Cost Column"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *costColSizer = new wxStaticBoxSizer(costBox, wxVERTICAL); + costSizer->Add(costColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *costCtrl = new wxListBox(this, ID_NET_COST, + wxDefaultPosition, size, + 0, NULL, wxLB_SINGLE); + costCtrl->Enable(false); + costColSizer->Add(costCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// third row: second column: the OneWay Selection + wxBoxSizer *row3Sizer = new wxBoxSizer(wxHORIZONTAL); + colSizer->Add(row3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxString oneWays[2]; + oneWays[0] = wxT("&Not using OneWay Columns"); + oneWays[1] = wxT("&Using OneWay Columns"); + wxRadioBox *oneWaySel = new wxRadioBox(this, ID_NET_ONEWAY, + wxT("&OneWays"), + wxDefaultPosition, + wxDefaultSize, 2, + oneWays, 2, + wxRA_SPECIFY_ROWS); + oneWaySel->SetSelection(0); + oneWaySel->Enable(false); + row3Sizer->Add(oneWaySel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// third row: second column: the OneWay FromTo COLUMN + wxBoxSizer *fromToSizer = new wxBoxSizer(wxHORIZONTAL); + row3Sizer->Add(fromToSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *fromToBox = new wxStaticBox(this, wxID_STATIC, + wxT("From -> To Column"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *fromToColSizer = new wxStaticBoxSizer(fromToBox, wxVERTICAL); + fromToSizer->Add(fromToColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *fromToCtrl = new wxListBox(this, ID_NET_FROM_TO, + wxDefaultPosition, size, + 0, NULL, wxLB_SINGLE); + fromToCtrl->Enable(false); + fromToColSizer->Add(fromToCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// fourth row: second column: the OneWay To From COLUMN + wxBoxSizer *toFromSizer = new wxBoxSizer(wxHORIZONTAL); + row3Sizer->Add(toFromSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticBox *toFromBox = new wxStaticBox(this, wxID_STATIC, + wxT("To -> From Column"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *toFromColSizer = new wxStaticBoxSizer(toFromBox, wxVERTICAL); + toFromSizer->Add(toFromColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxListBox *toFromCtrl = new wxListBox(this, ID_NET_TO_FROM, + wxDefaultPosition, size, + 0, NULL, wxLB_SINGLE); + toFromCtrl->Enable(false); + toFromColSizer->Add(toFromCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & NetworkDialog::OnOk); +// appends event handlers for radio buttons etc + Connect(ID_NET_TABLE, wxEVT_COMMAND_LISTBOX_SELECTED, + (wxObjectEventFunction) & NetworkDialog::OnTable); + Connect(ID_NET_BIDIR, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & NetworkDialog::OnDirection); + Connect(ID_NET_LENGTH, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & NetworkDialog::OnCost); + Connect(ID_NET_ONEWAY, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & NetworkDialog::OnOneWay); +} + +void NetworkDialog::OnTable(wxCommandEvent & event) +{ +// +// TABLE selection changed +// + wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); + TableName = tableCtrl->GetStringSelection(); + int n_cols; + wxString *columns = MainFrame->GetColumnNames(TableName, &n_cols); + wxListBox *fromCtrl = (wxListBox *) FindWindow(ID_NET_FROM); + fromCtrl->Clear(); + fromCtrl->InsertItems(n_cols, columns, 0); + fromCtrl->Enable(true); + wxListBox *toCtrl = (wxListBox *) FindWindow(ID_NET_TO); + toCtrl->Clear(); + toCtrl->InsertItems(n_cols, columns, 0); + toCtrl->Enable(true); + wxListBox *geomCtrl = (wxListBox *) FindWindow(ID_NET_GEOM); + geomCtrl->Clear(); + geomCtrl->InsertItems(n_cols, columns, 0); + geomCtrl->Enable(true); + wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); + costCtrl->Clear(); + costCtrl->InsertItems(n_cols, columns, 0); + costCtrl->Enable(false); + wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); + fromToCtrl->Clear(); + fromToCtrl->InsertItems(n_cols, columns, 0); + fromToCtrl->Enable(false); + wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); + toFromCtrl->Clear(); + toFromCtrl->InsertItems(n_cols, columns, 0); + toFromCtrl->Enable(false); + wxRadioBox *dirSel = (wxRadioBox *) FindWindow(ID_NET_BIDIR); + Bidirectional = true; + dirSel->SetSelection(1); + dirSel->Enable(true); + wxRadioBox *costSel = (wxRadioBox *) FindWindow(ID_NET_LENGTH); + GeomLength = true; + costSel->SetSelection(0); + costSel->Enable(true); + wxRadioBox *oneWaySel = (wxRadioBox *) FindWindow(ID_NET_ONEWAY); + OneWays = false; + oneWaySel->SetSelection(0); + oneWaySel->Enable(true); +} + +void NetworkDialog::OnDirection(wxCommandEvent & event) +{ +// +// BIDIRECTIONAL radio box +// + wxRadioBox *oneWaySel = (wxRadioBox *) FindWindow(ID_NET_ONEWAY); + wxRadioBox *dirSel = (wxRadioBox *) FindWindow(ID_NET_BIDIR); + wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); + wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); + if (Bidirectional == true) + { + Bidirectional = false; + dirSel->SetSelection(0); + OneWays = false; + oneWaySel->SetSelection(0); + oneWaySel->Enable(false); + fromToCtrl->Enable(false); + toFromCtrl->Enable(false); + } else + { + Bidirectional = true; + dirSel->SetSelection(1); + OneWays = false; + oneWaySel->SetSelection(0); + oneWaySel->Enable(true); + fromToCtrl->Enable(false); + toFromCtrl->Enable(false); + } +} + +void NetworkDialog::OnCost(wxCommandEvent & event) +{ +// +// COST radio box +// + wxRadioBox *costSel = (wxRadioBox *) FindWindow(ID_NET_LENGTH); + wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); + if (GeomLength == true) + { + GeomLength = false; + costSel->SetSelection(1); + costCtrl->Enable(true); + } else + { + GeomLength = true; + costSel->SetSelection(0); + costCtrl->Enable(false); + } +} + +void NetworkDialog::OnOneWay(wxCommandEvent & event) +{ +// +// OneWay radio box +// + wxRadioBox *oneWaySel = (wxRadioBox *) FindWindow(ID_NET_ONEWAY); + wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); + wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); + if (OneWays == true) + { + OneWays = false; + oneWaySel->SetSelection(0); + fromToCtrl->Enable(false); + toFromCtrl->Enable(false); + } else + { + OneWays = true; + oneWaySel->SetSelection(1); + fromToCtrl->Enable(true); + toFromCtrl->Enable(true); + } +} + +void NetworkDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); + TableName = tableCtrl->GetStringSelection(); + if (TableName.Len() < 1) + { + wxMessageBox(wxT("You must select some TABLE NAME !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxListBox *fromCtrl = (wxListBox *) FindWindow(ID_NET_FROM); + FromColumn = fromCtrl->GetStringSelection(); + if (FromColumn.Len() < 1) + { + wxMessageBox(wxT("You must select some 'NodeFrom' COLUMN !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxListBox *toCtrl = (wxListBox *) FindWindow(ID_NET_TO); + ToColumn = toCtrl->GetStringSelection(); + if (ToColumn.Len() < 1) + { + wxMessageBox(wxT("You must select some 'NodeTo' COLUMN !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxListBox *geomCtrl = (wxListBox *) FindWindow(ID_NET_GEOM); + GeomColumn = geomCtrl->GetStringSelection(); + if (GeomColumn.Len() < 1) + { + wxMessageBox(wxT("You must select some 'Geometry' COLUMN !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + if (GeomLength == true) + CostColumn = wxT(""); + else + { + wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); + CostColumn = costCtrl->GetStringSelection(); + if (CostColumn.Len() < 1) + { + wxMessageBox(wxT("You must select some 'Cost' COLUMN !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + } + if (Bidirectional == true && OneWays == true) + { + wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); + OneWayFromTo = fromToCtrl->GetStringSelection(); + if (OneWayFromTo.Len() < 1) + { + wxMessageBox(wxT("You must select some 'OneWay From->To' COLUMN !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); + OneWayToFrom = toFromCtrl->GetStringSelection(); + if (OneWayToFrom.Len() < 1) + { + wxMessageBox(wxT("You must select some 'OneWay To->From' COLUMN !!!"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + return; + } + } else + { + OneWayFromTo = wxT(""); + OneWayToFrom = wxT(""); + } + wxDialog::EndModal(wxID_OK); +} + +bool ExifDialog::Create(MyFrame * parent, wxString & dir_path, + wxString & img_path) +{ +// +// creating the dialog +// + MainFrame = parent; + DirPath = dir_path; + ImgPath = img_path; + Folder = false; + Metadata = true; + GpsOnly = false; + if (wxDialog::Create(parent, wxID_ANY, wxT("Import EXIF Photos")) == false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void ExifDialog::CreateControls() { // // creating individual control and setting initial values // - wxBoxSizer *topSizer = new wxBoxSizer (wxVERTICAL); - this->SetSizer (topSizer); - wxBoxSizer *boxSizer = new wxBoxSizer (wxVERTICAL); - topSizer->Add (boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); - wxHtmlWindow *helpWin = new wxHtmlWindow (this, wxID_ANY, - wxDefaultPosition, wxSize (620, - 420)); - wxString html; - MainFrame->GetHelp (html); - helpWin->SetPage (html); - topSizer->Add (helpWin, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxBoxSizer *row0Sizer = new wxBoxSizer(wxVERTICAL); + boxSizer->Add(row0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: the path and file/folder selection + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + row0Sizer->Add(pathSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); + wxStaticBox *pathBox = new wxStaticBox(this, wxID_STATIC, + wxT("Import from source"), + wxDefaultPosition, + wxDefaultSize); + wxBoxSizer *pthSizer = new wxStaticBoxSizer(pathBox, wxVERTICAL); + pathSizer->Add(pthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); + wxStaticText *pathLabel = new wxStaticText(this, ID_EXIF_PATH, ImgPath); + pthSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); + wxString imgFolder[2]; + imgFolder[0] = wxT("Import &selected image only"); + imgFolder[1] = wxT("Import &any EXIF from selected folder"); + wxRadioBox *imgFolderSel = new wxRadioBox(this, ID_EXIF_FOLDER, + wxT("&Source selection"), + wxDefaultPosition, + wxDefaultSize, 2, + imgFolder, 2, + wxRA_SPECIFY_ROWS); + imgFolderSel->SetSelection(0); + pthSizer->Add(imgFolderSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// second row: the metadata and gps-only selection + wxBoxSizer *modeSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(modeSizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); + wxString metadata[2]; + metadata[0] = wxT("Feed full EXIF &Metadata"); + metadata[1] = wxT("&Skip EXIF Metadata"); + wxRadioBox *metadataSel = new wxRadioBox(this, ID_EXIF_METADATA, + wxT("&EXIF Metadata tables"), + wxDefaultPosition, + wxDefaultSize, 2, + metadata, 2, + wxRA_SPECIFY_ROWS); + metadataSel->SetSelection(0); + modeSizer->Add(metadataSel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxString gpsOnly[2]; + gpsOnly[0] = wxT("Import any EXIF file"); + gpsOnly[1] = wxT("Import EXIF only if containing &GPS tags"); + wxRadioBox *gpsOnlySel = new wxRadioBox(this, ID_EXIF_GPS_ONLY, + wxT("&GPS position"), + wxDefaultPosition, + wxDefaultSize, 2, + gpsOnly, 2, + wxRA_SPECIFY_ROWS); + gpsOnlySel->SetSelection(0); + modeSizer->Add(gpsOnlySel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & ExifDialog::OnOk); +// appends event handlers for radio buttons etc + Connect(ID_EXIF_FOLDER, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & ExifDialog::OnFolder); + Connect(ID_EXIF_METADATA, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & ExifDialog::OnMetadata); + Connect(ID_EXIF_GPS_ONLY, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & ExifDialog::OnGpsOnly); +} + +void ExifDialog::OnFolder(wxCommandEvent & event) +{ +// +// File/Folder radio box +// + wxRadioBox *folderSel = (wxRadioBox *) FindWindow(ID_EXIF_FOLDER); + wxStaticText *pathLabel = (wxStaticText *) FindWindow(ID_EXIF_PATH); + if (Folder == true) + { + Folder = false; + folderSel->SetSelection(0); + pathLabel->SetLabel(ImgPath); + } else + { + Folder = true; + folderSel->SetSelection(1); + pathLabel->SetLabel(DirPath); + } +} + +void ExifDialog::OnMetadata(wxCommandEvent & event) +{ +// +// Metadata radio box +// + wxRadioBox *metadataSel = (wxRadioBox *) FindWindow(ID_EXIF_METADATA); + if (Metadata == true) + { + Metadata = false; + metadataSel->SetSelection(1); + } else + { + Metadata = true; + metadataSel->SetSelection(0); + } +} + +void ExifDialog::OnGpsOnly(wxCommandEvent & event) +{ +// +// GpsOnly radio box +// + wxRadioBox *gpsOnlySel = (wxRadioBox *) FindWindow(ID_EXIF_GPS_ONLY); + if (GpsOnly == true) + { + GpsOnly = false; + gpsOnlySel->SetSelection(0); + } else + { + GpsOnly = true; + gpsOnlySel->SetSelection(1); + } +} + +void ExifDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxDialog::EndModal(wxID_OK); +} + +bool AutoSaveDialog::Create(MyFrame * parent, wxString & path, int secs) +{ +// +// creating the dialog +// + MainFrame = parent; + Path = path; + Seconds = secs; + if (wxDialog::Create(parent, wxID_ANY, wxT("MEMORY-DB AutoSave settings")) == + false) + return false; +// populates individual controls + CreateControls(); +// sets dialog sizer + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); +// centers the dialog window + Centre(); + return true; +} + +void AutoSaveDialog::CreateControls() +{ +// +// creating individual controls and setting initial values +// + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + this->SetSizer(topSizer); + wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); + topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); +// first row: export path + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); + wxStaticText *pathLabel = + new wxStaticText(this, wxID_STATIC, wxT("&Save as:")); + pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxString pth = Path; + if (pth.Len() == 0) + pth = wxT("*** not set: AutoSave IS DISABLED ***"); + PathCtrl = new wxTextCtrl(this, ID_AUTO_SAVE_PATH, pth, wxDefaultPosition, + wxSize(350, 22), wxTE_READONLY); + pathSizer->Add(PathCtrl, 0, wxALIGN_RIGHT | wxALL, 5); +// second row: CHANGE PATH button + wxBoxSizer *changeBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(changeBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *change = + new wxButton(this, ID_AUTO_SAVE_CHANGE_PATH, wxT("&Set the export path")); + changeBox->Add(change, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// third row: INTERVAL + wxBoxSizer *modeSizer = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(modeSizer, 0, wxALIGN_LEFT | wxALL, 0); + wxString modes[6]; + modes[0] = wxT("&Disable AutoSaving"); + modes[1] = wxT("Every &30 seconds"); + modes[2] = wxT("Every &minute"); + modes[3] = wxT("Every &2 minutes"); + modes[4] = wxT("Every &5 minutes"); + modes[5] = wxT("Every &10 minutes"); + IntervalCtrl = new wxRadioBox(this, ID_AUTO_SAVE_INTERVAL, + wxT("&AutoSave interval"), + wxDefaultPosition, wxDefaultSize, 6, modes, 6, + wxRA_SPECIFY_ROWS); + if (Seconds <= 0) + IntervalCtrl->SetSelection(0); + else if (Seconds <= 30) + IntervalCtrl->SetSelection(1); + else if (Seconds <= 60) + IntervalCtrl->SetSelection(2); + else if (Seconds <= 120) + IntervalCtrl->SetSelection(3); + else if (Seconds <= 300) + IntervalCtrl->SetSelection(4); + else + IntervalCtrl->SetSelection(5); + modeSizer->Add(IntervalCtrl, 0, wxALIGN_RIGHT | wxALL, 5); + +// OK - CANCEL buttons + wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); + boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); + wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); + okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); +// appends event handler for OK button + Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & AutoSaveDialog::OnOk); + Connect(ID_AUTO_SAVE_CHANGE_PATH, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & AutoSaveDialog::OnChangePath); + Connect(ID_AUTO_SAVE_INTERVAL, wxEVT_COMMAND_RADIOBOX_SELECTED, + (wxObjectEventFunction) & AutoSaveDialog::OnIntervalChanged); +} + +void AutoSaveDialog::OnChangePath(wxCommandEvent & WXUNUSED(event)) +{ +// +// exporting the MEMORY-DB into an external DB +// + int retdlg; + wxString lastDir; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Saving the MEMORY-DB"), + wxT(""), wxT("db.sqlite"), + wxT + ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + retdlg = fileDialog->ShowModal(); + if (retdlg == wxID_OK) + { + // exporting the external DB + wxString pth = fileDialog->GetPath(); + wxString extPth = wxT("*** not set: AutoSave IS DISABLED ***"); + MainFrame->SetExternalSqlitePath(pth); + if (MainFrame->MemoryDbSave() == true) + { + wxMessageBox(wxT("Ok, MEMORY-DB was succesfully saved"), + wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + MainFrame->SetLastDirectory(lastDir); + extPth = MainFrame->GetExternalSqlitePath(); + PathCtrl->SetValue(extPth); + } else + PathCtrl->SetValue(extPth); + } +} + +void AutoSaveDialog::OnIntervalChanged(wxCommandEvent & event) +{ +// +// Interval selection changed +// + if (IntervalCtrl->GetSelection() == 0) + Seconds = 0; + else if (IntervalCtrl->GetSelection() == 1) + Seconds = 30; + else if (IntervalCtrl->GetSelection() == 2) + Seconds = 60; + else if (IntervalCtrl->GetSelection() == 3) + Seconds = 120; + else if (IntervalCtrl->GetSelection() == 4) + Seconds = 300; + else + Seconds = 600; +} + +void AutoSaveDialog::OnOk(wxCommandEvent & event) +{ +// +// all done: +// + wxDialog::EndModal(wxID_OK); } ADDED Exif.cpp Index: Exif.cpp ================================================================== --- Exif.cpp +++ Exif.cpp @@ -0,0 +1,1322 @@ +/* +/ Exif.cpp +/ methods related to EXIF import +/ +/ version 1.2, 2008 October 9 +/ +/ Author: Sandro Furieri a-furieri@lqt.it +/ +/ Copyright (C) 2008 Alessandro Furieri +/ +/ This program is free software: you can redistribute it and/or modify +/ it under the terms of the GNU General Public License as published by +/ the Free Software Foundation, either version 3 of the License, or +/ (at your option) any later version. +/ +/ This program is distributed in the hope that it will be useful, +/ but WITHOUT ANY WARRANTY; without even the implied warranty of +/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +/ GNU General Public License for more details. +/ +/ You should have received a copy of the GNU General Public License +/ along with this program. If not, see . +/ +*/ + +#include "Classdef.h" + +#include +#include +#include + +void MyFrame::ImportExifPhotos(wxString & path, bool folder, bool metadata, + bool gps_only) +{ +// +// trying to import EXIF photos +// + int cnt; + char msg[256]; + ::wxBeginBusyCursor(); + if (CheckExifTables() == false) + { + ::wxEndBusyCursor(); + wxMessageBox(wxT + ("An EXIF table is already defined, but has incompatibles columns"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; + } + if (folder == true) + cnt = ExifLoadDir(path, gps_only, metadata); + else + cnt = ExifLoadFile(path, gps_only, metadata); + ::wxEndBusyCursor(); + sprintf(msg, "%d EXIF photo%s succesfully inserted into the DB\n", cnt, + (cnt > 1) ? "s where" : " was"); + wxMessageBox(wxString::FromUTF8(msg), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + InitTableTree(); +} + +bool MyFrame::CheckExifTables() +{ +// +// creates the EXIF DB tables / or checks existing ones for validity +// + int ret; + wxString sql; + char xsql[1024]; + char *errMsg; + bool ok_photoId; + bool ok_photo; + bool ok_pixelX; + bool ok_pixelY; + bool ok_cameraMake; + bool ok_cameraModel; + bool ok_shotDateTime; + bool ok_gpsGeometry; + bool ok_gpsDirection; + bool ok_gpsSatellites; + bool ok_gpsTimestamp; + bool ok_fromPath; + bool ok_tagId; + bool ok_tagName; + bool ok_gpsTag; + bool ok_valueType; + bool ok_typeName; + bool ok_countValues; + bool ok_valueIndex; + bool ok_byteValue; + bool ok_stringValue; + bool ok_numValue; + bool ok_numValueBis; + bool ok_doubleValue; + bool ok_humanReadable; + bool err_pk; + bool ok_photoIdPk; + bool ok_tagIdPk; + bool ok_valueIndexPk; + bool pKey; + const char *name; + int i; + char **results; + int rows; + int columns; +// creating the ExifPhoto table + sql = wxT("CREATE TABLE IF NOT EXISTS ExifPhoto (\n"); + sql += wxT("PhotoId INTEGER PRIMARY KEY AUTOINCREMENT,\n"); + sql += wxT("Photo BLOB NOT NULL,\n"); + sql += wxT("PixelX INTEGER,\n"); + sql += wxT("PixelY INTEGER,\n"); + sql += wxT("CameraMake TEXT,\n"); + sql += wxT("CameraModel TEXT,\n"); + sql += wxT("ShotDateTime DOUBLE,\n"); + sql += wxT("GpsGeometry BLOB,\n"); + sql += wxT("GpsDirection DOUBLE, "); + sql += wxT("GpsSatellites TEXT,\n"); + sql += wxT("GpsTimestamp DOUBLE,\n"); + sql += wxT("FromPath TEXT"); + sql += wxT(")"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CREATE TABLE ExifPhoto error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// checking the ExifPhoto table for sanity + ok_photoId = false; + ok_photo = false; + ok_pixelX = false; + ok_pixelY = false; + ok_cameraMake = false; + ok_cameraModel = false; + ok_shotDateTime = false; + ok_gpsGeometry = false; + ok_gpsDirection = false; + ok_gpsSatellites = false; + ok_gpsTimestamp = false; + ok_fromPath = false; + ok_photoIdPk = false; + err_pk = false; + strcpy(xsql, "PRAGMA table_info(ExifPhoto)"); + ret = + sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("PRAGMA table_info(ExifPhoto) error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 1]; + if (atoi(results[(i * columns) + 5]) == 0) + pKey = false; + else + pKey = true; + if (strcasecmp(name, "PhotoId") == 0) + ok_photoId = true; + if (strcasecmp(name, "Photo") == 0) + ok_photo = true; + if (strcasecmp(name, "PixelX") == 0) + ok_pixelX = true; + if (strcasecmp(name, "PixelY") == 0) + ok_pixelY = true; + if (strcasecmp(name, "CameraMake") == 0) + ok_cameraMake = true; + if (strcasecmp(name, "CameraModel") == 0) + ok_cameraModel = true; + if (strcasecmp(name, "ShotDateTime") == 0) + ok_shotDateTime = true; + if (strcasecmp(name, "GpsGeometry") == 0) + ok_gpsGeometry = true; + if (strcasecmp(name, "GpsDirection") == 0) + ok_gpsDirection = true; + if (strcasecmp(name, "GpsTimestamp") == 0) + ok_gpsTimestamp = true; + if (strcasecmp(name, "FromPath") == 0) + ok_fromPath = true; + if (pKey == true) + { + if (strcasecmp(name, "PhotoId") == 0) + ok_photoIdPk = true; + else + err_pk = true; + } + } + } + sqlite3_free_table(results); + if (ok_photoId == true && ok_photo == true && ok_pixelX == true + && ok_pixelY == true && ok_cameraMake == true && ok_cameraModel == true + && ok_shotDateTime == true && ok_gpsGeometry == true + && ok_gpsDirection == true && ok_gpsTimestamp == true + && ok_fromPath == true && ok_photoIdPk == true && err_pk == false) + ; + else + { + wxMessageBox(wxT + ("ERROR: table ExifPhoto already exists, but has incompatible columns"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// creating the ExifTags table + sql = wxT("CREATE TABLE IF NOT EXISTS ExifTags (\n"); + sql += wxT("PhotoId INTEGER NOT NULL,\n"); + sql += wxT("TagId INTEGER NOT NULL,\n"); + sql += wxT("TagName TEXT NOT NULL,\n"); + sql += wxT("GpsTag INTEGER NOT NULL CHECK (GpsTag IN (0, 1)),\n"); + sql += + wxT + ("ValueType INTEGER NOT NULL CHECK (ValueType IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)),\n"); + sql += wxT("TypeName TEXT NOT NULL,\n"); + sql += wxT("CountValues INTEGER NOT NULL,\n"); + sql += wxT("PRIMARY KEY (PhotoId, TagId)"); + sql += wxT(")"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CREATE TABLE ExifTags error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// checking the ExifTags table for sanity + ok_photoId = false; + ok_tagId = false; + ok_tagName = false; + ok_gpsTag = false; + ok_valueType = false; + ok_typeName = false; + ok_countValues = false; + ok_photoIdPk = false; + ok_tagIdPk = false; + err_pk = false; + strcpy(xsql, "PRAGMA table_info(ExifTags)"); + ret = + sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("PRAGMA table_info(ExifTags) error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 1]; + if (atoi(results[(i * columns) + 5]) == 0) + pKey = false; + else + pKey = true; + if (strcasecmp(name, "PhotoId") == 0) + ok_photoId = true; + if (strcasecmp(name, "TagId") == 0) + ok_tagId = true; + if (strcasecmp(name, "TagName") == 0) + ok_tagName = true; + if (strcasecmp(name, "GpsTag") == 0) + ok_gpsTag = true; + if (strcasecmp(name, "ValueType") == 0) + ok_valueType = true; + if (strcasecmp(name, "TypeName") == 0) + ok_typeName = true; + if (strcasecmp(name, "CountValues") == 0) + ok_countValues = true; + if (pKey == true) + { + if (strcasecmp(name, "PhotoId") == 0) + ok_photoIdPk = true; + else if (strcasecmp(name, "TagId") == 0) + ok_tagIdPk = true; + else + err_pk = true; + } + } + } + sqlite3_free_table(results); + if (ok_photoId == true && ok_tagId == true && ok_tagName == true + && ok_gpsTag == true && ok_valueType == true && ok_typeName == true + && ok_countValues == true && ok_photoIdPk == true && ok_tagIdPk == true + && err_pk == false) + ; + else + { + wxMessageBox(wxT + ("ERROR: table ExifTags already exists, but has incompatible columns"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// creating the ExifValues table + sql = wxT("CREATE TABLE IF NOT EXISTS ExifValues (\n"); + sql += wxT("PhotoId INTEGER NOT NULL,\n"); + sql += wxT("TagId INTEGER NOT NULL,\n"); + sql += wxT("ValueIndex INTEGER NOT NULL,\n"); + sql += wxT("ByteValue BLOB,\n"); + sql += wxT("StringValue TEXT,\n"); + sql += wxT("NumValue INTEGER,\n"); + sql += wxT("NumValueBis INTEGER,\n"); + sql += wxT("DoubleValue DOUBLE,\n"); + sql += wxT("HumanReadable TEXT,\n"); + sql += wxT("PRIMARY KEY (PhotoId, TagId, ValueIndex)"); + sql += wxT(")"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CREATE TABLE ExifValues error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// checking the ExifValues table for sanity + ok_photoId = false; + ok_tagId = false; + ok_valueIndex = false; + ok_byteValue = false; + ok_stringValue = false; + ok_numValue = false; + ok_numValueBis = false; + ok_doubleValue = false; + ok_humanReadable = false; + ok_photoIdPk = false; + ok_tagIdPk = false; + ok_valueIndexPk = false; + err_pk = false; + strcpy(xsql, "PRAGMA table_info(ExifValues)"); + ret = + sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("PRAGMA table_info(ExifValues) error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 1]; + if (atoi(results[(i * columns) + 5]) == 0) + pKey = false; + else + pKey = true; + if (strcasecmp(name, "PhotoId") == 0) + ok_photoId = true; + if (strcasecmp(name, "TagId") == 0) + ok_tagId = true; + if (strcasecmp(name, "ValueIndex") == 0) + ok_valueIndex = true; + if (strcasecmp(name, "ByteValue") == 0) + ok_byteValue = true; + if (strcasecmp(name, "StringValue") == 0) + ok_stringValue = true; + if (strcasecmp(name, "NumValue") == 0) + ok_numValue = true; + if (strcasecmp(name, "NumValueBis") == 0) + ok_numValueBis = true; + if (strcasecmp(name, "DoubleValue") == 0) + ok_doubleValue = true; + if (strcasecmp(name, "HumanReadable") == 0) + ok_humanReadable = true; + if (pKey == true) + { + if (strcasecmp(name, "PhotoId") == 0) + ok_photoIdPk = true; + else if (strcasecmp(name, "TagId") == 0) + ok_tagIdPk = true; + else if (strcasecmp(name, "ValueIndex") == 0) + ok_valueIndexPk = true; + else + err_pk = true; + } + } + } + sqlite3_free_table(results); + if (ok_photoId == true && ok_tagId == true && ok_valueIndex == true + && ok_byteValue == true && ok_stringValue == true && ok_numValue == true + && ok_numValueBis == true && ok_doubleValue == true + && ok_humanReadable == true && ok_photoIdPk == true && ok_tagIdPk == true + && ok_valueIndexPk == true && err_pk == false) + ; + else + { + wxMessageBox(wxT + ("ERROR: table ExifValues already exists, but has incompatible columns"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// creating the ExifView view + sql = wxT("CREATE VIEW IF NOT EXISTS ExifMetadata AS\n"); + sql += wxT("SELECT p.PhotoId AS PhotoId, "); + sql += wxT("t.TagId AS TagId, "); + sql += wxT("t.TagName AS TagName,"); + sql += wxT("t.GpsTag AS GpsTag,\n"); + sql += wxT("t.ValueType AS ValueType,"); + sql += wxT("t.TypeName AS TypeName, "); + sql += wxT("t.CountValues AS CountValues, "); + sql += wxT("v.ValueIndex AS ValueIndex,\n"); + sql += wxT("v.ByteValue AS ByteValue, "); + sql += wxT("v.StringValue AS StringValue, "); + sql += wxT("v.NumValue AS NumValue, "); + sql += wxT("v.NumValueBis AS NumValueBis,\n"); + sql += wxT("v.DoubleValue AS DoubleValue, "); + sql += wxT("v.HumanReadable AS HumanReadable\n"); + sql += wxT("FROM ExifPhoto AS p, ExifTags AS t, ExifValues AS v\n"); + sql += + wxT + ("WHERE t.PhotoId = p.PhotoId AND v.PhotoId = t.PhotoId AND v.TagId = t.TagId"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CREATE VIEW ExifMetadata error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + return true; +abort: + return false; +} + +int MyFrame::ExifLoadDir(wxString & path, bool gps_only, bool metadata) +{ +// +// importing EXIF files from a whole DIRECTORY +// + int cnt = 0; + wxString filePath; + struct dirent *entry; + DIR *dir = opendir(path.ToUTF8()); + if (!dir) + return 0; + while (1) + { + // scanning dir-entries + entry = readdir(dir); + if (!entry) + break; + filePath = path; + filePath += wxT("/") + wxString::FromUTF8(entry->d_name); + cnt += ExifLoadFile(filePath, gps_only, metadata); + } + closedir(dir); + return cnt; +} + +int MyFrame::ExifLoadFile(wxString & path, bool gps_only, bool metadata) +{ +// +// importing a single EXIF file +// + FILE *fl; + int sz = 0; + int rd; + int loaded = 0; + unsigned char *blob = NULL; + gaiaExifTagListPtr tag_list = NULL; + fl = fopen(path.ToUTF8(), "rb"); + if (!fl) + return 0; + if (fseek(fl, 0, SEEK_END) == 0) + sz = ftell(fl); + if (sz > 14) + { + blob = (unsigned char *) malloc(sz); + rewind(fl); + rd = fread(blob, 1, sz, fl); + if (rd == sz) + { + tag_list = gaiaGetExifTags(blob, sz); + if (tag_list) + { + if (gps_only && IsExifGps(tag_list) == false) + goto stop; + if (UpdateExifTables(blob, sz, tag_list, metadata, path) == false) + goto stop; + loaded = 1; + } + } + } +stop: + if (blob) + free(blob); + if (tag_list) + gaiaExifTagsFree(tag_list); + fclose(fl); + return loaded; +} + +bool MyFrame::IsExifGps(gaiaExifTagListPtr tag_list) +{ +// +// checks if this one is a GPS-tagged EXIF +// + bool gps_lat = false; + bool gps_long = false; + gaiaExifTagPtr pT = tag_list->First; + while (pT) + { + if (pT->Gps && pT->TagId == 0x04) + gps_long = true; + if (pT->Gps && pT->TagId == 0x02) + gps_lat = true; + if (gps_long == true && gps_lat == true) + return true; + pT = pT->Next; + } + return false; +} + +bool MyFrame::UpdateExifTables(unsigned char *blob, int sz, + gaiaExifTagListPtr tag_list, bool metadata, + wxString & path) +{ +// +// inserting an EXIF photo into the DB +// + int i; + int iv; + bool ok; + int xok; + int ok_human; + char tag_name[128]; + gaiaExifTagPtr pT; + int ret; + char sql[1024]; + char human[1024]; + wxString make; + wxString model; + wxString satellites; + wxString date; + wxString timestamp; + char *errMsg = NULL; + sqlite3_stmt *stmt; + sqlite3_int64 pk = 0; + sqlite3_int64 val64; + double dblval; + const char *type_desc; + double longitude; + double latitude; + gaiaGeomCollPtr geom; + unsigned char *geoblob; + int geosize; +// starts a transaction + strcpy(sql, "BEGIN"); + ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// feeding the ExifPhoto table; preparing the SQL statement + strcpy(sql, + "INSERT INTO ExifPhoto (PhotoId, Photo, PixelX, PixelY, CameraMake, CameraModel, "); + strcat(sql, + "ShotDateTime, GpsGeometry, GpsDirection, GpsSatellites, GpsTimestamp, FromPath) "); + strcat(sql, + "VALUES (NULL, ?, ?, ?, ?, ?, JulianDay(?), ?, ?, ?, JulianDay(?), ?)"); + ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("INSERT INTO ExifPhoto error: ") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + goto abort; + } + sqlite3_bind_blob(stmt, 1, blob, sz, SQLITE_STATIC); + val64 = GetPixelX(tag_list, &ok); + if (ok == true) + sqlite3_bind_int64(stmt, 2, val64); + else + sqlite3_bind_null(stmt, 2); + val64 = GetPixelY(tag_list, &ok); + if (ok == true) + sqlite3_bind_int64(stmt, 3, val64); + else + sqlite3_bind_null(stmt, 3); + GetMake(tag_list, make, &ok); + if (ok == true) + sqlite3_bind_text(stmt, 4, make.ToUTF8(), make.Len(), SQLITE_TRANSIENT); + else + sqlite3_bind_null(stmt, 4); + GetModel(tag_list, model, &ok); + if (ok == true) + sqlite3_bind_text(stmt, 5, model.ToUTF8(), model.Len(), SQLITE_TRANSIENT); + else + sqlite3_bind_null(stmt, 5); + GetDate(tag_list, date, &ok); + if (ok == true) + sqlite3_bind_text(stmt, 6, date.ToUTF8(), date.Len(), SQLITE_TRANSIENT); + else + sqlite3_bind_text(stmt, 6, "0000-00-00 00:00:00", 19, SQLITE_TRANSIENT); + GetGpsCoords(tag_list, &longitude, &latitude, &ok); + if (ok == true) + { + geom = gaiaAllocGeomColl(); + geom->Srid = 4326; + gaiaAddPointToGeomColl(geom, longitude, latitude); + gaiaToSpatiaLiteBlobWkb(geom, &geoblob, &geosize); + gaiaFreeGeomColl(geom); + sqlite3_bind_blob(stmt, 7, geoblob, geosize, SQLITE_TRANSIENT); + free(geoblob); + } else + sqlite3_bind_null(stmt, 7); + dblval = GetGpsDirection(tag_list, &ok); + if (ok == true) + sqlite3_bind_double(stmt, 8, dblval); + else + sqlite3_bind_null(stmt, 8); + GetGpsSatellites(tag_list, satellites, &ok); + if (ok == true) + sqlite3_bind_text(stmt, 9, satellites.ToUTF8(), satellites.Len(), + SQLITE_TRANSIENT); + else + sqlite3_bind_null(stmt, 9); + GetGpsTimestamp(tag_list, timestamp, &ok); + if (ok == true) + sqlite3_bind_text(stmt, 10, timestamp.ToUTF8(), timestamp.Len(), + SQLITE_TRANSIENT); + else + sqlite3_bind_text(stmt, 10, "0000-00-00 00:00:00", 19, SQLITE_TRANSIENT); + sqlite3_bind_text(stmt, 11, path.ToUTF8(), path.Len(), SQLITE_TRANSIENT); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxMessageBox(wxT("sqlite3_step() error: ") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto abort; + } + sqlite3_finalize(stmt); + pk = sqlite3_last_insert_rowid(SqliteHandle); + if (metadata) + { + // feeding the ExifTags table; preparing the SQL statement + strcpy(sql, + "INSERT OR IGNORE INTO ExifTags (PhotoId, TagId, TagName, GpsTag, ValueType, "); + strcat(sql, "TypeName, CountValues) VALUES (?, ?, ?, ?, ?, ?, ?)"); + ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("INSERT INTO ExifTags error: ") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + goto abort; + } + for (i = 0; i < gaiaGetExifTagsCount(tag_list); i++) + { + pT = gaiaGetExifTagByPos(tag_list, i); + if (pT) + { + gaiaExifTagGetName(pT, tag_name, 128); + switch (gaiaExifTagGetValueType(pT)) + { + case 1: + type_desc = "BYTE"; + break; + case 2: + type_desc = "STRING"; + break; + case 3: + type_desc = "SHORT"; + break; + case 4: + type_desc = "LONG"; + break; + case 5: + type_desc = "RATIONAL"; + break; + case 6: + type_desc = "SBYTE"; + break; + case 7: + type_desc = "UNDEFINED"; + break; + case 8: + type_desc = "SSHORT"; + break; + case 9: + type_desc = "SLONG"; + break; + case 10: + type_desc = "SRATIONAL"; + break; + case 11: + type_desc = "FLOAT"; + break; + case 12: + type_desc = "DOUBLE"; + break; + default: + type_desc = "UNKNOWN"; + break; + }; + // INSERTing an Exif Tag + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int64(stmt, 1, pk); + sqlite3_bind_int(stmt, 2, gaiaExifTagGetId(pT)); + sqlite3_bind_text(stmt, 3, tag_name, strlen(tag_name), + SQLITE_STATIC); + sqlite3_bind_int(stmt, 4, gaiaIsExifGpsTag(pT)); + sqlite3_bind_int(stmt, 5, gaiaExifTagGetValueType(pT)); + sqlite3_bind_text(stmt, 6, type_desc, strlen(type_desc), + SQLITE_STATIC); + sqlite3_bind_int(stmt, 7, gaiaExifTagGetNumValues(pT)); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxMessageBox(wxT("sqlite3_step() error: ") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, + this); + sqlite3_finalize(stmt); + goto abort; + } + } + } + sqlite3_finalize(stmt); + // feeding the ExifValues table; preparing the SQL statement + strcpy(sql, + "INSERT OR IGNORE INTO ExifValues (PhotoId, TagId, ValueIndex, ByteValue, "); + strcat(sql, + "StringValue, NumValue, NumValueBis, DoubleValue, HumanReadable) VALUES "); + strcat(sql, "(?, ?, ?, ?, ?, ?, ?, ?, ?)"); + ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("NSERT INTO ExifValues error: ") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + goto abort; + } + for (i = 0; i < gaiaGetExifTagsCount(tag_list); i++) + { + pT = gaiaGetExifTagByPos(tag_list, i); + if (pT) + { + gaiaExifTagGetHumanReadable(pT, human, 1024, &ok_human); + for (iv = 0; iv < gaiaExifTagGetNumValues(pT); iv++) + { + // INSERTing an Exif Tag + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int64(stmt, 1, pk); + sqlite3_bind_int(stmt, 2, gaiaExifTagGetId(pT)); + sqlite3_bind_int(stmt, 3, iv); + if (gaiaExifTagGetValueType(pT) == 1 + || gaiaExifTagGetValueType(pT) == 6 + || gaiaExifTagGetValueType(pT) == 7) + { + sqlite3_bind_blob(stmt, 4, pT->ByteValue, pT->Count, + SQLITE_STATIC); + sqlite3_bind_null(stmt, 5); + sqlite3_bind_null(stmt, 6); + sqlite3_bind_null(stmt, 7); + sqlite3_bind_null(stmt, 8); + } + if (gaiaExifTagGetValueType(pT) == 2) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_text(stmt, 5, pT->StringValue, + strlen(pT->StringValue), SQLITE_STATIC); + sqlite3_bind_null(stmt, 6); + sqlite3_bind_null(stmt, 7); + sqlite3_bind_null(stmt, 8); + } + if (gaiaExifTagGetValueType(pT) == 3) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + val64 = gaiaExifTagGetShortValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 6); + else + sqlite3_bind_int64(stmt, 6, val64); + sqlite3_bind_null(stmt, 7); + sqlite3_bind_null(stmt, 8); + } + if (gaiaExifTagGetValueType(pT) == 4) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + val64 = gaiaExifTagGetLongValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 6); + else + sqlite3_bind_int64(stmt, 6, val64); + sqlite3_bind_null(stmt, 7); + sqlite3_bind_null(stmt, 8); + } + if (gaiaExifTagGetValueType(pT) == 5) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + val64 = gaiaExifTagGetRational1Value(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 6); + else + sqlite3_bind_int64(stmt, 6, val64); + val64 = gaiaExifTagGetRational2Value(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 7); + else + sqlite3_bind_int64(stmt, 7, val64); + dblval = gaiaExifTagGetRationalValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 8); + else + sqlite3_bind_double(stmt, 8, dblval); + } + if (gaiaExifTagGetValueType(pT) == 9) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + val64 = gaiaExifTagGetSignedLongValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 6); + else + sqlite3_bind_int64(stmt, 6, val64); + sqlite3_bind_null(stmt, 7); + sqlite3_bind_null(stmt, 8); + } + if (gaiaExifTagGetValueType(pT) == 10) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + val64 = gaiaExifTagGetSignedRational1Value(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 6); + else + sqlite3_bind_int64(stmt, 6, val64); + val64 = gaiaExifTagGetSignedRational2Value(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 7); + else + sqlite3_bind_int64(stmt, 7, val64); + dblval = gaiaExifTagGetSignedRationalValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 8); + else + sqlite3_bind_double(stmt, 8, dblval); + } + if (gaiaExifTagGetValueType(pT) == 11) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + sqlite3_bind_null(stmt, 6); + sqlite3_bind_null(stmt, 7); + dblval = gaiaExifTagGetFloatValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 8); + else + sqlite3_bind_double(stmt, 8, dblval); + } + if (gaiaExifTagGetValueType(pT) == 12) + { + sqlite3_bind_null(stmt, 4); + sqlite3_bind_null(stmt, 5); + sqlite3_bind_null(stmt, 6); + sqlite3_bind_null(stmt, 7); + dblval = gaiaExifTagGetDoubleValue(pT, iv, &xok); + if (!ok) + sqlite3_bind_null(stmt, 8); + else + sqlite3_bind_double(stmt, 8, dblval); + } + if (!ok_human) + sqlite3_bind_null(stmt, 9); + else + sqlite3_bind_text(stmt, 9, human, strlen(human), + SQLITE_STATIC); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxMessageBox(wxT("sqlite3_step() error: ") + + wxString:: + FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, + this); + sqlite3_finalize(stmt); + goto abort; + } + if (gaiaExifTagGetValueType(pT) == 1 + || gaiaExifTagGetValueType(pT) == 2 + || gaiaExifTagGetValueType(pT) == 6 + || gaiaExifTagGetValueType(pT) == 7) + break; + ok_human = 0; + } + } + } + sqlite3_finalize(stmt); + } +// commits the transaction + strcpy(sql, "COMMIT"); + ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + } + return true; +abort: +// rolling back the transaction + strcpy(sql, "ROLLBACK"); + ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("ROLLBACK error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + } + return false; +} + +sqlite3_int64 MyFrame::GetPixelX(gaiaExifTagListPtr tag_list, bool * ok) +{ +// +// trying to retrieve the ExifImageWidth +// + *ok = false; + if (!tag_list) + return 0; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->TagId == 0xA002) + { + // ok, this one is the ExifImageWidth tag + if (tag->Type == 3 && tag->Count == 1) + { + *ok = true; + return *(tag->ShortValues + 0); + } else if (tag->Type == 4 && tag->Count == 1) + { + *ok = true; + return *(tag->LongValues + 0); + } + } + tag = tag->Next; + } + return false; +} + +sqlite3_int64 MyFrame::GetPixelY(gaiaExifTagListPtr tag_list, bool * ok) +{ +// +// trying to retrieve the ExifImageLength +// + *ok = false; + if (!tag_list) + return 0; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->TagId == 0xA003) + { + // ok, this one is the ExifImageLength tag + if (tag->Type == 3 && tag->Count == 1) + { + *ok = true; + return *(tag->ShortValues + 0); + } else if (tag->Type == 4 && tag->Count == 1) + { + *ok = true; + return *(tag->LongValues + 0); + } + } + tag = tag->Next; + } + return false; +} + +void MyFrame::GetMake(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) +{ +// +// trying to retrieve the Make +// + *ok = false; + if (!tag_list) + return; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->TagId == 0x010F) + { + // ok, this one is the Make tag + if (tag->Type == 2) + { + *ok = true; + str = wxString::FromUTF8(tag->StringValue); + return; + } + } + tag = tag->Next; + } + return; +} + +void MyFrame::GetModel(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) +{ +// +// trying to retrieve the Model +// + *ok = false; + if (!tag_list) + return; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->TagId == 0x0110) + { + // ok, this one is the Model tag + if (tag->Type == 2) + { + *ok = true; + str = wxString::FromUTF8(tag->StringValue); + return; + } + } + tag = tag->Next; + } + return; +} + +void MyFrame::GetDate(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) +{ +// +// trying to retrieve the Date +// + *ok = false; + if (!tag_list) + return; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->TagId == 0x9003) + { + // ok, this one is the DateTimeOriginal tag + if (tag->Type == 2) + { + *ok = true; + str = wxString::FromUTF8(tag->StringValue); + if (str.Len() >= 19) + { + str.SetChar(4, '-'); + str.SetChar(7, '-'); + } + return; + } + } + tag = tag->Next; + } + return; +} + +void MyFrame::GetGpsCoords(gaiaExifTagListPtr tag_list, double *longitude, + double *latitude, bool * ok) +{ +// +// trying to retrieve the GPS coordinates +// + char lat_ref = '\0'; + char long_ref = '\0'; + double lat_degs = DBL_MIN; + double lat_mins = DBL_MIN; + double lat_secs = DBL_MIN; + double long_degs = DBL_MIN; + double long_mins = DBL_MIN; + double long_secs = DBL_MIN; + double dblval; + double sign; + int xok; + *ok = false; + if (!tag_list) + return; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->Gps && tag->TagId == 0x01) + { + // ok, this one is the GPSLatitudeRef tag + if (tag->Type == 2) + lat_ref = *(tag->StringValue); + } + if (tag->Gps && tag->TagId == 0x03) + { + // ok, this one is the GPSLongitudeRef tag + if (tag->Type == 2) + long_ref = *(tag->StringValue); + } + if (tag->Gps && tag->TagId == 0x02) + { + // ok, this one is the GPSLatitude tag + if (tag->Type == 5 && tag->Count == 3) + { + dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); + if (xok) + lat_degs = dblval; + dblval = gaiaExifTagGetRationalValue(tag, 1, &xok); + if (xok) + lat_mins = dblval; + dblval = gaiaExifTagGetRationalValue(tag, 2, &xok); + if (xok) + lat_secs = dblval; + } + } + if (tag->Gps && tag->TagId == 0x04) + { + // ok, this one is the GPSLongitude tag + if (tag->Type == 5 && tag->Count == 3) + { + dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); + if (xok) + long_degs = dblval; + dblval = gaiaExifTagGetRationalValue(tag, 1, &xok); + if (xok) + long_mins = dblval; + dblval = gaiaExifTagGetRationalValue(tag, 2, &xok); + if (xok) + long_secs = dblval; + } + } + tag = tag->Next; + } + if ((lat_ref == 'N' || lat_ref == 'S' || long_ref == 'E' || long_ref == 'W') + && lat_degs != DBL_MIN && lat_mins != DBL_MIN && lat_secs != DBL_MIN + && long_degs != DBL_MIN && long_mins != DBL_MIN && long_secs != DBL_MIN) + { + *ok = true; + if (lat_ref == 'S') + sign = -1.0; + else + sign = 1.0; + lat_degs = math_round(lat_degs * 1000000.0); + lat_mins = math_round(lat_mins * 1000000.0); + lat_secs = math_round(lat_secs * 1000000.0); + dblval = + math_round(lat_degs + (lat_mins / 60.0) + + (lat_secs / 3600.0)) * (sign / 1000000.0); + *latitude = dblval; + if (long_ref == 'W') + sign = -1.0; + else + sign = 1.0; + long_degs = math_round(long_degs * 1000000.0); + long_mins = math_round(long_mins * 1000000.0); + long_secs = math_round(long_secs * 1000000.0); + dblval = + math_round(long_degs + (long_mins / 60.0) + + (long_secs / 3600.0)) * (sign / 1000000.0); + *longitude = dblval; + } + return; +} + +void MyFrame::GetGpsSatellites(gaiaExifTagListPtr tag_list, wxString & str, + bool * ok) +{ +// +// trying to retrieve the GPSSatellites +// + *ok = false; + if (!tag_list) + return; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->Gps && tag->TagId == 0x08) + { + // ok, this one is the GPSSatellites tag + if (tag->Type == 2) + { + *ok = true; + str = wxString::FromUTF8(tag->StringValue); + return; + } + } + tag = tag->Next; + } + return; +} + +double MyFrame::GetGpsDirection(gaiaExifTagListPtr tag_list, bool * ok) +{ +// +// trying to retrieve the GPS direction +// + char dir_ref = '\0'; + double direction = DBL_MIN; + double dblval; + int xok; + *ok = false; + if (!tag_list) + return direction; + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->Gps && tag->TagId == 0x10) + { + // ok, this one is the GPSDirectionRef tag + if (tag->Type == 2) + dir_ref = *(tag->StringValue); + } + if (tag->Gps && tag->TagId == 0x11) + { + // ok, this one is the GPSDirection tag + if (tag->Type == 5 && tag->Count == 1) + { + dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); + if (xok) + direction = dblval; + } + } + tag = tag->Next; + } + if ((dir_ref == 'T' || dir_ref == 'M') && direction != DBL_MIN) + *ok = true; + return direction; +} + +void MyFrame::GetGpsTimestamp(gaiaExifTagListPtr tag_list, wxString & str, + bool * ok) +{ +// +// trying to retrieve the GPS Timestamp +// + char date[16]; + char timestamp[32]; + double hours = DBL_MIN; + double mins = DBL_MIN; + double secs = DBL_MIN; + double dblval; + int xok; + int hh; + int mm; + int ss; + int millis; + *ok = false; + if (!tag_list) + return; + strcpy(date, "0000-00-00"); + gaiaExifTagPtr tag = tag_list->First; + while (tag) + { + if (tag->Gps && tag->TagId == 0x1D) + { + // ok, this one is the GPSDateStamp tag + if (tag->Type == 2) + { + strcpy(date, tag->StringValue); + date[4] = '-'; + date[7] = '-'; + } + } + if (tag->Gps && tag->TagId == 0x07) + { + // ok, this one is the GPSTimeStamp tag + if (tag->Type == 5 && tag->Count == 3) + { + dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); + if (xok) + hours = dblval; + dblval = gaiaExifTagGetRationalValue(tag, 1, &xok); + if (xok) + mins = dblval; + dblval = gaiaExifTagGetRationalValue(tag, 2, &xok); + if (xok) + secs = dblval; + } + } + tag = tag->Next; + } + if (hours != DBL_MIN && mins != DBL_MIN && secs != DBL_MIN) + { + *ok = true; + hh = (int) floor(hours); + mm = (int) floor(mins); + ss = (int) floor(secs); + millis = (int) ((secs - ss) * 1000); + sprintf(timestamp, "%s %02d:%02d:%02d.%03d", date, hh, mm, ss, millis); + str = wxString::FromUTF8(timestamp); + } + return; +} Index: Main.cpp ================================================================== --- Main.cpp +++ Main.cpp @@ -1,10 +1,10 @@ /* / Main.cpp / the main core of spatialite-gui - a SQLite /SpatiaLite GUI tool / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -26,3151 +26,4502 @@ #include "Classdef.h" #include "wx/menu.h" #include "wx/aboutdlg.h" #include "wx/filename.h" +#include "wx/config.h" #include #include #include // // ICONs in XPM format [universally portable] // #include "icons/icon.xpm" +#include "icons/icon_info.xpm" #include "icons/create_new.xpm" #include "icons/connect.xpm" #include "icons/disconnect.xpm" +#include "icons/memdb_load.xpm" +#include "icons/memdb_new.xpm" +#include "icons/memdb_clock.xpm" +#include "icons/memdb_save.xpm" #include "icons/vacuum.xpm" #include "icons/sql_script.xpm" #include "icons/loadshp.xpm" #include "icons/virtshp.xpm" #include "icons/loadtxt.xpm" #include "icons/virttxt.xpm" +#include "icons/network.xpm" +#include "icons/exif.xpm" #include "icons/srids.xpm" #include "icons/charset.xpm" #include "icons/help.xpm" #include "icons/about.xpm" #include "icons/exit.xpm" -IMPLEMENT_APP (MyApp) - bool MyApp::OnInit () +IMPLEMENT_APP(MyApp) + bool MyApp::OnInit() { // // main APP implementation // - wxString path; - if (argc > 1) - path = argv[1]; - MyFrame *frame = - new - MyFrame (wxT ("spatialite-gui [a GUI tool for SQLite/SpatiaLite]"), - wxPoint (0, 0), wxSize (640, 480), path); - frame->Show (true); - SetTopWindow (frame); - return true; + wxString path; + if (argc > 1) + path = argv[1]; + MyFrame *frame = + new MyFrame(wxT("spatialite-gui [a GUI tool for SQLite/SpatiaLite]"), + wxPoint(0, 0), wxSize(640, 480), path); + frame->Show(true); + SetTopWindow(frame); + frame->LoadConfig(); + return true; } -MyFrame::MyFrame (const wxString & title, const wxPoint & pos, const wxSize & size, wxString & path): -wxFrame ((wxFrame *) NULL, -1, title, pos, - size) +MyFrame::MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size, wxString & path): +wxFrame((wxFrame *) NULL, -1, title, pos, size) { // // main GUI frame constructor // - -// -// setting up the BLOB signatures -// - Jpeg1Signature[0] = 0xff; - Jpeg1Signature[1] = 0xd8; - Jpeg2Signature[0] = 0xff; - Jpeg2Signature[1] = 0xd9; - Jpeg3Signature[0] = 0xff; - Jpeg3Signature[1] = 0xd8; - Jpeg3Signature[2] = 0xff; - Jpeg3Signature[3] = 0xe0; - JfifSignature[0] = 0x4a; - JfifSignature[1] = 0x46; - JfifSignature[2] = 0x49; - JfifSignature[3] = 0x46; - ExifSignature[0] = 0x45; - ExifSignature[1] = 0x78; - ExifSignature[2] = 0x69; - ExifSignature[3] = 0x66; - PngSignature[0] = 0x89; - PngSignature[1] = 0x50; - PngSignature[2] = 0x4e; - PngSignature[3] = 0x47; - PngSignature[4] = 0x0d; - PngSignature[5] = 0x0a; - PngSignature[6] = 0x1a; - PngSignature[7] = 0x0a; - ZipSignature[0] = 0x50; - ZipSignature[1] = 0x4b; - ZipSignature[2] = 0x03; - ZipSignature[3] = 0x04; - + MemoryDatabase = false; + AutoSaveInterval = 0; + LastTotalChanges = 0; + TimerAutoSave = NULL; // // initializing CHARSET lists // - CharsetsLen = 79; - Charsets = new wxString[CharsetsLen]; - CharsetsNames = new wxString[CharsetsLen]; - *(CharsetsNames + 0) = wxT ("ARMSCII-8 Armenian"); - *(CharsetsNames + 1) = wxT ("ASCII US-ASCII"); - *(CharsetsNames + 2) = wxT ("BIG5 Chinese/Traditional"); - *(CharsetsNames + 3) = wxT ("BIG5-HKSCS Chinese/Hong Kong"); - *(CharsetsNames + 4) = wxT ("BIG5-HKSCS:1999"); - *(CharsetsNames + 5) = wxT ("BIG5-HKSCS:2001"); - *(CharsetsNames + 6) = wxT ("CP850 DOS/OEM Western Europe"); - *(CharsetsNames + 7) = wxT ("CP862 DOS/OEM Hebrew"); - *(CharsetsNames + 8) = wxT ("CP866 DOS/OEM Cyrillic"); - *(CharsetsNames + 9) = wxT ("CP874 DOS/OEM Thai"); - *(CharsetsNames + 10) = wxT ("CP932 DOS/OEM Japanese"); - *(CharsetsNames + 11) = wxT ("CP936 DOS/OEM Chinese"); - *(CharsetsNames + 12) = wxT ("CP949 DOS/OEM Korean"); - *(CharsetsNames + 13) = wxT ("CP950 DOS/OEM Chinese/Big5"); - *(CharsetsNames + 14) = wxT ("CP1133 Laotian"); - *(CharsetsNames + 15) = wxT ("CP1250 Windows Central Europe"); - *(CharsetsNames + 16) = wxT ("CP1251 Windows Cyrillic"); - *(CharsetsNames + 17) = wxT ("CP1252 Windows Latin 1"); - *(CharsetsNames + 18) = wxT ("CP1253 Windows Greek"); - *(CharsetsNames + 19) = wxT ("CP1254 Windows Turkish"); - *(CharsetsNames + 20) = wxT ("CP1255 Windows Hebrew"); - *(CharsetsNames + 21) = wxT ("CP1256 Windows Arabic"); - *(CharsetsNames + 22) = wxT ("CP1257 Windows Baltic"); - *(CharsetsNames + 23) = wxT ("CP1258 Windows Vietnamese"); - *(CharsetsNames + 24) = wxT ("EUC-CN Chinese"); - *(CharsetsNames + 25) = wxT ("EUC-JP Japanese"); - *(CharsetsNames + 26) = wxT ("EUC-KR Korean"); - *(CharsetsNames + 27) = wxT ("EUC-TW Taiwan"); - *(CharsetsNames + 28) = wxT ("GB18030 Chinese/National Standard"); - *(CharsetsNames + 29) = wxT ("GBK Chinese/Simplified"); - *(CharsetsNames + 30) = wxT ("Georgian-Academy"); - *(CharsetsNames + 31) = wxT ("Georgian-PS"); - *(CharsetsNames + 32) = wxT ("HZ Chinese"); - *(CharsetsNames + 33) = wxT ("ISO-2022-CN Chinese"); - *(CharsetsNames + 34) = wxT ("ISO-2022-CN-EXT"); - *(CharsetsNames + 35) = wxT ("ISO-2022-JP Japanese"); - *(CharsetsNames + 36) = wxT ("ISO-2022-JP-1"); - *(CharsetsNames + 37) = wxT ("ISO-2022-JP-2"); - *(CharsetsNames + 38) = wxT ("ISO-2022-KR Korean"); - *(CharsetsNames + 39) = wxT ("ISO-8859-1 Latin-1 Western European"); - *(CharsetsNames + 40) = wxT ("ISO-8859-2 Latin-2 Central European"); - *(CharsetsNames + 41) = wxT ("ISO-8859-3 Latin-3 South European"); - *(CharsetsNames + 42) = wxT ("ISO-8859-4 Latin-4 North European"); - *(CharsetsNames + 43) = wxT ("ISO-8859-5 Latin/Cyrillic"); - *(CharsetsNames + 44) = wxT ("ISO-8859-6 Latin/Arabic"); - *(CharsetsNames + 45) = wxT ("ISO-8859-7 Latin/Greek"); - *(CharsetsNames + 46) = wxT ("ISO-8859-8 Latin/Hebrew"); - *(CharsetsNames + 47) = wxT ("ISO-8859-9 Latin-5 Turkish"); - *(CharsetsNames + 48) = wxT ("ISO-8859-10 Latin-6 Nordic"); - *(CharsetsNames + 49) = wxT ("ISO-8859-11 Latin/Thai"); - *(CharsetsNames + 50) = wxT ("ISO-8859-13 Latin-7 Baltic Rim"); - *(CharsetsNames + 51) = wxT ("ISO-8859-14 Latin-8 Celtic"); - *(CharsetsNames + 52) = wxT ("ISO-8859-15 Latin-9"); - *(CharsetsNames + 53) = - wxT ("ISO-8859-16 Latin-10 South-Eastern European"); - *(CharsetsNames + 54) = wxT ("JOHAB Korean"); - *(CharsetsNames + 55) = wxT ("KOI8-R Russian"); - *(CharsetsNames + 56) = wxT ("KOI8-U Ukrainian"); - *(CharsetsNames + 57) = wxT ("KOI8-RU Belarusian"); - *(CharsetsNames + 58) = wxT ("KOI8-T Tajik"); - *(CharsetsNames + 59) = wxT ("MacArabic MAC Arabic"); - *(CharsetsNames + 60) = wxT ("MacCentralEurope"); - *(CharsetsNames + 61) = wxT ("MacCroatian MAC Croatian"); - *(CharsetsNames + 62) = wxT ("MacCyrillic MAC Cyrillic"); - *(CharsetsNames + 63) = wxT ("MacGreek MAC Greek"); - *(CharsetsNames + 64) = wxT ("MacHebrew MAC Hebrew"); - *(CharsetsNames + 65) = wxT ("MacIceland MAC Iceland"); - *(CharsetsNames + 66) = wxT ("Macintosh"); - *(CharsetsNames + 67) = wxT ("MacRoman MAC European/Western languages"); - *(CharsetsNames + 68) = wxT ("MacRomania MAC Romania"); - *(CharsetsNames + 69) = wxT ("MacThai MAC Thai"); - *(CharsetsNames + 70) = wxT ("MacTurkish MAC Turkish"); - *(CharsetsNames + 71) = wxT ("MacUkraine MAC Ukraine"); - *(CharsetsNames + 72) = wxT ("MuleLao-1 Laotian"); - *(CharsetsNames + 73) = wxT ("PT154 Kazakh"); - *(CharsetsNames + 74) = wxT ("RK1048 Kazakh"); - *(CharsetsNames + 75) = wxT ("SHIFT_JIS Japanese"); - *(CharsetsNames + 76) = wxT ("TCVN Vietnamese"); - *(CharsetsNames + 77) = wxT ("TIS-620 Thai"); - *(CharsetsNames + 77) = wxT ("UTF-8 UNICODE/Universal"); - *(CharsetsNames + 78) = wxT ("VISCII Vietnamese"); - *(Charsets + 0) = wxT ("ARMSCII-8"); - *(Charsets + 1) = wxT ("ASCII"); - *(Charsets + 2) = wxT ("BIG5"); - *(Charsets + 3) = wxT ("BIG5-HKSCS"); - *(Charsets + 4) = wxT ("BIG5-HKSCS:1999"); - *(Charsets + 5) = wxT ("BIG5-HKSCS:2001"); - *(Charsets + 6) = wxT ("CP850"); - *(Charsets + 7) = wxT ("CP862"); - *(Charsets + 8) = wxT ("CP866"); - *(Charsets + 9) = wxT ("CP874"); - *(Charsets + 10) = wxT ("CP932"); - *(Charsets + 11) = wxT ("CP936"); - *(Charsets + 12) = wxT ("CP949"); - *(Charsets + 13) = wxT ("CP950"); - *(Charsets + 14) = wxT ("CP1133"); - *(Charsets + 15) = wxT ("CP1250"); - *(Charsets + 16) = wxT ("CP1251"); - *(Charsets + 17) = wxT ("CP1252"); - *(Charsets + 18) = wxT ("CP1253"); - *(Charsets + 19) = wxT ("CP1254"); - *(Charsets + 20) = wxT ("CP1255"); - *(Charsets + 21) = wxT ("CP1256"); - *(Charsets + 22) = wxT ("CP1257"); - *(Charsets + 23) = wxT ("CP1258"); - *(Charsets + 24) = wxT ("EUC-CN"); - *(Charsets + 25) = wxT ("EUC-JP"); - *(Charsets + 26) = wxT ("EUC-KR"); - *(Charsets + 27) = wxT ("EUC-TW"); - *(Charsets + 28) = wxT ("GB18030"); - *(Charsets + 29) = wxT ("GBK"); - *(Charsets + 30) = wxT ("Georgian-Academy"); - *(Charsets + 31) = wxT ("Georgian-PS"); - *(Charsets + 32) = wxT ("HZ"); - *(Charsets + 33) = wxT ("ISO-2022-CN"); - *(Charsets + 34) = wxT ("ISO-2022-CN-EXT"); - *(Charsets + 35) = wxT ("ISO-2022-JP"); - *(Charsets + 36) = wxT ("ISO-2022-JP-1"); - *(Charsets + 37) = wxT ("ISO-2022-JP-2"); - *(Charsets + 38) = wxT ("ISO-2022-KR"); - *(Charsets + 39) = wxT ("ISO-8859-1"); - *(Charsets + 40) = wxT ("ISO-8859-2"); - *(Charsets + 41) = wxT ("ISO-8859-3"); - *(Charsets + 42) = wxT ("ISO-8859-4"); - *(Charsets + 43) = wxT ("ISO-8859-5"); - *(Charsets + 44) = wxT ("ISO-8859-6"); - *(Charsets + 45) = wxT ("ISO-8859-7"); - *(Charsets + 46) = wxT ("ISO-8859-8"); - *(Charsets + 47) = wxT ("ISO-8859-9"); - *(Charsets + 48) = wxT ("ISO-8859-10"); - *(Charsets + 49) = wxT ("ISO-8859-11"); - *(Charsets + 50) = wxT ("ISO-8859-13"); - *(Charsets + 51) = wxT ("ISO-8859-14"); - *(Charsets + 52) = wxT ("ISO-8859-15"); - *(Charsets + 53) = wxT ("ISO-8859-16"); - *(Charsets + 54) = wxT ("JOHAB"); - *(Charsets + 55) = wxT ("KOI8-R"); - *(Charsets + 56) = wxT ("KOI8-U"); - *(Charsets + 57) = wxT ("KOI8-RU"); - *(Charsets + 58) = wxT ("KOI8-T"); - *(Charsets + 59) = wxT ("MacArabic"); - *(Charsets + 60) = wxT ("MacCentralEurope"); - *(Charsets + 61) = wxT ("MacCroatian"); - *(Charsets + 62) = wxT ("MacCyrillic"); - *(Charsets + 63) = wxT ("MacGreek"); - *(Charsets + 64) = wxT ("MacHebrew"); - *(Charsets + 65) = wxT ("MacIceland"); - *(Charsets + 66) = wxT ("Macintosh"); - *(Charsets + 67) = wxT ("MacRoman"); - *(Charsets + 68) = wxT ("MacRomania"); - *(Charsets + 69) = wxT ("MacThai"); - *(Charsets + 70) = wxT ("MacTurkish"); - *(Charsets + 71) = wxT ("MacUkraine"); - *(Charsets + 72) = wxT ("MuleLao-1"); - *(Charsets + 73) = wxT ("PT154"); - *(Charsets + 74) = wxT ("RK1048"); - *(Charsets + 75) = wxT ("SHIFT_JIS"); - *(Charsets + 76) = wxT ("TCVN"); - *(Charsets + 77) = wxT ("TIS-620"); - *(Charsets + 77) = wxT ("UTF-8"); - *(Charsets + 78) = wxT ("VISCII"); - LocaleCharset = wxString::FromUTF8 (gaiaGetLocaleCharset ()); - DefaultCharset = LocaleCharset; - AskCharset = false; - - spatialite_init (0); // loading the SpatiaLite extension - - HelpPane = false; - SqliteHandle = NULL; - SqlitePath = wxT (""); - BtnConnect = new wxBitmap (connect_xpm); - BtnCreateNew = new wxBitmap (create_new_xpm); - BtnDisconnect = new wxBitmap (disconnect_xpm); - BtnVacuum = new wxBitmap (vacuum_xpm); - BtnSqlScript = new wxBitmap (sql_script_xpm); - BtnLoadShp = new wxBitmap (loadshp_xpm); - BtnVirtualShp = new wxBitmap (virtshp_xpm); - BtnLoadTxt = new wxBitmap (loadtxt_xpm); - BtnVirtualTxt = new wxBitmap (virttxt_xpm); - BtnSrids = new wxBitmap (srids_xpm); - BtnCharset = new wxBitmap (charset_xpm); - BtnHelp = new wxBitmap (help_xpm); - BtnAbout = new wxBitmap (about_xpm); - BtnExit = new wxBitmap (exit_xpm); + CharsetsLen = 79; + Charsets = new wxString[CharsetsLen]; + CharsetsNames = new wxString[CharsetsLen]; + *(CharsetsNames + 0) = wxT("ARMSCII-8 Armenian"); + *(CharsetsNames + 1) = wxT("ASCII US-ASCII"); + *(CharsetsNames + 2) = wxT("BIG5 Chinese/Traditional"); + *(CharsetsNames + 3) = wxT("BIG5-HKSCS Chinese/Hong Kong"); + *(CharsetsNames + 4) = wxT("BIG5-HKSCS:1999"); + *(CharsetsNames + 5) = wxT("BIG5-HKSCS:2001"); + *(CharsetsNames + 6) = wxT("CP850 DOS/OEM Western Europe"); + *(CharsetsNames + 7) = wxT("CP862 DOS/OEM Hebrew"); + *(CharsetsNames + 8) = wxT("CP866 DOS/OEM Cyrillic"); + *(CharsetsNames + 9) = wxT("CP874 DOS/OEM Thai"); + *(CharsetsNames + 10) = wxT("CP932 DOS/OEM Japanese"); + *(CharsetsNames + 11) = wxT("CP936 DOS/OEM Chinese"); + *(CharsetsNames + 12) = wxT("CP949 DOS/OEM Korean"); + *(CharsetsNames + 13) = wxT("CP950 DOS/OEM Chinese/Big5"); + *(CharsetsNames + 14) = wxT("CP1133 Laotian"); + *(CharsetsNames + 15) = wxT("CP1250 Windows Central Europe"); + *(CharsetsNames + 16) = wxT("CP1251 Windows Cyrillic"); + *(CharsetsNames + 17) = wxT("CP1252 Windows Latin 1"); + *(CharsetsNames + 18) = wxT("CP1253 Windows Greek"); + *(CharsetsNames + 19) = wxT("CP1254 Windows Turkish"); + *(CharsetsNames + 20) = wxT("CP1255 Windows Hebrew"); + *(CharsetsNames + 21) = wxT("CP1256 Windows Arabic"); + *(CharsetsNames + 22) = wxT("CP1257 Windows Baltic"); + *(CharsetsNames + 23) = wxT("CP1258 Windows Vietnamese"); + *(CharsetsNames + 24) = wxT("EUC-CN Chinese"); + *(CharsetsNames + 25) = wxT("EUC-JP Japanese"); + *(CharsetsNames + 26) = wxT("EUC-KR Korean"); + *(CharsetsNames + 27) = wxT("EUC-TW Taiwan"); + *(CharsetsNames + 28) = wxT("GB18030 Chinese/National Standard"); + *(CharsetsNames + 29) = wxT("GBK Chinese/Simplified"); + *(CharsetsNames + 30) = wxT("Georgian-Academy"); + *(CharsetsNames + 31) = wxT("Georgian-PS"); + *(CharsetsNames + 32) = wxT("HZ Chinese"); + *(CharsetsNames + 33) = wxT("ISO-2022-CN Chinese"); + *(CharsetsNames + 34) = wxT("ISO-2022-CN-EXT"); + *(CharsetsNames + 35) = wxT("ISO-2022-JP Japanese"); + *(CharsetsNames + 36) = wxT("ISO-2022-JP-1"); + *(CharsetsNames + 37) = wxT("ISO-2022-JP-2"); + *(CharsetsNames + 38) = wxT("ISO-2022-KR Korean"); + *(CharsetsNames + 39) = wxT("ISO-8859-1 Latin-1 Western European"); + *(CharsetsNames + 40) = wxT("ISO-8859-2 Latin-2 Central European"); + *(CharsetsNames + 41) = wxT("ISO-8859-3 Latin-3 South European"); + *(CharsetsNames + 42) = wxT("ISO-8859-4 Latin-4 North European"); + *(CharsetsNames + 43) = wxT("ISO-8859-5 Latin/Cyrillic"); + *(CharsetsNames + 44) = wxT("ISO-8859-6 Latin/Arabic"); + *(CharsetsNames + 45) = wxT("ISO-8859-7 Latin/Greek"); + *(CharsetsNames + 46) = wxT("ISO-8859-8 Latin/Hebrew"); + *(CharsetsNames + 47) = wxT("ISO-8859-9 Latin-5 Turkish"); + *(CharsetsNames + 48) = wxT("ISO-8859-10 Latin-6 Nordic"); + *(CharsetsNames + 49) = wxT("ISO-8859-11 Latin/Thai"); + *(CharsetsNames + 50) = wxT("ISO-8859-13 Latin-7 Baltic Rim"); + *(CharsetsNames + 51) = wxT("ISO-8859-14 Latin-8 Celtic"); + *(CharsetsNames + 52) = wxT("ISO-8859-15 Latin-9"); + *(CharsetsNames + 53) = wxT("ISO-8859-16 Latin-10 South-Eastern European"); + *(CharsetsNames + 54) = wxT("JOHAB Korean"); + *(CharsetsNames + 55) = wxT("KOI8-R Russian"); + *(CharsetsNames + 56) = wxT("KOI8-U Ukrainian"); + *(CharsetsNames + 57) = wxT("KOI8-RU Belarusian"); + *(CharsetsNames + 58) = wxT("KOI8-T Tajik"); + *(CharsetsNames + 59) = wxT("MacArabic MAC Arabic"); + *(CharsetsNames + 60) = wxT("MacCentralEurope"); + *(CharsetsNames + 61) = wxT("MacCroatian MAC Croatian"); + *(CharsetsNames + 62) = wxT("MacCyrillic MAC Cyrillic"); + *(CharsetsNames + 63) = wxT("MacGreek MAC Greek"); + *(CharsetsNames + 64) = wxT("MacHebrew MAC Hebrew"); + *(CharsetsNames + 65) = wxT("MacIceland MAC Iceland"); + *(CharsetsNames + 66) = wxT("Macintosh"); + *(CharsetsNames + 67) = wxT("MacRoman MAC European/Western languages"); + *(CharsetsNames + 68) = wxT("MacRomania MAC Romania"); + *(CharsetsNames + 69) = wxT("MacThai MAC Thai"); + *(CharsetsNames + 70) = wxT("MacTurkish MAC Turkish"); + *(CharsetsNames + 71) = wxT("MacUkraine MAC Ukraine"); + *(CharsetsNames + 72) = wxT("MuleLao-1 Laotian"); + *(CharsetsNames + 73) = wxT("PT154 Kazakh"); + *(CharsetsNames + 74) = wxT("RK1048 Kazakh"); + *(CharsetsNames + 75) = wxT("SHIFT_JIS Japanese"); + *(CharsetsNames + 76) = wxT("TCVN Vietnamese"); + *(CharsetsNames + 77) = wxT("TIS-620 Thai"); + *(CharsetsNames + 77) = wxT("UTF-8 UNICODE/Universal"); + *(CharsetsNames + 78) = wxT("VISCII Vietnamese"); + *(Charsets + 0) = wxT("ARMSCII-8"); + *(Charsets + 1) = wxT("ASCII"); + *(Charsets + 2) = wxT("BIG5"); + *(Charsets + 3) = wxT("BIG5-HKSCS"); + *(Charsets + 4) = wxT("BIG5-HKSCS:1999"); + *(Charsets + 5) = wxT("BIG5-HKSCS:2001"); + *(Charsets + 6) = wxT("CP850"); + *(Charsets + 7) = wxT("CP862"); + *(Charsets + 8) = wxT("CP866"); + *(Charsets + 9) = wxT("CP874"); + *(Charsets + 10) = wxT("CP932"); + *(Charsets + 11) = wxT("CP936"); + *(Charsets + 12) = wxT("CP949"); + *(Charsets + 13) = wxT("CP950"); + *(Charsets + 14) = wxT("CP1133"); + *(Charsets + 15) = wxT("CP1250"); + *(Charsets + 16) = wxT("CP1251"); + *(Charsets + 17) = wxT("CP1252"); + *(Charsets + 18) = wxT("CP1253"); + *(Charsets + 19) = wxT("CP1254"); + *(Charsets + 20) = wxT("CP1255"); + *(Charsets + 21) = wxT("CP1256"); + *(Charsets + 22) = wxT("CP1257"); + *(Charsets + 23) = wxT("CP1258"); + *(Charsets + 24) = wxT("EUC-CN"); + *(Charsets + 25) = wxT("EUC-JP"); + *(Charsets + 26) = wxT("EUC-KR"); + *(Charsets + 27) = wxT("EUC-TW"); + *(Charsets + 28) = wxT("GB18030"); + *(Charsets + 29) = wxT("GBK"); + *(Charsets + 30) = wxT("Georgian-Academy"); + *(Charsets + 31) = wxT("Georgian-PS"); + *(Charsets + 32) = wxT("HZ"); + *(Charsets + 33) = wxT("ISO-2022-CN"); + *(Charsets + 34) = wxT("ISO-2022-CN-EXT"); + *(Charsets + 35) = wxT("ISO-2022-JP"); + *(Charsets + 36) = wxT("ISO-2022-JP-1"); + *(Charsets + 37) = wxT("ISO-2022-JP-2"); + *(Charsets + 38) = wxT("ISO-2022-KR"); + *(Charsets + 39) = wxT("ISO-8859-1"); + *(Charsets + 40) = wxT("ISO-8859-2"); + *(Charsets + 41) = wxT("ISO-8859-3"); + *(Charsets + 42) = wxT("ISO-8859-4"); + *(Charsets + 43) = wxT("ISO-8859-5"); + *(Charsets + 44) = wxT("ISO-8859-6"); + *(Charsets + 45) = wxT("ISO-8859-7"); + *(Charsets + 46) = wxT("ISO-8859-8"); + *(Charsets + 47) = wxT("ISO-8859-9"); + *(Charsets + 48) = wxT("ISO-8859-10"); + *(Charsets + 49) = wxT("ISO-8859-11"); + *(Charsets + 50) = wxT("ISO-8859-13"); + *(Charsets + 51) = wxT("ISO-8859-14"); + *(Charsets + 52) = wxT("ISO-8859-15"); + *(Charsets + 53) = wxT("ISO-8859-16"); + *(Charsets + 54) = wxT("JOHAB"); + *(Charsets + 55) = wxT("KOI8-R"); + *(Charsets + 56) = wxT("KOI8-U"); + *(Charsets + 57) = wxT("KOI8-RU"); + *(Charsets + 58) = wxT("KOI8-T"); + *(Charsets + 59) = wxT("MacArabic"); + *(Charsets + 60) = wxT("MacCentralEurope"); + *(Charsets + 61) = wxT("MacCroatian"); + *(Charsets + 62) = wxT("MacCyrillic"); + *(Charsets + 63) = wxT("MacGreek"); + *(Charsets + 64) = wxT("MacHebrew"); + *(Charsets + 65) = wxT("MacIceland"); + *(Charsets + 66) = wxT("Macintosh"); + *(Charsets + 67) = wxT("MacRoman"); + *(Charsets + 68) = wxT("MacRomania"); + *(Charsets + 69) = wxT("MacThai"); + *(Charsets + 70) = wxT("MacTurkish"); + *(Charsets + 71) = wxT("MacUkraine"); + *(Charsets + 72) = wxT("MuleLao-1"); + *(Charsets + 73) = wxT("PT154"); + *(Charsets + 74) = wxT("RK1048"); + *(Charsets + 75) = wxT("SHIFT_JIS"); + *(Charsets + 76) = wxT("TCVN"); + *(Charsets + 77) = wxT("TIS-620"); + *(Charsets + 77) = wxT("UTF-8"); + *(Charsets + 78) = wxT("VISCII"); + LocaleCharset = wxString::FromUTF8(gaiaGetLocaleCharset()); + DefaultCharset = LocaleCharset; + AskCharset = false; + + spatialite_init(0); // loading the SpatiaLite extension + + HelpPane = false; + SqliteHandle = NULL; + SqlitePath = wxT(""); + BtnConnect = new wxBitmap(connect_xpm); + BtnCreateNew = new wxBitmap(create_new_xpm); + BtnDisconnect = new wxBitmap(disconnect_xpm); + BtnMemDbLoad = new wxBitmap(memdb_load_xpm); + BtnMemDbNew = new wxBitmap(memdb_new_xpm); + BtnMemDbClock = new wxBitmap(memdb_clock_xpm); + BtnMemDbSave = new wxBitmap(memdb_save_xpm); + BtnVacuum = new wxBitmap(vacuum_xpm); + BtnSqlScript = new wxBitmap(sql_script_xpm); + BtnLoadShp = new wxBitmap(loadshp_xpm); + BtnVirtualShp = new wxBitmap(virtshp_xpm); + BtnLoadTxt = new wxBitmap(loadtxt_xpm); + BtnVirtualTxt = new wxBitmap(virttxt_xpm); + BtnNetwork = new wxBitmap(network_xpm); + BtnExif = new wxBitmap(exif_xpm); + BtnSrids = new wxBitmap(srids_xpm); + BtnCharset = new wxBitmap(charset_xpm); + BtnHelp = new wxBitmap(help_xpm); + BtnAbout = new wxBitmap(about_xpm); + BtnExit = new wxBitmap(exit_xpm); // // setting up the application icon // - wxIcon MyIcon (icon_xpm); - SetIcon (MyIcon); + wxIcon MyIcon(icon_xpm); + SetIcon(MyIcon); // // setting up panes // - TableTree = new MyTableTree (this); - QueryView = new MyQueryView (this); - Manager.SetManagedWindow (this); - wxAuiPaneInfo paneView = wxAuiPaneInfo ().CenterPane (); - paneView.Caption (wxT ("SQL Query")); - paneView.Floatable (false); - paneView.CloseButton (false); - Manager.AddPane (QueryView, paneView); - wxAuiPaneInfo paneTree = wxAuiPaneInfo ().Left (); - paneTree.Caption (wxT ("DB Tables")); - paneTree.Floatable (false); - paneTree.CloseButton (false); - paneTree.BestSize (wxSize (200, 480)); - Manager.AddPane (TableTree, paneTree); - Manager.Update (); - Centre (); + TableTree = new MyTableTree(this); + QueryView = new MyQueryView(this); + RsView = new MyResultSetView(this); + Manager.SetManagedWindow(this); + wxAuiPaneInfo paneSql = wxAuiPaneInfo().Top(); + paneSql.Name(wxT("sql_stmt")); + paneSql.CaptionVisible(false); + paneSql.Floatable(true); + paneSql.Dockable(true); + paneSql.Movable(true); + paneSql.Gripper(true); + paneSql.CloseButton(false); + paneSql.BestSize(wxSize(200, 120)); + Manager.AddPane(QueryView, paneSql); + wxAuiPaneInfo paneView = wxAuiPaneInfo().Centre(); + paneView.Name(wxT("result_set")); + paneView.CaptionVisible(false); + paneView.Floatable(true); + paneView.Dockable(true); + paneView.Movable(true); + paneView.Gripper(false); + paneView.CloseButton(false); + Manager.AddPane(RsView, paneView); + wxAuiPaneInfo paneTree = wxAuiPaneInfo().Left(); + paneTree.Name(wxT("tree_view")); + paneTree.CaptionVisible(false); + paneTree.Floatable(true); + paneTree.Dockable(true); + paneTree.Movable(true); + paneTree.Gripper(true); + paneTree.CloseButton(false); + paneTree.BestSize(wxSize(200, 480)); + Manager.AddPane(TableTree, paneTree, wxPoint(0, 10)); + Manager.Update(); + Centre(); // // setting up the status bar // - wxStatusBar *statusBar = new wxStatusBar (this); - SetStatusBar (statusBar); + wxStatusBar *statusBar = new wxStatusBar(this); + SetStatusBar(statusBar); // // setting up the menu bar // - wxMenu *menuFile = new wxMenu; - wxMenuItem *menuItem; - menuItem = new wxMenuItem (menuFile, ID_Connect, - wxT ("&Connecting an existing SQLite DB")); - menuItem->SetBitmap (*BtnConnect); - menuFile->Append (menuItem); - menuItem = new wxMenuItem (menuFile, ID_CreateNew, - wxT ("Creating a &New (empty) SQLite DB")); - menuItem->SetBitmap (*BtnCreateNew); - menuFile->Append (menuItem); - menuItem = new wxMenuItem (menuFile, ID_Disconnect, - wxT ("&Disconnecting current SQLite DB")); - menuItem->SetBitmap (*BtnDisconnect); - menuFile->Append (menuItem); - menuItem = new wxMenuItem (menuFile, ID_Vacuum, - wxT ("&Optimizing current SQLite DB [VACUUM]")); - menuItem->SetBitmap (*BtnVacuum); - menuFile->Append (menuItem); - menuFile->AppendSeparator (); - menuItem = new wxMenuItem (menuFile, ID_SqlScript, - wxT ("&Execute SQL script")); - menuItem->SetBitmap (*BtnSqlScript); - menuFile->Append (menuItem); - menuFile->AppendSeparator (); - menuItem = new wxMenuItem (menuFile, ID_LoadShp, wxT ("&Load Shapefile")); - menuItem->SetBitmap (*BtnLoadShp); - menuFile->Append (menuItem); - menuItem = new wxMenuItem (menuFile, ID_VirtualShp, - wxT ("&Virtual Shapefile")); - menuItem->SetBitmap (*BtnVirtualShp); - menuFile->Append (menuItem); - menuFile->AppendSeparator (); - menuItem = new wxMenuItem (menuFile, ID_LoadTxt, wxT ("Load CSV/&TXT")); - menuItem->SetBitmap (*BtnLoadTxt); - menuFile->Append (menuItem); - menuItem = new wxMenuItem (menuFile, ID_VirtualTxt, - wxT ("Virtual &CSV/TXT")); - menuItem->SetBitmap (*BtnVirtualTxt); - menuFile->Append (menuItem); - menuFile->AppendSeparator (); - menuItem = new wxMenuItem (menuFile, ID_Srids, - wxT ("&Search SRID by name")); - menuItem->SetBitmap (*BtnSrids); - menuFile->Append (menuItem); - menuItem = new wxMenuItem (menuFile, ID_Charset, - wxT ("&Default Output Charset")); - menuItem->SetBitmap (*BtnCharset); - menuFile->Append (menuItem); - menuFile->AppendSeparator (); - menuItem = new wxMenuItem (menuFile, ID_Help, wxT ("&Help")); - menuItem->SetBitmap (*BtnHelp); - menuItem = new wxMenuItem (menuFile, wxID_ABOUT, wxT ("&About ...")); - menuItem->SetBitmap (*BtnAbout); - menuFile->Append (menuItem); - menuFile->AppendSeparator (); - menuItem = new wxMenuItem (menuFile, wxID_EXIT, wxT ("&Quit")); - menuItem->SetBitmap (*BtnExit); - menuFile->Append (menuItem); - wxMenuBar *menuBar = new wxMenuBar; - menuBar->Append (menuFile, wxT ("&Files")); - SetMenuBar (menuBar); + wxMenu *menuFile = new wxMenu; + wxMenuItem *menuItem; + menuItem = + new wxMenuItem(menuFile, ID_Connect, + wxT("&Connecting an existing SQLite DB")); + menuItem->SetBitmap(*BtnConnect); + menuFile->Append(menuItem); + menuItem = + new wxMenuItem(menuFile, ID_CreateNew, + wxT("Creating a &New (empty) SQLite DB")); + menuItem->SetBitmap(*BtnCreateNew); + menuFile->Append(menuItem); + wxMenu *memoryMenu = new wxMenu(); + menuItem = + new wxMenuItem(memoryMenu, ID_MemoryDbLoad, + wxT("&Loading an existing DB into the MEMORY-DB")); + menuItem->SetBitmap(*BtnMemDbLoad); + memoryMenu->Append(menuItem); + menuItem = + new wxMenuItem(memoryMenu, ID_MemoryDbNew, + wxT("Creating a &New (empty) MEMORY-DB")); + menuItem->SetBitmap(*BtnMemDbNew); + memoryMenu->Append(menuItem); + menuItem = + new wxMenuItem(memoryMenu, ID_MemoryDbClock, + wxT("&AutoSaving the current MEMORY-DB")); + menuItem->SetBitmap(*BtnMemDbClock); + memoryMenu->Append(menuItem); + menuItem = + new wxMenuItem(memoryMenu, ID_MemoryDbSave, + wxT("&Saving the current MEMORY-DB")); + menuItem->SetBitmap(*BtnMemDbSave); + memoryMenu->Append(menuItem); + menuFile->AppendSubMenu(memoryMenu, wxT("&MEMORY-DB")); + menuItem = + new wxMenuItem(menuFile, ID_Disconnect, + wxT("&Disconnecting current SQLite DB")); + menuItem->SetBitmap(*BtnDisconnect); + menuFile->Append(menuItem); + menuItem = + new wxMenuItem(menuFile, ID_Disconnect, + wxT("&Disconnecting current SQLite DB")); + menuItem->SetBitmap(*BtnDisconnect); + menuFile->Append(menuItem); + menuItem = + new wxMenuItem(menuFile, ID_Vacuum, + wxT("&Optimizing current SQLite DB [VACUUM]")); + menuItem->SetBitmap(*BtnVacuum); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_SqlScript, wxT("&Execute SQL script")); + menuItem->SetBitmap(*BtnSqlScript); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_LoadShp, wxT("&Load Shapefile")); + menuItem->SetBitmap(*BtnLoadShp); + menuFile->Append(menuItem); + menuItem = new wxMenuItem(menuFile, ID_VirtualShp, wxT("&Virtual Shapefile")); + menuItem->SetBitmap(*BtnVirtualShp); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_LoadTxt, wxT("Load CSV/&TXT")); + menuItem->SetBitmap(*BtnLoadTxt); + menuFile->Append(menuItem); + menuItem = new wxMenuItem(menuFile, ID_VirtualTxt, wxT("Virtual &CSV/TXT")); + menuItem->SetBitmap(*BtnVirtualTxt); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_Network, wxT("Build &Network")); + menuItem->SetBitmap(*BtnNetwork); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_Exif, wxT("Import &EXIF photos")); + menuItem->SetBitmap(*BtnExif); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_Srids, wxT("&Search SRID by name")); + menuItem->SetBitmap(*BtnSrids); + menuFile->Append(menuItem); + menuItem = + new wxMenuItem(menuFile, ID_Charset, wxT("&Default Output Charset")); + menuItem->SetBitmap(*BtnCharset); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, ID_Help, wxT("&Help")); + menuItem->SetBitmap(*BtnHelp); + menuItem = new wxMenuItem(menuFile, wxID_ABOUT, wxT("&About ...")); + menuItem->SetBitmap(*BtnAbout); + menuFile->Append(menuItem); + menuFile->AppendSeparator(); + menuItem = new wxMenuItem(menuFile, wxID_EXIT, wxT("&Quit")); + menuItem->SetBitmap(*BtnExit); + menuFile->Append(menuItem); + wxMenuBar *menuBar = new wxMenuBar; + menuBar->Append(menuFile, wxT("&Files")); + SetMenuBar(menuBar); // // setting up menu initial state // - menuBar->Enable (ID_Disconnect, false); - menuBar->Enable (ID_Vacuum, false); - menuBar->Enable (ID_SqlScript, false); - menuBar->Enable (ID_LoadShp, false); - menuBar->Enable (ID_VirtualShp, false); - menuBar->Enable (ID_LoadTxt, false); - menuBar->Enable (ID_VirtualTxt, false); - menuBar->Enable (ID_Srids, false); + menuBar->Enable(ID_Disconnect, false); + menuBar->Enable(ID_MemoryDbClock, false); + menuBar->Enable(ID_MemoryDbSave, false); + menuBar->Enable(ID_Vacuum, false); + menuBar->Enable(ID_SqlScript, false); + menuBar->Enable(ID_LoadShp, false); + menuBar->Enable(ID_VirtualShp, false); + menuBar->Enable(ID_LoadTxt, false); + menuBar->Enable(ID_VirtualTxt, false); + menuBar->Enable(ID_Network, false); + menuBar->Enable(ID_Exif, false); + menuBar->Enable(ID_Srids, false); // // setting up the toolbar // - wxToolBar *toolBar = CreateToolBar (); - toolBar->AddTool (ID_Connect, wxT ("Connecting an existing SQLite DB"), - *BtnConnect, wxNullBitmap, - wxITEM_NORMAL, wxT ("Connecting an existing SQLite DB")); - toolBar->AddTool (ID_CreateNew, wxT ("Creating a &New (empty) SQLite DB"), - *BtnCreateNew, wxNullBitmap, - wxITEM_NORMAL, wxT ("Creating a &New (empty) SQLite DB")); - toolBar->AddTool (ID_Disconnect, wxT ("Disconnecting current SQLite DB"), - *BtnDisconnect, wxNullBitmap, - wxITEM_NORMAL, wxT ("Disconnecting current SQLite DB")); - toolBar->AddTool (ID_Vacuum, wxT ("Optimizing current SQLite DB [VACUUM]"), - *BtnVacuum, wxNullBitmap, - wxITEM_NORMAL, - wxT ("Optimizing current SQLite DB [VACUUM]")); - toolBar->AddSeparator (); - toolBar->AddTool (ID_SqlScript, wxT ("Execute SQL script"), - *BtnSqlScript, wxNullBitmap, - wxITEM_NORMAL, wxT ("Execute SQL script")); - toolBar->AddSeparator (); - toolBar->AddTool (ID_LoadShp, wxT ("Load Shapefile"), - *BtnLoadShp, wxNullBitmap, - wxITEM_NORMAL, wxT ("Load Shapefile")); - toolBar->AddTool (ID_VirtualShp, wxT ("Virtual Shapefile"), - *BtnVirtualShp, wxNullBitmap, - wxITEM_NORMAL, wxT ("Virtual Shapefile")); - toolBar->AddSeparator (); - toolBar->AddTool (ID_LoadTxt, wxT ("Load CSV/TXT"), - *BtnLoadTxt, wxNullBitmap, - wxITEM_NORMAL, wxT ("Load CSV/TXT")); - toolBar->AddTool (ID_VirtualTxt, wxT ("Virtual CSV/TXT"), - *BtnVirtualTxt, wxNullBitmap, - wxITEM_NORMAL, wxT ("Virtual CSV/TXT")); - toolBar->AddSeparator (); - toolBar->AddTool (ID_Srids, wxT ("Search SRID by name"), - *BtnSrids, wxNullBitmap, - wxITEM_NORMAL, wxT ("Search SRID by name")); - toolBar->AddSeparator (); - toolBar->AddTool (ID_Charset, wxT ("Default Output Charset"), - *BtnCharset, wxNullBitmap, - wxITEM_NORMAL, wxT ("Default Output Charset")); - toolBar->AddSeparator (); - toolBar->AddTool (ID_Help, wxT ("Help"), *BtnHelp, wxNullBitmap, - wxITEM_NORMAL, wxT ("Help")); - toolBar->AddTool (wxID_ABOUT, wxT ("About ..."), *BtnAbout, wxNullBitmap, - wxITEM_NORMAL, wxT ("About ...")); - toolBar->AddSeparator (); - toolBar->AddTool (wxID_EXIT, wxT ("Quit"), *BtnExit, wxNullBitmap, - wxITEM_NORMAL, wxT ("Quit")); - toolBar->Realize (); - SetToolBar (toolBar); + wxToolBar *toolBar = CreateToolBar(); + toolBar->AddTool(ID_Connect, wxT("Connecting an existing SQLite DB"), + *BtnConnect, wxNullBitmap, wxITEM_NORMAL, + wxT("Connecting an existing SQLite DB")); + toolBar->AddTool(ID_CreateNew, wxT("Creating a &New (empty) SQLite DB"), + *BtnCreateNew, wxNullBitmap, wxITEM_NORMAL, + wxT("Creating a &New (empty) SQLite DB")); + toolBar->AddTool(ID_MemoryDbLoad, + wxT("Loading an existing DB into the MEMORY-DB"), + *BtnMemDbLoad, wxNullBitmap, wxITEM_NORMAL, + wxT("Loading an existing DB into the MEMORY-DB")); + toolBar->AddTool(ID_MemoryDbNew, wxT("Creating a New (empty) MEMORY-DB"), + *BtnMemDbNew, wxNullBitmap, wxITEM_NORMAL, + wxT("Creating a New (empty) MEMORY-DB")); + toolBar->AddTool(ID_MemoryDbClock, wxT("AutoSaving the current MEMORY-DB"), + *BtnMemDbClock, wxNullBitmap, wxITEM_NORMAL, + wxT("AutoSaving the current MEMORY-DB")); + toolBar->AddTool(ID_MemoryDbSave, wxT("Saving the current MEMORY-DB"), + *BtnMemDbSave, wxNullBitmap, wxITEM_NORMAL, + wxT("Saving the current MEMORY-DB")); + toolBar->AddTool(ID_Disconnect, wxT("Disconnecting current SQLite DB"), + *BtnDisconnect, wxNullBitmap, wxITEM_NORMAL, + wxT("Disconnecting current SQLite DB")); + toolBar->AddTool(ID_Vacuum, wxT("Optimizing current SQLite DB [VACUUM]"), + *BtnVacuum, wxNullBitmap, wxITEM_NORMAL, + wxT("Optimizing current SQLite DB [VACUUM]")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_SqlScript, wxT("Execute SQL script"), *BtnSqlScript, + wxNullBitmap, wxITEM_NORMAL, wxT("Execute SQL script")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_LoadShp, wxT("Load Shapefile"), *BtnLoadShp, wxNullBitmap, + wxITEM_NORMAL, wxT("Load Shapefile")); + toolBar->AddTool(ID_VirtualShp, wxT("Virtual Shapefile"), *BtnVirtualShp, + wxNullBitmap, wxITEM_NORMAL, wxT("Virtual Shapefile")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_LoadTxt, wxT("Load CSV/TXT"), *BtnLoadTxt, wxNullBitmap, + wxITEM_NORMAL, wxT("Load CSV/TXT")); + toolBar->AddTool(ID_VirtualTxt, wxT("Virtual CSV/TXT"), *BtnVirtualTxt, + wxNullBitmap, wxITEM_NORMAL, wxT("Virtual CSV/TXT")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_Network, wxT("Build Network"), *BtnNetwork, wxNullBitmap, + wxITEM_NORMAL, wxT("Build Network")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_Exif, wxT("Import EXIF photos"), *BtnExif, wxNullBitmap, + wxITEM_NORMAL, wxT("Import EXIF photos")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_Srids, wxT("Search SRID by name"), *BtnSrids, + wxNullBitmap, wxITEM_NORMAL, wxT("Search SRID by name")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_Charset, wxT("Default Output Charset"), *BtnCharset, + wxNullBitmap, wxITEM_NORMAL, wxT("Default Output Charset")); + toolBar->AddSeparator(); + toolBar->AddTool(ID_Help, wxT("Help"), *BtnHelp, wxNullBitmap, wxITEM_NORMAL, + wxT("Help")); + toolBar->AddTool(wxID_ABOUT, wxT("About ..."), *BtnAbout, wxNullBitmap, + wxITEM_NORMAL, wxT("About ...")); + toolBar->AddSeparator(); + toolBar->AddTool(wxID_EXIT, wxT("Quit"), *BtnExit, wxNullBitmap, + wxITEM_NORMAL, wxT("Quit")); + toolBar->Realize(); + SetToolBar(toolBar); // // setting up the toolbar initial state // - toolBar->EnableTool (ID_Disconnect, false); - toolBar->EnableTool (ID_Vacuum, false); - toolBar->EnableTool (ID_SqlScript, false); - toolBar->EnableTool (ID_LoadShp, false); - toolBar->EnableTool (ID_VirtualShp, false); - toolBar->EnableTool (ID_LoadTxt, false); - toolBar->EnableTool (ID_VirtualTxt, false); - toolBar->EnableTool (ID_Srids, false); + toolBar->EnableTool(ID_Disconnect, false); + toolBar->EnableTool(ID_MemoryDbClock, false); + toolBar->EnableTool(ID_MemoryDbSave, false); + toolBar->EnableTool(ID_Vacuum, false); + toolBar->EnableTool(ID_SqlScript, false); + toolBar->EnableTool(ID_LoadShp, false); + toolBar->EnableTool(ID_VirtualShp, false); + toolBar->EnableTool(ID_LoadTxt, false); + toolBar->EnableTool(ID_VirtualTxt, false); + toolBar->EnableTool(ID_Network, false); + toolBar->EnableTool(ID_Exif, false); + toolBar->EnableTool(ID_Srids, false); // updating the status bar - UpdateStatusBar (); + UpdateStatusBar(); // // setting up event handlers for menu and toolbar // - Connect (ID_Connect, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnConnect); - Connect (ID_CreateNew, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnCreateNew); - Connect (ID_Disconnect, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnDisconnect); - Connect (ID_Vacuum, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnVacuum); - Connect (ID_SqlScript, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnSqlScript); - Connect (ID_LoadShp, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnLoadShp); - Connect (ID_VirtualShp, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnVirtualShp); - Connect (ID_LoadTxt, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnLoadTxt); - Connect (ID_VirtualTxt, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnVirtualTxt); - Connect (ID_Srids, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnSrids); - Connect (ID_Charset, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnCharset); - Connect (ID_Help, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnHelp); - Connect (wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnAbout); - Connect (wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyFrame::OnQuit); - Connect (wxID_ANY, wxEVT_MOTION, - wxMouseEventHandler (MyFrame::OnMouseMove), NULL, this); + Connect(ID_Connect, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnConnect); + Connect(ID_CreateNew, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnCreateNew); + Connect(ID_Disconnect, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnDisconnect); + Connect(ID_MemoryDbLoad, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnMemoryDbLoad); + Connect(ID_MemoryDbNew, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnMemoryDbNew); + Connect(ID_MemoryDbClock, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnMemoryDbClock); + Connect(ID_MemoryDbSave, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnMemoryDbSave); + Connect(ID_Vacuum, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnVacuum); + Connect(ID_SqlScript, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnSqlScript); + Connect(ID_LoadShp, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnLoadShp); + Connect(ID_VirtualShp, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnVirtualShp); + Connect(ID_LoadTxt, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnLoadTxt); + Connect(ID_VirtualTxt, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnVirtualTxt); + Connect(ID_Network, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnNetwork); + Connect(ID_Exif, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnImportExifPhotos); + Connect(ID_Srids, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnSrids); + Connect(ID_Charset, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnCharset); + Connect(ID_Help, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnHelp); + Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnAbout); + Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyFrame::OnQuit); + Connect(wxID_ANY, wxEVT_MOTION, wxMouseEventHandler(MyFrame::OnMouseMove), + NULL, this); // // setting up event handlers for mouse // - TableTree->Connect (wxID_ANY, wxEVT_MOTION, - wxMouseEventHandler (MyFrame::OnMouseMove), NULL, this); - GetMenuBar ()->Connect (wxID_ANY, wxEVT_MOTION, - wxMouseEventHandler (MyFrame::OnMouseMove), NULL, - this); - GetStatusBar ()->Connect (wxID_ANY, wxEVT_MOTION, - wxMouseEventHandler (MyFrame::OnMouseMove), NULL, - this); + TableTree->Connect(wxID_ANY, wxEVT_MOTION, + wxMouseEventHandler(MyFrame::OnMouseMove), NULL, this); + GetMenuBar()->Connect(wxID_ANY, wxEVT_MOTION, + wxMouseEventHandler(MyFrame::OnMouseMove), NULL, this); + GetStatusBar()->Connect(wxID_ANY, wxEVT_MOTION, + wxMouseEventHandler(MyFrame::OnMouseMove), NULL, + this); +// +// setting up a Timer event handler for AutoSave +// + Connect(ID_AUTO_SAVE_TIMER, wxEVT_TIMER, + wxTimerEventHandler(MyFrame::OnTimerAutoSave), NULL, this); } -MyFrame::~MyFrame () +MyFrame::~MyFrame() { // // main GUI frame destructor // - Manager.UnInit (); - if (SqliteHandle) - sqlite3_close (SqliteHandle); - if (BtnConnect != NULL) - delete BtnConnect; - if (BtnCreateNew != NULL) - delete BtnCreateNew; - if (BtnDisconnect != NULL) - delete BtnDisconnect; - if (BtnVacuum != NULL) - delete BtnVacuum; - if (BtnSqlScript != NULL) - delete BtnSqlScript; - if (BtnLoadShp != NULL) - delete BtnLoadShp; - if (BtnVirtualShp != NULL) - delete BtnVirtualShp; - if (BtnLoadTxt != NULL) - delete BtnLoadTxt; - if (BtnVirtualTxt != NULL) - delete BtnVirtualTxt; - if (BtnSrids != NULL) - delete BtnSrids; - if (BtnHelp != NULL) - delete BtnHelp; - if (BtnAbout != NULL) - delete BtnAbout; - if (BtnExit != NULL) - delete BtnExit; - if (Charsets) - delete[]Charsets; - if (CharsetsNames) - delete[]CharsetsNames; -} - -void -MyFrame::OnQuit (wxCommandEvent & WXUNUSED (event)) + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + } + LastDitchMemoryDbSave(); + ConfigLayout = Manager.SavePerspective(); + GetPosition(&ConfigPaneX, &ConfigPaneY); + GetSize(&ConfigPaneWidth, &ConfigPaneHeight); + SaveConfig(); + Manager.UnInit(); + if (SqliteHandle) + sqlite3_close(SqliteHandle); + if (BtnConnect != NULL) + delete BtnConnect; + if (BtnCreateNew != NULL) + delete BtnCreateNew; + if (BtnDisconnect != NULL) + delete BtnDisconnect; + if (BtnMemDbLoad != NULL) + delete BtnMemDbLoad; + if (BtnMemDbNew != NULL) + delete BtnMemDbNew; + if (BtnMemDbClock != NULL) + delete BtnMemDbClock; + if (BtnMemDbSave != NULL) + delete BtnMemDbSave; + if (BtnVacuum != NULL) + delete BtnVacuum; + if (BtnSqlScript != NULL) + delete BtnSqlScript; + if (BtnLoadShp != NULL) + delete BtnLoadShp; + if (BtnVirtualShp != NULL) + delete BtnVirtualShp; + if (BtnLoadTxt != NULL) + delete BtnLoadTxt; + if (BtnVirtualTxt != NULL) + delete BtnVirtualTxt; + if (BtnNetwork != NULL) + delete BtnNetwork; + if (BtnExif != NULL) + delete BtnExif; + if (BtnSrids != NULL) + delete BtnSrids; + if (BtnHelp != NULL) + delete BtnHelp; + if (BtnAbout != NULL) + delete BtnAbout; + if (BtnExit != NULL) + delete BtnExit; + if (Charsets) + delete[]Charsets; + if (CharsetsNames) + delete[]CharsetsNames; +} + +void MyFrame::SaveConfig() +{ +// +// saves layout configuration +// + + wxConfig *config = new wxConfig(wxT("SpatialiteGui")); + config->Write(wxT("Layout"), ConfigLayout); + config->Write(wxT("PaneX"), ConfigPaneX); + config->Write(wxT("PaneY"), ConfigPaneY); + config->Write(wxT("PaneWidth"), ConfigPaneWidth); + config->Write(wxT("PaneHeight"), ConfigPaneHeight); + config->Write(wxT("SqlitePath"), SqlitePath); + config->Write(wxT("LastDirectory"), LastDirectory); + delete config; +} + +void MyFrame::LoadConfig() +{ +// +// loads layout configuration +// + ConfigLayout = wxT(""); + ConfigDbPath = wxT(""); + ConfigDir = wxT(""); + wxConfig *config = new wxConfig(wxT("SpatialiteGui")); + config->Read(wxT("Layout"), &ConfigLayout); + config->Read(wxT("PaneX"), &ConfigPaneX, -1); + config->Read(wxT("PaneY"), &ConfigPaneY, -1); + config->Read(wxT("PaneWidth"), &ConfigPaneWidth, -1); + config->Read(wxT("PaneHeight"), &ConfigPaneHeight, -1); + config->Read(wxT("SqlitePath"), &ConfigDbPath); + config->Read(wxT("LastDirectory"), &ConfigDir); + delete config; + Hide(); + if (ConfigLayout.Len() > 0) + Manager.LoadPerspective(ConfigLayout, true); + if (ConfigPaneX >= 0 && ConfigPaneY >= 0 && ConfigPaneWidth > 0 + && ConfigPaneHeight > 0) + SetSize(ConfigPaneX, ConfigPaneY, ConfigPaneWidth, ConfigPaneHeight); + if (ConfigDir.Len() > 0) + LastDirectory = ConfigDir; + if (ConfigDbPath.Len() > 0) + { + SqlitePath = ConfigDbPath; + if (OpenDB() == false) + SqlitePath = wxT(""); + else + { + bool metadata = CheckMetadata(); + wxMenuBar *menuBar = GetMenuBar(); + menuBar->Enable(ID_Connect, false); + menuBar->Enable(ID_MemoryDbLoad, false); + menuBar->Enable(ID_MemoryDbNew, false); + if (MemoryDatabase == true) + { + menuBar->Enable(ID_MemoryDbSave, true); + menuBar->Enable(ID_MemoryDbClock, true); + } else + { + menuBar->Enable(ID_MemoryDbSave, false); + menuBar->Enable(ID_MemoryDbClock, false); + } + menuBar->Enable(ID_CreateNew, false); + menuBar->Enable(ID_Disconnect, true); + menuBar->Enable(ID_Vacuum, true); + menuBar->Enable(ID_SqlScript, true); + menuBar->Enable(ID_LoadShp, true); + menuBar->Enable(ID_VirtualShp, true); + menuBar->Enable(ID_LoadTxt, true); + menuBar->Enable(ID_VirtualTxt, true); + menuBar->Enable(ID_Network, true); + menuBar->Enable(ID_Exif, true); + menuBar->Enable(ID_Srids, metadata); + wxToolBar *toolBar = GetToolBar(); + toolBar->EnableTool(ID_Connect, false); + toolBar->EnableTool(ID_MemoryDbLoad, false); + toolBar->EnableTool(ID_MemoryDbNew, false); + if (MemoryDatabase == true) + { + toolBar->EnableTool(ID_MemoryDbSave, true); + toolBar->EnableTool(ID_MemoryDbClock, true); + } else + { + toolBar->EnableTool(ID_MemoryDbSave, false); + toolBar->EnableTool(ID_MemoryDbClock, false); + } + toolBar->EnableTool(ID_CreateNew, false); + toolBar->EnableTool(ID_Disconnect, true); + toolBar->EnableTool(ID_Vacuum, true); + toolBar->EnableTool(ID_SqlScript, true); + toolBar->EnableTool(ID_LoadShp, true); + toolBar->EnableTool(ID_VirtualShp, true); + toolBar->EnableTool(ID_LoadTxt, true); + toolBar->EnableTool(ID_VirtualTxt, true); + toolBar->EnableTool(ID_Network, true); + toolBar->EnableTool(ID_Exif, true); + toolBar->EnableTool(ID_Srids, metadata); + UpdateStatusBar(); + } + } + Show(); + if (AutoFDOmsg.Len() > 0) + { + wxMessageBox(AutoFDOmsg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + AutoFDOmsg = wxT(""); + } +} + +void MyFrame::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // EXIT - event handler // - CloseDB (); - Close (TRUE); + CloseDB(); + Close(true); } -void -MyFrame::OnHelp (wxCommandEvent & WXUNUSED (event)) +void MyFrame::OnHelp(wxCommandEvent & WXUNUSED(event)) { // // HELP - event handler // - if (HelpPane == true) - return; - HelpDialog *help = new HelpDialog (this); - help->Show (); + if (HelpPane == true) + return; + HelpDialog *help = new HelpDialog(this); + help->Show(); } -void -MyFrame::OnAbout (wxCommandEvent & WXUNUSED (event)) +void MyFrame::OnAbout(wxCommandEvent & WXUNUSED(event)) { // // ABOUT dialog - event handler // - char ver[128]; - wxAboutDialogInfo dlg; - dlg.SetName (wxT ("spatialite-gui")); - dlg.SetVersion (wxT ("v1.1")); - wxString str = wxT ("a GUI-tool for SQLite / SpatiaLite\n\n"); - strcpy (ver, spatialite_version ()); - str += wxT ("SpatiaLite version ") + wxString::FromUTF8 (ver) + wxT ("\n"); - strcpy (ver, sqlite3_libversion ()); - str += wxT ("SQLite version ") + wxString::FromUTF8 (ver) + wxT ("\n"); - strcpy (ver, GEOSversion ()); - str += wxT ("GEOS version ") + wxString::FromUTF8 (ver) + wxT ("\n"); - strcpy (ver, pj_get_release ()); - str += wxT ("PROJ.4 version ") + wxString::FromUTF8 (ver) + wxT ("\n\n"); - str += wxT ("SQLite's extension 'SpatiaLite' enabled\n"); - str += wxT ("SQLite's extension 'VirtualShape' enabled\n"); - str += wxT ("SQLite's extension 'VirtualText' enabled\n"); - str += wxT ("SQLite's extension 'RTree' enabled\n"); - str += wxT ("SQLite's extension 'MbrCache' enabled\n\n"); - dlg.SetDescription (str); - dlg.SetCopyright (wxT ("by Alessandro Furieri - 2008")); - dlg.SetWebSite (wxT ("http://www.gaia-gis.it")); - wxString license = - wxT ("This program is free software; you can redistribute it\n"); - license += - wxT - ("and/or modify it under the terms of the GNU General Public License\n"); - license += wxT ("(GPL) as published by the Free Software Foundation\n\n"); - license += - wxT - ("A copy of the GPL can be found at\nhttp://www.gnu.org/licenses/gpl.txt"); - dlg.SetLicense (license); - ::wxAboutBox (dlg); -} - -void -MyFrame::OnMouseMove (wxMouseEvent & event) + char ver[128]; + wxAboutDialogInfo dlg; + dlg.SetIcon(wxIcon(icon_info_xpm)); + dlg.SetName(wxT("spatialite-gui")); + dlg.SetVersion(wxT("v1.2")); + wxString str = wxT("a GUI-tool for SQLite / SpatiaLite\n\n"); + sprintf(ver, "%d.%d.%d", wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER); + str += wxT("wxWidgets version ") + wxString::FromUTF8(ver) + wxT("\n"); + strcpy(ver, spatialite_version()); + str += wxT("SpatiaLite version ") + wxString::FromUTF8(ver) + wxT("\n"); + strcpy(ver, sqlite3_libversion()); + str += wxT("SQLite version ") + wxString::FromUTF8(ver) + wxT("\n"); + strcpy(ver, GEOSversion()); + str += wxT("GEOS version ") + wxString::FromUTF8(ver) + wxT("\n"); + strcpy(ver, pj_get_release()); + str += wxT("PROJ.4 version ") + wxString::FromUTF8(ver) + wxT("\n\n"); + str += wxT("SQLite's extension 'SpatiaLite' enabled\n"); + str += wxT("SQLite's extension 'VirtualShape' enabled\n"); + str += wxT("SQLite's extension 'VirtualText' enabled\n"); + str += wxT("SQLite's extension 'VirtualNetwork' enabled\n"); + str += wxT("SQLite's extension 'RTree' enabled\n"); + str += wxT("SQLite's extension 'MbrCache' enabled\n"); + str += wxT("SQLite's extension 'VirtualFDO' enabled\n\n"); + dlg.SetDescription(str); + dlg.SetCopyright(wxT("by Alessandro Furieri - 2008")); + dlg.SetWebSite(wxT("http://www.gaia-gis.it")); + wxString license = + wxT("This program is free software; you can redistribute it\n"); + license += + wxT("and/or modify it under the terms of the GNU General Public License\n"); + license += wxT("(GPL) as published by the Free Software Foundation\n\n"); + license += + wxT + ("A copy of the GPL can be found at\nhttp://www.gnu.org/licenses/gpl.txt"); + dlg.SetLicense(license); + ::wxAboutBox(dlg); +} + +void MyFrame::OnMouseMove(wxMouseEvent & event) { // // MOUSE motion - event handler // - UpdateStatusBar (); + UpdateStatusBar(); } -void -MyFrame::UpdateStatusBar () +void MyFrame::UpdateStatusBar() { // // updating the status bar // - if (GetStatusBar () == NULL) - return; - if (SqlitePath.Len () < 1) - GetStatusBar ()->SetStatusText (wxT ("not connected"), 0); - else - GetStatusBar ()->SetStatusText (wxT ("Current SQLite DB: ") + - SqlitePath, 0); - if (SqlitePath.Len () < 1) - QueryView->HideControls (); - else - QueryView->ShowSqlControls (); + if (GetStatusBar() == NULL) + return; + if (MemoryDatabase == true) + { + GetStatusBar()->SetStatusText(wxT("Current SQLite DB: MEMORY-DB"), 0); + QueryView->ShowControls(); + } else + { + if (SqlitePath.Len() < 1) + GetStatusBar()->SetStatusText(wxT("not connected"), 0); + else + GetStatusBar()->SetStatusText(wxT("Current SQLite DB: ") + SqlitePath, + 0); + if (SqlitePath.Len() < 1) + { + QueryView->HideControls(); + RsView->HideControls(); + } else + QueryView->ShowControls(); + } } -void -MyFrame::OnConnect (wxCommandEvent & WXUNUSED (event)) +void MyFrame::OnConnect(wxCommandEvent & WXUNUSED(event)) { // // connecting to an existent SQLite DB // - int ret; - wxString lastDir; - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("DB connection"), - wxT (""), wxT ("db.sqlite"), - wxT - ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), - wxFD_OPEN | - wxFD_FILE_MUST_EXIST, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - SqlitePath = fileDialog->GetPath (); - if (OpenDB () == false) - SqlitePath = wxT (""); - else - { - wxFileName file (fileDialog->GetPath ()); - lastDir = file.GetPath (); - SetLastDirectory (lastDir); - bool metadata = CheckMetadata (); - wxMenuBar *menuBar = GetMenuBar (); - menuBar->Enable (ID_Connect, false); - menuBar->Enable (ID_CreateNew, false); - menuBar->Enable (ID_Disconnect, true); - menuBar->Enable (ID_Vacuum, true); - menuBar->Enable (ID_SqlScript, true); - menuBar->Enable (ID_LoadShp, true); - menuBar->Enable (ID_VirtualShp, true); - menuBar->Enable (ID_LoadTxt, true); - menuBar->Enable (ID_VirtualTxt, true); - menuBar->Enable (ID_Srids, metadata); - wxToolBar *toolBar = GetToolBar (); - toolBar->EnableTool (ID_Connect, false); - toolBar->EnableTool (ID_CreateNew, false); - toolBar->EnableTool (ID_Disconnect, true); - toolBar->EnableTool (ID_Vacuum, true); - toolBar->EnableTool (ID_SqlScript, true); - toolBar->EnableTool (ID_LoadShp, true); - toolBar->EnableTool (ID_VirtualShp, true); - toolBar->EnableTool (ID_LoadTxt, true); - toolBar->EnableTool (ID_VirtualTxt, true); - toolBar->EnableTool (ID_Srids, metadata); - UpdateStatusBar (); - } - } -} - -void -MyFrame::OnDisconnect (wxCommandEvent & WXUNUSED (event)) + int ret; + wxString lastDir; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("DB connection"), + wxT(""), wxT("db.sqlite"), + wxT + ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + SqlitePath = fileDialog->GetPath(); + if (OpenDB() == false) + SqlitePath = wxT(""); + else + { + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + bool metadata = CheckMetadata(); + wxMenuBar *menuBar = GetMenuBar(); + menuBar->Enable(ID_Connect, false); + menuBar->Enable(ID_CreateNew, false); + menuBar->Enable(ID_Disconnect, true); + menuBar->Enable(ID_MemoryDbLoad, false); + menuBar->Enable(ID_MemoryDbNew, false); + if (MemoryDatabase == true) + { + menuBar->Enable(ID_MemoryDbSave, true); + menuBar->Enable(ID_MemoryDbClock, true); + } else + { + menuBar->Enable(ID_MemoryDbSave, false); + menuBar->Enable(ID_MemoryDbClock, false); + } + menuBar->Enable(ID_Vacuum, true); + menuBar->Enable(ID_SqlScript, true); + menuBar->Enable(ID_LoadShp, true); + menuBar->Enable(ID_VirtualShp, true); + menuBar->Enable(ID_LoadTxt, true); + menuBar->Enable(ID_VirtualTxt, true); + menuBar->Enable(ID_Network, true); + menuBar->Enable(ID_Exif, true); + menuBar->Enable(ID_Srids, metadata); + wxToolBar *toolBar = GetToolBar(); + toolBar->EnableTool(ID_Connect, false); + toolBar->EnableTool(ID_CreateNew, false); + toolBar->EnableTool(ID_Disconnect, true); + toolBar->EnableTool(ID_MemoryDbLoad, false); + toolBar->EnableTool(ID_MemoryDbNew, false); + if (MemoryDatabase == true) + { + toolBar->EnableTool(ID_MemoryDbSave, true); + toolBar->EnableTool(ID_MemoryDbClock, true); + } else + { + toolBar->EnableTool(ID_MemoryDbSave, false); + toolBar->EnableTool(ID_MemoryDbClock, false); + } + toolBar->EnableTool(ID_Vacuum, true); + toolBar->EnableTool(ID_SqlScript, true); + toolBar->EnableTool(ID_LoadShp, true); + toolBar->EnableTool(ID_VirtualShp, true); + toolBar->EnableTool(ID_LoadTxt, true); + toolBar->EnableTool(ID_VirtualTxt, true); + toolBar->EnableTool(ID_Network, true); + toolBar->EnableTool(ID_Exif, true); + toolBar->EnableTool(ID_Srids, metadata); + UpdateStatusBar(); + } + } + if (AutoFDOmsg.Len() > 0) + { + wxMessageBox(AutoFDOmsg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + AutoFDOmsg = wxT(""); + } +} + +void MyFrame::OnDisconnect(wxCommandEvent & WXUNUSED(event)) { // // disconnecting current SQLite DB // - CloseDB (); - wxMenuBar *menuBar = GetMenuBar (); - menuBar->Enable (ID_Connect, true); - menuBar->Enable (ID_CreateNew, true); - menuBar->Enable (ID_Disconnect, false); - menuBar->Enable (ID_Vacuum, false); - menuBar->Enable (ID_SqlScript, false); - menuBar->Enable (ID_LoadShp, false); - menuBar->Enable (ID_VirtualShp, false); - menuBar->Enable (ID_LoadTxt, false); - menuBar->Enable (ID_VirtualTxt, false); - menuBar->Enable (ID_Srids, false); - wxToolBar *toolBar = GetToolBar (); - toolBar->EnableTool (ID_Connect, true); - toolBar->EnableTool (ID_CreateNew, true); - toolBar->EnableTool (ID_Disconnect, false); - toolBar->EnableTool (ID_Vacuum, false); - toolBar->EnableTool (ID_SqlScript, false); - toolBar->EnableTool (ID_LoadShp, false); - toolBar->EnableTool (ID_VirtualShp, false); - toolBar->EnableTool (ID_LoadTxt, false); - toolBar->EnableTool (ID_VirtualTxt, false); - toolBar->EnableTool (ID_Srids, false); - UpdateStatusBar (); -} - -void -MyFrame::OnCreateNew (wxCommandEvent & WXUNUSED (event)) + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + TimerAutoSave = NULL; + } + CloseDB(); + ExternalSqlitePath = wxT(""); + wxMenuBar *menuBar = GetMenuBar(); + menuBar->Enable(ID_Connect, true); + menuBar->Enable(ID_CreateNew, true); + menuBar->Enable(ID_Disconnect, false); + menuBar->Enable(ID_MemoryDbLoad, true); + menuBar->Enable(ID_MemoryDbNew, true); + menuBar->Enable(ID_MemoryDbSave, false); + menuBar->Enable(ID_MemoryDbClock, false); + menuBar->Enable(ID_Vacuum, false); + menuBar->Enable(ID_SqlScript, false); + menuBar->Enable(ID_LoadShp, false); + menuBar->Enable(ID_VirtualShp, false); + menuBar->Enable(ID_LoadTxt, false); + menuBar->Enable(ID_VirtualTxt, false); + menuBar->Enable(ID_Network, false); + menuBar->Enable(ID_Exif, false); + menuBar->Enable(ID_Srids, false); + wxToolBar *toolBar = GetToolBar(); + toolBar->EnableTool(ID_Connect, true); + toolBar->EnableTool(ID_CreateNew, true); + toolBar->EnableTool(ID_Disconnect, false); + toolBar->EnableTool(ID_MemoryDbLoad, true); + toolBar->EnableTool(ID_MemoryDbNew, true); + toolBar->EnableTool(ID_MemoryDbSave, false); + toolBar->EnableTool(ID_MemoryDbClock, false); + toolBar->EnableTool(ID_Vacuum, false); + toolBar->EnableTool(ID_SqlScript, false); + toolBar->EnableTool(ID_LoadShp, false); + toolBar->EnableTool(ID_VirtualShp, false); + toolBar->EnableTool(ID_LoadTxt, false); + toolBar->EnableTool(ID_VirtualTxt, false); + toolBar->EnableTool(ID_Network, false); + toolBar->EnableTool(ID_Exif, false); + toolBar->EnableTool(ID_Srids, false); + UpdateStatusBar(); +} + +void MyFrame::OnCreateNew(wxCommandEvent & WXUNUSED(event)) { // // creating a new, empty SQLite DB // - int retdlg; - int ret; - wxString lastDir; - wxFileDialog *fileDialog = - new wxFileDialog (this, wxT ("Creating a new, empty DB"), - wxT (""), wxT ("db.sqlite"), - wxT - ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), - wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - retdlg = fileDialog->ShowModal (); - if (retdlg == wxID_OK) - { - // creating the new DB - SqlitePath = fileDialog->GetPath (); - ret = CreateDB (); - if (ret == false) - goto error; - wxFileName file (fileDialog->GetPath ()); - lastDir = file.GetPath (); - SetLastDirectory (lastDir); - wxMenuBar *menuBar = GetMenuBar (); - menuBar->Enable (ID_Connect, false); - menuBar->Enable (ID_CreateNew, false); - menuBar->Enable (ID_Disconnect, true); - menuBar->Enable (ID_Vacuum, true); - menuBar->Enable (ID_SqlScript, true); - menuBar->Enable (ID_LoadShp, true); - menuBar->Enable (ID_VirtualShp, true); - menuBar->Enable (ID_LoadTxt, true); - menuBar->Enable (ID_VirtualTxt, true); - menuBar->Enable (ID_Srids, false); - wxToolBar *toolBar = GetToolBar (); - toolBar->EnableTool (ID_Connect, false); - toolBar->EnableTool (ID_CreateNew, false); - toolBar->EnableTool (ID_Disconnect, true); - toolBar->EnableTool (ID_Vacuum, true); - toolBar->EnableTool (ID_SqlScript, true); - toolBar->EnableTool (ID_LoadShp, true); - toolBar->EnableTool (ID_VirtualShp, true); - toolBar->EnableTool (ID_LoadTxt, true); - toolBar->EnableTool (ID_VirtualTxt, true); - toolBar->EnableTool (ID_Srids, false); - UpdateStatusBar (); - return; - } - else - return; - error: - unlink (SqlitePath.ToUTF8 ()); - wxString msg = wxT ("An error occurred\nno DB was created"); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); + int retdlg; + int ret; + wxString lastDir; + wxFileDialog *fileDialog = + new wxFileDialog(this, wxT("Creating a new, empty DB"), + wxT(""), wxT("db.sqlite"), + wxT("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + retdlg = fileDialog->ShowModal(); + if (retdlg == wxID_OK) + { + // creating the new DB + SqlitePath = fileDialog->GetPath(); + ret = CreateDB(); + if (ret == false) + goto error; + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + wxMenuBar *menuBar = GetMenuBar(); + menuBar->Enable(ID_Connect, false); + menuBar->Enable(ID_CreateNew, false); + menuBar->Enable(ID_Disconnect, true); + menuBar->Enable(ID_MemoryDbLoad, false); + menuBar->Enable(ID_MemoryDbNew, false); + menuBar->Enable(ID_MemoryDbSave, false); + menuBar->Enable(ID_MemoryDbClock, false); + menuBar->Enable(ID_Vacuum, true); + menuBar->Enable(ID_SqlScript, true); + menuBar->Enable(ID_LoadShp, true); + menuBar->Enable(ID_VirtualShp, true); + menuBar->Enable(ID_LoadTxt, true); + menuBar->Enable(ID_VirtualTxt, true); + menuBar->Enable(ID_Network, true); + menuBar->Enable(ID_Exif, true); + menuBar->Enable(ID_Srids, false); + wxToolBar *toolBar = GetToolBar(); + toolBar->EnableTool(ID_Connect, false); + toolBar->EnableTool(ID_CreateNew, false); + toolBar->EnableTool(ID_Disconnect, true); + toolBar->EnableTool(ID_MemoryDbLoad, false); + toolBar->EnableTool(ID_MemoryDbNew, false); + toolBar->EnableTool(ID_MemoryDbSave, false); + toolBar->EnableTool(ID_MemoryDbClock, false); + toolBar->EnableTool(ID_Vacuum, true); + toolBar->EnableTool(ID_SqlScript, true); + toolBar->EnableTool(ID_LoadShp, true); + toolBar->EnableTool(ID_VirtualShp, true); + toolBar->EnableTool(ID_LoadTxt, true); + toolBar->EnableTool(ID_VirtualTxt, true); + toolBar->EnableTool(ID_Network, true); + toolBar->EnableTool(ID_Exif, true); + toolBar->EnableTool(ID_Srids, false); + UpdateStatusBar(); + return; + } else return; -} - -void -MyFrame::OnVacuum (wxCommandEvent & WXUNUSED (event)) +error: + unlink(SqlitePath.ToUTF8()); + wxString msg = wxT("An error occurred\nno DB was created"); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; +} + +void MyFrame::OnMemoryDbLoad(wxCommandEvent & WXUNUSED(event)) +{ +// +// loading an external DB into the MEMORY-DB +// + sqlite3 *extSqlite = NULL; + sqlite3_backup *backup; + int retdlg; + int ret; + wxString lastDir; + char path[1024]; + wxString error; + wxFileDialog *fileDialog = + new wxFileDialog(this, wxT("Loading an existing DB into the MEMORY-DB"), + wxT(""), wxT("db.sqlite"), + wxT("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + retdlg = fileDialog->ShowModal(); + if (retdlg == wxID_OK) + { + // opening the external DB + ExternalSqlitePath = fileDialog->GetPath(); + strcpy(path, ExternalSqlitePath.ToUTF8()); + ret = sqlite3_open_v2(path, &extSqlite, SQLITE_OPEN_READWRITE, NULL); + if (ret) + { + // an error occurred + wxString errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + error = wxT("Failure while connecting to DB\n\n"); + error += errCause; + error += wxT("\n"); + goto stop; + } + ret = + sqlite3_open_v2(":memory:", &SqliteHandle, + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); + if (ret) + { + // an error occurred + wxString errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + error = wxT("MEMORY-DB: an error occurred \n\n"); + error += errCause; + error += +wxT("\n"); + goto stop; + } + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + backup = sqlite3_backup_init(SqliteHandle, "main", extSqlite, "main"); + if (!backup) + goto stop; + while (1) + { + ret = sqlite3_backup_step(backup, 1024); + if (ret == SQLITE_DONE) + break; + } + ret = sqlite3_backup_finish(backup); + sqlite3_close(extSqlite); + MemoryDatabase = true; + AutoSaveInterval = 120; + AutoFDOStart(); + InitTableTree(); + bool metadata = CheckMetadata(); + wxMenuBar *menuBar = GetMenuBar(); + menuBar->Enable(ID_Connect, false); + menuBar->Enable(ID_CreateNew, false); + menuBar->Enable(ID_Disconnect, true); + menuBar->Enable(ID_MemoryDbLoad, false); + menuBar->Enable(ID_MemoryDbNew, false); + if (MemoryDatabase == true) + { + menuBar->Enable(ID_MemoryDbSave, true); + menuBar->Enable(ID_MemoryDbClock, true); + } else + { + menuBar->Enable(ID_MemoryDbSave, false); + menuBar->Enable(ID_MemoryDbClock, false); + } + menuBar->Enable(ID_Vacuum, true); + menuBar->Enable(ID_SqlScript, true); + menuBar->Enable(ID_LoadShp, true); + menuBar->Enable(ID_VirtualShp, true); + menuBar->Enable(ID_LoadTxt, true); + menuBar->Enable(ID_VirtualTxt, true); + menuBar->Enable(ID_Network, true); + menuBar->Enable(ID_Exif, true); + menuBar->Enable(ID_Srids, metadata); + wxToolBar *toolBar = GetToolBar(); + toolBar->EnableTool(ID_Connect, false); + toolBar->EnableTool(ID_CreateNew, false); + toolBar->EnableTool(ID_Disconnect, true); + toolBar->EnableTool(ID_MemoryDbLoad, false); + toolBar->EnableTool(ID_MemoryDbNew, false); + if (MemoryDatabase == true) + { + toolBar->EnableTool(ID_MemoryDbSave, true); + toolBar->EnableTool(ID_MemoryDbClock, true); + } else + { + toolBar->EnableTool(ID_MemoryDbSave, false); + toolBar->EnableTool(ID_MemoryDbClock, false); + } + toolBar->EnableTool(ID_Vacuum, true); + toolBar->EnableTool(ID_SqlScript, true); + toolBar->EnableTool(ID_LoadShp, true); + toolBar->EnableTool(ID_VirtualShp, true); + toolBar->EnableTool(ID_LoadTxt, true); + toolBar->EnableTool(ID_VirtualTxt, true); + toolBar->EnableTool(ID_Network, true); + toolBar->EnableTool(ID_Exif, true); + toolBar->EnableTool(ID_Srids, metadata); + UpdateStatusBar(); + if (AutoSaveInterval <= 0) + { + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + TimerAutoSave = NULL; + } + } else + { + // + // starting the AutoSave timer + // + if (!TimerAutoSave) + TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); + else + TimerAutoSave->Stop(); + LastTotalChanges = 0; + TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); + } + } + if (AutoFDOmsg.Len() > 0) + { + wxMessageBox(AutoFDOmsg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + AutoFDOmsg = wxT(""); + } + return; +stop: + MemoryDatabase = false; + if (SqliteHandle) + sqlite3_close(SqliteHandle); + if (extSqlite) + sqlite3_close(extSqlite); + wxString msg = wxT("MEMORY-DB wasn't loaded\n\n"); + msg += error; + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + SqliteHandle = NULL; +} + +void MyFrame::OnMemoryDbNew(wxCommandEvent & WXUNUSED(event)) +{ +// +//creating a new MEMORY-DB +// + int ret; + wxToolBar *toolBar; + wxMenuBar *menuBar; + bool metadata; + MemoryDatabase = true; + AutoSaveInterval = 120; + ExternalSqlitePath = wxT(""); +// creating the new MEMORY-DB + ret = CreateDB(); + if (ret == false) + goto error; + metadata = CheckMetadata(); + menuBar = GetMenuBar(); + menuBar->Enable(ID_Connect, false); + menuBar->Enable(ID_CreateNew, false); + menuBar->Enable(ID_Disconnect, true); + menuBar->Enable(ID_MemoryDbLoad, false); + menuBar->Enable(ID_MemoryDbNew, false); + menuBar->Enable(ID_MemoryDbSave, true); + menuBar->Enable(ID_MemoryDbClock, true); + menuBar->Enable(ID_Vacuum, true); + menuBar->Enable(ID_SqlScript, true); + menuBar->Enable(ID_LoadShp, true); + menuBar->Enable(ID_VirtualShp, true); + menuBar->Enable(ID_LoadTxt, true); + menuBar->Enable(ID_VirtualTxt, true); + menuBar->Enable(ID_Network, true); + menuBar->Enable(ID_Exif, true); + menuBar->Enable(ID_Srids, metadata); + toolBar = GetToolBar(); + toolBar->EnableTool(ID_Connect, false); + toolBar->EnableTool(ID_CreateNew, false); + toolBar->EnableTool(ID_Disconnect, true); + toolBar->EnableTool(ID_MemoryDbLoad, false); + toolBar->EnableTool(ID_MemoryDbNew, false); + toolBar->EnableTool(ID_MemoryDbSave, true); + toolBar->EnableTool(ID_MemoryDbClock, true); + toolBar->EnableTool(ID_Vacuum, true); + toolBar->EnableTool(ID_SqlScript, true); + toolBar->EnableTool(ID_LoadShp, true); + toolBar->EnableTool(ID_VirtualShp, true); + toolBar->EnableTool(ID_LoadTxt, true); + toolBar->EnableTool(ID_VirtualTxt, true); + toolBar->EnableTool(ID_Network, true); + toolBar->EnableTool(ID_Exif, true); + toolBar->EnableTool(ID_Srids, metadata); + UpdateStatusBar(); + if (AutoSaveInterval <= 0) + { + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + TimerAutoSave = NULL; + } + } else + { + // + // starting the AutoSave timer + // + if (!TimerAutoSave) + TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); + else + TimerAutoSave->Stop(); + LastTotalChanges = 0; + TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); + } + return; +error: + wxString msg = wxT("An error occurred\nno MEMORY-DB was created"); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; +} + +bool MyFrame::MemoryDbSave() +{ +// +// trying to export the MEMORY-DB into an external DB +// + sqlite3 *extSqlite = NULL; + sqlite3_backup *backup; + char path[1024]; + char bak_path[1024]; + int ret; + wxString error; + if (ExternalSqlitePath.Len() == 0) + return false; + ::wxBeginBusyCursor(); + strcpy(path, ExternalSqlitePath.ToUTF8()); + strcpy(bak_path, path); + strcat(bak_path, ".bak"); + unlink(bak_path); + rename(path, bak_path); + ret = + sqlite3_open_v2(path, &extSqlite, + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); + if (ret) + { + // an error occurred + wxString errCause = wxString::FromUTF8(sqlite3_errmsg(extSqlite)); + error = wxT("An error occurred\n\n"); + error += errCause; + error += +wxT("\n"); + error += ExternalSqlitePath; + goto stop; + } + backup = sqlite3_backup_init(extSqlite, "main", SqliteHandle, "main"); + if (!backup) + goto stop; + while (1) + { + ret = sqlite3_backup_step(backup, 1024); + if (ret == SQLITE_DONE) + break; + } + ret = sqlite3_backup_finish(backup); + sqlite3_close(extSqlite); + unlink(bak_path); + ::wxEndBusyCursor(); + LastTotalChanges = sqlite3_total_changes(SqliteHandle); + return true; +stop: + if (extSqlite) + sqlite3_close(extSqlite); + wxString msg = wxT("Backup failure: MEMORY-DB wasn't saved\n\n"); + msg += error; + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + ExternalSqlitePath = wxT(""); + ::wxEndBusyCursor(); + return false; +} + +void MyFrame::OnMemoryDbSave(wxCommandEvent & WXUNUSED(event)) +{ +// +// exporting the MEMORY-DB into an external DB +// + int retdlg; + wxString lastDir; + if (ExternalSqlitePath.Len() > 0) + { + if (MemoryDbSave() == true) + { + wxMessageBox(wxT("Ok, MEMORY-DB was succesfully saved"), + wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + if (AutoSaveInterval <= 0) + { + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + TimerAutoSave = NULL; + } + } else + { + // + // restarting the AutoSave timer + // + if (!TimerAutoSave) + TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); + else + TimerAutoSave->Stop(); + TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); + } + return; + } + } + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Saving the MEMORY-DB"), + wxT(""), wxT("db.sqlite"), + wxT + ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + retdlg = fileDialog->ShowModal(); + if (retdlg == wxID_OK) + { + // exporting the external DB + ExternalSqlitePath = fileDialog->GetPath(); + if (MemoryDbSave() == true) + { + wxMessageBox(wxT("Ok, MEMORY-DB was succesfully saved"), + wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + if (AutoSaveInterval <= 0) + { + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + TimerAutoSave = NULL; + } + } else + { + // + // restarting the AutoSave timer + // + if (!TimerAutoSave) + TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); + else + TimerAutoSave->Stop(); + TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); + } + } + } +} + +void MyFrame::OnMemoryDbClock(wxCommandEvent & WXUNUSED(event)) +{ +// +// setting up AutoSave for MEMORY-DB +// + AutoSaveDialog dlg; + dlg.Create(this, ExternalSqlitePath, AutoSaveInterval); + int ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + AutoSaveInterval = dlg.GetSeconds(); + if (AutoSaveInterval <= 0) + { + // + // stopping the AutoSave timer + // + if (TimerAutoSave) + { + TimerAutoSave->Stop(); + delete TimerAutoSave; + TimerAutoSave = NULL; + } + } else + { + // + // restarting the AutoSave timer + // + if (!TimerAutoSave) + TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); + else + TimerAutoSave->Stop(); + TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); + } + } +} + +void MyFrame::OnVacuum(wxCommandEvent & WXUNUSED(event)) { // // performing a VACUUM in order to reorganize the current DB // - char *errMsg = NULL; - ::wxBeginBusyCursor (); - int ret = - sqlite3_exec (SqliteHandle, "ANALYZE; VACUUM;", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - } - else - { - wxMessageBox (wxT ("Current DB was succesfully optimized"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - } - ::wxEndBusyCursor (); + char *errMsg = NULL; + ::wxBeginBusyCursor(); + int ret = sqlite3_exec(SqliteHandle, "ANALYZE; VACUUM;", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + } else + { + wxMessageBox(wxT("Current DB was succesfully optimized"), + wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + } + ::wxEndBusyCursor(); } -char * -MyFrame::ReadSqlLine (FILE * in, int *len, int *eof) +char *MyFrame::ReadSqlLine(FILE * in, int *len, int *eof) { // // reading an SQL script line // - int c; - *eof = 0; - int size = 4096; - char *line = (char *) malloc (size); - int off = 0; - while ((c = getc (in)) != EOF) - { - // consuming input one chat at each time - if (off == size) - { - // buffer overflow; reallocating a bigger one - // presumably this is because there is some BLOB, so we'll grow by 1MB at each time - size += 1024 * 1024; - line = (char *) realloc (line, size); - } - *(line + off) = c; - off++; - if (c == '\n') - { - // end of line marker - *(line + off) = '\0'; - *len = off; - return line; - } - if (c == ';') - { - // end of SQL statement marker - *(line + off) = '\0'; - *len = off; - return line; - } - } + int c; + *eof = 0; + int size = 4096; + char *line = (char *) malloc(size); + int off = 0; + while ((c = getc(in)) != EOF) + { + // consuming input one chat at each time + if (off == size) + { + // buffer overflow; reallocating a bigger one + // presumably this is because there is some BLOB, so we'll grow by 1MB at each time + size += 1024 * 1024; + line = (char *) realloc(line, size); + } + *(line + off) = c; + off++; + if (c == '\n') + { + // end of line marker + *(line + off) = '\0'; + *len = off; + return line; + } + if (c == ';') + { + // end of SQL statement marker + *(line + off) = '\0'; + *len = off; + return line; + } + } // EOF reached - *len = off; - *eof = 1; - return line; + *len = off; + *eof = 1; + return line; } -void -MyFrame::OnSqlScript (wxCommandEvent & WXUNUSED (event)) +void MyFrame::OnSqlScript(wxCommandEvent & WXUNUSED(event)) { // // executing an SQL Script // - int ret; - wxString lastDir; - wxString path; - wxString charset; - FILE *sql; - char *line = NULL; - char *statement = NULL; - int stmt_len = 0; - char *prev_stmt; - int prev_len; - int eof; - int rowNo = 1; - int stmt = 0; - int len; - wxString msg; - void *cvtCS = NULL; - char *utf8stmt = NULL; - int cvtErr; - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("SQL Script"), - wxT (""), - wxT ("init_spatialite.sql"), - wxT - ("SQL script (*.sql)|*.sql|All files (*.*)|*.*"), - wxFD_OPEN | - wxFD_FILE_MUST_EXIST, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - path = fileDialog->GetPath (); - SqlScriptDialog dlg; - dlg.Create (this, path, LocaleCharset); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - charset = dlg.GetCharset (); - else - return; - // opening the SQL script - sql = fopen (path.ToUTF8 (), "r"); - if (sql == NULL) - { - wxMessageBox (wxT ("can't open: ") + fileDialog->GetPath (), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - } - else - { - wxFileName file (fileDialog->GetPath ()); - lastDir = file.GetPath (); - SetLastDirectory (lastDir); - cvtCS = gaiaCreateUTF8Converter (charset.ToUTF8 ()); - if (!cvtCS) - { - msg = charset + wxT (": unsupported CharacterSet"); - wxMessageBox (msg, wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, this); - goto stop; - } - ::wxBeginBusyCursor (); - while (1) - { - // reading the SQL script lines - line = ReadSqlLine (sql, &len, &eof); - if (len > 0) - { - if (statement == NULL) - { - statement = line; - stmt_len = len; - } - else - { - // appending line to SQL statement - prev_stmt = statement; - prev_len = stmt_len; - stmt_len = prev_len + len; - statement = (char *) malloc (stmt_len + 1); - memcpy (statement, prev_stmt, prev_len); - memcpy (statement + prev_len, line, len); - *(statement + stmt_len) = '\0'; - free (prev_stmt); - free (line); - line = NULL; - } - } - else - { - free (line); - line = NULL; - } - if (statement) - { - if (sqlite3_complete (statement)) - { - // executing the SQL statement - utf8stmt = - gaiaConvertToUTF8 (cvtCS, statement, - stmt_len, &cvtErr); - free (statement); - statement = NULL; - stmt_len = 0; - if (cvtErr || !utf8stmt) - { - Rollback (); - msg = - wxT - ("SQL Script abnormal termination\nillegal character sequence"); - msg += - wxT - ("\n\nROLLBACK was automatically performed"); - wxMessageBox (msg, - wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, - this); - goto stop; - } - if (ExecuteSql (utf8stmt, rowNo) == false) - { - Rollback (); - msg = - wxT - ("SQL Script abnormal termination\nan error occurred"); - msg += - wxT - ("\n\nROLLBACK was automatically performed"); - wxMessageBox (msg, - wxT ("spatialite-gui"), - wxOK | wxICON_WARNING, - this); - goto stop; - } - else - { - stmt++; - free (utf8stmt); - utf8stmt = NULL; - } - } - } - rowNo++; - if (eof) - break; - } - msg.Printf (wxT - ("SQL Script normal termination\n\n%d SQL statements where performed"), - stmt); - wxMessageBox (msg, wxT ("spatialite-gui"), - wxOK | wxICON_INFORMATION, this); - stop: - if (cvtCS) - gaiaFreeUTF8Converter (cvtCS); - if (utf8stmt) - free (utf8stmt); - if (statement) - free (statement); - if (line) - free (line); - fclose (sql); - ::wxEndBusyCursor (); - } - } -} - -void -MyFrame::OnLoadShp (wxCommandEvent & WXUNUSED (event)) + int ret; + wxString lastDir; + wxString path; + wxString charset; + FILE *sql; + char *line = NULL; + char *statement = NULL; + int stmt_len = 0; + char *prev_stmt; + int prev_len; + int eof; + int rowNo = 1; + int stmt = 0; + int len; + wxString msg; + char dummy[128]; + void *cvtCS = NULL; + char *utf8stmt = NULL; + int cvtErr; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("SQL Script"), + wxT(""), + wxT("init_spatialite.sql"), + wxT + ("SQL script (*.sql)|*.sql|All files (*.*)|*.*"), + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + path = fileDialog->GetPath(); + SqlScriptDialog dlg; + dlg.Create(this, path, LocaleCharset); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + charset = dlg.GetCharset(); + else + return; + // opening the SQL script + sql = fopen(path.ToUTF8(), "r"); + if (sql == NULL) + { + wxMessageBox(wxT("can't open: ") + fileDialog->GetPath(), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + } else + { + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + cvtCS = gaiaCreateUTF8Converter(charset.ToUTF8()); + if (!cvtCS) + { + msg = charset + wxT(": unsupported CharacterSet"); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_WARNING, + this); + goto stop; + } + ::wxBeginBusyCursor(); + while (1) + { + // reading the SQL script lines + line = ReadSqlLine(sql, &len, &eof); + if (len > 0) + { + if (statement == NULL) + { + statement = line; + stmt_len = len; + } else + { + // appending line to SQL statement + prev_stmt = statement; + prev_len = stmt_len; + stmt_len = prev_len + len; + statement = (char *) malloc(stmt_len + 1); + memcpy(statement, prev_stmt, prev_len); + memcpy(statement + prev_len, line, len); + *(statement + stmt_len) = '\0'; + free(prev_stmt); + free(line); + line = NULL; + } + } else + { + free(line); + line = NULL; + } + if (statement) + { + if (sqlite3_complete(statement)) + { + // executing the SQL statement + utf8stmt = + gaiaConvertToUTF8(cvtCS, statement, stmt_len, &cvtErr); + free(statement); + statement = NULL; + stmt_len = 0; + if (cvtErr || !utf8stmt) + { + Rollback(); + msg = + wxT + ("SQL Script abnormal termination\nillegal character sequence"); + msg += + wxT("\n\nROLLBACK was automatically performed"); + wxMessageBox(msg, wxT("spatialite-gui"), + wxOK | wxICON_WARNING, this); + goto stop; + } + if (ExecuteSql(utf8stmt, rowNo) == false) + { + Rollback(); + msg = + wxT + ("SQL Script abnormal termination\nan error occurred"); + msg += + wxT("\n\nROLLBACK was automatically performed"); + wxMessageBox(msg, wxT("spatialite-gui"), + wxOK | wxICON_WARNING, this); + goto stop; + } else + { + stmt++; + free(utf8stmt); + utf8stmt = NULL; + } + } + } + rowNo++; + if (eof) + break; + } + sprintf(dummy, + "SQL Script normal termination\n\n%d SQL statements where performed", + stmt); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + stop: + if (cvtCS) + gaiaFreeUTF8Converter(cvtCS); + if (utf8stmt) + free(utf8stmt); + if (statement) + free(statement); + if (line) + free(line); + fclose(sql); + ::wxEndBusyCursor(); + } + } +} + +void MyFrame::OnLoadShp(wxCommandEvent & WXUNUSED(event)) { // // loading a shapefile // - int ret; - wxString table; - wxString column = wxT ("Geometry"); - wxString charset; - int srid = -1; - wxString path; - wxString lastDir; - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("Load Shapefile"), - wxT (""), - wxT ("shapefile.shp"), - wxT - ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), - wxFD_OPEN | - wxFD_FILE_MUST_EXIST, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - wxFileName file (fileDialog->GetPath ()); - lastDir = file.GetPath (); - table = file.GetName (); - path = file.GetPath (); - path += file.GetPathSeparator (); - path += file.GetName (); - LoadShpDialog dlg; - dlg.Create (this, path, table, srid, column, LocaleCharset); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - SetLastDirectory (lastDir); - table = dlg.GetTable (); - srid = dlg.GetSrid (); - column = dlg.GetColumn (); - charset = dlg.GetCharset (); - LoadShapefile (path, table, srid, column, charset); - } - } -} - -void -MyFrame::OnVirtualShp (wxCommandEvent & WXUNUSED (event)) + int ret; + wxString table; + wxString column = wxT("Geometry"); + wxString charset; + int srid = -1; + wxString path; + wxString lastDir; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Load Shapefile"), + wxT(""), + wxT("shapefile.shp"), + wxT + ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + table = file.GetName(); + path = file.GetPath(); + path += file.GetPathSeparator(); + path += file.GetName(); + LoadShpDialog dlg; + dlg.Create(this, path, table, srid, column, LocaleCharset); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + SetLastDirectory(lastDir); + table = dlg.GetTable(); + srid = dlg.GetSrid(); + column = dlg.GetColumn(); + charset = dlg.GetCharset(); + LoadShapefile(path, table, srid, column, charset); + } + } +} + +void MyFrame::OnVirtualShp(wxCommandEvent & WXUNUSED(event)) { // // creating a VirtualShape // - int ret; - wxString charset; - int srid; - wxString xSrid; - wxString sql; - wxString path; - wxString table; - wxString lastDir; - char *errMsg = NULL; - sqlite3 *sqlite = GetSqlite (); - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("VirtualShape"), - wxT (""), - wxT ("shapefile.shp"), - wxT - ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), - wxFD_OPEN | - wxFD_FILE_MUST_EXIST, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - path = fileDialog->GetPath (); - wxFileName file (path); - table = file.GetName (); - VirtualShpDialog dlg; - dlg.Create (this, path, table, LocaleCharset); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - table = dlg.GetTable (); - srid = dlg.GetSrid (); - charset = dlg.GetCharset (); - } - else - return; - lastDir = file.GetPath (); - SetLastDirectory (lastDir); - sql = wxT ("CREATE VIRTUAL TABLE "); - sql += table; - sql += wxT ("\nUSING VirtualShape('"); - sql += file.GetPath (); - sql += file.GetPathSeparator (); - sql += file.GetName (); - sql += wxT ("',\n'"); - sql += charset; - xSrid.Printf (wxT ("', %d"), srid); - sql += xSrid; - sql += wxT (")"); - ret = sqlite3_exec (sqlite, sql.ToUTF8 (), NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - return; - } - wxMessageBox (wxT ("Virtual Table '") + table + - wxT ("' was successfully created"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - ClearTableTree (); - InitTableTree (); - } -} - -void -MyFrame::OnLoadTxt (wxCommandEvent & WXUNUSED (event)) + int ret; + wxString charset; + int srid; + char dummy[128]; + wxString sql; + wxString path; + wxString table; + wxString lastDir; + char *errMsg = NULL; + sqlite3 *sqlite = GetSqlite(); + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("VirtualShape"), + wxT(""), + wxT("shapefile.shp"), + wxT + ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + path = fileDialog->GetPath(); + wxFileName file(path); + table = file.GetName(); + VirtualShpDialog dlg; + dlg.Create(this, path, table, LocaleCharset); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + table = dlg.GetTable(); + srid = dlg.GetSrid(); + charset = dlg.GetCharset(); + } else + return; + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + sql = wxT("CREATE VIRTUAL TABLE \""); + sql += table; + sql += wxT("\"\nUSING VirtualShape('"); + sql += file.GetPath(); + sql += file.GetPathSeparator(); + sql += file.GetName(); + sql += wxT("',\n'"); + sql += charset; + sprintf(dummy, "', %d", srid); + sql += wxString::FromUTF8(dummy); + sql += wxT(")"); + ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + wxMessageBox(wxT("Virtual Table \"") + table + + wxT("\" was successfully created"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + InitTableTree(); + } +} + +void MyFrame::OnLoadTxt(wxCommandEvent & WXUNUSED(event)) { // // loading a CSV/TXT // - int ret; - wxString charset; - wxString sql; - wxString path; - wxString table; - wxString lastDir; - bool first_titles; - bool decimal_comma; - char separator; - char text_separator; - wxString filelist = wxT ("TXT and CSV files (*.txt;*.csv)|*.txt;*.csv"); - filelist += - wxT - ("|Text file (*.txt)|*.txt|CSV file (*.csv)|*.csv|All files (*.*)|*.*"); - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("Load CSV/TXT"), - wxT (""), - wxT ("textfile.txt"), - filelist, - wxFD_OPEN | - wxFD_FILE_MUST_EXIST, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - path = fileDialog->GetPath (); - wxFileName file (path); - table = file.GetName (); - LoadTxtDialog dlg; - dlg.Create (this, path, table, LocaleCharset); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - SetLastDirectory (lastDir); - table = dlg.GetTable (); - charset = dlg.GetCharset (); - first_titles = dlg.IsFirstLineTitles (); - decimal_comma = dlg.IsDecimalPointComma (); - separator = dlg.GetSeparator (); - text_separator = dlg.GetTextSeparator (); - char decimal_separator = '.'; - if (decimal_comma == true) - decimal_separator = ','; - LoadText (path, table, charset, first_titles, decimal_separator, - separator, text_separator); - } - } -} - -void -MyFrame::OnVirtualTxt (wxCommandEvent & WXUNUSED (event)) + int ret; + wxString charset; + wxString sql; + wxString path; + wxString table; + wxString lastDir; + bool first_titles; + bool decimal_comma; + char separator; + char text_separator; + wxString filelist = wxT("TXT and CSV files (*.txt;*.csv)|*.txt;*.csv"); + filelist += + wxT("|Text file (*.txt)|*.txt|CSV file (*.csv)|*.csv|All files (*.*)|*.*"); + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Load CSV/TXT"), + wxT(""), + wxT("textfile.txt"), + filelist, + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + path = fileDialog->GetPath(); + wxFileName file(path); + table = file.GetName(); + LoadTxtDialog dlg; + dlg.Create(this, path, table, LocaleCharset); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + SetLastDirectory(lastDir); + table = dlg.GetTable(); + charset = dlg.GetCharset(); + first_titles = dlg.IsFirstLineTitles(); + decimal_comma = dlg.IsDecimalPointComma(); + separator = dlg.GetSeparator(); + text_separator = dlg.GetTextSeparator(); + char decimal_separator = '.'; + if (decimal_comma == true) + decimal_separator = ','; + LoadText(path, table, charset, first_titles, decimal_separator, + separator, text_separator); + } + } +} + +void MyFrame::OnVirtualTxt(wxCommandEvent & WXUNUSED(event)) { // // creating a VirtualText // - int ret; - wxString charset; - wxString sql; - wxString path; - wxString table; - wxString lastDir; - bool first_titles; - bool decimal_comma; - char separator; - char text_separator; - char dummy[16]; - char *errMsg = NULL; - sqlite3 *sqlite = GetSqlite (); - wxString filelist = wxT ("TXT and CSV files (*.txt;*.csv)|*.txt;*.csv"); - filelist += - wxT - ("|Text file (*.txt)|*.txt|CSV file (*.csv)|*.csv|All files (*.*)|*.*"); - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("VirtualText"), - wxT (""), - wxT ("textfile.txt"), - filelist, - wxFD_OPEN | - wxFD_FILE_MUST_EXIST, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - path = fileDialog->GetPath (); - wxFileName file (path); - table = file.GetName (); - VirtualTxtDialog dlg; - dlg.Create (this, path, table, LocaleCharset); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - table = dlg.GetTable (); - charset = dlg.GetCharset (); - first_titles = dlg.IsFirstLineTitles (); - decimal_comma = dlg.IsDecimalPointComma (); - separator = dlg.GetSeparator (); - text_separator = dlg.GetTextSeparator (); - } - else - return; - lastDir = file.GetPath (); - SetLastDirectory (lastDir); - sql = wxT ("CREATE VIRTUAL TABLE "); - sql += table; - sql += wxT ("\nUSING VirtualText('"); - sql += path; - sql += wxT ("',\n'"); - sql += charset; - if (first_titles == true) - sql += wxT ("', 1"); - else - sql += wxT ("', 0"); - if (decimal_comma == true) - sql += wxT (", COMMA"); - else - sql += wxT (", POINT"); - if (text_separator == '\'') - sql += wxT (", SINGLEQUOTE"); - else - sql += wxT (", DOUBLEQUOTE"); - if (separator == '\t') - sql += wxT (", TAB"); - else - { - sprintf (dummy, ", '%c'", separator); - sql += wxString::FromUTF8 (dummy); - } - sql += wxT (")"); - ret = sqlite3_exec (sqlite, sql.ToUTF8 (), NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - return; - } - wxMessageBox (wxT ("Virtual Table '") + table + - wxT ("' was successfully created"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - ClearTableTree (); - InitTableTree (); - } -} - -void -MyFrame::OnSrids (wxCommandEvent & WXUNUSED (event)) + int ret; + wxString charset; + wxString sql; + wxString path; + wxString table; + wxString lastDir; + bool first_titles; + bool decimal_comma; + char separator; + char text_separator; + char dummy[16]; + char *errMsg = NULL; + sqlite3 *sqlite = GetSqlite(); + wxString filelist = wxT("TXT and CSV files (*.txt;*.csv)|*.txt;*.csv"); + filelist += + wxT("|Text file (*.txt)|*.txt|CSV file (*.csv)|*.csv|All files (*.*)|*.*"); + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("VirtualText"), + wxT(""), + wxT("textfile.txt"), + filelist, + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + path = fileDialog->GetPath(); + wxFileName file(path); + table = file.GetName(); + VirtualTxtDialog dlg; + dlg.Create(this, path, table, LocaleCharset); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + table = dlg.GetTable(); + charset = dlg.GetCharset(); + first_titles = dlg.IsFirstLineTitles(); + decimal_comma = dlg.IsDecimalPointComma(); + separator = dlg.GetSeparator(); + text_separator = dlg.GetTextSeparator(); + } else + return; + lastDir = file.GetPath(); + SetLastDirectory(lastDir); + sql = wxT("CREATE VIRTUAL TABLE \""); + sql += table; + sql += wxT("\"\nUSING VirtualText('"); + sql += path; + sql += wxT("',\n'"); + sql += charset; + if (first_titles == true) + sql += wxT("', 1"); + else + sql += wxT("', 0"); + if (decimal_comma == true) + sql += wxT(", COMMA"); + else + sql += wxT(", POINT"); + if (text_separator == '\'') + sql += wxT(", SINGLEQUOTE"); + else + sql += wxT(", DOUBLEQUOTE"); + if (separator == '\t') + sql += wxT(", TAB"); + else + { + sprintf(dummy, ", '%c'", separator); + sql += wxString::FromUTF8(dummy); + } + sql += wxT(")"); + ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + wxMessageBox(wxT("Virtual Table \"") + table + + wxT("\" was successfully created"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + InitTableTree(); + } +} + +void MyFrame::OnNetwork(wxCommandEvent & WXUNUSED(event)) +{ +// +// building a Network +// + NetworkDialog dlg; + int ret; + wxString table; + wxString from; + wxString to; + wxString geom; + bool isGeomLength; + wxString cost; + bool isBidirectional; + bool isOneWays; + wxString oneWayToFrom; + wxString oneWayFromTo; + dlg.Create(this); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + table = dlg.GetTableName(); + from = dlg.GetFromColumn(); + to = dlg.GetToColumn(); + geom = dlg.GetGeomColumn(); + isGeomLength = dlg.IsGeomLength(); + cost = dlg.GetCostColumn(); + isBidirectional = dlg.IsBidirectional(); + isOneWays = dlg.IsOneWays(); + oneWayToFrom = dlg.GetOneWayToFrom(); + oneWayFromTo = dlg.GetOneWayFromTo(); + BuildNetwork(table, from, to, geom, isGeomLength, cost, isBidirectional, + isOneWays, oneWayFromTo, oneWayToFrom); + } +} + +void MyFrame::OnImportExifPhotos(wxCommandEvent & WXUNUSED(event)) +{ +// +// importing EXIF Photos +// + ExifDialog dlg; + int ret; + wxString path; + bool isFolder; + bool isMetadata; + bool isGpsOnly; + wxString lastDir; + wxString dir_path; + wxString img_path; + wxString filelist = wxT("JPEG files (*.jpg;*.jpeg)|*.jpg;*.jpeg|"); + filelist += wxT("All files (*.*)|*.*"); + wxFileDialog *fileDialog = + new wxFileDialog(this, wxT("EXIF File/Folder selection"), + wxT(""), + wxT(""), + filelist, + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + img_path = fileDialog->GetPath(); + wxFileName file(img_path); + dir_path = file.GetPath(); + } else + return; + dlg.Create(this, dir_path, img_path); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + SetLastDirectory(dir_path); + isFolder = dlg.IsFolder(); + if (isFolder == true) + path = dlg.GetDirPath(); + else + path = dlg.GetImgPath(); + isMetadata = dlg.IsMetadata(); + isGpsOnly = dlg.IsGpsOnly(); + ImportExifPhotos(path, isFolder, isMetadata, isGpsOnly); + } +} + +void MyFrame::OnSrids(wxCommandEvent & WXUNUSED(event)) { // // searching a SRID by name // - SearchSridDialog dlg; - int ret; - wxString string; - wxString sql; - dlg.Create (this); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - string = dlg.GetString (); - sql = wxT ("SELECT * FROM spatial_ref_sys\n"); - sql += wxT ("WHERE ref_sys_name LIKE '%"); - sql += string; - sql += wxT ("%'\nORDER BY srid"); - QueryView->SetSql (sql, true); - } + SearchSridDialog dlg; + int ret; + wxString string; + wxString sql; + dlg.Create(this); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + string = dlg.GetString(); + sql = wxT("SELECT * FROM spatial_ref_sys\n"); + sql += wxT("WHERE ref_sys_name LIKE '%"); + sql += string; + sql += wxT("%'\nORDER BY srid"); + QueryView->SetSql(sql, true); + } } -void -MyFrame::OnCharset (wxCommandEvent & WXUNUSED (event)) +void MyFrame::OnCharset(wxCommandEvent & WXUNUSED(event)) { // // setting the default CHARSET // - DefaultCharsetDialog dlg; - int ret; - dlg.Create (this, DefaultCharset, AskCharset); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - DefaultCharset = dlg.GetCharset (); - AskCharset = dlg.IsSetAskCharset (); - } + DefaultCharsetDialog dlg; + int ret; + dlg.Create(this, DefaultCharset, AskCharset); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + DefaultCharset = dlg.GetCharset(); + AskCharset = dlg.IsSetAskCharset(); + } } -bool -MyFrame::ExecuteSql (const char *sql, int rowNo) +void MyFrame::OnTimerAutoSave(wxTimerEvent & event) +{ +// +// AutoSave - Timer event handler +// + int tc = sqlite3_total_changes(SqliteHandle); + if (tc != LastTotalChanges) + MemoryDbSave(); + if (AutoSaveInterval <= 0) + { + delete TimerAutoSave; + TimerAutoSave = NULL; + } else + TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); +} + +bool MyFrame::ExecuteSql(const char *sql, int rowNo) { // // executes an SQL statement from the SQL script // - int ret; - char *errMsg = NULL; - wxString msg; - ret = sqlite3_exec (SqliteHandle, sql, NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - msg.Printf (wxT ("row %d\n\nSQLite SQL error: "), rowNo); - wxMessageBox (msg + wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return false; - } - return true; + int ret; + char *errMsg = NULL; + wxString msg; + char dummy[128]; + ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + sprintf(dummy, "row %d\n\nSQLite SQL error: ", rowNo); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return false; + } + return true; } -void -MyFrame::Rollback () +void MyFrame::Rollback() { // // performing a ROLLBACK // - sqlite3_exec (SqliteHandle, "ROLLBACK", NULL, NULL, NULL); + sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, NULL, NULL); } -bool -MyFrame::OpenDB () +bool MyFrame::OpenDB() { // // establishing a physical connetion to some DB SQLite // - int ret; - ret = - sqlite3_open_v2 (SqlitePath.ToUTF8 (), &SqliteHandle, - SQLITE_OPEN_READWRITE, NULL); - if (ret) - { - // impossibile aprire il DB SQLite - wxString errCause; - errCause = wxString::FromUTF8 (sqlite3_errmsg (SqliteHandle)); - sqlite3_close (SqliteHandle); - wxMessageBox (wxT ("Failure while connecting to DB\n\n") + errCause + - wxT ("\n") + SqlitePath, wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - SqliteHandle = NULL; - ClearTableTree (); - return false; - } - InitTableTree (); - return true; -} - -void -MyFrame::CloseDB () + int ret; + ret = + sqlite3_open_v2(SqlitePath.ToUTF8(), &SqliteHandle, SQLITE_OPEN_READWRITE, + NULL); + if (ret) + { + // an error occurred + wxString errCause; + errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + sqlite3_close(SqliteHandle); + wxMessageBox(wxT("Failure while connecting to DB\n\n") + errCause + + wxT("\n") + SqlitePath, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + SqliteHandle = NULL; + ClearTableTree(); + MemoryDatabase = false; + return false; + } + AutoFDOStart(); + InitTableTree(); + return true; +} + +void MyFrame::LastDitchMemoryDbSave() +{ +// +// performing the last desperate attempt to save a MEMORY-DB +// + int tc; + int ret; + wxString lastDir; + if (MemoryDatabase == false) + return; + if (!SqliteHandle) + return; + tc = sqlite3_total_changes(SqliteHandle); + if (tc == LastTotalChanges) + return; + while (1) + { + // OK, this MEMORY-DB needs to be saved + if (MemoryDbSave() == true) + break; + // we must ask the user + wxString msg = + wxT("WARNING: the MEMORY-DB contains uncommitted changes\n\n"); + msg += wxT("The MEMORY_DB is intrinsecally volatile, so these changes\n"); + msg += + wxT("will be irremediably lost if you don't export them to some\n"); + msg += wxT("persistent storage [i.e. on the file-system]\n\n"); + msg += + wxT + ("Do you want to export [SAVE] the MEMORY-DB to some external database ?"); + ret = + wxMessageBox(msg, wxT("spatialite-gui"), wxYES_NO | wxICON_QUESTION, + this); + if (ret != wxYES) + break; + // asking a PATHNAME to the user + wxFileDialog *fileDialog = + new wxFileDialog(this, wxT("Saving the MEMORY-DB"), + wxT(""), wxT("db.sqlite"), + wxT + ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + // exporting the external DB + ExternalSqlitePath = fileDialog->GetPath(); + if (MemoryDbSave() == true) + { + wxMessageBox(wxT("Ok, MEMORY-DB was succesfully saved"), + wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + break; + } + } + } +} + +void MyFrame::CloseDB() { // // disconnecting current SQLite DB // - if (!SqliteHandle) - return; - sqlite3_close (SqliteHandle); - SqliteHandle = NULL; - SqlitePath = wxT (""); - ClearTableTree (); + if (!SqliteHandle) + return; + AutoFDOStop(); + if (AutoFDOmsg.Len() > 0) + wxMessageBox(AutoFDOmsg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + LastDitchMemoryDbSave(); + sqlite3_close(SqliteHandle); + SqliteHandle = NULL; + SqlitePath = wxT(""); + MemoryDatabase = false; + ClearTableTree(); } -bool -MyFrame::CreateDB () +bool MyFrame::CreateDB() { // creating a new, empty SQLite DB - unlink (SqlitePath.ToUTF8 ()); - int ret; - ret = sqlite3_open_v2 (SqlitePath.ToUTF8 (), &SqliteHandle, - SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); - if (ret) - { - // an error occurred - wxString errCause; - errCause = wxString::FromUTF8 (sqlite3_errmsg (SqliteHandle)); - sqlite3_close (SqliteHandle); - wxMessageBox (wxT ("An error occurred\n\n") + errCause + wxT ("\n") + - SqlitePath, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - SqliteHandle = NULL; - ClearTableTree (); - return false; - } - InitTableTree (); - return true; -} - -void -MyFrame::CleanSql (char *buf) + int ret; + char path[1024]; + if (MemoryDatabase == true) + strcpy(path, ":memory:"); + else + { + strcpy(path, SqlitePath.ToUTF8()); + unlink(path); + } + ret = + sqlite3_open_v2(path, &SqliteHandle, + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); + if (ret) + { + // an error occurred + wxString errCause; + errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + sqlite3_close(SqliteHandle); + wxMessageBox(wxT("An error occurred\n\n") + errCause + wxT("\n") + + SqlitePath, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + this); + SqliteHandle = NULL; + ClearTableTree(); + MemoryDatabase = false; + return false; + } + if (CreateSpatialMetaData() == false) + wxMessageBox(wxT("Spatial Metadata tables creation error\n") + + SqlitePath, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + AutoFDOStart(); + InitTableTree(); + return true; +} + +void MyFrame::CleanSql(char *buf) { // well-formatting a string to be used as an SQL string - char tmp[1024]; - char *in = tmp; - char *out = buf; - strcpy (tmp, buf); - while (*in != '\0') - { - if (*in == '\'') - *out++ = '\''; - *out++ = *in++; - } - *out = '\0'; + char tmp[1024]; + char *in = tmp; + char *out = buf; + strcpy(tmp, buf); + while (*in != '\0') + { + if (*in == '\'') + *out++ = '\''; + *out++ = *in++; + } + *out = '\0'; } -void -MyFrame::InitTableTree () +void MyFrame::InitTableTree() { // loads the table TREE list - int i; - char **results; - int rows; - int columns; - char *errMsg = NULL; - char *name; - char *createSql; - char *type; - wxString tblName; - wxString sql; - bool virtualTable = false; - TableTree->SetPath (SqlitePath); - TableTree->FlushAll (); - sql = - wxT - ("SELECT name, sql, type FROM sqlite_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - name = results[(i * columns) + 0]; - createSql = results[(i * columns) + 1]; - type = results[(i * columns) + 2]; - if (strstr (createSql, "VIRTUAL") - || strstr (createSql, "virtual")) - virtualTable = true; - else - virtualTable = false; - tblName = wxString::FromUTF8 (name); - if (strcmp (type, "view") == 0) - TableTree->AddView (tblName); - else - TableTree->AddTable (tblName, virtualTable); - } - } - sqlite3_free_table (results); - TableTree->ExpandRoot (); + int i; + char **results; + int rows; + int columns; + char *errMsg = NULL; + char *name; + char *createSql; + char *type; + wxString tblName; + wxString sql; + bool virtualTable = false; + TableTree->Show(false); + if (MemoryDatabase == true) + { + wxString memory = wxT("MEMORY-DB"); + TableTree->SetPath(memory); + } else + TableTree->SetPath(SqlitePath); + TableTree->FlushAll(); + sql = + wxT + ("SELECT name, sql, type FROM sqlite_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 0]; + createSql = results[(i * columns) + 1]; + type = results[(i * columns) + 2]; + if (strstr(createSql, "VIRTUAL") || strstr(createSql, "virtual")) + virtualTable = true; + else + virtualTable = false; + tblName = wxString::FromUTF8(name); + if (strcmp(type, "view") == 0) + TableTree->AddView(tblName); + else + TableTree->AddTable(tblName, virtualTable); + } + } + sqlite3_free_table(results); + TableTree->ExpandRoot(); + TableTree->Show(true); +} + +wxString *MyFrame::GetTables(int *n) +{ +// loads the table list + int i; + char **results; + int rows; + int columns; + char *errMsg = NULL; + char *name; + wxString *tables = NULL; + wxString sql; + *n = 0; + sql = + wxT("SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return tables; + } + if (rows < 1) + ; + else + { + tables = new wxString[rows]; + *n = rows; + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 0]; + tables[i - 1] = wxString::FromUTF8(name); + } + } + sqlite3_free_table(results); + return tables; } -void -MyFrame::GetTableColumns (wxString & tableName, MyTableInfo * list) +void MyFrame::GetTableColumns(wxString & tableName, MyTableInfo * list) { // loads the table's column list - int i; - char **results; - int rows; - int columns; - char *errMsg = NULL; - char *name; - char *column; - wxString Name; - wxString Column; - bool pKey; - bool index; - bool cached; - wxString sql; - sql = wxT ("PRAGMA table_info("); - sql += tableName; - sql += wxT (")"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - name = results[(i * columns) + 1]; - if (atoi (results[(i * columns) + 5]) == 0) - pKey = false; - else - pKey = true; - Name = wxString::FromUTF8 (name); - list->AddColumn (Name, pKey); - } - } - sqlite3_free_table (results); - if (CheckMetadata () == true) - { - // ok, Spatial MetaData exists; retrieving Geometries and Spatial Indices - sql = - wxT - ("SELECT f_geometry_column, spatial_index_enabled FROM geometry_columns "); - sql += wxT ("WHERE f_table_name = '"); - sql += tableName; - sql += wxT ("'"); - ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - column = results[(i * columns) + 0]; - if (atoi (results[(i * columns) + 1]) == 1) - index = true; - else - index = false; - if (atoi (results[(i * columns) + 1]) == 2) - cached = true; - else - cached = false; - Column = wxString::FromUTF8 (column); - list->SetGeometry (Column, index, cached); - } - } - sqlite3_free_table (results); - } + int i; + char **results; + int rows; + int columns; + char *errMsg = NULL; + char *name; + char *column; + wxString Name; + wxString Column; + bool pKey; + bool index; + bool cached; + wxString sql; + sql = wxT("PRAGMA table_info(\""); + sql += tableName; + sql += wxT("\")"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 1]; + if (atoi(results[(i * columns) + 5]) == 0) + pKey = false; + else + pKey = true; + Name = wxString::FromUTF8(name); + list->AddColumn(Name, pKey); + } + } + sqlite3_free_table(results); + if (CheckMetadata() == true) + { + // ok, Spatial MetaData exists; retrieving Geometries and Spatial Indices + sql = + wxT + ("SELECT f_geometry_column, spatial_index_enabled FROM geometry_columns "); + sql += wxT("WHERE f_table_name = '"); + sql += tableName; + sql += wxT("'"); + ret = + sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + column = results[(i * columns) + 0]; + if (atoi(results[(i * columns) + 1]) == 1) + index = true; + else + index = false; + if (atoi(results[(i * columns) + 1]) == 2) + cached = true; + else + cached = false; + Column = wxString::FromUTF8(column); + list->SetGeometry(Column, index, cached); + } + } + sqlite3_free_table(results); + } } -void -MyFrame::GetViewColumns (wxString & tableName, MyViewInfo * list) +void MyFrame::GetViewColumns(wxString & tableName, MyViewInfo * list) { // loads the view's column list - int i; - char **results; - int rows; - int columns; - char *errMsg = NULL; - char *name; - wxString Name; - wxString sql; - sql = wxT ("PRAGMA table_info("); - sql += tableName; - sql += wxT (")"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - name = results[(i * columns) + 1]; - Name = wxString::FromUTF8 (name); - list->AddColumn (Name); - } - } - sqlite3_free_table (results); + int i; + char **results; + int rows; + int columns; + char *errMsg = NULL; + char *name; + wxString Name; + wxString sql; + sql = wxT("PRAGMA table_info(\""); + sql += tableName; + sql += wxT("\")"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 1]; + Name = wxString::FromUTF8(name); + list->AddColumn(Name); + } + } + sqlite3_free_table(results); } -void -MyFrame::GetTableIndices (wxString & tableName, MyTableInfo * list) +void MyFrame::GetTableIndices(wxString & tableName, MyTableInfo * list) { // loads the table's indices list - int i; - char **results; - int rows; - int columns; - char *errMsg = NULL; - char *name; - wxString Name; - wxString sql; - sql = wxT ("PRAGMA index_list("); - sql += tableName; - sql += wxT (")"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - name = results[(i * columns) + 1]; - Name = wxString::FromUTF8 (name); - list->AddIndex (Name); - } - } - sqlite3_free_table (results); + int i; + char **results; + int rows; + int columns; + char *errMsg = NULL; + char *name; + wxString Name; + wxString sql; + sql = wxT("PRAGMA index_list(\""); + sql += tableName; + sql += wxT("\")"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 1]; + Name = wxString::FromUTF8(name); + list->AddIndex(Name); + } + } + sqlite3_free_table(results); } -void -MyFrame::GetTableTriggers (wxString & tableName, MyTableInfo * list) +void MyFrame::GetTableTriggers(wxString & tableName, MyTableInfo * list) { // loads the table's indices list - int i; - char **results; - int rows; - int columns; - char *errMsg = NULL; - char *name; - wxString Name; - wxString sql; - sql = - wxT - ("SELECT name FROM sqlite_master WHERE type = 'trigger' AND tbl_name = '"); - sql += tableName; - sql += wxT ("' ORDER BY name"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - name = results[(i * columns) + 0]; - Name = wxString::FromUTF8 (name); - list->AddTrigger (Name); - } - } - sqlite3_free_table (results); - TableTree->ExpandRoot (); + int i; + char **results; + int rows; + int columns; + char *errMsg = NULL; + char *name; + wxString Name; + wxString sql; + sql = + wxT + ("SELECT name FROM sqlite_master WHERE type = 'trigger' AND tbl_name = '"); + sql += tableName; + sql += wxT("' ORDER BY \"name\""); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 0]; + Name = wxString::FromUTF8(name); + list->AddTrigger(Name); + } + } + sqlite3_free_table(results); + TableTree->ExpandRoot(); } -wxString * -MyFrame::GetColumnNames (wxString & tableName, int *n_cols) +wxString *MyFrame::GetColumnNames(wxString & tableName, int *n_cols) { // loads the table's column names list - wxString *cols = NULL; - int nCols = 0; - char **results; - int rows; - int columns; - int i; - char *errMsg = NULL; - wxString sql; - char *column; - sql = wxT ("PRAGMA table_info("); - sql += tableName; - sql += wxT (")"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return NULL; - } - sql = wxT (""); - if (rows < 1) - ; - else - { - nCols = rows; - cols = new wxString[rows]; - for (i = 1; i <= rows; i++) - { - column = results[(i * columns) + 1]; - *(cols + i - 1) += wxString::FromUTF8 (column); - } - } - sqlite3_free_table (results); - *n_cols = nCols; - return cols; + wxString *cols = NULL; + int nCols = 0; + char **results; + int rows; + int columns; + int i; + char *errMsg = NULL; + wxString sql; + char *column; + sql = wxT("PRAGMA table_info(\""); + sql += tableName; + sql += wxT("\")"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return NULL; + } + sql = wxT(""); + if (rows < 1) + ; + else + { + nCols = rows; + cols = new wxString[rows]; + for (i = 1; i <= rows; i++) + { + column = results[(i * columns) + 1]; + *(cols + i - 1) += wxString::FromUTF8(column); + } + } + sqlite3_free_table(results); + *n_cols = nCols; + return cols; } -int -MyFrame::GetCharsetIndex (wxString & charset) +int MyFrame::GetCharsetIndex(wxString & charset) { // identifies the INDEX for a given charset - int i; - for (i = 0; i < CharsetsLen; i++) - { - if (*(Charsets + i) == charset) - return i; - } - return wxNOT_FOUND; + int i; + for (i = 0; i < CharsetsLen; i++) + { + if (*(Charsets + i) == charset) + return i; + } + return wxNOT_FOUND; } -wxString & MyFrame::GetCharsetName (wxString & charset) +wxString & MyFrame::GetCharsetName(wxString & charset) { // identifies the full name for a given charset code - int - i; - for (i = 0; i < CharsetsLen; i++) - { - if (*(Charsets + i) == charset) - return *(CharsetsNames + i); - } - return charset; + int i; + for (i = 0; i < CharsetsLen; i++) + { + if (*(Charsets + i) == charset) + return *(CharsetsNames + i); + } + return charset; } -void -MyFrame::ClearTableTree () +void MyFrame::ClearTableTree() { // resets the table TREE list to the empty state - wxString path = wxT ("no current DB"); - TableTree->SetPath (path); - TableTree->FlushAll (); + wxString path = wxT("no current DB"); + TableTree->SetPath(path); + TableTree->FlushAll(); +} + +void MyFrame::AutoFDOStart() +{ +// +// trying to start the FDO-OGR auto-wrapper +// + int ret; + const char *name; + int i; + char **results; + int rows; + int columns; + char sql[1024]; + int count = 0; + int len; + int spatial_type = 0; + AutoFDOTables tables; + AutoFDOTable *p; + wxString fdoNames[5]; + SpatiaLiteMetadata = false; + AutoFDOmsg = wxT(""); + strcpy(sql, "SELECT CheckSpatialMetadata()"); + ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); + if (ret != SQLITE_OK) + goto error1; + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + spatial_type = atoi(results[(i * columns) + 0]); + } + sqlite3_free_table(results); +error1: + if (spatial_type == 1) + SpatiaLiteMetadata = true; + if (spatial_type == 2) + { + // + // ok, creating VirtualFDO tables + // + strcpy(sql, "SELECT DISTINCT f_table_name FROM geometry_columns"); + ret = + sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); + if (ret != SQLITE_OK) + goto error; + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 0]; + if (name) + { + len = strlen(name); + tables.Add(name, len); + } + } + } + sqlite3_free_table(results); + p = tables.GetFirst(); + while (p) + { + // + // destroying the VirtualFDO table [if existing] + // + sprintf(sql, "DROP TABLE IF EXISTS \"fdo_%s\"", p->GetName()); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); + if (ret != SQLITE_OK) + goto error; + // + // creating the VirtualFDO table + // + sprintf(sql, "CREATE VIRTUAL TABLE \"fdo_%s\" USING VirtualFDO(%s)", + p->GetName(), p->GetName()); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); + if (ret != SQLITE_OK) + goto error; + if (count < 5) + fdoNames[count] = + wxT("- VirtualTable: \"fdo_") + wxString::FromUTF8(p->GetName()) + + wxT("\""); + else + fdoNames[4] = wxT("- ... and others ..."); + count++; + p = p->GetNext(); + } + error: + if (count++) + { + AutoFDOmsg = + wxT("FDO-OGR detected; activating FDO-OGR auto-wrapping ...\n\n"); + if (fdoNames[0].Len() > 0) + AutoFDOmsg += fdoNames[0] + wxT("\n"); + if (fdoNames[1].Len() > 0) + AutoFDOmsg += fdoNames[1] + wxT("\n"); + if (fdoNames[2].Len() > 0) + AutoFDOmsg += fdoNames[2] + wxT("\n"); + if (fdoNames[3].Len() > 0) + AutoFDOmsg += fdoNames[3] + wxT("\n"); + if (fdoNames[4].Len() > 0) + AutoFDOmsg += fdoNames[4] + wxT("\n"); + AutoFDOmsg += + wxT + ("\nAccessing these fdo_XX tables you can take full advantage of\n"); + AutoFDOmsg += wxT("FDO-OGR auto-wrapping facility\n"); + AutoFDOmsg += + wxT + ("This allows you to access any specific FDO-OGR Geometry as if it\n"); + AutoFDOmsg += + wxT + ("where native SpatiaLite ones in a completely transparent way.\n"); + } + return; + } } -int -MyFrame::GuessBlobType (int size, unsigned char *blob) +void MyFrame::AutoFDOStop() { // -// trying to check the content-type for a BLOB value [using signatures] +// trying to stop the FDO-OGR auto-wrapper // - bool geom; - if (size < 1 || !blob) - return BLOB_NULL; - if (size > 5) - { - if (strncmp ((char *) blob, "%PDF-", 5) == 0) - return BLOB_PDF; - } - if (size > 6) - { - if (strncmp ((char *) blob, "GIF87a", 6) == 0 - || strncmp ((char *) blob, "GIF89a", 6) == 0) - return BLOB_GIF; - } - if (size > 4) - { - if (memcmp (blob, ZipSignature, 4) == 0) - return BLOB_ZIP; - if (memcmp (blob, Jpeg1Signature, 2) == 0 - && memcmp (blob + size - 2, Jpeg2Signature, 2) == 0) - return BLOB_JPEG; // this one is the standard JPEG signature - if (memcmp (blob, Jpeg3Signature, 4) == 0) - return BLOB_JPEG; // another common JPEG signature - } - if (size > 8) - { - if (memcmp (blob, PngSignature, 8) == 0) - return BLOB_PNG; - } - if (size > 10) - { - if (memcmp (blob + 6, JfifSignature, 4) == 0) - return BLOB_JFIF; // standard JFIF signature - if (memcmp (blob + 6, ExifSignature, 4) == 0) - return BLOB_EXIF; // standard EXIF signature - } -// testing for GEOMETRY - geom = true; - if (size < 45) - geom = false; - else - { - if (*(blob + 0) != 0x00) - geom = false; - if (*(blob + (size - 1)) != 0xFE) - geom = false; - if (*(blob + 38) != 0x7C) - geom = false; - if (*(blob + 1) == 0 || *(blob + 1) == 1) - ; - else - geom = false; - } - if (geom == true) - return BLOB_GEOMETRY; - return BLOB_HEX; + int ret; + const char *name; + int i; + char **results; + int rows; + int columns; + char sql[1024]; + int count = 0; + int len; + int spatial_type = 0; + AutoFDOTables tables; + AutoFDOTable *p; + AutoFDOmsg = wxT(""); + strcpy(sql, "SELECT CheckSpatialMetadata()"); + ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); + if (ret != SQLITE_OK) + goto error1; + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + spatial_type = atoi(results[(i * columns) + 0]); + } + sqlite3_free_table(results); +error1: + if (spatial_type == 2) + { + // + // ok, destroying VirtualFDO tables + // + strcpy(sql, "SELECT DISTINCT f_table_name FROM geometry_columns"); + ret = + sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); + if (ret != SQLITE_OK) + goto error; + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + name = results[(i * columns) + 0]; + if (name) + { + len = strlen(name); + tables.Add(name, len); + } + } + } + sqlite3_free_table(results); + p = tables.GetFirst(); + while (p) + { + // + // destroying the VirtualFDO table [if existing] + // + sprintf(sql, "DROP TABLE IF EXISTS \"fdo_%s\"", p->GetName()); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); + if (ret != SQLITE_OK) + goto error; + count++; + p = p->GetNext(); + } + error: + if (count++) + AutoFDOmsg = wxT("FDO-OGR auto-wrapping shutdown done"); + return; + } } -void -MyFrame::GetHelp (wxString & html) +void MyFrame::GetHelp(wxString & html) { // // return the HTML Help // - html = - wxT - (""); - html += wxT (""); - html += wxT (""); - html += - wxT - (""); - html += wxT ("SQLite + SpatiaLite quick Help"); - html += wxT (""); - html += wxT (""); - html += - wxT ("

SQLite + SpatiaLite quick Help

"); - html += wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += wxT ("
Index of contents
1.SQLite SQL syntax
2.SQLite SQL functions
3.SpatiaLite SQL Spatial functions
"); - html += wxT ("

SQLite SQL syntax

"); - html += wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += wxT ("
ALTER TABLEsql-statement ::= ALTER TABLE [database-name .] table-name alteration
"); - html += wxT ("alteration ::= RENAME TO new-table-name
"); - html += wxT ("alteration ::= ADD [COLUMN] column-def
ANALYZEsql-statement ::= ANALYZE
"); - html += wxT ("sql-statement ::= ANALYZE database-name
"); - html += - wxT - ("sql-statement ::= ANALYZE [database-name .] table-name
ATTACH DATABASEsql-statement ::= ATTACH [DATABASE] database-filename AS database-name
BEGIN TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= END [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= COMMIT [TRANSACTION [name]]
"); - html += - wxT ("sql-statement ::= ROLLBACK [TRANSACTION [name]]
COMMIT TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= END [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= COMMIT [TRANSACTION [name]]
"); - html += - wxT ("sql-statement ::= ROLLBACK [TRANSACTION [name]]
CREATE INDEXsql-statement ::= CREATE [UNIQUE] INDEX [IF NOT EXISTS] [database-name .] index-name
"); - html += wxT ("ON table-name ( column-name [, column-name]* )
"); - html += - wxT - ("column-name ::= name [ COLLATE collation-name] [ ASC | DESC ]
CREATE TABLEsql-command ::= CREATE [TEMP | TEMPORARY] TABLE [IF NOT EXISTS] [database-name .] table-name (
"); - html += wxT ("column-def [, column-def]*
"); - html += wxT ("[, constraint]*
"); - html += wxT (")
"); - html += - wxT - ("sql-command ::= CREATE [TEMP | TEMPORARY] TABLE [database-name.] table-name AS select-statement
"); - html += - wxT - ("column-def ::= name [type] [[CONSTRAINT name] column-constraint]*
"); - html += wxT ("type ::= typename |
"); - html += wxT ("typename ( number ) |
"); - html += wxT ("typename ( number , number )
"); - html += wxT ("column-constraint ::= NOT NULL [ conflict-clause ] |
"); - html += - wxT - ("PRIMARY KEY [sort-order] [ conflict-clause ] [AUTOINCREMENT] |
"); - html += wxT ("UNIQUE [ conflict-clause ] |
"); - html += wxT ("CHECK ( expr ) |
"); - html += wxT ("DEFAULT value |
"); - html += wxT ("COLLATE collation-name
"); - html += - wxT - ("constraint ::= PRIMARY KEY ( column-list ) [ conflict-clause ] |
"); - html += wxT ("UNIQUE ( column-list ) [ conflict-clause ] |
"); - html += wxT ("CHECK ( expr )
"); - html += - wxT ("conflict-clause ::= ON CONFLICT conflict-algorithm
CREATE TRIGGERsql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name [ BEFORE | AFTER ]
"); - html += wxT ("database-event ON [database-name .] table-name
"); - html += wxT ("trigger-action
"); - html += - wxT - ("sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name INSTEAD OF
"); - html += wxT ("database-event ON [database-name .] view-name
"); - html += wxT ("trigger-action
"); - html += wxT ("database-event ::= DELETE |
"); - html += wxT ("INSERT |
"); - html += wxT ("UPDATE |
"); - html += wxT ("UPDATE OF column-list
"); - html += wxT ("trigger-action ::= [ FOR EACH ROW ] [ WHEN expression ]
"); - html += wxT ("BEGIN
"); - html += wxT ("trigger-step ; [ trigger-step ; ]*
"); - html += wxT ("END
"); - html += wxT ("trigger-step ::= update-statement | insert-statement |
"); - html += wxT ("delete-statement | select-statement
CREATE VIEWsql-command ::= CREATE [TEMP | TEMPORARY] VIEW [IF NOT EXISTS] [database-name.] view-name AS select-statement
CREATE VIRTUAL TABLEsql-command ::= CREATE VIRTUAL TABLE [database-name .] table-name USING module-name [( arguments )]
DELETEsql-statement ::= DELETE FROM [database-name .] table-name [WHERE expr]
DETACH DATABASEsql-command ::= DETACH [DATABASE] database-name
DROP INDEXsql-command ::= DROP INDEX [IF EXISTS] [database-name .] index-name
DROP TABLEsql-command ::= DROP TABLE [IF EXISTS] [database-name.] table-name
DROP TRIGGERsql-statement ::= DROP TRIGGER [IF EXISTS] [database-name .] trigger-name
DROP VIEWsql-command ::= DROP VIEW [IF EXISTS] view-name
END TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= END [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= COMMIT [TRANSACTION [name]]
"); - html += - wxT ("sql-statement ::= ROLLBACK [TRANSACTION [name]]
EXPLAINsql-statement ::= EXPLAIN sql-statement
INSERTsql-statement ::= INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] VALUES(value-list) |
"); - html += - wxT - ("INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] select-statement
ON CONFLICT clauseconflict-clause ::= ON CONFLICT conflict-algorithm
"); - html += - wxT - ("conflict-algorithm ::= ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
PRAGMAsql-statement ::= PRAGMA name [= value] |
"); - html += wxT ("PRAGMA function(arg)
"); - html += wxT ("PRAGMA auto_vacuum;
"); - html += - wxT ("PRAGMA auto_vacuum = 0 | none | 1 | full | 2 | incremental;
"); - html += wxT ("PRAGMA cache_size;
"); - html += wxT ("PRAGMA cache_size = Number-of-pages;
"); - html += wxT ("PRAGMA case_sensitive_like;
"); - html += wxT ("PRAGMA case_sensitive_like = 0 | 1;
"); - html += wxT ("PRAGMA count_changes;
"); - html += wxT ("PRAGMA count_changes = 0 | 1;
"); - html += wxT ("PRAGMA default_cache_size;
"); - html += wxT ("PRAGMA default_cache_size = Number-of-pages;
"); - html += wxT ("PRAGMA empty_result_callbacks;
"); - html += wxT ("PRAGMA empty_result_callbacks = 0 | 1;
"); - html += wxT ("PRAGMA encoding;
"); - html += wxT ("PRAGMA encoding = \"UTF-8\";
"); - html += wxT ("PRAGMA encoding = \"UTF-16\";
"); - html += wxT ("PRAGMA encoding = \"UTF-16le\";
"); - html += wxT ("PRAGMA encoding = \"UTF-16be\";
"); - html += wxT ("PRAGMA full_column_names;
"); - html += wxT ("PRAGMA full_column_names = 0 | 1;
"); - html += wxT ("PRAGMA fullfsync;
"); - html += wxT ("PRAGMA fullfsync = 0 | 1;
"); - html += wxT ("PRAGMA journal_mode;
"); - html += wxT ("PRAGMA database.journal_mode;
"); - html += wxT ("PRAGMA journal_mode = DELETE | PERSIST | OFF
"); - html += wxT ("PRAGMA database.journal_mode = DELETE | PERSIST | OFF
"); - html += wxT ("PRAGMA legacy_file_format;
"); - html += wxT ("PRAGMA legacy_file_format = ON | OFF
"); - html += wxT ("PRAGMA locking_mode;
"); - html += wxT ("PRAGMA locking_mode = NORMAL | EXCLUSIVE
"); - html += wxT ("PRAGMA page_size;
"); - html += wxT ("PRAGMA page_size = bytes;
"); - html += wxT ("PRAGMA max_page_count;
"); - html += wxT ("PRAGMA max_page_count = N;
"); - html += wxT ("PRAGMA read_uncommitted;
"); - html += wxT ("PRAGMA read_uncommitted = 0 | 1;
"); - html += wxT ("PRAGMA short_column_names;
"); - html += wxT ("PRAGMA short_column_names = 0 | 1;
"); - html += wxT ("PRAGMA synchronous;
"); - html += wxT ("PRAGMA synchronous = FULL; (2)
"); - html += wxT ("PRAGMA synchronous = NORMAL; (1)
"); - html += wxT ("PRAGMA synchronous = OFF; (0)
"); - html += wxT ("PRAGMA temp_store;
"); - html += wxT ("PRAGMA temp_store = DEFAULT; (0)
"); - html += wxT ("PRAGMA temp_store = FILE; (1)
"); - html += wxT ("PRAGMA temp_store = MEMORY; (2)
"); - html += wxT ("PRAGMA temp_store_directory;
"); - html += wxT ("PRAGMA temp_store_directory = 'directory-name';
"); - html += wxT ("PRAGMA database_list;
"); - html += wxT ("PRAGMA foreign_key_list(table-name);
"); - html += wxT ("PRAGMA [database].freelist_count;
"); - html += wxT ("PRAGMA index_info(index-name);
"); - html += wxT ("PRAGMA index_list(table-name);
"); - html += wxT ("PRAGMA table_info(table-name);
"); - html += wxT ("PRAGMA [database.]schema_version;
"); - html += wxT ("PRAGMA [database.]schema_version = integer ;
"); - html += wxT ("PRAGMA [database.]user_version;
"); - html += wxT ("PRAGMA [database.]user_version = integer ;
"); - html += wxT ("PRAGMA integrity_check;
"); - html += wxT ("PRAGMA integrity_check(integer)
"); - html += wxT ("PRAGMA parser_trace = ON; (1)
"); - html += wxT ("PRAGMA parser_trace = OFF; (0)
"); - html += wxT ("PRAGMA vdbe_trace = ON; (1)
"); - html += wxT ("PRAGMA vdbe_trace = OFF; (0)
"); - html += wxT ("PRAGMA vdbe_listing = ON; (1)
"); - html += wxT ("PRAGMA vdbe_listing = OFF; (0)
REINDEXsql-statement ::= REINDEX collation name
"); - html += - wxT - ("sql-statement ::= REINDEX [database-name .] table/index-name
REPLACEsql-statement ::= REPLACE INTO [database-name .] table-name [( column-list )] VALUES ( value-list ) |
"); - html += - wxT - ("REPLACE INTO [database-name .] table-name [( column-list )] select-statement
ROLLBACK TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= END [TRANSACTION [name]]
"); - html += wxT ("sql-statement ::= COMMIT [TRANSACTION [name]]
"); - html += - wxT ("sql-statement ::= ROLLBACK [TRANSACTION [name]]
SELECTsql-statement ::= SELECT [ALL | DISTINCT] result [FROM table-list]
"); - html += wxT ("[WHERE expr]
"); - html += wxT ("[GROUP BY expr-list]
"); - html += wxT ("[HAVING expr]
"); - html += wxT ("[compound-op select]*
"); - html += wxT ("[ORDER BY sort-expr-list]
"); - html += wxT ("[LIMIT integer [( OFFSET | , ) integer]]
"); - html += wxT ("result ::= result-column [, result-column]*
"); - html += - wxT ("result-column ::= * | table-name . * | expr [ [AS] string ]
"); - html += wxT ("table-list ::= table [join-op table join-args]*
"); - html += wxT ("table ::= table-name [AS alias] |
"); - html += wxT ("( select ) [AS alias]
"); - html += - wxT - ("join-op ::= , | [NATURAL] [LEFT | RIGHT | FULL] [OUTER | INNER | CROSS] JOIN
"); - html += wxT ("join-args ::= [ON expr] [USING ( id-list )]
"); - html += - wxT ("sort-expr-list ::= expr [sort-order] [, expr [sort-order]]*
"); - html += - wxT ("sort-order ::= [ COLLATE collation-name ] [ ASC | DESC ]
"); - html += - wxT - ("compound_op ::= UNION | UNION ALL | INTERSECT | EXCEPT
UPDATEsql-statement ::= UPDATE [ OR conflict-algorithm ] [database-name .] table-name
"); - html += wxT ("SET assignment [, assignment]*
"); - html += wxT ("[WHERE expr]
"); - html += wxT ("assignment ::= column-name = expr
VACUUMsql-statement ::= VACUUM
"); - html += wxT ("back to index"); - html += - wxT - ("

SQLite SQL functions

"); - html += wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (" "); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (" "); - html += wxT ("
ordinary functions
back to index
abs(X)Return the absolute value of the numeric argument X. "); - html += - wxT - ("Return NULL if X is NULL. Return 0.0 if X is not a numeric value.
coalesce(X,Y,...)Return a copy of the first non-NULL argument. "); - html += - wxT - ("If all arguments are NULL then NULL is returned. There must be at least 2 arguments.
glob(X,Y)This function is used to implement the \"X GLOB Y\" syntax of SQLite. "); - html += - wxT - ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the GLOB operator.
ifnull(X,Y)Return a copy of the first non-NULL argument. "); - html += - wxT - ("If both arguments are NULL then NULL is returned. This behaves the same as coalesce().
hex(X)The argument is interpreted as a BLOB. "); - html += - wxT - ("The result is a hexadecimal rendering of the content of that blob.
last_insert_rowid()Return the ROWID of the last row insert from this connection to the database. "); - html += - wxT - ("This is the same value that would be returned from the sqlite3_last_insert_rowid() API function.
length(X)Return the string length of X in characters. "); - html += - wxT - ("If SQLite is configured to support UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.
like(X,Y)
like(X,Y,Z)
This function is used to implement the \"X LIKE Y [ESCAPE Z]\" syntax of SQL."); - html += - wxT - ("If the optional ESCAPE clause is present, then the user-function is invoked with three arguments. "); - html += wxT ("Otherwise, it is invoked with two arguments only. "); - html += - wxT - ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the LIKE operator. "); - html += - wxT - ("When doing this, it may be important to override both the two and three argument versions of the like() function. "); - html += - wxT - ("Otherwise, different code may be called to implement the LIKE operator depending on whether or not an ESCAPE clause was specified.
load_extension(X)
load_extension(X,Y)
Load SQLite extensions "); - html += - wxT - ("out of the shared library file named X using the entry point Y. "); - html += - wxT - ("The result is a NULL. If Y is omitted then the default entry point of sqlite3_extension_init is used. "); - html += - wxT - ("This function raises an exception if the extension fails to load or initialize correctly.
lower(X)Return a copy of string X will all ASCII characters converted to lower case. "); - html += - wxT - ("The C library tolower() routine is used for the conversion, which means that this function might not work correctly on non-ASCII UTF-8 characters.
ltrim(X)
ltrim(X,Y)
Return a string formed by removing any and all characters "); - html += - wxT - ("that appear in Y from the left side of X. If the Y argument is omitted, spaces are removed.
max(X,Y,...)Return the argument with the maximum value. "); - html += wxT ("Arguments may be strings in addition to numbers. "); - html += wxT ("The maximum value is determined by the usual sort order. "); - html += - wxT - ("Note that max() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
min(X,Y,...)Return the argument with the minimum value. "); - html += wxT ("Arguments may be strings in addition to numbers. "); - html += wxT ("The minimum value is determined by the usual sort order. "); - html += - wxT - ("Note that min() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
nullif(X,Y)Return the first argument if the arguments are different, otherwise return NULL.
quote(X)This routine return a string which is the value of its argument suitable for inclusion "); - html += - wxT - ("into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. "); - html += - wxT - ("BLOBs are encoded as hexadecimal literals. The implementation of VACUUM uses this function. "); - html += - wxT - ("The function is also useful when writing triggers to implement undo/redo functionality.
random()Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.
randomblob(N)Return an N-byte blob containing pseudo-random bytes. N should be a postive integer.
replace(X,Y,Z)Return a string formed by substituting string Z for every occurrance of string Y in string X. "); - html += - wxT - ("The BINARY collating sequence is used for comparisons.
round(X)
round(X,Y)
Round off the number X to Y digits to the right of the decimal point. "); - html += wxT ("If the Y argument is omitted, 0 is assumed.
rtrim(X)
rtrim(X,Y)
Return a string formed by removing any and all characters "); - html += - wxT - ("that appear in Y from the right side of X. If the Y argument is omitted, spaces are removed.
sqlite_version(X)Return the version string for the SQLite library that is running. Example: \"3.5.9\"
substr(X,Y,Z)
substr(X,Y)
Return a substring of input string X that begins with the Y-th character "); - html += - wxT - ("and which is Z characters long. If Z is omitted then all character through the end of the string are returned. "); - html += wxT ("The left-most character of X is number 1. "); - html += - wxT - ("If Y is negative the the first character of the substring is found by counting from the right rather than the left. "); - html += - wxT - ("If X is string then characters indices refer to actual UTF-8 characters. If X is a BLOB then the indices refer to bytes.
trim(X)
trim(X,Y)
Return a string formed by removing any and all characters that appear in Y from both ends of X. "); - html += wxT ("If the Y argument is omitted, spaces are removed.
typeof(X)Return the type of the expression X. "); - html += - wxT - ("The only return values are \"null\", \"integer\", \"real\", \"text\", and \"blob\".
upper(X)Return a copy of input string X converted to all upper-case letters. "); - html += - wxT - ("The implementation of this function uses the C library routine toupper() which means it may not work correctly on non-ASCII UTF-8 strings.
zeroblob(N)Return a BLOB consisting of N bytes of 0x00. "); - html += wxT ("SQLite manages these zeroblobs very efficiently. "); - html += - wxT - ("Zeroblobs can be used to reserve space for a BLOB that is later written using incremental BLOB I/O.
aggregate functions
back to index
avg(X)Return the average value of all non-NULL X within a group. "); - html += - wxT - ("String and BLOB values that do not look like numbers are interpreted as 0. "); - html += - wxT - ("The result of avg() is always a floating point value even if all inputs are integers.
count(X)
count(*)
The first form return a count of the number of times that X is not NULL in a group. "); - html += - wxT - ("The second form (with no argument) return the total number of rows in the group.
group_concat(X)
group_concat(X,Y)
The result is a string which is the concatenation of all non-NULL values of X. "); - html += - wxT - ("If parameter Y is the separator between instances of X. A comma (\",\") is used as the separator if Y is omitted.
max(X)Return the maximum value of all values in the group. "); - html += - wxT - ("The usual sort order is used to determine the maximum.
min(X)Return the minimum non-NULL value of all values in the group. "); - html += - wxT - ("The usual sort order is used to determine the minimum. NULL is only returned if all values in the group are NULL.
sum(X)
total(X)
Return the numeric sum of all non-NULL values in the group. "); - html += - wxT - ("If there are no non-NULL input rows then sum() return NULL but total() return 0.0. "); - html += - wxT - ("NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL "); - html += - wxT - ("database engines implement sum() that way so SQLite does it in the same way in order to be compatible. "); - html += - wxT - ("The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language.
"); - html += - wxT - ("The result of total() is always a floating point value. The result of sum() is an integer value if all non-NULL inputs are integers. "); - html += - wxT - ("If any input to sum() is neither an integer or a NULL then sum() return a floating point value which might be an approximation to the true sum.
"); - html += - wxT - ("Sum() will throw an \"integer overflow\" exception if all inputs are integers or NULL and an integer overflow occurs at any point during the computation."); - html += wxT ("Total() never throws an exception.
"); - html += wxT ("back to index"); - html += - wxT ("

SpatiaLite SQL Spatial functions

"); - html += wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += - wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += - wxT (""); - html += - wxT - (""); - html += wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT (""); - html += - wxT - (""); - html += - wxT (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += - wxT - (""); - html += wxT ("
SQL utility functions [non-standard] for geometric objects"); - html += wxT ("
back to index
MakePoint( x Double precision , y Double precision, [ , SRID Integer] ) : Geometrya Geometry will be returned representing the POINT defined by [x y] coordinates
BuildMbr( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision, [ , SRID Integer] ) : Geometry[x1 y1] and [x2 y2] are assumed to be Points identifying a line segment;"); - html += - wxT - ("then a Geometry will be returned representing the MBR for this line segment
BuildCircleMbr( x Double precision , y Double precision , radius Double precision [ , SRID Integer] ) : Geometry[x y] is assumed to be the center of a circle of given radius; then a Geometry will be returned representing the MBR for this circle
MbrMinX( geom Geometry) : Double precisionreturn the x-coordinate for geom MBR's leftmost side as a double precision number
MbrMinY( geom Geometry) : Double precisionreturn the y-coordinate for geom MBR's lowermost side as a double precision number
MbrMaxX( geom Geometry) : Double precisionreturn the x-coordinate for geom MBR's rightmost side as a double precision number
MbrMaxY( geom Geometry) : Double precisionreturn the y-coordinate for geom MBR's uppermost side as a double precision number
functions for constructing a geometric object given its Well-known Text Representation"); - html += wxT ("
back to index
GeomFromText( wkt String [ , SRID Integer] ) : Geometryconstruct a geometric object given its Well-known text Representation
PointFromText( wktPoint String [ , SRID Integer] ) : Pointconstruct a Point
LineFromText( wktLineString String [ , SRID Integer] ) : Linestring
"); - html += - wxT - ("LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring
construct a Linestring
PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon
"); - html += - wxT - ("PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon
construct a Polygon
MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
"); - html += - wxT - ("MultiPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
construct a MultiPoint
MLineFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
"); - html += - wxT - ("MultiLineStringFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
construct a MultiLinestring
MPolyFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
"); - html += - wxT - ("MultiPolygonFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
construct a MultiPolygon
GeomCollFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
"); - html += - wxT - ("GeometryCollectionFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
construct a GeometryCollection
functions for constructing a geometric object given its Well-known Binary Representation"); - html += wxT ("
back to index
GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometryconstruct a geometric object given its Well-known binary Representation
PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Pointconstruct a Point
LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring
"); - html += - wxT - ("LineStringFromText( wkbLineString Binary [ , SRID Integer] ) : Linestring
construct a Linestring
PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
"); - html += - wxT - ("PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
construct a Polygon
MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
"); - html += - wxT - ("MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
construct a MultiPoint
MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
"); - html += - wxT - ("MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
construct a MultiLinestring
MPolyFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
"); - html += - wxT - ("MultiPolygonFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
construct a MultiPolygon
GeomCollFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
"); - html += - wxT - ("GeometryCollectionFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
construct a GeometryCollection
functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object"); - html += wxT ("
back to index
AsText( geom Geometry ) : Stringreturn the Well-known Text representation
AsBinary( geom Geometry ) : Binaryreturn the Well-known Binary representation
functions on type Geometry"); - html += wxT ("
back to index
Dimension( geom Geometry ) : Integerreturn the dimension of the geometric object, which is less than or equal to the dimension of the coordinate space
GeometryType( geom Geometry ) : Stringreturn the name of the instantiable subtype of Geometry of which this geometric object is a member, as a string
SRID( geom Geometry ) : Integerreturn the Spatial Reference System ID for this geometric object
SetSRID( geom Geometry , SRID Integer ) : Integerdirectly sets the Spatial Reference System ID for this geometric object [no reprojection is applied].
"); - html += - wxT - ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); - html += wxT ("function invocation on NULL arguments
IsEmpty( geom Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if this geometric object corresponds to the empty set
IsSimple( geom Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if this geometric object is simple, as defined in the Geometry Model
IsValid( geom Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if this geometric object does not contains any topological error
Boundary( geom Geometry ) : Geometryreturn a geometric object that is the combinatorial boundary of g as defined in the Geometry Model
Envelope( geom Geometry ) : Geometryreturn the rectangle bounding g as a Polygon. "); - html += - wxT - ("The Polygon is defined by the corner points of the bounding box [(MINX, MINY),(MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].
functions on type Point"); - html += wxT ("
back to index
X( pt Point ) : Double precisionreturn the x-coordinate of Point p as a double precision number
Y( pt Point ) : Double precisionreturn the y-coordinate of Point p as a double precision number
functions on type Curve [Linestring or Ring]
StartPoint( c Curve ) : Pointreturn a Point containing the first Point of c
EndPoint( c Curve ) : Pointreturn a Point containing the last Point of c
NumPoints( line LineString ) : Integerreturn the number of Points in the LineString
PointN( line LineString , n Integer ) : Pointreturn a Point containing Point n of line
GLength( c Curve ) : Double precisionreturn the length of c
IsClosed( c Curve ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); - html += - wxT - ("return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c)
IsRing( c Curve ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); - html += - wxT - ("return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through the same Point more than once.
Simplify( c Curve , tolerance Double precision ) : Curvereturn a geometric object representing a simplified version of c applying the Douglas-Peukert algorithm with given tolerance
SimplifyPreserveTopology( c Curve , tolerance Double precision ) : Curvereturn a geometric object representing a simplified version of c "); - html += - wxT - ("applying the Douglas-Peukert algorithm with given tolerance and respecting topology
functions on type Surface [Polygon or Ring]"); - html += wxT ("
back to index
Centroid( s Surface ) : Pointreturn the centroid of s, which may lie outside s
PointOnSurface( s Surface ) : Pointreturn a Point guaranteed to lie on the Surface
Area( s Surface ) : Double precisionreturn the area of s
functions on type Polygon"); - html += wxT ("
back to index
ExteriorRing( polyg Polygon ) : LineStringreturn the exteriorRing of p
NumInteriorRing( polyg Polygon ) : Integer
NumInteriorRings( polyg Polygon ) : Integer
return the number of interiorRings
InteriorRingN( polyg Polygon , n Integer ) : LineStringreturn the nth interiorRing. The order of Rings is not geometrically significant.
functions on type GeomCollection"); - html += wxT ("
back to index
NumGeometries( geom GeomCollection ) : Integerreturn the number of geometries
GeometryN( geom GeomCollection , n Integer ) : Geometryreturn the nth geometric object in the collection. The order of the elements in the collection is not geometrically significant.
functions testing approximative spatial relationships via MBRs"); - html += wxT ("
back to index
MbrEqual( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += wxT ("TRUE if g1 and g2 have equal MBRs
MbrDisjoint( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the intersection of g1 and g2 MBRs is the empty set
MbrTouches( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2
MbrWithin( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += wxT ("TRUE if g1 MBR is completely contained in g2 MBR
MbrOverlaps( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the intersection of g1 and g2 MBRs results in a value of the same dimension as g1 and g2 that is different from both g1 and g2
MbrIntersects( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); - html += - wxT - ("convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty
MbrContains( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); - html += - wxT - ("convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR
functions testing spatial relationships"); - html += wxT ("
back to index
Equals( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += wxT ("TRUE if g1 and g2 are equal
Disjoint( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the intersection of g1 and g2 is the empty set
Touches( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2
Within( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += wxT ("TRUE if g1 is completely contained in g2
Overlaps( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the intersection of g1 and g2 results in a value of the same dimension as g1 and g2 that is different from both g1 and g2
Crosses( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("TRUE if the intersection of g1 and g2 results in a value whose dimension is less than the maximum dimension of g1 and g2 "); - html += - wxT - ("and the intersection value includes Points interior to both g1 and g2, and the intersection value is not equal to either g1 or g2
Intersects( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); - html += - wxT - ("convenience predicate: TRUE if the intersection of g1 and g2 is not empty
Contains( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); - html += - wxT - ("convenience predicate: TRUE if g2 is completely contained in g1
Relate( geom1 Geometry , geom2 Geometry , patternMatrix String ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); - html += - wxT - ("return TRUE if the spatial relationship specified by the patternMatrix holds
Distance( geom1 Geometry , geom2 Geometry ) : Double precisionreturn the distance between geom1 and geom2
functions implementing spatial operators"); - html += wxT ("
back to index
Intersection( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the intersection of geometric objects geom1 and geom2
Difference( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the closure of the set difference of geom1 and geom2
GUnion( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the set union of geom1 and geom2
SymDifference( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the closure of the set symmetric difference of geom1 and geom2 (logical XOR of space)
Buffer( geom Geometry , dist Double precision ) : Geometryreturn a geometric object defined by buffering a distance d around geom, "); - html += - wxT - ("where dist is in the distance units for the Spatial Reference of geom
ConvexHull( geom Geometry ) : Geometryreturn a geometric object that is the convex hull of geom
functions for coordinate transformations"); - html += wxT ("
back to index
Transform( geom Geometry , newSRID Integer ) : Geometryreturn a geometric object obtained by reprojecting coordinates into the Reference System identified by newSRID
ShiftCoords( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
"); - html += - wxT - ("ShiftCoordinates( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
return a geometric object obtained by translating coordinates according to shiftX and shiftY values
ScaleCoords( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
"); - html += - wxT - ("ScaleCoordinates( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
return a geometric object obtained by scaling coordinates according to scaleX and scaleY values
"); - html += - wxT - ("if only one scale factor is specified, then an isotropic scaling occurs [i.e. the same scale factor is applied to both axis]"); - html += - wxT - ("otherwise an anisotropic scaling occurs [i.e. each axis is scaled according to its own scale factor]
RotateCoords( geom Geometry , angleInDegrees Double precision ) : Geometry
"); - html += - wxT - ("RotateCoordinates( geom Geometry , angleInDegrees Double precision ) : Geometry
return a geometric object obtained by rotating coordinates according to angleInDegrees value
ReflectCoords( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry
"); - html += - wxT - ("ReflectCoordinates( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry
return a geometric object obtained by reflecting coordinates according to xAxis and yAxis switches
"); - html += - wxT - ("i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected
SwapCoords( geom Geometry ) : Geometry
SwapCoordinates( geom Geometry ) : Geometry
return a geometric object obtained by swapping x- and y-coordinates
functions for Spatial-MetaData and Spatial-Index handling"); - html += wxT ("
back to index
InitSpatialMetaData( void ) : IntegerCreates the geometry_columns and spatial_ref_sys metadata tables"); - html += - wxT - ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
"); - html += - wxT - ("direct invocation of these function is discouraged; you have to run the init_spatialite.sql "); - html += - wxT - ("script in order to fully initialize the Spatial MetaData tables
AddGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer ) : IntegerCreates a new geometry column updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints
"); - html += - wxT - ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer ) : IntegerValidates an existing ordinary column in order to possibly transform it in a real geometry column, "); - html += - wxT - ("thus updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints
"); - html += - wxT - ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DiscardGeometryColumn( table String , column String ) : IntegerRemoves a geometry column from Spatial MetaData tables and drops any related trigger
"); - html += - wxT - ("the column itself still continues to exist untouched as an ordinary, unconstrained column
"); - html += - wxT - ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
CreateSpatialIndex( table String , column String ) : IntegerBuilds an RTree Spatial Index on a geometry column, "); - html += - wxT - ("creating any required trigger required in order to enforce full data coherency between the main table and Spatial Index
"); - html += - wxT - ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DisableSpatialIndex( table String , column String ) : IntegerDisables an RTree Spatial Index, removing any related trigger
"); - html += - wxT - ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
"); - html += wxT ("back to index"); - html += wxT (""); - html += wxT (""); + html = + wxT(""); + html += wxT(""); + html += wxT(""); + html += + wxT + (""); + html += wxT("SQLite + SpatiaLite quick Help"); + html += wxT(""); + html += wxT(""); + html += wxT("

SQLite + SpatiaLite quick Help

"); + html += wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += wxT("
Index of contents
1.SQLite SQL syntax
2.SQLite SQL functions
3.SpatiaLite SQL Spatial functions
"); + html += wxT("

SQLite SQL syntax

"); + html += wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += wxT("
ALTER TABLEsql-statement ::= ALTER TABLE [database-name .] table-name alteration
"); + html += wxT("alteration ::= RENAME TO new-table-name
"); + html += wxT("alteration ::= ADD [COLUMN] column-def
ANALYZEsql-statement ::= ANALYZE
"); + html += wxT("sql-statement ::= ANALYZE database-name
"); + html += + wxT("sql-statement ::= ANALYZE [database-name .] table-name
ATTACH DATABASEsql-statement ::= ATTACH [DATABASE] database-filename AS database-name
BEGIN TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
COMMIT TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
CREATE INDEXsql-statement ::= CREATE [UNIQUE] INDEX [IF NOT EXISTS] [database-name .] index-name
"); + html += wxT("ON table-name ( column-name [, column-name]* )
"); + html += + wxT + ("column-name ::= name [ COLLATE collation-name] [ ASC | DESC ]
CREATE TABLEsql-command ::= CREATE [TEMP | TEMPORARY] TABLE [IF NOT EXISTS] [database-name .] table-name (
"); + html += wxT("column-def [, column-def]*
"); + html += wxT("[, constraint]*
"); + html += wxT(")
"); + html += + wxT + ("sql-command ::= CREATE [TEMP | TEMPORARY] TABLE [database-name.] table-name AS select-statement
"); + html += + wxT + ("column-def ::= name [type] [[CONSTRAINT name] column-constraint]*
"); + html += wxT("type ::= typename |
"); + html += wxT("typename ( number ) |
"); + html += wxT("typename ( number , number )
"); + html += wxT("column-constraint ::= NOT NULL [ conflict-clause ] |
"); + html += + wxT("PRIMARY KEY [sort-order] [ conflict-clause ] [AUTOINCREMENT] |
"); + html += wxT("UNIQUE [ conflict-clause ] |
"); + html += wxT("CHECK ( expr ) |
"); + html += wxT("DEFAULT value |
"); + html += wxT("COLLATE collation-name
"); + html += + wxT("constraint ::= PRIMARY KEY ( column-list ) [ conflict-clause ] |
"); + html += wxT("UNIQUE ( column-list ) [ conflict-clause ] |
"); + html += wxT("CHECK ( expr )
"); + html += wxT("conflict-clause ::= ON CONFLICT conflict-algorithm
CREATE TRIGGERsql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name [ BEFORE | AFTER ]
"); + html += wxT("database-event ON [database-name .] table-name
"); + html += wxT("trigger-action
"); + html += + wxT + ("sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name INSTEAD OF
"); + html += wxT("database-event ON [database-name .] view-name
"); + html += wxT("trigger-action
"); + html += wxT("database-event ::= DELETE |
"); + html += wxT("INSERT |
"); + html += wxT("UPDATE |
"); + html += wxT("UPDATE OF column-list
"); + html += wxT("trigger-action ::= [ FOR EACH ROW ] [ WHEN expression ]
"); + html += wxT("BEGIN
"); + html += wxT("trigger-step ; [ trigger-step ; ]*
"); + html += wxT("END
"); + html += wxT("trigger-step ::= update-statement | insert-statement |
"); + html += wxT("delete-statement | select-statement
CREATE VIEWsql-command ::= CREATE [TEMP | TEMPORARY] VIEW [IF NOT EXISTS] [database-name.] view-name AS select-statement
CREATE VIRTUAL TABLEsql-command ::= CREATE VIRTUAL TABLE [database-name .] table-name USING module-name [( arguments )]
DELETEsql-statement ::= DELETE FROM [database-name .] table-name [WHERE expr]
DETACH DATABASEsql-command ::= DETACH [DATABASE] database-name
DROP INDEXsql-command ::= DROP INDEX [IF EXISTS] [database-name .] index-name
DROP TABLEsql-command ::= DROP TABLE [IF EXISTS] [database-name.] table-name
DROP TRIGGERsql-statement ::= DROP TRIGGER [IF EXISTS] [database-name .] trigger-name
DROP VIEWsql-command ::= DROP VIEW [IF EXISTS] view-name
END TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
EXPLAINsql-statement ::= EXPLAIN sql-statement
INSERTsql-statement ::= INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] VALUES(value-list) |
"); + html += + wxT + ("INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] select-statement
ON CONFLICT clauseconflict-clause ::= ON CONFLICT conflict-algorithm
"); + html += + wxT + ("conflict-algorithm ::= ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
PRAGMAsql-statement ::= PRAGMA name [= value] |
"); + html += wxT("PRAGMA function(arg)
"); + html += wxT("PRAGMA auto_vacuum;
"); + html += + wxT("PRAGMA auto_vacuum = 0 | none | 1 | full | 2 | incremental;
"); + html += wxT("PRAGMA cache_size;
"); + html += wxT("PRAGMA cache_size = Number-of-pages;
"); + html += wxT("PRAGMA case_sensitive_like;
"); + html += wxT("PRAGMA case_sensitive_like = 0 | 1;
"); + html += wxT("PRAGMA count_changes;
"); + html += wxT("PRAGMA count_changes = 0 | 1;
"); + html += wxT("PRAGMA default_cache_size;
"); + html += wxT("PRAGMA default_cache_size = Number-of-pages;
"); + html += wxT("PRAGMA empty_result_callbacks;
"); + html += wxT("PRAGMA empty_result_callbacks = 0 | 1;
"); + html += wxT("PRAGMA encoding;
"); + html += wxT("PRAGMA encoding = \"UTF-8\";
"); + html += wxT("PRAGMA encoding = \"UTF-16\";
"); + html += wxT("PRAGMA encoding = \"UTF-16le\";
"); + html += wxT("PRAGMA encoding = \"UTF-16be\";
"); + html += wxT("PRAGMA full_column_names;
"); + html += wxT("PRAGMA full_column_names = 0 | 1;
"); + html += wxT("PRAGMA fullfsync;
"); + html += wxT("PRAGMA fullfsync = 0 | 1;
"); + html += wxT("PRAGMA journal_mode;
"); + html += wxT("PRAGMA database.journal_mode;
"); + html += wxT("PRAGMA journal_mode = DELETE | PERSIST | OFF
"); + html += wxT("PRAGMA database.journal_mode = DELETE | PERSIST | OFF
"); + html += wxT("PRAGMA legacy_file_format;
"); + html += wxT("PRAGMA legacy_file_format = ON | OFF
"); + html += wxT("PRAGMA locking_mode;
"); + html += wxT("PRAGMA locking_mode = NORMAL | EXCLUSIVE
"); + html += wxT("PRAGMA page_size;
"); + html += wxT("PRAGMA page_size = bytes;
"); + html += wxT("PRAGMA max_page_count;
"); + html += wxT("PRAGMA max_page_count = N;
"); + html += wxT("PRAGMA read_uncommitted;
"); + html += wxT("PRAGMA read_uncommitted = 0 | 1;
"); + html += wxT("PRAGMA short_column_names;
"); + html += wxT("PRAGMA short_column_names = 0 | 1;
"); + html += wxT("PRAGMA synchronous;
"); + html += wxT("PRAGMA synchronous = FULL; (2)
"); + html += wxT("PRAGMA synchronous = NORMAL; (1)
"); + html += wxT("PRAGMA synchronous = OFF; (0)
"); + html += wxT("PRAGMA temp_store;
"); + html += wxT("PRAGMA temp_store = DEFAULT; (0)
"); + html += wxT("PRAGMA temp_store = FILE; (1)
"); + html += wxT("PRAGMA temp_store = MEMORY; (2)
"); + html += wxT("PRAGMA temp_store_directory;
"); + html += wxT("PRAGMA temp_store_directory = 'directory-name';
"); + html += wxT("PRAGMA database_list;
"); + html += wxT("PRAGMA foreign_key_list(table-name);
"); + html += wxT("PRAGMA [database].freelist_count;
"); + html += wxT("PRAGMA index_info(index-name);
"); + html += wxT("PRAGMA index_list(table-name);
"); + html += wxT("PRAGMA table_info(table-name);
"); + html += wxT("PRAGMA [database.]schema_version;
"); + html += wxT("PRAGMA [database.]schema_version = integer ;
"); + html += wxT("PRAGMA [database.]user_version;
"); + html += wxT("PRAGMA [database.]user_version = integer ;
"); + html += wxT("PRAGMA integrity_check;
"); + html += wxT("PRAGMA integrity_check(integer)
"); + html += wxT("PRAGMA parser_trace = ON; (1)
"); + html += wxT("PRAGMA parser_trace = OFF; (0)
"); + html += wxT("PRAGMA vdbe_trace = ON; (1)
"); + html += wxT("PRAGMA vdbe_trace = OFF; (0)
"); + html += wxT("PRAGMA vdbe_listing = ON; (1)
"); + html += wxT("PRAGMA vdbe_listing = OFF; (0)
REINDEXsql-statement ::= REINDEX collation name
"); + html += + wxT + ("sql-statement ::= REINDEX [database-name .] table/index-name
REPLACEsql-statement ::= REPLACE INTO [database-name .] table-name [( column-list )] VALUES ( value-list ) |
"); + html += + wxT + ("REPLACE INTO [database-name .] table-name [( column-list )] select-statement
ROLLBACK TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); + html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
SELECTsql-statement ::= SELECT [ALL | DISTINCT] result [FROM table-list]
"); + html += wxT("[WHERE expr]
"); + html += wxT("[GROUP BY expr-list]
"); + html += wxT("[HAVING expr]
"); + html += wxT("[compound-op select]*
"); + html += wxT("[ORDER BY sort-expr-list]
"); + html += wxT("[LIMIT integer [( OFFSET | , ) integer]]
"); + html += wxT("result ::= result-column [, result-column]*
"); + html += + wxT("result-column ::= * | table-name . * | expr [ [AS] string ]
"); + html += wxT("table-list ::= table [join-op table join-args]*
"); + html += wxT("table ::= table-name [AS alias] |
"); + html += wxT("( select ) [AS alias]
"); + html += + wxT + ("join-op ::= , | [NATURAL] [LEFT | RIGHT | FULL] [OUTER | INNER | CROSS] JOIN
"); + html += wxT("join-args ::= [ON expr] [USING ( id-list )]
"); + html += + wxT("sort-expr-list ::= expr [sort-order] [, expr [sort-order]]*
"); + html += wxT("sort-order ::= [ COLLATE collation-name ] [ ASC | DESC ]
"); + html += + wxT("compound_op ::= UNION | UNION ALL | INTERSECT | EXCEPT
UPDATEsql-statement ::= UPDATE [ OR conflict-algorithm ] [database-name .] table-name
"); + html += wxT("SET assignment [, assignment]*
"); + html += wxT("[WHERE expr]
"); + html += wxT("assignment ::= column-name = expr
VACUUMsql-statement ::= VACUUM
"); + html += wxT("back to index"); + html += + wxT + ("

SQLite SQL functions

"); + html += wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (" "); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (" "); + html += wxT("
ordinary functions
back to index
abs(X)Return the absolute value of the numeric argument X. "); + html += + wxT + ("Return NULL if X is NULL. Return 0.0 if X is not a numeric value.
coalesce(X,Y,...)Return a copy of the first non-NULL argument. "); + html += + wxT + ("If all arguments are NULL then NULL is returned. There must be at least 2 arguments.
glob(X,Y)This function is used to implement the \"X GLOB Y\" syntax of SQLite. "); + html += + wxT + ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the GLOB operator.
ifnull(X,Y)Return a copy of the first non-NULL argument. "); + html += + wxT + ("If both arguments are NULL then NULL is returned. This behaves the same as coalesce().
hex(X)The argument is interpreted as a BLOB. "); + html += + wxT + ("The result is a hexadecimal rendering of the content of that blob.
last_insert_rowid()Return the ROWID of the last row insert from this connection to the database. "); + html += + wxT + ("This is the same value that would be returned from the sqlite3_last_insert_rowid() API function.
length(X)Return the string length of X in characters. "); + html += + wxT + ("If SQLite is configured to support UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.
like(X,Y)
like(X,Y,Z)
This function is used to implement the \"X LIKE Y [ESCAPE Z]\" syntax of SQL."); + html += + wxT + ("If the optional ESCAPE clause is present, then the user-function is invoked with three arguments. "); + html += wxT("Otherwise, it is invoked with two arguments only. "); + html += + wxT + ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the LIKE operator. "); + html += + wxT + ("When doing this, it may be important to override both the two and three argument versions of the like() function. "); + html += + wxT + ("Otherwise, different code may be called to implement the LIKE operator depending on whether or not an ESCAPE clause was specified.
load_extension(X)
load_extension(X,Y)
Load SQLite extensions "); + html += + wxT("out of the shared library file named X using the entry point Y. "); + html += + wxT + ("The result is a NULL. If Y is omitted then the default entry point of sqlite3_extension_init is used. "); + html += + wxT + ("This function raises an exception if the extension fails to load or initialize correctly.
lower(X)Return a copy of string X will all ASCII characters converted to lower case. "); + html += + wxT + ("The C library tolower() routine is used for the conversion, which means that this function might not work correctly on non-ASCII UTF-8 characters.
ltrim(X)
ltrim(X,Y)
Return a string formed by removing any and all characters "); + html += + wxT + ("that appear in Y from the left side of X. If the Y argument is omitted, spaces are removed.
max(X,Y,...)Return the argument with the maximum value. "); + html += wxT("Arguments may be strings in addition to numbers. "); + html += wxT("The maximum value is determined by the usual sort order. "); + html += + wxT + ("Note that max() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
min(X,Y,...)Return the argument with the minimum value. "); + html += wxT("Arguments may be strings in addition to numbers. "); + html += wxT("The minimum value is determined by the usual sort order. "); + html += + wxT + ("Note that min() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
nullif(X,Y)Return the first argument if the arguments are different, otherwise return NULL.
quote(X)This routine return a string which is the value of its argument suitable for inclusion "); + html += + wxT + ("into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. "); + html += + wxT + ("BLOBs are encoded as hexadecimal literals. The implementation of VACUUM uses this function. "); + html += + wxT + ("The function is also useful when writing triggers to implement undo/redo functionality.
random()Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.
randomblob(N)Return an N-byte blob containing pseudo-random bytes. N should be a postive integer.
replace(X,Y,Z)Return a string formed by substituting string Z for every occurrance of string Y in string X. "); + html += + wxT("The BINARY collating sequence is used for comparisons.
round(X)
round(X,Y)
Round off the number X to Y digits to the right of the decimal point. "); + html += wxT("If the Y argument is omitted, 0 is assumed.
rtrim(X)
rtrim(X,Y)
Return a string formed by removing any and all characters "); + html += + wxT + ("that appear in Y from the right side of X. If the Y argument is omitted, spaces are removed.
sqlite_version(X)Return the version string for the SQLite library that is running. Example: \"3.5.9\"
substr(X,Y,Z)
substr(X,Y)
Return a substring of input string X that begins with the Y-th character "); + html += + wxT + ("and which is Z characters long. If Z is omitted then all character through the end of the string are returned. "); + html += wxT("The left-most character of X is number 1. "); + html += + wxT + ("If Y is negative the the first character of the substring is found by counting from the right rather than the left. "); + html += + wxT + ("If X is string then characters indices refer to actual UTF-8 characters. If X is a BLOB then the indices refer to bytes.
trim(X)
trim(X,Y)
Return a string formed by removing any and all characters that appear in Y from both ends of X. "); + html += wxT("If the Y argument is omitted, spaces are removed.
typeof(X)Return the type of the expression X. "); + html += + wxT + ("The only return values are \"null\", \"integer\", \"real\", \"text\", and \"blob\".
upper(X)Return a copy of input string X converted to all upper-case letters. "); + html += + wxT + ("The implementation of this function uses the C library routine toupper() which means it may not work correctly on non-ASCII UTF-8 strings.
zeroblob(N)Return a BLOB consisting of N bytes of 0x00. "); + html += wxT("SQLite manages these zeroblobs very efficiently. "); + html += + wxT + ("Zeroblobs can be used to reserve space for a BLOB that is later written using incremental BLOB I/O.
aggregate functions
back to index
avg(X)Return the average value of all non-NULL X within a group. "); + html += + wxT + ("String and BLOB values that do not look like numbers are interpreted as 0. "); + html += + wxT + ("The result of avg() is always a floating point value even if all inputs are integers.
count(X)
count(*)
The first form return a count of the number of times that X is not NULL in a group. "); + html += + wxT + ("The second form (with no argument) return the total number of rows in the group.
group_concat(X)
group_concat(X,Y)
The result is a string which is the concatenation of all non-NULL values of X. "); + html += + wxT + ("If parameter Y is the separator between instances of X. A comma (\",\") is used as the separator if Y is omitted.
max(X)Return the maximum value of all values in the group. "); + html += + wxT("The usual sort order is used to determine the maximum.
min(X)Return the minimum non-NULL value of all values in the group. "); + html += + wxT + ("The usual sort order is used to determine the minimum. NULL is only returned if all values in the group are NULL.
sum(X)
total(X)
Return the numeric sum of all non-NULL values in the group. "); + html += + wxT + ("If there are no non-NULL input rows then sum() return NULL but total() return 0.0. "); + html += + wxT + ("NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL "); + html += + wxT + ("database engines implement sum() that way so SQLite does it in the same way in order to be compatible. "); + html += + wxT + ("The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language.
"); + html += + wxT + ("The result of total() is always a floating point value. The result of sum() is an integer value if all non-NULL inputs are integers. "); + html += + wxT + ("If any input to sum() is neither an integer or a NULL then sum() return a floating point value which might be an approximation to the true sum.
"); + html += + wxT + ("Sum() will throw an \"integer overflow\" exception if all inputs are integers or NULL and an integer overflow occurs at any point during the computation."); + html += wxT("Total() never throws an exception.
"); + html += wxT("back to index"); + html += wxT("

SpatiaLite SQL Spatial functions

"); + html += wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += wxT(""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT(""); + html += + wxT + (""); + html += wxT(""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + html += + wxT + (""); + + + html += wxT("
SQL math functions"); + html += wxT("
back to index
Abs( x Double precision ) : Double precisionreturns the absolute value of x
Acos( x Double precision ) : Double precisionreturns the arc cosine of x, that is, the value whose cosine is x
"); + html += wxT("returns NULL if x is not in the range -1 to 1
Asin( x Double precision ) : Double precisionreturns the arc sine of x, that is, the value whose sine is x
"); + html += wxT("returns NULL if x is not in the range -1 to 1
Atan( x Double precision ) : Double precisionreturns the arc tangent of x, that is, the value whose tangent is x
Ceil( x Double precision ) : Double precision
"); + html += wxT("Ceiling( x Double precision ) : Double precision
returns the smallest integer value not less than x
Cos( x Double precision ) : Double precisionreturns the cosine of x, where x is given in radians
Cot( x Double precision ) : Double precisionreturns the cotangent of x, where x is given in radians
Degrees( x Double precision ) : Double precisionreturns the argument x, converted from radians to degrees
Exp( x Double precision ) : Double precisionreturns the value of e (the base of natural logarithms) raised to the power of x
"); + html += + wxT + ("the inverse of this function is Log() (using a single argument only) or Ln()
Floor( x Double precision ) : Double precisionreturns the largest integer value not greater than x
Ln( x Double precision ) : Double precision
"); + html += wxT("Log( x Double precision ) : Double precision
returns the natural logarithm of x; that is, the base-e logarithm of x
"); + html += + wxT + ("If x is less than or equal to 0, then NULL is returned
Log( b Double precision, x Double precision ) : Double precisionreturns the logarithm of x to the base b
"); + html += + wxT + ("If x is less than or equal to 0, or if b is less than or equal to 1, then NULL is returned
"); + html += + wxT + ("Log(b, x) is equivalent to Log(x) / Log(b)
Log2( x Double precision ) : Double precisionreturns the base-2 logarithm of x
"); + html += + wxT + ("Log2(x) is equivalent to Log(x) / Log(2)
Log10( x Double precision ) : Double precisionreturns the base-10 logarithm of x
"); + html += + wxT + ("Log10(x) is equivalent to Log(x) / Log(10)
PI( void ) : Double precisionreturns the value of PI
Pow( x Double precision, y Double precision ) : Double precision
"); + html += + wxT + ("Power( x Double precision, y Double precision ) : Double precision
returns the value of x raised to the power of y
Radians( x Double precision ) : Double precisionreturns the argument x, converted from degrees to radians
Round( x Double precision ) : Double precisionreturns the integer value nearest to x
Sign( x Double precision ) : Double precisionreturns the sign of the argument as -1, 0, or 1, "); + html += + wxT + ("depending on whether x is negative, zero, or positive.
Sin( x Double precision ) : Double precisionreturns the sine of x, where x is given in radians
Sqrt( x Double precision ) : Double precisionreturns the square root of a non-negative number x
Stddev_pop( x Double precision ) : Double precisionreturns the population standard deviation of the input values
"); + html += wxT("aggregate function
Stddev_samp( x Double precision ) : Double precisionreturns the sample standard deviation of the input values
"); + html += wxT("aggregate function
Tan( x Double precision ) : Double precisionreturns the tangent of x, where x is given in radians
Var_pop( x Double precision ) : Double precisionreturns the population variance of the input values (square of the population standard deviation)
"); + html += wxT("aggregate function
Var_samp( x Double precision ) : Double precisionreturns the sample variance of the input values (square of the sample standard deviation)
"); + html += wxT("aggregate function
SQL utility functions for BLOB objects"); + html += wxT("
back to index
IsZipBlob( content Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if this BLOB object corresponds to a valid ZIP-compressed file
IsPdfBlob( content Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if this BLOB object corresponds to a valid PDF document
IsGifBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT("TRUE if this BLOB object corresponds to a valid GIF image
IsPngBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT("TRUE if this BLOB object corresponds to a valid PNG image
IsJpegBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT("TRUE if this BLOB object corresponds to a valid JPEG image
IsExifBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += wxT("TRUE if this BLOB object corresponds to a valid EXIF image
"); + html += + wxT + ("Please note: any valid EXIF image is a valid JPEG as well
IsExifGpsBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT("TRUE if this BLOB object corresponds to a valid EXIF-GPS image
"); + html += + wxT + ("Please note: any valid EXIF-GPS image is a valid EXIF and JPEG as well
SQL utility functions [non-standard] for geometric objects"); + html += wxT("
back to index
GeomFromExifGpsBlob( image Blob ) : Geometrya POINT Geometry will be returned representing the GPS long/lat contained within EXIF-GPS metadata for the BLOB image
"); + html += + wxT + ("NULL will be returned if for any reason it's not possible to build such a POINT
MakePoint( x Double precision , y Double precision [ , SRID Integer] ) : Geometrya Geometry will be returned representing the POINT defined by [x y] coordinates
BuildMbr( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision, [ , SRID Integer] ) : Geometry[x1 y1] and [x2 y2] are assumed to be Points identifying a line segment;"); + html += + wxT + ("then a Geometry will be returned representing the MBR for this line segment
BuildCircleMbr( x Double precision , y Double precision , radius Double precision [ , SRID Integer] ) : Geometry[x y] is assumed to be the center of a circle of given radius; then a Geometry will be returned representing the MBR for this circle
MbrMinX( geom Geometry) : Double precisionreturn the x-coordinate for geom MBR's leftmost side as a double precision number
MbrMinY( geom Geometry) : Double precisionreturn the y-coordinate for geom MBR's lowermost side as a double precision number
MbrMaxX( geom Geometry) : Double precisionreturn the x-coordinate for geom MBR's rightmost side as a double precision number
MbrMaxY( geom Geometry) : Double precisionreturn the y-coordinate for geom MBR's uppermost side as a double precision number
functions for constructing a geometric object given its Well-known Text Representation"); + html += wxT("
back to index
GeomFromText( wkt String [ , SRID Integer] ) : Geometryconstruct a geometric object given its Well-known text Representation
PointFromText( wktPoint String [ , SRID Integer] ) : Pointconstruct a Point
LineFromText( wktLineString String [ , SRID Integer] ) : Linestring
"); + html += + wxT + ("LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring
construct a Linestring
PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon
"); + html += + wxT + ("PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon
construct a Polygon
MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
"); + html += + wxT + ("MultiPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
construct a MultiPoint
MLineFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
"); + html += + wxT + ("MultiLineStringFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
construct a MultiLinestring
MPolyFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
"); + html += + wxT + ("MultiPolygonFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
construct a MultiPolygon
GeomCollFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
"); + html += + wxT + ("GeometryCollectionFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
construct a GeometryCollection
functions for constructing a geometric object given its Well-known Binary Representation"); + html += wxT("
back to index
GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometryconstruct a geometric object given its Well-known binary Representation
PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Pointconstruct a Point
LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring
"); + html += + wxT + ("LineStringFromText( wkbLineString Binary [ , SRID Integer] ) : Linestring
construct a Linestring
PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
"); + html += + wxT("PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
construct a Polygon
MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
"); + html += + wxT + ("MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
construct a MultiPoint
MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
"); + html += + wxT + ("MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
construct a MultiLinestring
MPolyFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
"); + html += + wxT + ("MultiPolygonFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
construct a MultiPolygon
GeomCollFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
"); + html += + wxT + ("GeometryCollectionFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
construct a GeometryCollection
functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object"); + html += wxT("
back to index
AsText( geom Geometry ) : Stringreturn the Well-known Text representation
AsBinary( geom Geometry ) : Binaryreturn the Well-known Binary representation
SQL functions supporting exotic geometric formats"); + html += wxT("
back to index
AsSVG( geom Geometry ) : Stringreturns the SVG [Scalable Vector Graphics] representation
AsFGF( geom Geometry ) : Stringreturns the FGF [FDO Geometry Binary Format] representation
GeomFromFGF( fgfGeometry Binary [ , SRID Integer] ) : Geometryconstruct a geometric object given its FGF binary Representation
functions on type Geometry"); + html += wxT("
back to index
Dimension( geom Geometry ) : Integerreturn the dimension of the geometric object, which is less than or equal to the dimension of the coordinate space
GeometryType( geom Geometry ) : Stringreturn the name of the instantiable subtype of Geometry of which this geometric object is a member, as a string
SRID( geom Geometry ) : Integerreturn the Spatial Reference System ID for this geometric object
SetSRID( geom Geometry , SRID Integer ) : Integerdirectly sets the Spatial Reference System ID for this geometric object [no reprojection is applied].
"); + html += + wxT + ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); + html += wxT("function invocation on NULL arguments
IsEmpty( geom Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT("TRUE if this geometric object corresponds to the empty set
IsSimple( geom Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if this geometric object is simple, as defined in the Geometry Model
IsValid( geom Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if this geometric object does not contains any topological error
Boundary( geom Geometry ) : Geometryreturn a geometric object that is the combinatorial boundary of g as defined in the Geometry Model
Envelope( geom Geometry ) : Geometryreturn the rectangle bounding g as a Polygon. "); + html += + wxT + ("The Polygon is defined by the corner points of the bounding box [(MINX, MINY),(MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].
functions on type Point"); + html += wxT("
back to index
X( pt Point ) : Double precisionreturn the x-coordinate of Point p as a double precision number
Y( pt Point ) : Double precisionreturn the y-coordinate of Point p as a double precision number
functions on type Curve [Linestring or Ring]
StartPoint( c Curve ) : Pointreturn a Point containing the first Point of c
EndPoint( c Curve ) : Pointreturn a Point containing the last Point of c
NumPoints( line LineString ) : Integerreturn the number of Points in the LineString
PointN( line LineString , n Integer ) : Pointreturn a Point containing Point n of line
GLength( c Curve ) : Double precisionreturn the length of c
IsClosed( c Curve ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); + html += + wxT + ("return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c)
IsRing( c Curve ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); + html += + wxT + ("return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through the same Point more than once.
Simplify( c Curve , tolerance Double precision ) : Curvereturn a geometric object representing a simplified version of c applying the Douglas-Peukert algorithm with given tolerance
SimplifyPreserveTopology( c Curve , tolerance Double precision ) : Curvereturn a geometric object representing a simplified version of c "); + html += + wxT + ("applying the Douglas-Peukert algorithm with given tolerance and respecting topology
functions on type Surface [Polygon or Ring]"); + html += wxT("
back to index
Centroid( s Surface ) : Pointreturn the centroid of s, which may lie outside s
PointOnSurface( s Surface ) : Pointreturn a Point guaranteed to lie on the Surface
Area( s Surface ) : Double precisionreturn the area of s
functions on type Polygon"); + html += wxT("
back to index
ExteriorRing( polyg Polygon ) : LineStringreturn the exteriorRing of p
NumInteriorRing( polyg Polygon ) : Integer
NumInteriorRings( polyg Polygon ) : Integer
return the number of interiorRings
InteriorRingN( polyg Polygon , n Integer ) : LineStringreturn the nth interiorRing. The order of Rings is not geometrically significant.
functions on type GeomCollection"); + html += wxT("
back to index
NumGeometries( geom GeomCollection ) : Integerreturn the number of geometries
GeometryN( geom GeomCollection , n Integer ) : Geometryreturn the nth geometric object in the collection. The order of the elements in the collection is not geometrically significant.
functions testing approximative spatial relationships via MBRs"); + html += wxT("
back to index
MbrEqual( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += wxT("TRUE if g1 and g2 have equal MBRs
MbrDisjoint( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if the intersection of g1 and g2 MBRs is the empty set
MbrTouches( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2
MbrWithin( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += wxT("TRUE if g1 MBR is completely contained in g2 MBR
MbrOverlaps( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if the intersection of g1 and g2 MBRs results in a value of the same dimension as g1 and g2 that is different from both g1 and g2
MbrIntersects( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); + html += + wxT + ("convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty
MbrContains( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); + html += + wxT + ("convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR
functions testing spatial relationships"); + html += wxT("
back to index
Equals( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += wxT("TRUE if g1 and g2 are equal
Disjoint( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT("TRUE if the intersection of g1 and g2 is the empty set
Touches( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2
Within( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += wxT("TRUE if g1 is completely contained in g2
Overlaps( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if the intersection of g1 and g2 results in a value of the same dimension as g1 and g2 that is different from both g1 and g2
Crosses( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("TRUE if the intersection of g1 and g2 results in a value whose dimension is less than the maximum dimension of g1 and g2 "); + html += + wxT + ("and the intersection value includes Points interior to both g1 and g2, and the intersection value is not equal to either g1 or g2
Intersects( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); + html += + wxT + ("convenience predicate: TRUE if the intersection of g1 and g2 is not empty
Contains( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); + html += + wxT + ("convenience predicate: TRUE if g2 is completely contained in g1
Relate( geom1 Geometry , geom2 Geometry , patternMatrix String ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); + html += + wxT + ("return TRUE if the spatial relationship specified by the patternMatrix holds
Distance( geom1 Geometry , geom2 Geometry ) : Double precisionreturn the distance between geom1 and geom2
functions implementing spatial operators"); + html += wxT("
back to index
Intersection( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the intersection of geometric objects geom1 and geom2
Difference( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the closure of the set difference of geom1 and geom2
GUnion( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the set union of geom1 and geom2
GUnion( geom Geometry ) : Geometryreturn a geometric object that is the set union of input values
"); + html += wxT("aggregate function
SymDifference( geom1 Geometry , geom2 Geometry ) : Geometryreturn a geometric object that is the closure of the set symmetric difference of geom1 and geom2 (logical XOR of space)
Buffer( geom Geometry , dist Double precision ) : Geometryreturn a geometric object defined by buffering a distance d around geom, "); + html += + wxT + ("where dist is in the distance units for the Spatial Reference of geom
ConvexHull( geom Geometry ) : Geometryreturn a geometric object that is the convex hull of geom
functions for coordinate transformations"); + html += wxT("
back to index
Transform( geom Geometry , newSRID Integer ) : Geometryreturn a geometric object obtained by reprojecting coordinates into the Reference System identified by newSRID
ShiftCoords( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
"); + html += + wxT + ("ShiftCoordinates( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
return a geometric object obtained by translating coordinates according to shiftX and shiftY values
ScaleCoords( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
"); + html += + wxT + ("ScaleCoordinates( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
return a geometric object obtained by scaling coordinates according to scaleX and scaleY values
"); + html += + wxT + ("if only one scale factor is specified, then an isotropic scaling occurs [i.e. the same scale factor is applied to both axis]"); + html += + wxT + ("otherwise an anisotropic scaling occurs [i.e. each axis is scaled according to its own scale factor]
RotateCoords( geom Geometry , angleInDegrees Double precision ) : Geometry
"); + html += + wxT + ("RotateCoordinates( geom Geometry , angleInDegrees Double precision ) : Geometry
return a geometric object obtained by rotating coordinates according to angleInDegrees value
ReflectCoords( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry
"); + html += + wxT + ("ReflectCoordinates( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry
return a geometric object obtained by reflecting coordinates according to xAxis and yAxis switches
"); + html += + wxT + ("i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected
SwapCoords( geom Geometry ) : Geometry
SwapCoordinates( geom Geometry ) : Geometry
return a geometric object obtained by swapping x- and y-coordinates
functions for Spatial-MetaData and Spatial-Index handling"); + html += wxT("
back to index
InitSpatialMetaData( void ) : IntegerCreates the geometry_columns and spatial_ref_sys metadata tables"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
"); + html += + wxT + ("direct invocation of these function is discouraged; you have to run the init_spatialite.sql "); + html += + wxT + ("script in order to fully initialize the Spatial MetaData tables
AddGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer [ , not_null Integer ] ) : IntegerCreates a new geometry column updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer ) : IntegerValidates an existing ordinary column in order to possibly transform it in a real geometry column, "); + html += + wxT + ("thus updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DiscardGeometryColumn( table String , column String ) : IntegerRemoves a geometry column from Spatial MetaData tables and drops any related trigger
"); + html += + wxT + ("the column itself still continues to exist untouched as an ordinary, unconstrained column
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
CreateSpatialIndex( table String , column String ) : IntegerBuilds an RTree Spatial Index on a geometry column, "); + html += + wxT + ("creating any required trigger required in order to enforce full data coherency between the main table and Spatial Index
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DisableSpatialIndex( table String , column String ) : IntegerDisables an RTree Spatial Index, removing any related trigger
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
functions implementing FDO/OGR compatibily"); + html += wxT("
back to index
CheckSpatialMetaData( void ) : IntegerChecks the Spatial Metadata type, then returning:
"); + html += + wxT + ("0 if geometry_columns and spatial_ref_sys tables does not exists
"); + html += + wxT + ("1 if both tables exist, and their layout is the one used by SpatiaLite
"); + html += + wxT + ("2 if both tables exist, and their layout is the one used by FDO/OGR
AutoFDOStart( void ) : IntegerThis function will inspect the Spatial Metadata, then automatically creating/refreshing a VirtualFDO"); + html += + wxT + (" wrapper for each FDO/OGR geometry table
the return type is Integer [how many VirtualFDO tables have been created]
AutoFDOStop( void ) : IntegerThis function will inspect the Spatial Metadata, then automatically destroying any VirtualFDO"); + html += + wxT + (" wrapper found
the return type is Integer [how many VirtualFDO tables have been destroyed]
InitFDOSpatialMetaData( void ) : IntegerCreates the geometry_columns and spatial_ref_sys metadata tables"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
"); + html += + wxT + ("Please note: Spatial Metadata created using this function will have the FDO/OGR layout, and not the SpatiaLite's own
AddFDOGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer , geometry_type String ) : IntegerCreates a new geometry column updating the FDO/OGR Spatial Metadata tables
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverFDOGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer , geometry_type String ) : IntegerValidates an existing ordinary column in order to possibly transform it in a real geometry column, "); + html += wxT("thus updating the FDO/OGR Spatial Metadata tables
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DiscardFDOGeometryColumn( table String , column String ) : IntegerRemoves a geometry column from FDO/OGR Spatial MetaData tables
"); + html += + wxT + ("the column itself still continues to exist untouched as an ordinary column
"); + html += + wxT + ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
functions for MbrCache-based queries"); + html += wxT("
back to index
FilterMbrWithin( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an MbrCache any entity whose MBR falls within"); + html += + wxT + (" the rectangle identified by extreme points x1 y1 and x2 y2
FilterMbrContains( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an MbrCache any entity whose MBR contains"); + html += + wxT + (" the rectangle identified by extreme points x1 y1 and x2 y2
FilterMbrIntersects( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an MbrCache any entity whose MBR intersects"); + html += + wxT + (" the rectangle identified by extreme points x1 y1 and x2 y2
"); + html += wxT("back to index"); + html += wxT(""); + html += wxT(""); } Index: Makefile-MinGW ================================================================== --- Makefile-MinGW +++ Makefile-MinGW @@ -1,54 +1,70 @@ -# SandroFurieri (c) 2008 -# Makefile ( Mingw & wxwidgets) for spatialite-GUI - -SRC = Main.cpp TableTree.cpp QueryView.cpp BlobExplorer.cpp Dialogs.cpp \ - Shapefiles.cpp TextCsv.cpp Objects.cpp win_resource/resource.rc -OBJ = Main.o TableTree.o QueryView.o BlobExplorer.o Dialogs.o Shapefiles.o \ - TextCsv.o Objects.o win_resource/resource.o -EXE = ./bin/spatialite-gui.exe -INCLUDE = Classdef.h - -# Define default flags: -CXXFLAGS = $(shell wx-config --cxxflags) -LIB = $(shell wx-config --libs) -EXTRAFLAGS = -O3 -march=i686 -Wall -Wundef -Wno-ctor-dtor-privacy -fno-strict-aliasing -I/usr/local/include -REZ = $(shell wx-config --rescomp) -EXTRALIBS = /usr/local/lib/libspatialite.a /usr/local/lib/libsqlite3.a \ - /usr/local/lib/libgeos_c.a /usr/local/lib/libiconv.a \ - /usr/local/lib/libgeos.a /usr/local/lib/libproj.a - -all: $(EXE) - -$(EXE): $(OBJ) - $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) - strip --strip-all $(EXE) - -clean : - $(RM) $(OBJ) $(EXE) - -Main.o: Main.cpp $(INCLUDE) - $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -TableTree.o: TableTree.cpp $(INCLUDE) - $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -QueryView.o: QueryView.cpp $(INCLUDE) - $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) - $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Dialogs.o: Dialogs.cpp $(INCLUDE) - $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Shapefiles.o: Shapefiles.cpp $(INCLUDE) - $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -TextCsv.o: TextCsv.cpp $(INCLUDE) - $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Objects.o: Objects.cpp $(INCLUDE) - $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -win_resource/resource.o: win_resource/resource.rc - $(REZ) -i win_resource/resource.rc -o win_resource/resource.o +# SandroFurieri (c) 2008 +# Makefile ( Mingw & wxwidgets) for spatialite-GUI + +SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ + Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp Objects.cpp \ + MetadataInit.cpp win_resource/resource.rc +OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o \ + Dialogs.o Shapefiles.o Network.o Exif.o TextCsv.o Objects.o \ + MetadataInit.o win_resource/resource.o +EXE = ./bin/spatialite-gui.exe +INCLUDE = Classdef.h + +# Define default flags: +CXXFLAGS = $(shell wx-config --cxxflags) +LIB = $(shell wx-config --libs) +EXTRAFLAGS = -O3 -march=i686 -Wall -Wundef -Wno-ctor-dtor-privacy \ + -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILE=1 \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 +REZ = $(shell wx-config --rescomp) +EXTRALIBS = /usr/local/lib/libspatialite.a /usr/local/lib/libgeos_c.a \ + /usr/local/lib/libiconv.a /usr/local/lib/libgeos.a \ + /usr/local/lib/libproj.a + +all: $(EXE) + +$(EXE): $(OBJ) $(EXTRALIBS) + $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) + strip --strip-all $(EXE) + +clean : + $(RM) $(OBJ) $(EXE) + +Main.o: Main.cpp $(INCLUDE) + $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +TableTree.o: TableTree.cpp $(INCLUDE) + $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +QueryView.o: QueryView.cpp $(INCLUDE) + $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +ResultSetView.o: ResultSetView.cpp $(INCLUDE) + $(CXX) -c ResultSetView.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) + $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Dialogs.o: Dialogs.cpp $(INCLUDE) + $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Shapefiles.o: Shapefiles.cpp $(INCLUDE) + $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Network.o: Network.cpp $(INCLUDE) + $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Exif.o: Exif.cpp $(INCLUDE) + $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +TextCsv.o: TextCsv.cpp $(INCLUDE) + $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Objects.o: Objects.cpp $(INCLUDE) + $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +MetadataInit.o: MetadataInit.cpp $(INCLUDE) + $(CXX) -c MetadataInit.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +win_resource/resource.o: win_resource/resource.rc + $(REZ) -i win_resource/resource.rc -o win_resource/resource.o Index: Makefile-OsX ================================================================== --- Makefile-OsX +++ Makefile-OsX @@ -1,52 +1,66 @@ -# SandroFurieri (c) 2008 -# Makefile ( wxwidgets MacOsX) for spatialite-GUI - -SRC = Main.cpp TableTree.cpp QueryView.cpp BlobExplorer.cpp Dialogs.cpp \ - Shapefiles.cpp TextCsv.cpp Objects.cpp -OBJ = Main.o TableTree.o QueryView.o BlobExplorer.o Dialogs.o Shapefiles.o \ - TextCsv.o Objects.o -EXE = ./bin/spatialite-gui -INCLUDE = Classdef.h - -# Define default flags: -CXXFLAGS = $(shell wx-config --cxxflags) -LIB = $(shell wx-config --libs) -EXTRAFLAGS = -O3 -Wall -Wundef -Wno-ctor-dtor-privacy -fno-strict-aliasing -I/usr/local/include -EXTRALIBS = /usr/local/lib/libspatialite.a /usr/local/lib/libsqlite3.a \ - /usr/local/lib/libgeos_c.a /usr/local/lib/libgeos.a \ - /usr/local/lib/libproj.a \ - -liconv - -all: $(EXE) - -$(EXE): $(OBJ) - $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) - strip $(EXE) - -clean : - $(RM) $(OBJ) $(EXE) - -Main.o: Main.cpp $(INCLUDE) - $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -TableTree.o: TableTree.cpp $(INCLUDE) - $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -QueryView.o: QueryView.cpp $(INCLUDE) - $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) - $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Dialogs.o: Dialogs.cpp $(INCLUDE) - $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Shapefiles.o: Shapefiles.cpp $(INCLUDE) - $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -TextCsv.o: TextCsv.cpp $(INCLUDE) - $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Objects.o: Objects.cpp $(INCLUDE) - $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) - +# SandroFurieri (c) 2008 +# Makefile ( wxwidgets MacOsX) for spatialite-GUI + +SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ + Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp Objects.cpp \ + MetadataInit.cpp +OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o Dialogs.o \ + Shapefiles.o Network.o Exif.o TextCsv.o Objects.o MetadataInit.o +EXE = ./bin/spatialite-gui +INCLUDE = Classdef.h + +# Define default flags: +CXXFLAGS = $(shell wx-config --cxxflags) +LIB = $(shell wx-config --libs) +EXTRAFLAGS = -O3 -Wall -Wundef -Wno-ctor-dtor-privacy \ + -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILE=1 \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 +EXTRALIBS = /usr/local/lib/libspatialite.a /usr/local/lib/libgeos_c.a \ + /usr/local/lib/libgeos.a /usr/local/lib/libproj.a +EXTRALIB2 = -liconv + +all: $(EXE) + +$(EXE): $(OBJ) $(EXTRALIBS) + $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) $(EXTRALIB2) + strip $(EXE) + +clean : + $(RM) $(OBJ) $(EXE) + +Main.o: Main.cpp $(INCLUDE) + $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +TableTree.o: TableTree.cpp $(INCLUDE) + $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +QueryView.o: QueryView.cpp $(INCLUDE) + $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +ResultSetView.o: ResultSetView.cpp $(INCLUDE) + $(CXX) -c ResultSetView.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) + $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Dialogs.o: Dialogs.cpp $(INCLUDE) + $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Shapefiles.o: Shapefiles.cpp $(INCLUDE) + $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Network.o: Network.cpp $(INCLUDE) + $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Exif.o: Exif.cpp $(INCLUDE) + $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +TextCsv.o: TextCsv.cpp $(INCLUDE) + $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Objects.o: Objects.cpp $(INCLUDE) + $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +MetadataInit.o: MetadataInit.cpp $(INCLUDE) + $(CXX) -c MetadataInit.cpp $(CXXFLAGS) $(EXTRAFLAGS) + Index: Makefile-linux32 ================================================================== --- Makefile-linux32 +++ Makefile-linux32 @@ -1,51 +1,64 @@ -# SandroFurieri (c) 2008 -# Makefile ( wxwidgets GTK) for spatialite-GUI - -SRC = Main.cpp TableTree.cpp QueryView.cpp BlobExplorer.cpp Dialogs.cpp \ - Shapefiles.cpp TextCsv.cpp Objects.cpp -OBJ = Main.o TableTree.o QueryView.o BlobExplorer.o Dialogs.o Shapefiles.o \ - TextCsv.o Objects.o -EXE = ./bin/spatialite-gui -INCLUDE = Classdef.h - -# Define default flags: -CXXFLAGS = $(shell wx-config --cxxflags) -LIB = $(shell wx-config --libs) -EXTRAFLAGS = -O3 -march=i686 -Wall -Wundef -Wno-ctor-dtor-privacy -fno-strict-aliasing -I/usr/local/include -EXTRALIBS = /usr/local/lib/libspatialite.a /usr/local/lib/libsqlite3.a \ - /usr/local/lib/libgeos_c.a /usr/local/lib/libgeos.a \ - /usr/local/lib/libproj.a - -all: $(EXE) - -$(EXE): $(OBJ) - $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) - strip --strip-all $(EXE) - -clean : - $(RM) $(OBJ) $(EXE) - -Main.o: Main.cpp $(INCLUDE) - $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -TableTree.o: TableTree.cpp $(INCLUDE) - $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -QueryView.o: QueryView.cpp $(INCLUDE) - $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) - $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Dialogs.o: Dialogs.cpp $(INCLUDE) - $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Shapefiles.o: Shapefiles.cpp $(INCLUDE) - $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -TextCsv.o: TextCsv.cpp $(INCLUDE) - $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) - -Objects.o: Objects.cpp $(INCLUDE) - $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) - +# SandroFurieri (c) 2008 +# Makefile ( wxwidgets GTK) for spatialite-GUI + +SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ + Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp Objects.cpp \ + MetadataInit.cpp +OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o Dialogs.o \ + Shapefiles.o Network.o Exif.o TextCsv.o Objects.o MetadataInit.o +EXE = ./bin/spatialite-gui +INCLUDE = Classdef.h + +# Define default flags: +CXXFLAGS = $(shell wx-config --cxxflags) +LIB = $(shell wx-config --libs) +EXTRAFLAGS = -O3 -march=i686 -Wall -Wundef -Wno-ctor-dtor-privacy \ + -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILE=1 \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 +EXTRALIBS = /usr/local/lib/libspatialite.a /usr/local/lib/libgeos_c.a \ + /usr/local/lib/libgeos.a /usr/local/lib/libproj.a + +all: $(EXE) + +$(EXE): $(OBJ) $(EXTRALIBS) + $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) + strip --strip-all $(EXE) + +clean : + $(RM) $(OBJ) $(EXE) + +Main.o: Main.cpp $(INCLUDE) + $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +TableTree.o: TableTree.cpp $(INCLUDE) + $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +QueryView.o: QueryView.cpp $(INCLUDE) + $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +ResultSetView.o: ResultSetView.cpp $(INCLUDE) + $(CXX) -c ResultSetView.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) + $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Dialogs.o: Dialogs.cpp $(INCLUDE) + $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Shapefiles.o: Shapefiles.cpp $(INCLUDE) + $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Network.o: Network.cpp $(INCLUDE) + $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Exif.o: Exif.cpp $(INCLUDE) + $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +TextCsv.o: TextCsv.cpp $(INCLUDE) + $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +Objects.o: Objects.cpp $(INCLUDE) + $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) + +MetadataInit.o: MetadataInit.cpp $(INCLUDE) + $(CXX) -c MetadataInit.cpp $(CXXFLAGS) $(EXTRAFLAGS) ADDED MetadataInit.cpp Index: MetadataInit.cpp ================================================================== --- MetadataInit.cpp +++ MetadataInit.cpp @@ -0,0 +1,10626 @@ +/* +/ MetadataInit.cpp +/ ancillary methods used to create and feed the Spatial Metadata tables +/ +/ version 1.2, 2009 March 11 +/ +/ Author: Sandro Furieri a-furieri@lqt.it +/ +/ Copyright (C) 2009 Alessandro Furieri +/ +/ This program is free software: you can redistribute it and/or modify +/ it under the terms of the GNU General Public License as published by +/ the Free Software Foundation, either version 3 of the License, or +/ (at your option) any later version. +/ +/ This program is distributed in the hope that it will be useful, +/ but WITHOUT ANY WARRANTY; without even the implied warranty of +/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +/ GNU General Public License for more details. +/ +/ You should have received a copy of the GNU General Public License +/ along with this program. If not, see . +/ +*/ + +#include "Classdef.h" + +bool MyFrame::CreateSpatialMetaData() +{ +// creating and feeding the Spatial MetaData tables + struct epsg_defs + { + int srid; + const char *auth_name; + int auth_srid; + const char *ref_sys_name; + const char *proj4text; + } epsg[] = + { + { + 2000, "epsg", 2000, "Anguilla 1957 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs"}, + { + 2001, "epsg", 2001, "Antigua 1943 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs"}, + { + 2002, "epsg", 2002, "Dominica 1945 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +units=m +no_defs"}, + { + 2003, "epsg", 2003, "Grenada 1953 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +units=m +no_defs"}, + { + 2004, "epsg", 2004, "Montserrat 1958 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m +no_defs"}, + { + 2005, "epsg", 2005, "St. Kitts 1955 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs"}, + { + 2006, "epsg", 2006, "St. Lucia 1955 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +units=m +no_defs"}, + { + 2007, "epsg", 2007, "St. Vincent 45 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=195.671,332.517,274.607,0,0,0,0 +units=m +no_defs"}, + { + 2008, "epsg", 2008, "NAD27(CGQ77) / SCoPQ zone 2", + "+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2009, "epsg", 2009, "NAD27(CGQ77) / SCoPQ zone 3", + "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2010, "epsg", 2010, "NAD27(CGQ77) / SCoPQ zone 4", + "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2011, "epsg", 2011, "NAD27(CGQ77) / SCoPQ zone 5", + "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2012, "epsg", 2012, "NAD27(CGQ77) / SCoPQ zone 6", + "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2013, "epsg", 2013, "NAD27(CGQ77) / SCoPQ zone 7", + "+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2014, "epsg", 2014, "NAD27(CGQ77) / SCoPQ zone 8", + "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2015, "epsg", 2015, "NAD27(CGQ77) / SCoPQ zone 9", + "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2016, "epsg", 2016, "NAD27(CGQ77) / SCoPQ zone 10", + "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2017, "epsg", 2017, "NAD27(76) / MTM zone 8", + "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2018, "epsg", 2018, "NAD27(76) / MTM zone 9", + "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2019, "epsg", 2019, "NAD27(76) / MTM zone 10", + "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2020, "epsg", 2020, "NAD27(76) / MTM zone 11", + "+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2021, "epsg", 2021, "NAD27(76) / MTM zone 12", + "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2022, "epsg", 2022, "NAD27(76) / MTM zone 13", + "+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2023, "epsg", 2023, "NAD27(76) / MTM zone 14", + "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2024, "epsg", 2024, "NAD27(76) / MTM zone 15", + "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2025, "epsg", 2025, "NAD27(76) / MTM zone 16", + "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2026, "epsg", 2026, "NAD27(76) / MTM zone 17", + "+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2027, "epsg", 2027, "NAD27(76) / UTM zone 15N", + "+proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs"}, + { + 2028, "epsg", 2028, "NAD27(76) / UTM zone 16N", + "+proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs"}, + { + 2029, "epsg", 2029, "NAD27(76) / UTM zone 17N", + "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs"}, + { + 2030, "epsg", 2030, "NAD27(76) / UTM zone 18N", + "+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs"}, + { + 2031, "epsg", 2031, "NAD27(CGQ77) / UTM zone 17N", + "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs"}, + { + 2032, "epsg", 2032, "NAD27(CGQ77) / UTM zone 18N", + "+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs"}, + { + 2033, "epsg", 2033, "NAD27(CGQ77) / UTM zone 19N", + "+proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs"}, + { + 2034, "epsg", 2034, "NAD27(CGQ77) / UTM zone 20N", + "+proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs"}, + { + 2035, "epsg", 2035, "NAD27(CGQ77) / UTM zone 21N", + "+proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs"}, + { + 2036, "epsg", 2036, "NAD83(CSRS98) / New Brunswick Stereo (deprecated)", + "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2037, "epsg", 2037, "NAD83(CSRS98) / UTM zone 19N (deprecated)", + "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2038, "epsg", 2038, "NAD83(CSRS98) / UTM zone 20N (deprecated)", + "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2039, "epsg", 2039, "Israel / Israeli TM Grid", + "+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.20451694444445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +units=m +no_defs"}, + { + 2040, "epsg", 2040, "Locodjo 1965 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs"}, + { + 2041, "epsg", 2041, "Abidjan 1987 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs"}, + { + 2042, "epsg", 2042, "Locodjo 1965 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs"}, + { + 2043, "epsg", 2043, "Abidjan 1987 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs"}, + { + 2044, "epsg", 2044, "Hanoi 1972 / Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs"}, + { + 2045, "epsg", 2045, "Hanoi 1972 / Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs"}, + { + 2056, "epsg", 2056, "CH1903+ / LV95", + "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"}, + { + 2057, "epsg", 2057, "Rassadiran / Nakhl e Taqi", + "+proj=omerc +lat_0=27.51882880555555 +lonc=52.60353916666667 +alpha=0.5716611944444444 +k=0.999895934 +x_0=658377.437 +y_0=3044969.194 +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +units=m +no_defs"}, + { + 2058, "epsg", 2058, "ED50(ED77) / UTM zone 38N", + "+proj=utm +zone=38 +ellps=intl +units=m +no_defs"}, + { + 2059, "epsg", 2059, "ED50(ED77) / UTM zone 39N", + "+proj=utm +zone=39 +ellps=intl +units=m +no_defs"}, + { + 2060, "epsg", 2060, "ED50(ED77) / UTM zone 40N", + "+proj=utm +zone=40 +ellps=intl +units=m +no_defs"}, + { + 2061, "epsg", 2061, "ED50(ED77) / UTM zone 41N", + "+proj=utm +zone=41 +ellps=intl +units=m +no_defs"}, + { + 2062, "epsg", 2062, "Madrid 1870 (Madrid) / Spain", + "+proj=lcc +lat_1=40 +lat_0=40 +lon_0=0 +k_0=0.9988085293 +x_0=600000 +y_0=600000 +a=6378298.3 +b=6356657.142669561 +pm=madrid +units=m +no_defs"}, + { + 2063, "epsg", 2063, "Dabola 1981 / UTM zone 28N (deprecated)", + "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs"}, + { + 2064, "epsg", 2064, "Dabola 1981 / UTM zone 29N (deprecated)", + "+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs"}, + { + 2065, "epsg", 2065, "S-JTSK (Ferro) / Krovak", + "+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 2066, "epsg", 2066, "Mount Dillon / Tobago Grid", + "+proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66159325 +y_0=36209.91512952 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164 +no_defs"}, + { + 2067, "epsg", 2067, "Naparima 1955 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +units=m +no_defs"}, + { + 2068, "epsg", 2068, "ELD79 / Libya zone 5", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2069, "epsg", 2069, "ELD79 / Libya zone 6", + "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2070, "epsg", 2070, "ELD79 / Libya zone 7", + "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2071, "epsg", 2071, "ELD79 / Libya zone 8", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2072, "epsg", 2072, "ELD79 / Libya zone 9", + "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2073, "epsg", 2073, "ELD79 / Libya zone 10", + "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2074, "epsg", 2074, "ELD79 / Libya zone 11", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2075, "epsg", 2075, "ELD79 / Libya zone 12", + "+proj=tmerc +lat_0=0 +lon_0=23 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2076, "epsg", 2076, "ELD79 / Libya zone 13", + "+proj=tmerc +lat_0=0 +lon_0=25 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2077, "epsg", 2077, "ELD79 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=intl +units=m +no_defs"}, + { + 2078, "epsg", 2078, "ELD79 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=intl +units=m +no_defs"}, + { + 2079, "epsg", 2079, "ELD79 / UTM zone 34N", + "+proj=utm +zone=34 +ellps=intl +units=m +no_defs"}, + { + 2080, "epsg", 2080, "ELD79 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=intl +units=m +no_defs"}, + { + 2081, "epsg", 2081, "Chos Malal 1914 / Argentina zone 2", + "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2082, "epsg", 2082, "Pampa del Castillo / Argentina zone 2", + "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=27.5,14,186.4,0,0,0,0 +units=m +no_defs"}, + { + 2083, "epsg", 2083, "Hito XVIII 1963 / Argentina zone 2", + "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2084, "epsg", 2084, "Hito XVIII 1963 / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs"}, + { + 2085, "epsg", 2085, "NAD27 / Cuba Norte", + "+proj=lcc +lat_1=22.35 +lat_0=22.35 +lon_0=-81 +k_0=0.99993602 +x_0=500000 +y_0=280296.016 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 2086, "epsg", 2086, "NAD27 / Cuba Sur", + "+proj=lcc +lat_1=20.71666666666667 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +k_0=0.99994848 +x_0=500000 +y_0=229126.939 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 2087, "epsg", 2087, "ELD79 / TM 12 NE", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2088, "epsg", 2088, "Carthage / TM 11 NE", + "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9996 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 2089, "epsg", 2089, "Yemen NGN96 / UTM zone 38N", + "+proj=utm +zone=38 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2090, "epsg", 2090, "Yemen NGN96 / UTM zone 39N", + "+proj=utm +zone=39 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2091, "epsg", 2091, "South Yemen / Gauss Kruger zone 8 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs"}, + { + 2092, "epsg", 2092, "South Yemen / Gauss Kruger zone 9 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs"}, + { + 2093, "epsg", 2093, "Hanoi 1972 / GK 106 NE", + "+proj=tmerc +lat_0=0 +lon_0=106 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs"}, + { + 2094, "epsg", 2094, "WGS 72BE / TM 106 NE", + "+proj=tmerc +lat_0=0 +lon_0=106 +k=0.9996 +x_0=500000 +y_0=0 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 2095, "epsg", 2095, "Bissau / UTM zone 28N", + "+proj=utm +zone=28 +ellps=intl +towgs84=-173,253,27,0,0,0,0 +units=m +no_defs"}, + { + 2096, "epsg", 2096, "Korean 1985 / Korea East Belt", + "+proj=tmerc +lat_0=38 +lon_0=129 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs"}, + { + 2097, "epsg", 2097, "Korean 1985 / Korea Central Belt", + "+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs"}, + { + 2098, "epsg", 2098, "Korean 1985 / Korea West Belt", + "+proj=tmerc +lat_0=38 +lon_0=125 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs"}, + { + 2099, "epsg", 2099, "Qatar 1948 / Qatar Grid", + "+proj=cass +lat_0=25.38236111111111 +lon_0=50.76138888888889 +x_0=100000 +y_0=100000 +ellps=helmert +units=m +no_defs"}, + { + 2100, "epsg", 2100, "GGRS87 / Greek Grid", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs"}, + { + 2101, "epsg", 2101, "Lake / Maracaibo Grid M1", + "+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=0 +y_0=-52684.972 +ellps=intl +units=m +no_defs"}, + { + 2102, "epsg", 2102, "Lake / Maracaibo Grid", + "+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=200000 +y_0=147315.028 +ellps=intl +units=m +no_defs"}, + { + 2103, "epsg", 2103, "Lake / Maracaibo Grid M3", + "+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=500000 +y_0=447315.028 +ellps=intl +units=m +no_defs"}, + { + 2104, "epsg", 2104, "Lake / Maracaibo La Rosa Grid", + "+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=-17044 +y_0=-23139.97 +ellps=intl +units=m +no_defs"}, + { + 2105, "epsg", 2105, "NZGD2000 / Mount Eden Circuit 2000", + "+proj=tmerc +lat_0=-36.87972222222222 +lon_0=174.7641666666667 +k=0.9999 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2106, "epsg", 2106, "NZGD2000 / Bay of Plenty Circuit 2000", + "+proj=tmerc +lat_0=-37.76111111111111 +lon_0=176.4661111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2107, "epsg", 2107, "NZGD2000 / Poverty Bay Circuit 2000", + "+proj=tmerc +lat_0=-38.62444444444444 +lon_0=177.8855555555556 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2108, "epsg", 2108, "NZGD2000 / Hawkes Bay Circuit 2000", + "+proj=tmerc +lat_0=-39.65083333333333 +lon_0=176.6736111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2109, "epsg", 2109, "NZGD2000 / Taranaki Circuit 2000", + "+proj=tmerc +lat_0=-39.13555555555556 +lon_0=174.2277777777778 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2110, "epsg", 2110, "NZGD2000 / Tuhirangi Circuit 2000", + "+proj=tmerc +lat_0=-39.51222222222222 +lon_0=175.64 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2111, "epsg", 2111, "NZGD2000 / Wanganui Circuit 2000", + "+proj=tmerc +lat_0=-40.24194444444444 +lon_0=175.4880555555555 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2112, "epsg", 2112, "NZGD2000 / Wairarapa Circuit 2000", + "+proj=tmerc +lat_0=-40.92527777777777 +lon_0=175.6472222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2113, "epsg", 2113, "NZGD2000 / Wellington Circuit 2000", + "+proj=tmerc +lat_0=-41.3011111111111 +lon_0=174.7763888888889 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2114, "epsg", 2114, "NZGD2000 / Collingwood Circuit 2000", + "+proj=tmerc +lat_0=-40.71472222222223 +lon_0=172.6719444444444 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2115, "epsg", 2115, "NZGD2000 / Nelson Circuit 2000", + "+proj=tmerc +lat_0=-41.27444444444444 +lon_0=173.2991666666667 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2116, "epsg", 2116, "NZGD2000 / Karamea Circuit 2000", + "+proj=tmerc +lat_0=-41.28972222222222 +lon_0=172.1088888888889 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2117, "epsg", 2117, "NZGD2000 / Buller Circuit 2000", + "+proj=tmerc +lat_0=-41.81055555555555 +lon_0=171.5811111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2118, "epsg", 2118, "NZGD2000 / Grey Circuit 2000", + "+proj=tmerc +lat_0=-42.33361111111111 +lon_0=171.5497222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2119, "epsg", 2119, "NZGD2000 / Amuri Circuit 2000", + "+proj=tmerc +lat_0=-42.68888888888888 +lon_0=173.01 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2120, "epsg", 2120, "NZGD2000 / Marlborough Circuit 2000", + "+proj=tmerc +lat_0=-41.54444444444444 +lon_0=173.8019444444444 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2121, "epsg", 2121, "NZGD2000 / Hokitika Circuit 2000", + "+proj=tmerc +lat_0=-42.88611111111111 +lon_0=170.9797222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2122, "epsg", 2122, "NZGD2000 / Okarito Circuit 2000", + "+proj=tmerc +lat_0=-43.11 +lon_0=170.2608333333333 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2123, "epsg", 2123, "NZGD2000 / Jacksons Bay Circuit 2000", + "+proj=tmerc +lat_0=-43.97777777777778 +lon_0=168.6061111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2124, "epsg", 2124, "NZGD2000 / Mount Pleasant Circuit 2000", + "+proj=tmerc +lat_0=-43.59055555555556 +lon_0=172.7269444444445 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2125, "epsg", 2125, "NZGD2000 / Gawler Circuit 2000", + "+proj=tmerc +lat_0=-43.74861111111111 +lon_0=171.3605555555555 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2126, "epsg", 2126, "NZGD2000 / Timaru Circuit 2000", + "+proj=tmerc +lat_0=-44.40194444444445 +lon_0=171.0572222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2127, "epsg", 2127, "NZGD2000 / Lindis Peak Circuit 2000", + "+proj=tmerc +lat_0=-44.735 +lon_0=169.4675 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2128, "epsg", 2128, "NZGD2000 / Mount Nicholas Circuit 2000", + "+proj=tmerc +lat_0=-45.13277777777778 +lon_0=168.3986111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2129, "epsg", 2129, "NZGD2000 / Mount York Circuit 2000", + "+proj=tmerc +lat_0=-45.56361111111111 +lon_0=167.7386111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2130, "epsg", 2130, "NZGD2000 / Observation Point Circuit 2000", + "+proj=tmerc +lat_0=-45.81611111111111 +lon_0=170.6283333333333 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2131, "epsg", 2131, "NZGD2000 / North Taieri Circuit 2000", + "+proj=tmerc +lat_0=-45.86138888888889 +lon_0=170.2825 +k=0.99996 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2132, "epsg", 2132, "NZGD2000 / Bluff Circuit 2000", + "+proj=tmerc +lat_0=-46.6 +lon_0=168.3427777777778 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2133, "epsg", 2133, "NZGD2000 / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2134, "epsg", 2134, "NZGD2000 / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2135, "epsg", 2135, "NZGD2000 / UTM zone 60S", + "+proj=utm +zone=60 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2136, "epsg", 2136, "Accra / Ghana National Grid", + "+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.99975 +x_0=274319.7391633579 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +to_meter=0.3047997101815088 +no_defs"}, + { + 2137, "epsg", 2137, "Accra / TM 1 NW", + "+proj=tmerc +lat_0=0 +lon_0=-1 +k=0.9996 +x_0=500000 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +units=m +no_defs"}, + { + 2138, "epsg", 2138, "NAD27(CGQ77) / Quebec Lambert", + "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 2139, "epsg", 2139, "NAD83(CSRS98) / SCoPQ zone 2 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2140, "epsg", 2140, "NAD83(CSRS98) / MTM zone 3 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2141, "epsg", 2141, "NAD83(CSRS98) / MTM zone 4 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2142, "epsg", 2142, "NAD83(CSRS98) / MTM zone 5 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2143, "epsg", 2143, "NAD83(CSRS98) / MTM zone 6 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2144, "epsg", 2144, "NAD83(CSRS98) / MTM zone 7 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2145, "epsg", 2145, "NAD83(CSRS98) / MTM zone 8 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2146, "epsg", 2146, "NAD83(CSRS98) / MTM zone 9 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2147, "epsg", 2147, "NAD83(CSRS98) / MTM zone 10 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2148, "epsg", 2148, "NAD83(CSRS98) / UTM zone 21N (deprecated)", + "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2149, "epsg", 2149, "NAD83(CSRS98) / UTM zone 18N (deprecated)", + "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2150, "epsg", 2150, "NAD83(CSRS98) / UTM zone 17N (deprecated)", + "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2151, "epsg", 2151, "NAD83(CSRS98) / UTM zone 13N (deprecated)", + "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2152, "epsg", 2152, "NAD83(CSRS98) / UTM zone 12N (deprecated)", + "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2153, "epsg", 2153, "NAD83(CSRS98) / UTM zone 11N (deprecated)", + "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2154, "epsg", 2154, "RGF93 / Lambert-93", + "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2155, "epsg", 2155, + "American Samoa 1962 / American Samoa Lambert (deprecated)", + "+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 2156, "epsg", 2156, "NAD83(HARN) / UTM zone 59S (deprecated)", + "+proj=utm +zone=59 +south +ellps=GRS80 +units=m +no_defs"}, + { + 2157, "epsg", 2157, "IRENET95 / Irish Transverse Mercator", + "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=0.99982 +x_0=600000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2158, "epsg", 2158, "IRENET95 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2159, "epsg", 2159, "Sierra Leone 1924 / New Colony Grid", + "+proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1 +x_0=152399.8550907544 +y_0=0 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs"}, + { + 2160, "epsg", 2160, "Sierra Leone 1924 / New War Office Grid", + "+proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1 +x_0=243839.7681452071 +y_0=182879.8261089053 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs"}, + { + 2161, "epsg", 2161, "Sierra Leone 1968 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs"}, + { + 2162, "epsg", 2162, "Sierra Leone 1968 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs"}, + { + 2163, "epsg", 2163, "US National Atlas Equal Area", + "+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs"}, + { + 2164, "epsg", 2164, "Locodjo 1965 / TM 5 NW", + "+proj=tmerc +lat_0=0 +lon_0=-5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs"}, + { + 2165, "epsg", 2165, "Abidjan 1987 / TM 5 NW", + "+proj=tmerc +lat_0=0 +lon_0=-5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs"}, + { + 2166, "epsg", 2166, "Pulkovo 1942(83) / Gauss Kruger zone 3 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"}, + { + 2167, "epsg", 2167, "Pulkovo 1942(83) / Gauss Kruger zone 4 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"}, + { + 2168, "epsg", 2168, "Pulkovo 1942(83) / Gauss Kruger zone 5 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"}, + { + 2169, "epsg", 2169, "Luxembourg 1930 / Gauss", + "+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs"}, + { + 2170, "epsg", 2170, "MGI / Slovenia Grid", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 2171, "epsg", 2171, "Pulkovo 1942(58) / Poland zone I (deprecated)", + "+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5647000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 2172, "epsg", 2172, "Pulkovo 1942(58) / Poland zone II", + "+proj=sterea +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 2173, "epsg", 2173, "Pulkovo 1942(58) / Poland zone III", + "+proj=sterea +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 2174, "epsg", 2174, "Pulkovo 1942(58) / Poland zone IV", + "+proj=sterea +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.9998 +x_0=3703000 +y_0=5627000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 2175, "epsg", 2175, "Pulkovo 1942(58) / Poland zone V", + "+proj=tmerc +lat_0=0 +lon_0=18.95833333333333 +k=0.999983 +x_0=237000 +y_0=-4700000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 2176, "epsg", 2176, "ETRS89 / Poland CS2000 zone 5", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.999923 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2177, "epsg", 2177, "ETRS89 / Poland CS2000 zone 6", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.999923 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2178, "epsg", 2178, "ETRS89 / Poland CS2000 zone 7", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.999923 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2179, "epsg", 2179, "ETRS89 / Poland CS2000 zone 8", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.999923 +x_0=8500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2180, "epsg", 2180, "ETRS89 / Poland CS92", + "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defs"}, + { + 2188, "epsg", 2188, "Azores Occidental 1939 / UTM zone 25N", + "+proj=utm +zone=25 +ellps=intl +units=m +no_defs"}, + { + 2189, "epsg", 2189, "Azores Central 1948 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=intl +towgs84=-104,167,-38,0,0,0,0 +units=m +no_defs"}, + { + 2190, "epsg", 2190, "Azores Oriental 1940 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=intl +towgs84=-203,141,53,0,0,0,0 +units=m +no_defs"}, + { + 2191, "epsg", 2191, "Madeira 1936 / UTM zone 28N (deprecated)", + "+proj=utm +zone=28 +ellps=intl +units=m +no_defs"}, + { + 2192, "epsg", 2192, "ED50 / France EuroLambert", + "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=intl +units=m +no_defs"}, + { + 2193, "epsg", 2193, "NZGD2000 / New Zealand Transverse Mercator", + "+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2194, "epsg", 2194, + "American Samoa 1962 / American Samoa Lambert (deprecated)", + "+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 2195, "epsg", 2195, "NAD83(HARN) / UTM zone 2S", + "+proj=utm +zone=2 +south +ellps=GRS80 +units=m +no_defs"}, + { + 2196, "epsg", 2196, "ETRS89 / Kp2000 Jutland", + "+proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.99995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2197, "epsg", 2197, "ETRS89 / Kp2000 Zealand", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.99995 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2198, "epsg", 2198, "ETRS89 / Kp2000 Bornholm", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2199, "epsg", 2199, "Albanian 1987 / Gauss Kruger zone 4 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2200, "epsg", 2200, "ATS77 / New Brunswick Stereographic (ATS77)", + "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2201, "epsg", 2201, "REGVEN / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2202, "epsg", 2202, "REGVEN / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2203, "epsg", 2203, "REGVEN / UTM zone 20N", + "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2204, "epsg", 2204, "NAD27 / Tennessee", + "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=609601.2192024384 +y_0=30480.06096012192 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 2205, "epsg", 2205, "NAD83 / Kentucky North", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 2206, "epsg", 2206, "ED50 / 3-degree Gauss-Kruger zone 9", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2207, "epsg", 2207, "ED50 / 3-degree Gauss-Kruger zone 10", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2208, "epsg", 2208, "ED50 / 3-degree Gauss-Kruger zone 11", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2209, "epsg", 2209, "ED50 / 3-degree Gauss-Kruger zone 12", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2210, "epsg", 2210, "ED50 / 3-degree Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2211, "epsg", 2211, "ED50 / 3-degree Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2212, "epsg", 2212, "ED50 / 3-degree Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2213, "epsg", 2213, "ETRS89 / TM 30 NE", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2214, "epsg", 2214, "Douala 1948 / AOF west (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +units=m +no_defs"}, + { + 2215, "epsg", 2215, "Manoca 1962 / UTM zone 32N", + "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +units=m +no_defs"}, + { + 2216, "epsg", 2216, "Qornoq 1927 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=intl +units=m +no_defs"}, + { + 2217, "epsg", 2217, "Qornoq 1927 / UTM zone 23N", + "+proj=utm +zone=23 +ellps=intl +units=m +no_defs"}, + { + 2219, "epsg", 2219, "ATS77 / UTM zone 19N", + "+proj=utm +zone=19 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2220, "epsg", 2220, "ATS77 / UTM zone 20N", + "+proj=utm +zone=20 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2222, "epsg", 2222, "NAD83 / Arizona East (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2223, "epsg", 2223, "NAD83 / Arizona Central (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2224, "epsg", 2224, "NAD83 / Arizona West (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2225, "epsg", 2225, "NAD83 / California zone 1 (ftUS)", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2226, "epsg", 2226, "NAD83 / California zone 2 (ftUS)", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2227, "epsg", 2227, "NAD83 / California zone 3 (ftUS)", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2228, "epsg", 2228, "NAD83 / California zone 4 (ftUS)", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2229, "epsg", 2229, "NAD83 / California zone 5 (ftUS)", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2230, "epsg", 2230, "NAD83 / California zone 6 (ftUS)", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2231, "epsg", 2231, "NAD83 / Colorado North (ftUS)", + "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2232, "epsg", 2232, "NAD83 / Colorado Central (ftUS)", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2233, "epsg", 2233, "NAD83 / Colorado South (ftUS)", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2234, "epsg", 2234, "NAD83 / Connecticut (ftUS)", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2235, "epsg", 2235, "NAD83 / Delaware (ftUS)", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2236, "epsg", 2236, "NAD83 / Florida East (ftUS)", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2237, "epsg", 2237, "NAD83 / Florida West (ftUS)", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2238, "epsg", 2238, "NAD83 / Florida North (ftUS)", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2239, "epsg", 2239, "NAD83 / Georgia East (ftUS)", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2240, "epsg", 2240, "NAD83 / Georgia West (ftUS)", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2241, "epsg", 2241, "NAD83 / Idaho East (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2242, "epsg", 2242, "NAD83 / Idaho Central (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2243, "epsg", 2243, "NAD83 / Idaho West (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2244, "epsg", 2244, "NAD83 / Indiana East (ftUS) (deprecated)", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2245, "epsg", 2245, "NAD83 / Indiana West (ftUS) (deprecated)", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2246, "epsg", 2246, "NAD83 / Kentucky North (ftUS)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2247, "epsg", 2247, "NAD83 / Kentucky South (ftUS)", + "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2248, "epsg", 2248, "NAD83 / Maryland (ftUS)", + "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2249, "epsg", 2249, "NAD83 / Massachusetts Mainland (ftUS)", + "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2250, "epsg", 2250, "NAD83 / Massachusetts Island (ftUS)", + "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2251, "epsg", 2251, "NAD83 / Michigan North (ft)", + "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2252, "epsg", 2252, "NAD83 / Michigan Central (ft)", + "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2253, "epsg", 2253, "NAD83 / Michigan South (ft)", + "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2254, "epsg", 2254, "NAD83 / Mississippi East (ftUS)", + "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2255, "epsg", 2255, "NAD83 / Mississippi West (ftUS)", + "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2256, "epsg", 2256, "NAD83 / Montana (ft)", + "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2257, "epsg", 2257, "NAD83 / New Mexico East (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2258, "epsg", 2258, "NAD83 / New Mexico Central (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2259, "epsg", 2259, "NAD83 / New Mexico West (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2260, "epsg", 2260, "NAD83 / New York East (ftUS)", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2261, "epsg", 2261, "NAD83 / New York Central (ftUS)", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2262, "epsg", 2262, "NAD83 / New York West (ftUS)", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2263, "epsg", 2263, "NAD83 / New York Long Island (ftUS)", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2264, "epsg", 2264, "NAD83 / North Carolina (ftUS)", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2265, "epsg", 2265, "NAD83 / North Dakota North (ft)", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2266, "epsg", 2266, "NAD83 / North Dakota South (ft)", + "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2267, "epsg", 2267, "NAD83 / Oklahoma North (ftUS)", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2268, "epsg", 2268, "NAD83 / Oklahoma South (ftUS)", + "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2269, "epsg", 2269, "NAD83 / Oregon North (ft)", + "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2270, "epsg", 2270, "NAD83 / Oregon South (ft)", + "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2271, "epsg", 2271, "NAD83 / Pennsylvania North (ftUS)", + "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2272, "epsg", 2272, "NAD83 / Pennsylvania South (ftUS)", + "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2273, "epsg", 2273, "NAD83 / South Carolina (ft)", + "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2274, "epsg", 2274, "NAD83 / Tennessee (ftUS)", + "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2275, "epsg", 2275, "NAD83 / Texas North (ftUS)", + "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2276, "epsg", 2276, "NAD83 / Texas North Central (ftUS)", + "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2277, "epsg", 2277, "NAD83 / Texas Central (ftUS)", + "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2278, "epsg", 2278, "NAD83 / Texas South Central (ftUS)", + "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2279, "epsg", 2279, "NAD83 / Texas South (ftUS)", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2280, "epsg", 2280, "NAD83 / Utah North (ft)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2281, "epsg", 2281, "NAD83 / Utah Central (ft)", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2282, "epsg", 2282, "NAD83 / Utah South (ft)", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2283, "epsg", 2283, "NAD83 / Virginia North (ftUS)", + "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2284, "epsg", 2284, "NAD83 / Virginia South (ftUS)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2285, "epsg", 2285, "NAD83 / Washington North (ftUS)", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2286, "epsg", 2286, "NAD83 / Washington South (ftUS)", + "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2287, "epsg", 2287, "NAD83 / Wisconsin North (ftUS)", + "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2288, "epsg", 2288, "NAD83 / Wisconsin Central (ftUS)", + "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2289, "epsg", 2289, "NAD83 / Wisconsin South (ftUS)", + "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2290, "epsg", 2290, "ATS77 / Prince Edward Isl. Stereographic (ATS77)", + "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2291, "epsg", 2291, + "NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83) (deprecated)", + "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2292, "epsg", 2292, + "NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83) (deprecated)", + "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2294, "epsg", 2294, "ATS77 / MTM Nova Scotia zone 4", + "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=4500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2295, "epsg", 2295, "ATS77 / MTM Nova Scotia zone 5", + "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=5500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs"}, + { + 2308, "epsg", 2308, "Batavia / TM 109 SE", + "+proj=tmerc +lat_0=0 +lon_0=109 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=bessel +units=m +no_defs"}, + { + 2309, "epsg", 2309, "WGS 84 / TM 116 SE", + "+proj=tmerc +lat_0=0 +lon_0=116 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 2310, "epsg", 2310, "WGS 84 / TM 132 SE", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 2311, "epsg", 2311, "WGS 84 / TM 6 NE", + "+proj=tmerc +lat_0=0 +lon_0=6 +k=0.9996 +x_0=500000 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 2312, "epsg", 2312, "Garoua / UTM zone 33N", + "+proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs"}, + { + 2313, "epsg", 2313, "Kousseri / UTM zone 33N", + "+proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs"}, + { + 2314, "epsg", 2314, "Trinidad 1903 / Trinidad Grid (ftCla)", + "+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392052001 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654 +no_defs"}, + { + 2315, "epsg", 2315, "Campo Inchauspe / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs"}, + { + 2316, "epsg", 2316, "Campo Inchauspe / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=intl +units=m +no_defs"}, + { + 2317, "epsg", 2317, "PSAD56 / ICN Regional", + "+proj=lcc +lat_1=9 +lat_2=3 +lat_0=6 +lon_0=-66 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs"}, + { + 2318, "epsg", 2318, "Ain el Abd / Aramco Lambert", + "+proj=lcc +lat_1=17 +lat_2=33 +lat_0=25.08951 +lon_0=48 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2319, "epsg", 2319, "ED50 / TM27", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2320, "epsg", 2320, "ED50 / TM30", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2321, "epsg", 2321, "ED50 / TM33", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2322, "epsg", 2322, "ED50 / TM36", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2323, "epsg", 2323, "ED50 / TM39", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2324, "epsg", 2324, "ED50 / TM42", + "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2325, "epsg", 2325, "ED50 / TM45", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 2326, "epsg", 2326, "Hong Kong 1980 Grid System", + "+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +units=m +no_defs"}, + { + 2327, "epsg", 2327, "Xian 1980 / Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2328, "epsg", 2328, "Xian 1980 / Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2329, "epsg", 2329, "Xian 1980 / Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2330, "epsg", 2330, "Xian 1980 / Gauss-Kruger zone 16", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2331, "epsg", 2331, "Xian 1980 / Gauss-Kruger zone 17", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2332, "epsg", 2332, "Xian 1980 / Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2333, "epsg", 2333, "Xian 1980 / Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2334, "epsg", 2334, "Xian 1980 / Gauss-Kruger zone 20", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2335, "epsg", 2335, "Xian 1980 / Gauss-Kruger zone 21", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2336, "epsg", 2336, "Xian 1980 / Gauss-Kruger zone 22", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2337, "epsg", 2337, "Xian 1980 / Gauss-Kruger zone 23", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2338, "epsg", 2338, "Xian 1980 / Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2339, "epsg", 2339, "Xian 1980 / Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2340, "epsg", 2340, "Xian 1980 / Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2341, "epsg", 2341, "Xian 1980 / Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2342, "epsg", 2342, "Xian 1980 / Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2343, "epsg", 2343, "Xian 1980 / Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2344, "epsg", 2344, "Xian 1980 / Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2345, "epsg", 2345, "Xian 1980 / Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2346, "epsg", 2346, "Xian 1980 / Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2347, "epsg", 2347, "Xian 1980 / Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2348, "epsg", 2348, "Xian 1980 / Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2349, "epsg", 2349, "Xian 1980 / 3-degree Gauss-Kruger zone 25", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2350, "epsg", 2350, "Xian 1980 / 3-degree Gauss-Kruger zone 26", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2351, "epsg", 2351, "Xian 1980 / 3-degree Gauss-Kruger zone 27", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2352, "epsg", 2352, "Xian 1980 / 3-degree Gauss-Kruger zone 28", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2353, "epsg", 2353, "Xian 1980 / 3-degree Gauss-Kruger zone 29", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2354, "epsg", 2354, "Xian 1980 / 3-degree Gauss-Kruger zone 30", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2355, "epsg", 2355, "Xian 1980 / 3-degree Gauss-Kruger zone 31", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2356, "epsg", 2356, "Xian 1980 / 3-degree Gauss-Kruger zone 32", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2357, "epsg", 2357, "Xian 1980 / 3-degree Gauss-Kruger zone 33", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2358, "epsg", 2358, "Xian 1980 / 3-degree Gauss-Kruger zone 34", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2359, "epsg", 2359, "Xian 1980 / 3-degree Gauss-Kruger zone 35", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2360, "epsg", 2360, "Xian 1980 / 3-degree Gauss-Kruger zone 36", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2361, "epsg", 2361, "Xian 1980 / 3-degree Gauss-Kruger zone 37", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2362, "epsg", 2362, "Xian 1980 / 3-degree Gauss-Kruger zone 38", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2363, "epsg", 2363, "Xian 1980 / 3-degree Gauss-Kruger zone 39", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2364, "epsg", 2364, "Xian 1980 / 3-degree Gauss-Kruger zone 40", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2365, "epsg", 2365, "Xian 1980 / 3-degree Gauss-Kruger zone 41", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2366, "epsg", 2366, "Xian 1980 / 3-degree Gauss-Kruger zone 42", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2367, "epsg", 2367, "Xian 1980 / 3-degree Gauss-Kruger zone 43", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2368, "epsg", 2368, "Xian 1980 / 3-degree Gauss-Kruger zone 44", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2369, "epsg", 2369, "Xian 1980 / 3-degree Gauss-Kruger zone 45", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2370, "epsg", 2370, "Xian 1980 / 3-degree Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2371, "epsg", 2371, "Xian 1980 / 3-degree Gauss-Kruger CM 78E", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2372, "epsg", 2372, "Xian 1980 / 3-degree Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2373, "epsg", 2373, "Xian 1980 / 3-degree Gauss-Kruger CM 84E", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2374, "epsg", 2374, "Xian 1980 / 3-degree Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2375, "epsg", 2375, "Xian 1980 / 3-degree Gauss-Kruger CM 90E", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2376, "epsg", 2376, "Xian 1980 / 3-degree Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2377, "epsg", 2377, "Xian 1980 / 3-degree Gauss-Kruger CM 96E", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2378, "epsg", 2378, "Xian 1980 / 3-degree Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2379, "epsg", 2379, "Xian 1980 / 3-degree Gauss-Kruger CM 102E", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2380, "epsg", 2380, "Xian 1980 / 3-degree Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2381, "epsg", 2381, "Xian 1980 / 3-degree Gauss-Kruger CM 108E", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2382, "epsg", 2382, "Xian 1980 / 3-degree Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2383, "epsg", 2383, "Xian 1980 / 3-degree Gauss-Kruger CM 114E", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2384, "epsg", 2384, "Xian 1980 / 3-degree Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2385, "epsg", 2385, "Xian 1980 / 3-degree Gauss-Kruger CM 120E", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2386, "epsg", 2386, "Xian 1980 / 3-degree Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2387, "epsg", 2387, "Xian 1980 / 3-degree Gauss-Kruger CM 126E", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2388, "epsg", 2388, "Xian 1980 / 3-degree Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2389, "epsg", 2389, "Xian 1980 / 3-degree Gauss-Kruger CM 132E", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2390, "epsg", 2390, "Xian 1980 / 3-degree Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"}, + { + 2391, "epsg", 2391, "KKJ / Finland zone 1", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs"}, + { + 2392, "epsg", 2392, "KKJ / Finland zone 2", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs"}, + { + 2393, "epsg", 2393, "KKJ / Finland Uniform Coordinate System", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs"}, + { + 2394, "epsg", 2394, "KKJ / Finland zone 4", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=4500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs"}, + { + 2395, "epsg", 2395, "South Yemen / Gauss-Kruger zone 8", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs"}, + { + 2396, "epsg", 2396, "South Yemen / Gauss-Kruger zone 9", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs"}, + { + 2397, "epsg", 2397, "Pulkovo 1942(83) / Gauss-Kruger zone 3", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"}, + { + 2398, "epsg", 2398, "Pulkovo 1942(83) / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"}, + { + 2399, "epsg", 2399, "Pulkovo 1942(83) / Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"}, + { + 2400, "epsg", 2400, "RT90 2.5 gon W (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 2401, "epsg", 2401, "Beijing 1954 / 3-degree Gauss-Kruger zone 25", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2402, "epsg", 2402, "Beijing 1954 / 3-degree Gauss-Kruger zone 26", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2403, "epsg", 2403, "Beijing 1954 / 3-degree Gauss-Kruger zone 27", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2404, "epsg", 2404, "Beijing 1954 / 3-degree Gauss-Kruger zone 28", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2405, "epsg", 2405, "Beijing 1954 / 3-degree Gauss-Kruger zone 29", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2406, "epsg", 2406, "Beijing 1954 / 3-degree Gauss-Kruger zone 30", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2407, "epsg", 2407, "Beijing 1954 / 3-degree Gauss-Kruger zone 31", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2408, "epsg", 2408, "Beijing 1954 / 3-degree Gauss-Kruger zone 32", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2409, "epsg", 2409, "Beijing 1954 / 3-degree Gauss-Kruger zone 33", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2410, "epsg", 2410, "Beijing 1954 / 3-degree Gauss-Kruger zone 34", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2411, "epsg", 2411, "Beijing 1954 / 3-degree Gauss-Kruger zone 35", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2412, "epsg", 2412, "Beijing 1954 / 3-degree Gauss-Kruger zone 36", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2413, "epsg", 2413, "Beijing 1954 / 3-degree Gauss-Kruger zone 37", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2414, "epsg", 2414, "Beijing 1954 / 3-degree Gauss-Kruger zone 38", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2415, "epsg", 2415, "Beijing 1954 / 3-degree Gauss-Kruger zone 39", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2416, "epsg", 2416, "Beijing 1954 / 3-degree Gauss-Kruger zone 40", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2417, "epsg", 2417, "Beijing 1954 / 3-degree Gauss-Kruger zone 41", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2418, "epsg", 2418, "Beijing 1954 / 3-degree Gauss-Kruger zone 42", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2419, "epsg", 2419, "Beijing 1954 / 3-degree Gauss-Kruger zone 43", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2420, "epsg", 2420, "Beijing 1954 / 3-degree Gauss-Kruger zone 44", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2421, "epsg", 2421, "Beijing 1954 / 3-degree Gauss-Kruger zone 45", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2422, "epsg", 2422, "Beijing 1954 / 3-degree Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2423, "epsg", 2423, "Beijing 1954 / 3-degree Gauss-Kruger CM 78E", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2424, "epsg", 2424, "Beijing 1954 / 3-degree Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2425, "epsg", 2425, "Beijing 1954 / 3-degree Gauss-Kruger CM 84E", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2426, "epsg", 2426, "Beijing 1954 / 3-degree Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2427, "epsg", 2427, "Beijing 1954 / 3-degree Gauss-Kruger CM 90E", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2428, "epsg", 2428, "Beijing 1954 / 3-degree Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2429, "epsg", 2429, "Beijing 1954 / 3-degree Gauss-Kruger CM 96E", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2430, "epsg", 2430, "Beijing 1954 / 3-degree Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2431, "epsg", 2431, "Beijing 1954 / 3-degree Gauss-Kruger CM 102E", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2432, "epsg", 2432, "Beijing 1954 / 3-degree Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2433, "epsg", 2433, "Beijing 1954 / 3-degree Gauss-Kruger CM 108E", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2434, "epsg", 2434, "Beijing 1954 / 3-degree Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2435, "epsg", 2435, "Beijing 1954 / 3-degree Gauss-Kruger CM 114E", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2436, "epsg", 2436, "Beijing 1954 / 3-degree Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2437, "epsg", 2437, "Beijing 1954 / 3-degree Gauss-Kruger CM 120E", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2438, "epsg", 2438, "Beijing 1954 / 3-degree Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2439, "epsg", 2439, "Beijing 1954 / 3-degree Gauss-Kruger CM 126E", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2440, "epsg", 2440, "Beijing 1954 / 3-degree Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2441, "epsg", 2441, "Beijing 1954 / 3-degree Gauss-Kruger CM 132E", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2442, "epsg", 2442, "Beijing 1954 / 3-degree Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2443, "epsg", 2443, "JGD2000 / Japan Plane Rectangular CS I", + "+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2444, "epsg", 2444, "JGD2000 / Japan Plane Rectangular CS II", + "+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2445, "epsg", 2445, "JGD2000 / Japan Plane Rectangular CS III", + "+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2446, "epsg", 2446, "JGD2000 / Japan Plane Rectangular CS IV", + "+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2447, "epsg", 2447, "JGD2000 / Japan Plane Rectangular CS V", + "+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2448, "epsg", 2448, "JGD2000 / Japan Plane Rectangular CS VI", + "+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2449, "epsg", 2449, "JGD2000 / Japan Plane Rectangular CS VII", + "+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2450, "epsg", 2450, "JGD2000 / Japan Plane Rectangular CS VIII", + "+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2451, "epsg", 2451, "JGD2000 / Japan Plane Rectangular CS IX", + "+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2452, "epsg", 2452, "JGD2000 / Japan Plane Rectangular CS X", + "+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2453, "epsg", 2453, "JGD2000 / Japan Plane Rectangular CS XI", + "+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2454, "epsg", 2454, "JGD2000 / Japan Plane Rectangular CS XII", + "+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2455, "epsg", 2455, "JGD2000 / Japan Plane Rectangular CS XIII", + "+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2456, "epsg", 2456, "JGD2000 / Japan Plane Rectangular CS XIV", + "+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2457, "epsg", 2457, "JGD2000 / Japan Plane Rectangular CS XV", + "+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2458, "epsg", 2458, "JGD2000 / Japan Plane Rectangular CS XVI", + "+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2459, "epsg", 2459, "JGD2000 / Japan Plane Rectangular CS XVII", + "+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2460, "epsg", 2460, "JGD2000 / Japan Plane Rectangular CS XVIII", + "+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2461, "epsg", 2461, "JGD2000 / Japan Plane Rectangular CS XIX", + "+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2462, "epsg", 2462, "Albanian 1987 / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2463, "epsg", 2463, "Pulkovo 1995 / Gauss-Kruger CM 21E", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2464, "epsg", 2464, "Pulkovo 1995 / Gauss-Kruger CM 27E", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2465, "epsg", 2465, "Pulkovo 1995 / Gauss-Kruger CM 33E", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2466, "epsg", 2466, "Pulkovo 1995 / Gauss-Kruger CM 39E", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2467, "epsg", 2467, "Pulkovo 1995 / Gauss-Kruger CM 45E", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2468, "epsg", 2468, "Pulkovo 1995 / Gauss-Kruger CM 51E", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2469, "epsg", 2469, "Pulkovo 1995 / Gauss-Kruger CM 57E", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2470, "epsg", 2470, "Pulkovo 1995 / Gauss-Kruger CM 63E", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2471, "epsg", 2471, "Pulkovo 1995 / Gauss-Kruger CM 69E", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2472, "epsg", 2472, "Pulkovo 1995 / Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2473, "epsg", 2473, "Pulkovo 1995 / Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2474, "epsg", 2474, "Pulkovo 1995 / Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2475, "epsg", 2475, "Pulkovo 1995 / Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2476, "epsg", 2476, "Pulkovo 1995 / Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2477, "epsg", 2477, "Pulkovo 1995 / Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2478, "epsg", 2478, "Pulkovo 1995 / Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2479, "epsg", 2479, "Pulkovo 1995 / Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2480, "epsg", 2480, "Pulkovo 1995 / Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2481, "epsg", 2481, "Pulkovo 1995 / Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2482, "epsg", 2482, "Pulkovo 1995 / Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2483, "epsg", 2483, "Pulkovo 1995 / Gauss-Kruger CM 141E", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2484, "epsg", 2484, "Pulkovo 1995 / Gauss-Kruger CM 147E", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2485, "epsg", 2485, "Pulkovo 1995 / Gauss-Kruger CM 153E", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2486, "epsg", 2486, "Pulkovo 1995 / Gauss-Kruger CM 159E", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2487, "epsg", 2487, "Pulkovo 1995 / Gauss-Kruger CM 165E", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2488, "epsg", 2488, "Pulkovo 1995 / Gauss-Kruger CM 171E", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2489, "epsg", 2489, "Pulkovo 1995 / Gauss-Kruger CM 177E", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2490, "epsg", 2490, "Pulkovo 1995 / Gauss-Kruger CM 177W", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2491, "epsg", 2491, "Pulkovo 1995 / Gauss-Kruger CM 171W", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2492, "epsg", 2492, "Pulkovo 1942 / Gauss-Kruger CM 9E", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2493, "epsg", 2493, "Pulkovo 1942 / Gauss-Kruger CM 15E", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2494, "epsg", 2494, "Pulkovo 1942 / Gauss-Kruger CM 21E", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2495, "epsg", 2495, "Pulkovo 1942 / Gauss-Kruger CM 27E", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2496, "epsg", 2496, "Pulkovo 1942 / Gauss-Kruger CM 33E", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2497, "epsg", 2497, "Pulkovo 1942 / Gauss-Kruger CM 39E", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2498, "epsg", 2498, "Pulkovo 1942 / Gauss-Kruger CM 45E", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2499, "epsg", 2499, "Pulkovo 1942 / Gauss-Kruger CM 51E", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2500, "epsg", 2500, "Pulkovo 1942 / Gauss-Kruger CM 57E", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2501, "epsg", 2501, "Pulkovo 1942 / Gauss-Kruger CM 63E", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2502, "epsg", 2502, "Pulkovo 1942 / Gauss-Kruger CM 69E", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2503, "epsg", 2503, "Pulkovo 1942 / Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2504, "epsg", 2504, "Pulkovo 1942 / Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2505, "epsg", 2505, "Pulkovo 1942 / Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2506, "epsg", 2506, "Pulkovo 1942 / Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2507, "epsg", 2507, "Pulkovo 1942 / Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2508, "epsg", 2508, "Pulkovo 1942 / Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2509, "epsg", 2509, "Pulkovo 1942 / Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2510, "epsg", 2510, "Pulkovo 1942 / Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2511, "epsg", 2511, "Pulkovo 1942 / Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2512, "epsg", 2512, "Pulkovo 1942 / Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2513, "epsg", 2513, "Pulkovo 1942 / Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2514, "epsg", 2514, "Pulkovo 1942 / Gauss-Kruger CM 141E", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2515, "epsg", 2515, "Pulkovo 1942 / Gauss-Kruger CM 147E", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2516, "epsg", 2516, "Pulkovo 1942 / Gauss-Kruger CM 153E", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2517, "epsg", 2517, "Pulkovo 1942 / Gauss-Kruger CM 159E", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2518, "epsg", 2518, "Pulkovo 1942 / Gauss-Kruger CM 165E", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2519, "epsg", 2519, "Pulkovo 1942 / Gauss-Kruger CM 171E", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2520, "epsg", 2520, "Pulkovo 1942 / Gauss-Kruger CM 177E", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2521, "epsg", 2521, "Pulkovo 1942 / Gauss-Kruger CM 177W", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2522, "epsg", 2522, "Pulkovo 1942 / Gauss-Kruger CM 171W", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2523, "epsg", 2523, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 7", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2524, "epsg", 2524, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 8", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2525, "epsg", 2525, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 9", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2526, "epsg", 2526, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 10", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2527, "epsg", 2527, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 11", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2528, "epsg", 2528, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 12", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2529, "epsg", 2529, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2530, "epsg", 2530, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2531, "epsg", 2531, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2532, "epsg", 2532, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 16", + "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2533, "epsg", 2533, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 17", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2534, "epsg", 2534, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2535, "epsg", 2535, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2536, "epsg", 2536, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 20", + "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2537, "epsg", 2537, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 21", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2538, "epsg", 2538, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 22", + "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2539, "epsg", 2539, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 23", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2540, "epsg", 2540, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 24", + "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2541, "epsg", 2541, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 25", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2542, "epsg", 2542, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 26", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2543, "epsg", 2543, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 27", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2544, "epsg", 2544, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 28", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2545, "epsg", 2545, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 29", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2546, "epsg", 2546, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 30", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2547, "epsg", 2547, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 31", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2548, "epsg", 2548, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 32", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2549, "epsg", 2549, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 33", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2550, "epsg", 2550, "Samboja / UTM zone 50S (deprecated)", + "+proj=utm +zone=50 +south +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +units=m +no_defs"}, + { + 2551, "epsg", 2551, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 34", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2552, "epsg", 2552, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 35", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2553, "epsg", 2553, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 36", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2554, "epsg", 2554, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 37", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2555, "epsg", 2555, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 38", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2556, "epsg", 2556, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 39", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2557, "epsg", 2557, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 40", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2558, "epsg", 2558, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 41", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2559, "epsg", 2559, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 42", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2560, "epsg", 2560, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 43", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2561, "epsg", 2561, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 44", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2562, "epsg", 2562, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 45", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2563, "epsg", 2563, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 46", + "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2564, "epsg", 2564, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 47", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2565, "epsg", 2565, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 48", + "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2566, "epsg", 2566, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 49", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2567, "epsg", 2567, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 50", + "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2568, "epsg", 2568, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 51", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2569, "epsg", 2569, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 52", + "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2570, "epsg", 2570, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 53", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2571, "epsg", 2571, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 54", + "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2572, "epsg", 2572, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 55", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2573, "epsg", 2573, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 56", + "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2574, "epsg", 2574, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 57", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2575, "epsg", 2575, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 58", + "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2576, "epsg", 2576, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 59", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2577, "epsg", 2577, + "Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2578, "epsg", 2578, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 61", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2579, "epsg", 2579, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 62", + "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2580, "epsg", 2580, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 63", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2581, "epsg", 2581, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 64", + "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2582, "epsg", 2582, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2583, "epsg", 2583, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2584, "epsg", 2584, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2585, "epsg", 2585, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2586, "epsg", 2586, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2587, "epsg", 2587, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2588, "epsg", 2588, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2589, "epsg", 2589, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E", + "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2590, "epsg", 2590, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2591, "epsg", 2591, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E", + "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2592, "epsg", 2592, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2593, "epsg", 2593, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E", + "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2594, "epsg", 2594, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2595, "epsg", 2595, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E", + "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2596, "epsg", 2596, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2597, "epsg", 2597, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E", + "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2598, "epsg", 2598, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2599, "epsg", 2599, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E", + "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2600, "epsg", 2600, "Lietuvos Koordinoei Sistema 1994 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2601, "epsg", 2601, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2602, "epsg", 2602, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2603, "epsg", 2603, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2604, "epsg", 2604, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2605, "epsg", 2605, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2606, "epsg", 2606, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2607, "epsg", 2607, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2608, "epsg", 2608, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2609, "epsg", 2609, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2610, "epsg", 2610, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2611, "epsg", 2611, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2612, "epsg", 2612, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2613, "epsg", 2613, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2614, "epsg", 2614, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2615, "epsg", 2615, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2616, "epsg", 2616, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2617, "epsg", 2617, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2618, "epsg", 2618, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2619, "epsg", 2619, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2620, "epsg", 2620, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2621, "epsg", 2621, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2622, "epsg", 2622, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E", + "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2623, "epsg", 2623, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2624, "epsg", 2624, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E", + "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2625, "epsg", 2625, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2626, "epsg", 2626, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E", + "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2627, "epsg", 2627, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2628, "epsg", 2628, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E", + "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2629, "epsg", 2629, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2630, "epsg", 2630, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E", + "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2631, "epsg", 2631, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2632, "epsg", 2632, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E", + "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2633, "epsg", 2633, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2634, "epsg", 2634, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E", + "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2635, "epsg", 2635, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2636, "epsg", 2636, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E", + "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2637, "epsg", 2637, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2638, "epsg", 2638, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W", + "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2639, "epsg", 2639, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2640, "epsg", 2640, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W", + "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2641, "epsg", 2641, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 7", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2642, "epsg", 2642, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 8", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2643, "epsg", 2643, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 9", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2644, "epsg", 2644, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 10", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2645, "epsg", 2645, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 11", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2646, "epsg", 2646, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 12", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2647, "epsg", 2647, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2648, "epsg", 2648, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2649, "epsg", 2649, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2650, "epsg", 2650, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 16", + "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2651, "epsg", 2651, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 17", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2652, "epsg", 2652, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2653, "epsg", 2653, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2654, "epsg", 2654, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 20", + "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2655, "epsg", 2655, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 21", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2656, "epsg", 2656, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 22", + "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2657, "epsg", 2657, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 23", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2658, "epsg", 2658, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 24", + "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2659, "epsg", 2659, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 25", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2660, "epsg", 2660, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 26", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2661, "epsg", 2661, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 27", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2662, "epsg", 2662, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 28", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2663, "epsg", 2663, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 29", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2664, "epsg", 2664, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 30", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2665, "epsg", 2665, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 31", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2666, "epsg", 2666, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 32", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2667, "epsg", 2667, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 33", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2668, "epsg", 2668, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 34", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2669, "epsg", 2669, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 35", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2670, "epsg", 2670, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 36", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2671, "epsg", 2671, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 37", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2672, "epsg", 2672, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 38", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2673, "epsg", 2673, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 39", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2674, "epsg", 2674, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 40", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2675, "epsg", 2675, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 41", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2676, "epsg", 2676, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 42", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2677, "epsg", 2677, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 43", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2678, "epsg", 2678, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 44", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2679, "epsg", 2679, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 45", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2680, "epsg", 2680, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 46", + "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2681, "epsg", 2681, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 47", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2682, "epsg", 2682, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 48", + "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2683, "epsg", 2683, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 49", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2684, "epsg", 2684, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 50", + "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2685, "epsg", 2685, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 51", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2686, "epsg", 2686, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 52", + "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2687, "epsg", 2687, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 53", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2688, "epsg", 2688, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 54", + "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2689, "epsg", 2689, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 55", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2690, "epsg", 2690, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 56", + "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2691, "epsg", 2691, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 57", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2692, "epsg", 2692, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 58", + "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2693, "epsg", 2693, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 59", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2694, "epsg", 2694, + "Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2695, "epsg", 2695, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 61", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2696, "epsg", 2696, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 62", + "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2697, "epsg", 2697, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 63", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2698, "epsg", 2698, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 64", + "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2699, "epsg", 2699, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2700, "epsg", 2700, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2701, "epsg", 2701, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2702, "epsg", 2702, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2703, "epsg", 2703, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2704, "epsg", 2704, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2705, "epsg", 2705, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2706, "epsg", 2706, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E", + "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2707, "epsg", 2707, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2708, "epsg", 2708, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E", + "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2709, "epsg", 2709, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2710, "epsg", 2710, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E", + "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2711, "epsg", 2711, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2712, "epsg", 2712, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E", + "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2713, "epsg", 2713, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2714, "epsg", 2714, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E", + "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2715, "epsg", 2715, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2716, "epsg", 2716, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E", + "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2717, "epsg", 2717, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2718, "epsg", 2718, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E", + "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2719, "epsg", 2719, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2720, "epsg", 2720, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E", + "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2721, "epsg", 2721, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2722, "epsg", 2722, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2723, "epsg", 2723, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2724, "epsg", 2724, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E", + "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2725, "epsg", 2725, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2726, "epsg", 2726, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E", + "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2727, "epsg", 2727, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2728, "epsg", 2728, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E", + "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2729, "epsg", 2729, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2730, "epsg", 2730, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E", + "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2731, "epsg", 2731, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2732, "epsg", 2732, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2733, "epsg", 2733, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2734, "epsg", 2734, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E", + "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2735, "epsg", 2735, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2736, "epsg", 2736, "Tete / UTM zone 36S", + "+proj=utm +zone=36 +south +ellps=clrk66 +units=m +no_defs"}, + { + 2737, "epsg", 2737, "Tete / UTM zone 37S", + "+proj=utm +zone=37 +south +ellps=clrk66 +units=m +no_defs"}, + { + 2738, "epsg", 2738, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E", + "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2739, "epsg", 2739, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2740, "epsg", 2740, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E", + "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2741, "epsg", 2741, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2742, "epsg", 2742, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E", + "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2743, "epsg", 2743, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2744, "epsg", 2744, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E", + "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2745, "epsg", 2745, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2746, "epsg", 2746, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E", + "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2747, "epsg", 2747, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2748, "epsg", 2748, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E", + "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2749, "epsg", 2749, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2750, "epsg", 2750, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E", + "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2751, "epsg", 2751, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2752, "epsg", 2752, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E", + "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2753, "epsg", 2753, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2754, "epsg", 2754, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E", + "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2755, "epsg", 2755, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2756, "epsg", 2756, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W", + "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2757, "epsg", 2757, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2758, "epsg", 2758, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W", + "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2759, "epsg", 2759, "NAD83(HARN) / Alabama East", + "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2760, "epsg", 2760, "NAD83(HARN) / Alabama West", + "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2761, "epsg", 2761, "NAD83(HARN) / Arizona East", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2762, "epsg", 2762, "NAD83(HARN) / Arizona Central", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2763, "epsg", 2763, "NAD83(HARN) / Arizona West", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2764, "epsg", 2764, "NAD83(HARN) / Arkansas North", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2765, "epsg", 2765, "NAD83(HARN) / Arkansas South", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs"}, + { + 2766, "epsg", 2766, "NAD83(HARN) / California zone 1", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2767, "epsg", 2767, "NAD83(HARN) / California zone 2", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2768, "epsg", 2768, "NAD83(HARN) / California zone 3", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2769, "epsg", 2769, "NAD83(HARN) / California zone 4", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2770, "epsg", 2770, "NAD83(HARN) / California zone 5", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2771, "epsg", 2771, "NAD83(HARN) / California zone 6", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2772, "epsg", 2772, "NAD83(HARN) / Colorado North", + "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs"}, + { + 2773, "epsg", 2773, "NAD83(HARN) / Colorado Central", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs"}, + { + 2774, "epsg", 2774, "NAD83(HARN) / Colorado South", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs"}, + { + 2775, "epsg", 2775, "NAD83(HARN) / Connecticut", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m +no_defs"}, + { + 2776, "epsg", 2776, "NAD83(HARN) / Delaware", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2777, "epsg", 2777, "NAD83(HARN) / Florida East", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2778, "epsg", 2778, "NAD83(HARN) / Florida West", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2779, "epsg", 2779, "NAD83(HARN) / Florida North", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2780, "epsg", 2780, "NAD83(HARN) / Georgia East", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2781, "epsg", 2781, "NAD83(HARN) / Georgia West", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2782, "epsg", 2782, "NAD83(HARN) / Hawaii zone 1", + "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2783, "epsg", 2783, "NAD83(HARN) / Hawaii zone 2", + "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2784, "epsg", 2784, "NAD83(HARN) / Hawaii zone 3", + "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2785, "epsg", 2785, "NAD83(HARN) / Hawaii zone 4", + "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2786, "epsg", 2786, "NAD83(HARN) / Hawaii zone 5", + "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2787, "epsg", 2787, "NAD83(HARN) / Idaho East", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2788, "epsg", 2788, "NAD83(HARN) / Idaho Central", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2789, "epsg", 2789, "NAD83(HARN) / Idaho West", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2790, "epsg", 2790, "NAD83(HARN) / Illinois East", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2791, "epsg", 2791, "NAD83(HARN) / Illinois West", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2792, "epsg", 2792, "NAD83(HARN) / Indiana East", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +no_defs"}, + { + 2793, "epsg", 2793, "NAD83(HARN) / Indiana West", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +no_defs"}, + { + 2794, "epsg", 2794, "NAD83(HARN) / Iowa North", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2795, "epsg", 2795, "NAD83(HARN) / Iowa South", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2796, "epsg", 2796, "NAD83(HARN) / Kansas North", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2797, "epsg", 2797, "NAD83(HARN) / Kansas South", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs"}, + { + 2798, "epsg", 2798, "NAD83(HARN) / Kentucky North", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2799, "epsg", 2799, "NAD83(HARN) / Kentucky South", + "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2800, "epsg", 2800, "NAD83(HARN) / Louisiana North", + "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2801, "epsg", 2801, "NAD83(HARN) / Louisiana South", + "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2802, "epsg", 2802, "NAD83(HARN) / Maine East", + "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2803, "epsg", 2803, "NAD83(HARN) / Maine West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2804, "epsg", 2804, "NAD83(HARN) / Maryland", + "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2805, "epsg", 2805, "NAD83(HARN) / Massachusetts Mainland", + "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m +no_defs"}, + { + 2806, "epsg", 2806, "NAD83(HARN) / Massachusetts Island", + "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2807, "epsg", 2807, "NAD83(HARN) / Michigan North", + "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2808, "epsg", 2808, "NAD83(HARN) / Michigan Central", + "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2809, "epsg", 2809, "NAD83(HARN) / Michigan South", + "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2810, "epsg", 2810, "NAD83(HARN) / Minnesota North", + "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"}, + { + 2811, "epsg", 2811, "NAD83(HARN) / Minnesota Central", + "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"}, + { + 2812, "epsg", 2812, "NAD83(HARN) / Minnesota South", + "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"}, + { + 2813, "epsg", 2813, "NAD83(HARN) / Mississippi East", + "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2814, "epsg", 2814, "NAD83(HARN) / Mississippi West", + "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2815, "epsg", 2815, "NAD83(HARN) / Missouri East", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2816, "epsg", 2816, "NAD83(HARN) / Missouri Central", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2817, "epsg", 2817, "NAD83(HARN) / Missouri West", + "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2818, "epsg", 2818, "NAD83(HARN) / Montana", + "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2819, "epsg", 2819, "NAD83(HARN) / Nebraska", + "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2820, "epsg", 2820, "NAD83(HARN) / Nevada East", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2821, "epsg", 2821, "NAD83(HARN) / Nevada Central", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2822, "epsg", 2822, "NAD83(HARN) / Nevada West", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2823, "epsg", 2823, "NAD83(HARN) / New Hampshire", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2824, "epsg", 2824, "NAD83(HARN) / New Jersey", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2825, "epsg", 2825, "NAD83(HARN) / New Mexico East", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2826, "epsg", 2826, "NAD83(HARN) / New Mexico Central", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2827, "epsg", 2827, "NAD83(HARN) / New Mexico West", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2828, "epsg", 2828, "NAD83(HARN) / New York East", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2829, "epsg", 2829, "NAD83(HARN) / New York Central", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2830, "epsg", 2830, "NAD83(HARN) / New York West", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2831, "epsg", 2831, "NAD83(HARN) / New York Long Island", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2832, "epsg", 2832, "NAD83(HARN) / North Dakota North", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2833, "epsg", 2833, "NAD83(HARN) / North Dakota South", + "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2834, "epsg", 2834, "NAD83(HARN) / Ohio North", + "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2835, "epsg", 2835, "NAD83(HARN) / Ohio South", + "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2836, "epsg", 2836, "NAD83(HARN) / Oklahoma North", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2837, "epsg", 2837, "NAD83(HARN) / Oklahoma South", + "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2838, "epsg", 2838, "NAD83(HARN) / Oregon North", + "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2839, "epsg", 2839, "NAD83(HARN) / Oregon South", + "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2840, "epsg", 2840, "NAD83(HARN) / Rhode Island", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2841, "epsg", 2841, "NAD83(HARN) / South Dakota North", + "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2842, "epsg", 2842, "NAD83(HARN) / South Dakota South", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2843, "epsg", 2843, "NAD83(HARN) / Tennessee", + "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2844, "epsg", 2844, "NAD83(HARN) / Texas North", + "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2845, "epsg", 2845, "NAD83(HARN) / Texas North Central", + "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2846, "epsg", 2846, "NAD83(HARN) / Texas Central", + "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2847, "epsg", 2847, "NAD83(HARN) / Texas South Central", + "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2848, "epsg", 2848, "NAD83(HARN) / Texas South", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2849, "epsg", 2849, "NAD83(HARN) / Utah North", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2850, "epsg", 2850, "NAD83(HARN) / Utah Central", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2851, "epsg", 2851, "NAD83(HARN) / Utah South", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2852, "epsg", 2852, "NAD83(HARN) / Vermont", + "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2853, "epsg", 2853, "NAD83(HARN) / Virginia North", + "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2854, "epsg", 2854, "NAD83(HARN) / Virginia South", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"}, + { + 2855, "epsg", 2855, "NAD83(HARN) / Washington North", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2856, "epsg", 2856, "NAD83(HARN) / Washington South", + "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2857, "epsg", 2857, "NAD83(HARN) / West Virginia North", + "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2858, "epsg", 2858, "NAD83(HARN) / West Virginia South", + "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2859, "epsg", 2859, "NAD83(HARN) / Wisconsin North", + "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2860, "epsg", 2860, "NAD83(HARN) / Wisconsin Central", + "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2861, "epsg", 2861, "NAD83(HARN) / Wisconsin South", + "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2862, "epsg", 2862, "NAD83(HARN) / Wyoming East", + "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2863, "epsg", 2863, "NAD83(HARN) / Wyoming East Central", + "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"}, + { + 2864, "epsg", 2864, "NAD83(HARN) / Wyoming West Central", + "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2865, "epsg", 2865, "NAD83(HARN) / Wyoming West", + "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"}, + { + 2866, "epsg", 2866, "NAD83(HARN) / Puerto Rico & Virgin Is.", + "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs"}, + { + 2867, "epsg", 2867, "NAD83(HARN) / Arizona East (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2868, "epsg", 2868, "NAD83(HARN) / Arizona Central (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2869, "epsg", 2869, "NAD83(HARN) / Arizona West (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2870, "epsg", 2870, "NAD83(HARN) / California zone 1 (ftUS)", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2871, "epsg", 2871, "NAD83(HARN) / California zone 2 (ftUS)", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2872, "epsg", 2872, "NAD83(HARN) / California zone 3 (ftUS)", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2873, "epsg", 2873, "NAD83(HARN) / California zone 4 (ftUS)", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2874, "epsg", 2874, "NAD83(HARN) / California zone 5 (ftUS)", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2875, "epsg", 2875, "NAD83(HARN) / California zone 6 (ftUS)", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2876, "epsg", 2876, "NAD83(HARN) / Colorado North (ftUS)", + "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2877, "epsg", 2877, "NAD83(HARN) / Colorado Central (ftUS)", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2878, "epsg", 2878, "NAD83(HARN) / Colorado South (ftUS)", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2879, "epsg", 2879, "NAD83(HARN) / Connecticut (ftUS)", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2880, "epsg", 2880, "NAD83(HARN) / Delaware (ftUS)", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2881, "epsg", 2881, "NAD83(HARN) / Florida East (ftUS)", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2882, "epsg", 2882, "NAD83(HARN) / Florida West (ftUS)", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2883, "epsg", 2883, "NAD83(HARN) / Florida North (ftUS)", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2884, "epsg", 2884, "NAD83(HARN) / Georgia East (ftUS)", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2885, "epsg", 2885, "NAD83(HARN) / Georgia West (ftUS)", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2886, "epsg", 2886, "NAD83(HARN) / Idaho East (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2887, "epsg", 2887, "NAD83(HARN) / Idaho Central (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2888, "epsg", 2888, "NAD83(HARN) / Idaho West (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2889, "epsg", 2889, "NAD83(HARN) / Indiana East (ftUS) (deprecated)", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2890, "epsg", 2890, "NAD83(HARN) / Indiana West (ftUS) (deprecated)", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2891, "epsg", 2891, "NAD83(HARN) / Kentucky North (ftUS)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2892, "epsg", 2892, "NAD83(HARN) / Kentucky South (ftUS)", + "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2893, "epsg", 2893, "NAD83(HARN) / Maryland (ftUS)", + "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2894, "epsg", 2894, "NAD83(HARN) / Massachusetts Mainland (ftUS)", + "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2895, "epsg", 2895, "NAD83(HARN) / Massachusetts Island (ftUS)", + "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2896, "epsg", 2896, "NAD83(HARN) / Michigan North (ft)", + "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2897, "epsg", 2897, "NAD83(HARN) / Michigan Central (ft)", + "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2898, "epsg", 2898, "NAD83(HARN) / Michigan South (ft)", + "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2899, "epsg", 2899, "NAD83(HARN) / Mississippi East (ftUS)", + "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2900, "epsg", 2900, "NAD83(HARN) / Mississippi West (ftUS)", + "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2901, "epsg", 2901, "NAD83(HARN) / Montana (ft)", + "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2902, "epsg", 2902, "NAD83(HARN) / New Mexico East (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2903, "epsg", 2903, "NAD83(HARN) / New Mexico Central (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2904, "epsg", 2904, "NAD83(HARN) / New Mexico West (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2905, "epsg", 2905, "NAD83(HARN) / New York East (ftUS)", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2906, "epsg", 2906, "NAD83(HARN) / New York Central (ftUS)", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2907, "epsg", 2907, "NAD83(HARN) / New York West (ftUS)", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2908, "epsg", 2908, "NAD83(HARN) / New York Long Island (ftUS)", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2909, "epsg", 2909, "NAD83(HARN) / North Dakota North (ft)", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2910, "epsg", 2910, "NAD83(HARN) / North Dakota South (ft)", + "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2911, "epsg", 2911, "NAD83(HARN) / Oklahoma North (ftUS)", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2912, "epsg", 2912, "NAD83(HARN) / Oklahoma South (ftUS)", + "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2913, "epsg", 2913, "NAD83(HARN) / Oregon North (ft)", + "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2914, "epsg", 2914, "NAD83(HARN) / Oregon South (ft)", + "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2915, "epsg", 2915, "NAD83(HARN) / Tennessee (ftUS)", + "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2916, "epsg", 2916, "NAD83(HARN) / Texas North (ftUS)", + "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2917, "epsg", 2917, "NAD83(HARN) / Texas North Central (ftUS)", + "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2918, "epsg", 2918, "NAD83(HARN) / Texas Central (ftUS)", + "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2919, "epsg", 2919, "NAD83(HARN) / Texas South Central (ftUS)", + "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2920, "epsg", 2920, "NAD83(HARN) / Texas South (ftUS)", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2921, "epsg", 2921, "NAD83(HARN) / Utah North (ft)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2922, "epsg", 2922, "NAD83(HARN) / Utah Central (ft)", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2923, "epsg", 2923, "NAD83(HARN) / Utah South (ft)", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2924, "epsg", 2924, "NAD83(HARN) / Virginia North (ftUS)", + "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2925, "epsg", 2925, "NAD83(HARN) / Virginia South (ftUS)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2926, "epsg", 2926, "NAD83(HARN) / Washington North (ftUS)", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2927, "epsg", 2927, "NAD83(HARN) / Washington South (ftUS)", + "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2928, "epsg", 2928, "NAD83(HARN) / Wisconsin North (ftUS)", + "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2929, "epsg", 2929, "NAD83(HARN) / Wisconsin Central (ftUS)", + "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2930, "epsg", 2930, "NAD83(HARN) / Wisconsin South (ftUS)", + "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2931, "epsg", 2931, "Beduaram / TM 13 NE", + "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9996 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-106,-87,188,0,0,0,0 +units=m +no_defs"}, + { + 2932, "epsg", 2932, "QND95 / Qatar National Grid", + "+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +units=m +no_defs"}, + { + 2933, "epsg", 2933, "Segara / UTM zone 50S", + "+proj=utm +zone=50 +south +ellps=bessel +units=m +no_defs"}, + { + 2934, "epsg", 2934, "Segara (Jakarta) / NEIEZ (deprecated)", + "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs"}, + { + 2935, "epsg", 2935, "Pulkovo 1942 / CS63 zone A1", + "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333333333 +k=1 +x_0=1300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2936, "epsg", 2936, "Pulkovo 1942 / CS63 zone A2", + "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333333333 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2937, "epsg", 2937, "Pulkovo 1942 / CS63 zone A3", + "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333333333 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2938, "epsg", 2938, "Pulkovo 1942 / CS63 zone A4", + "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333333333 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2939, "epsg", 2939, "Pulkovo 1942 / CS63 zone K2", + "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666666667 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2940, "epsg", 2940, "Pulkovo 1942 / CS63 zone K3", + "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666666667 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2941, "epsg", 2941, "Pulkovo 1942 / CS63 zone K4", + "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666666667 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 2942, "epsg", 2942, "Porto Santo / UTM zone 28N", + "+proj=utm +zone=28 +ellps=intl +towgs84=-499,-249,314,0,0,0,0 +units=m +no_defs"}, + { + 2943, "epsg", 2943, "Selvagem Grande / UTM zone 28N", + "+proj=utm +zone=28 +ellps=intl +units=m +no_defs"}, + { + 2944, "epsg", 2944, "NAD83(CSRS) / SCoPQ zone 2", + "+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2945, "epsg", 2945, "NAD83(CSRS) / MTM zone 3", + "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2946, "epsg", 2946, "NAD83(CSRS) / MTM zone 4", + "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2947, "epsg", 2947, "NAD83(CSRS) / MTM zone 5", + "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2948, "epsg", 2948, "NAD83(CSRS) / MTM zone 6", + "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2949, "epsg", 2949, "NAD83(CSRS) / MTM zone 7", + "+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2950, "epsg", 2950, "NAD83(CSRS) / MTM zone 8", + "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2951, "epsg", 2951, "NAD83(CSRS) / MTM zone 9", + "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2952, "epsg", 2952, "NAD83(CSRS) / MTM zone 10", + "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2953, "epsg", 2953, "NAD83(CSRS) / New Brunswick Stereo", + "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +units=m +no_defs"}, + { + 2954, "epsg", 2954, + "NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83)", + "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +units=m +no_defs"}, + { + 2955, "epsg", 2955, "NAD83(CSRS) / UTM zone 11N", + "+proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs"}, + { + 2956, "epsg", 2956, "NAD83(CSRS) / UTM zone 12N", + "+proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs"}, + { + 2957, "epsg", 2957, "NAD83(CSRS) / UTM zone 13N", + "+proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs"}, + { + 2958, "epsg", 2958, "NAD83(CSRS) / UTM zone 17N", + "+proj=utm +zone=17 +ellps=GRS80 +units=m +no_defs"}, + { + 2959, "epsg", 2959, "NAD83(CSRS) / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +units=m +no_defs"}, + { + 2960, "epsg", 2960, "NAD83(CSRS) / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +units=m +no_defs"}, + { + 2961, "epsg", 2961, "NAD83(CSRS) / UTM zone 20N", + "+proj=utm +zone=20 +ellps=GRS80 +units=m +no_defs"}, + { + 2962, "epsg", 2962, "NAD83(CSRS) / UTM zone 21N", + "+proj=utm +zone=21 +ellps=GRS80 +units=m +no_defs"}, + { + 2964, "epsg", 2964, "NAD27 / Alaska Albers", + "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 2965, "epsg", 2965, "NAD83 / Indiana East (ftUS)", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2966, "epsg", 2966, "NAD83 / Indiana West (ftUS)", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 2967, "epsg", 2967, "NAD83(HARN) / Indiana East (ftUS)", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2968, "epsg", 2968, "NAD83(HARN) / Indiana West (ftUS)", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 2969, "epsg", 2969, "Fort Marigot / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs"}, + { + 2970, "epsg", 2970, "Guadeloupe 1948 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +units=m +no_defs"}, + { + 2971, "epsg", 2971, "CSG67 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs"}, + { + 2972, "epsg", 2972, "RGFG95 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs"}, + { + 2973, "epsg", 2973, "Martinique 1938 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +units=m +no_defs"}, + { + 2975, "epsg", 2975, "RGR92 / UTM zone 40S", + "+proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2976, "epsg", 2976, "Tahiti 52 / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs"}, + { + 2977, "epsg", 2977, "Tahaa 54 / UTM zone 5S", + "+proj=utm +zone=5 +south +ellps=intl +units=m +no_defs"}, + { + 2978, "epsg", 2978, "IGN72 Nuku Hiva / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=intl +units=m +no_defs"}, + { + 2979, "epsg", 2979, "K0 1949 / UTM zone 42S (deprecated)", + "+proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs"}, + { + 2980, "epsg", 2980, "Combani 1950 / UTM zone 38S", + "+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs"}, + { + 2981, "epsg", 2981, "IGN56 Lifou / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs"}, + { + 2982, "epsg", 2982, "IGN72 Grand Terre / UTM zone 58S (deprecated)", + "+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs"}, + { + 2983, "epsg", 2983, "ST87 Ouvea / UTM zone 58S (deprecated)", + "+proj=utm +zone=58 +south +ellps=intl +towgs84=-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +units=m +no_defs"}, + { + 2984, "epsg", 2984, "RGNC 1991 / Lambert New Caledonia (deprecated)", + "+proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2987, "epsg", 2987, "Saint Pierre et Miquelon 1950 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs"}, + { + 2988, "epsg", 2988, "MOP78 / UTM zone 1S", + "+proj=utm +zone=1 +south +ellps=intl +units=m +no_defs"}, + { + 2989, "epsg", 2989, "RRAF 1991 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 2990, "epsg", 2990, "Reunion 1947 / TM Reunion (deprecated)", + "+proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs"}, + { + 2991, "epsg", 2991, "NAD83 / Oregon Lambert", + "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 2992, "epsg", 2992, "NAD83 / Oregon Lambert (ft)", + "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs"}, + { + 2993, "epsg", 2993, "NAD83(HARN) / Oregon Lambert", + "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 2994, "epsg", 2994, "NAD83(HARN) / Oregon Lambert (ft)", + "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 2995, "epsg", 2995, "IGN53 Mare / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs"}, + { + 2996, "epsg", 2996, "ST84 Ile des Pins / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs"}, + { + 2997, "epsg", 2997, "ST71 Belep / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +units=m +no_defs"}, + { + 2998, "epsg", 2998, "NEA74 Noumea / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs"}, + { + 2999, "epsg", 2999, "Grand Comoros / UTM zone 38S", + "+proj=utm +zone=38 +south +ellps=intl +units=m +no_defs"}, + { + 3000, "epsg", 3000, "Segara / NEIEZ", + "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs"}, + { + 3001, "epsg", 3001, "Batavia / NEIEZ", + "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs"}, + { + 3002, "epsg", 3002, "Makassar / NEIEZ", + "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +units=m +no_defs"}, + { + 3003, "epsg", 3003, "Monte Mario / Italy zone 1", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 3004, "epsg", 3004, "Monte Mario / Italy zone 2", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 3005, "epsg", 3005, "NAD83 / BC Albers", + "+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3006, "epsg", 3006, "SWEREF99 TM", + "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3007, "epsg", 3007, "SWEREF99 12 00", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3008, "epsg", 3008, "SWEREF99 13 30", + "+proj=tmerc +lat_0=0 +lon_0=13.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3009, "epsg", 3009, "SWEREF99 15 00", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3010, "epsg", 3010, "SWEREF99 16 30", + "+proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3011, "epsg", 3011, "SWEREF99 18 00", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3012, "epsg", 3012, "SWEREF99 14 15", + "+proj=tmerc +lat_0=0 +lon_0=14.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3013, "epsg", 3013, "SWEREF99 15 45", + "+proj=tmerc +lat_0=0 +lon_0=15.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3014, "epsg", 3014, "SWEREF99 17 15", + "+proj=tmerc +lat_0=0 +lon_0=17.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3015, "epsg", 3015, "SWEREF99 18 45", + "+proj=tmerc +lat_0=0 +lon_0=18.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3016, "epsg", 3016, "SWEREF99 20 15", + "+proj=tmerc +lat_0=0 +lon_0=20.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3017, "epsg", 3017, "SWEREF99 21 45", + "+proj=tmerc +lat_0=0 +lon_0=21.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3018, "epsg", 3018, "SWEREF99 23 15", + "+proj=tmerc +lat_0=0 +lon_0=23.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3019, "epsg", 3019, "RT90 7.5 gon V", + "+proj=tmerc +lat_0=0 +lon_0=11.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3020, "epsg", 3020, "RT90 5 gon V", + "+proj=tmerc +lat_0=0 +lon_0=13.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3021, "epsg", 3021, "RT90 2.5 gon V", + "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3022, "epsg", 3022, "RT90 0 gon", + "+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3023, "epsg", 3023, "RT90 2.5 gon O", + "+proj=tmerc +lat_0=0 +lon_0=20.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3024, "epsg", 3024, "RT90 5 gon O", + "+proj=tmerc +lat_0=0 +lon_0=22.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3025, "epsg", 3025, "RT38 7.5 gon V", + "+proj=tmerc +lat_0=0 +lon_0=11.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3026, "epsg", 3026, "RT38 5 gon V", + "+proj=tmerc +lat_0=0 +lon_0=13.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3027, "epsg", 3027, "RT38 2.5 gon V", + "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3028, "epsg", 3028, "RT38 0 gon", + "+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3029, "epsg", 3029, "RT38 2.5 gon O", + "+proj=tmerc +lat_0=0 +lon_0=20.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3030, "epsg", 3030, "RT38 5 gon O", + "+proj=tmerc +lat_0=0 +lon_0=22.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3031, "epsg", 3031, "WGS 84 / Antarctic Polar Stereographic", + "+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3032, "epsg", 3032, "WGS 84 / Australian Antarctic Polar Stereographic", + "+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=70 +k=1 +x_0=6000000 +y_0=6000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3033, "epsg", 3033, "WGS 84 / Australian Antarctic Lambert", + "+proj=lcc +lat_1=-68.5 +lat_2=-74.5 +lat_0=-50 +lon_0=70 +x_0=6000000 +y_0=6000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3034, "epsg", 3034, "ETRS89 / ETRS-LCC", + "+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs"}, + { + 3035, "epsg", 3035, "ETRS89 / ETRS-LAEA", + "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"}, + { + 3036, "epsg", 3036, "Moznet / UTM zone 36S", + "+proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs"}, + { + 3037, "epsg", 3037, "Moznet / UTM zone 37S", + "+proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs"}, + { + 3038, "epsg", 3038, "ETRS89 / ETRS-TM26", + "+proj=utm +zone=26 +ellps=GRS80 +units=m +no_defs"}, + { + 3039, "epsg", 3039, "ETRS89 / ETRS-TM27", + "+proj=utm +zone=27 +ellps=GRS80 +units=m +no_defs"}, + { + 3040, "epsg", 3040, "ETRS89 / ETRS-TM28", + "+proj=utm +zone=28 +ellps=GRS80 +units=m +no_defs"}, + { + 3041, "epsg", 3041, "ETRS89 / ETRS-TM29", + "+proj=utm +zone=29 +ellps=GRS80 +units=m +no_defs"}, + { + 3042, "epsg", 3042, "ETRS89 / ETRS-TM30", + "+proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs"}, + { + 3043, "epsg", 3043, "ETRS89 / ETRS-TM31", + "+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs"}, + { + 3044, "epsg", 3044, "ETRS89 / ETRS-TM32", + "+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs"}, + { + 3045, "epsg", 3045, "ETRS89 / ETRS-TM33", + "+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs"}, + { + 3046, "epsg", 3046, "ETRS89 / ETRS-TM34", + "+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs"}, + { + 3047, "epsg", 3047, "ETRS89 / ETRS-TM35", + "+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs"}, + { + 3048, "epsg", 3048, "ETRS89 / ETRS-TM36", + "+proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs"}, + { + 3049, "epsg", 3049, "ETRS89 / ETRS-TM37", + "+proj=utm +zone=37 +ellps=GRS80 +units=m +no_defs"}, + { + 3050, "epsg", 3050, "ETRS89 / ETRS-TM38", + "+proj=utm +zone=38 +ellps=GRS80 +units=m +no_defs"}, + { + 3051, "epsg", 3051, "ETRS89 / ETRS-TM39", + "+proj=utm +zone=39 +ellps=GRS80 +units=m +no_defs"}, + { + 3054, "epsg", 3054, "Hjorsey 1955 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs"}, + { + 3055, "epsg", 3055, "Hjorsey 1955 / UTM zone 27N", + "+proj=utm +zone=27 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs"}, + { + 3056, "epsg", 3056, "Hjorsey 1955 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs"}, + { + 3057, "epsg", 3057, "ISN93 / Lambert 1993", + "+proj=lcc +lat_1=64.25 +lat_2=65.75 +lat_0=65 +lon_0=-19 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3058, "epsg", 3058, "Helle 1954 / Jan Mayen Grid", + "+proj=tmerc +lat_0=0 +lon_0=-8.5 +k=1 +x_0=50000 +y_0=-7800000 +ellps=intl +towgs84=982.609,552.753,-540.873,32.3934,-153.257,-96.2266,16.805 +units=m +no_defs"}, + { + 3059, "epsg", 3059, "LKS92 / Latvia TM", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3060, "epsg", 3060, "IGN72 Grande Terre / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs"}, + { + 3061, "epsg", 3061, "Porto Santo 1995 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=intl +units=m +no_defs"}, + { + 3062, "epsg", 3062, "Azores Oriental 1995 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=intl +units=m +no_defs"}, + { + 3063, "epsg", 3063, "Azores Central 1995 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=intl +units=m +no_defs"}, + { + 3064, "epsg", 3064, "IGM95 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3065, "epsg", 3065, "IGM95 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3066, "epsg", 3066, "ED50 / Jordan TM", + "+proj=tmerc +lat_0=0 +lon_0=37 +k=0.9998 +x_0=500000 +y_0=-3000000 +ellps=intl +units=m +no_defs"}, + { + 3067, "epsg", 3067, "ETRS89 / ETRS-TM35FIN", + "+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs"}, + { + 3068, "epsg", 3068, "DHDN / Soldner Berlin", + "+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 +x_0=40000 +y_0=10000 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 3069, "epsg", 3069, "NAD27 / Wisconsin Transverse Mercator", + "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=500000 +y_0=-4500000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 3070, "epsg", 3070, "NAD83 / Wisconsin Transverse Mercator", + "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3071, "epsg", 3071, "NAD83(HARN) / Wisconsin Transverse Mercator", + "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +units=m +no_defs"}, + { + 3072, "epsg", 3072, "NAD83 / Maine CS2000 East", + "+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3073, "epsg", 3073, "NAD83 / Maine CS2000 Central (deprecated)", + "+proj=tmerc +lat_0=43 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3074, "epsg", 3074, "NAD83 / Maine CS2000 West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3075, "epsg", 3075, "NAD83(HARN) / Maine CS2000 East", + "+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3076, "epsg", 3076, "NAD83(HARN) / Maine CS2000 Central (deprecated)", + "+proj=tmerc +lat_0=43 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3077, "epsg", 3077, "NAD83(HARN) / Maine CS2000 West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3078, "epsg", 3078, "NAD83 / Michigan Oblique Mercator", + "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3079, "epsg", 3079, "NAD83(HARN) / Michigan Oblique Mercator", + "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +units=m +no_defs"}, + { + 3080, "epsg", 3080, "NAD27 / Shackleford", + "+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=914400 +y_0=914400 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048 +no_defs"}, + { + 3081, "epsg", 3081, "NAD83 / Texas State Mapping System", + "+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3082, "epsg", 3082, "NAD83 / Texas Centric Lambert Conformal", + "+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3083, "epsg", 3083, "NAD83 / Texas Centric Albers Equal Area", + "+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3084, "epsg", 3084, "NAD83(HARN) / Texas Centric Lambert Conformal", + "+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs"}, + { + 3085, "epsg", 3085, "NAD83(HARN) / Texas Centric Albers Equal Area", + "+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs"}, + { + 3086, "epsg", 3086, "NAD83 / Florida GDL Albers", + "+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3087, "epsg", 3087, "NAD83(HARN) / Florida GDL Albers", + "+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3088, "epsg", 3088, "NAD83 / Kentucky Single Zone", + "+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3089, "epsg", 3089, "NAD83 / Kentucky Single Zone (ftUS)", + "+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3090, "epsg", 3090, "NAD83(HARN) / Kentucky Single Zone", + "+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"}, + { + 3091, "epsg", 3091, "NAD83(HARN) / Kentucky Single Zone (ftUS)", + "+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3092, "epsg", 3092, "Tokyo / UTM zone 51N", + "+proj=utm +zone=51 +ellps=bessel +units=m +no_defs"}, + { + 3093, "epsg", 3093, "Tokyo / UTM zone 52N", + "+proj=utm +zone=52 +ellps=bessel +units=m +no_defs"}, + { + 3094, "epsg", 3094, "Tokyo / UTM zone 53N", + "+proj=utm +zone=53 +ellps=bessel +units=m +no_defs"}, + { + 3095, "epsg", 3095, "Tokyo / UTM zone 54N", + "+proj=utm +zone=54 +ellps=bessel +units=m +no_defs"}, + { + 3096, "epsg", 3096, "Tokyo / UTM zone 55N", + "+proj=utm +zone=55 +ellps=bessel +units=m +no_defs"}, + { + 3097, "epsg", 3097, "JGD2000 / UTM zone 51N", + "+proj=utm +zone=51 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3098, "epsg", 3098, "JGD2000 / UTM zone 52N", + "+proj=utm +zone=52 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3099, "epsg", 3099, "JGD2000 / UTM zone 53N", + "+proj=utm +zone=53 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3100, "epsg", 3100, "JGD2000 / UTM zone 54N", + "+proj=utm +zone=54 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3101, "epsg", 3101, "JGD2000 / UTM zone 55N", + "+proj=utm +zone=55 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3102, "epsg", 3102, "American Samoa 1962 / American Samoa Lambert", + "+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=95169.31165862332 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3103, "epsg", 3103, "Mauritania 1999 / UTM zone 28N (deprecated)", + "+proj=utm +zone=28 +ellps=clrk80 +units=m +no_defs"}, + { + 3104, "epsg", 3104, "Mauritania 1999 / UTM zone 29N (deprecated)", + "+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs"}, + { + 3105, "epsg", 3105, "Mauritania 1999 / UTM zone 30N (deprecated)", + "+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs"}, + { + 3106, "epsg", 3106, "Gulshan 303 / Bangladesh Transverse Mercator", + "+proj=tmerc +lat_0=0 +lon_0=90 +k=0.9996 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 3107, "epsg", 3107, "GDA94 / SA Lambert", + "+proj=lcc +lat_1=-28 +lat_2=-36 +lat_0=-32 +lon_0=135 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3108, "epsg", 3108, "ETRS89 / Guernsey Grid", + "+proj=tmerc +lat_0=49.5 +lon_0=-2.416666666666667 +k=0.999997 +x_0=47000 +y_0=50000 +ellps=GRS80 +units=m +no_defs"}, + { + 3109, "epsg", 3109, "ETRS89 / Jersey Transverse Mercator", + "+proj=tmerc +lat_0=49.225 +lon_0=-2.135 +k=0.9999999000000001 +x_0=40000 +y_0=70000 +ellps=GRS80 +units=m +no_defs"}, + { + 3110, "epsg", 3110, "AGD66 / Vicgrid66", + "+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=4500000 +ellps=aust_SA +units=m +no_defs"}, + { + 3111, "epsg", 3111, "GDA94 / Vicgrid94", + "+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3112, "epsg", 3112, "GDA94 / Geoscience Australia Lambert", + "+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3113, "epsg", 3113, "GDA94 / BCSG02", + "+proj=tmerc +lat_0=-28 +lon_0=153 +k=0.99999 +x_0=50000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3114, "epsg", 3114, "MAGNA-SIRGAS / Colombia Far West zone", + "+proj=tmerc +lat_0=4.596200416666666 +lon_0=-80.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3115, "epsg", 3115, "MAGNA-SIRGAS / Colombia West zone", + "+proj=tmerc +lat_0=4.596200416666666 +lon_0=-77.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3116, "epsg", 3116, "MAGNA-SIRGAS / Colombia Bogota zone", + "+proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3117, "epsg", 3117, "MAGNA-SIRGAS / Colombia East Central zone", + "+proj=tmerc +lat_0=4.596200416666666 +lon_0=-71.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3118, "epsg", 3118, "MAGNA-SIRGAS / Colombia East zone", + "+proj=tmerc +lat_0=4.596200416666666 +lon_0=-68.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3119, "epsg", 3119, "Douala 1948 / AEF west", + "+proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +units=m +no_defs"}, + { + 3120, "epsg", 3120, "Pulkovo 1942(58) / Poland zone I", + "+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5467000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3121, "epsg", 3121, "PRS92 / Philippines zone 1", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs"}, + { + 3122, "epsg", 3122, "PRS92 / Philippines zone 2", + "+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs"}, + { + 3123, "epsg", 3123, "PRS92 / Philippines zone 3", + "+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs"}, + { + 3124, "epsg", 3124, "PRS92 / Philippines zone 4", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs"}, + { + 3125, "epsg", 3125, "PRS92 / Philippines zone 5", + "+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs"}, + { + 3126, "epsg", 3126, "ETRS89 / ETRS-GK19FIN", + "+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3127, "epsg", 3127, "ETRS89 / ETRS-GK20FIN", + "+proj=tmerc +lat_0=0 +lon_0=20 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3128, "epsg", 3128, "ETRS89 / ETRS-GK21FIN", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3129, "epsg", 3129, "ETRS89 / ETRS-GK22FIN", + "+proj=tmerc +lat_0=0 +lon_0=22 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3130, "epsg", 3130, "ETRS89 / ETRS-GK23FIN", + "+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3131, "epsg", 3131, "ETRS89 / ETRS-GK24FIN", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3132, "epsg", 3132, "ETRS89 / ETRS-GK25FIN", + "+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3133, "epsg", 3133, "ETRS89 / ETRS-GK26FIN", + "+proj=tmerc +lat_0=0 +lon_0=26 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3134, "epsg", 3134, "ETRS89 / ETRS-GK27FIN", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3135, "epsg", 3135, "ETRS89 / ETRS-GK28FIN", + "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3136, "epsg", 3136, "ETRS89 / ETRS-GK29FIN", + "+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3137, "epsg", 3137, "ETRS89 / ETRS-GK30FIN", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3138, "epsg", 3138, "ETRS89 / ETRS-GK31FIN", + "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3140, "epsg", 3140, "Viti Levu 1912 / Viti Levu Grid", + "+proj=cass +lat_0=-18 +lon_0=178 +x_0=109435.392 +y_0=141622.272 +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +to_meter=0.201168 +no_defs"}, + { + 3141, "epsg", 3141, "Fiji 1956 / UTM zone 60S", + "+proj=utm +zone=60 +south +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +units=m +no_defs"}, + { + 3142, "epsg", 3142, "Fiji 1956 / UTM zone 1S", + "+proj=utm +zone=1 +south +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +units=m +no_defs"}, + { + 3143, "epsg", 3143, "Fiji 1986 / Fiji Map Grid (deprecated)", + "+proj=tmerc +lat_0=-17 +lon_0=178.75 +k=0.99985 +x_0=2000000 +y_0=4000000 +ellps=WGS72 +units=m +no_defs"}, + { + 3146, "epsg", 3146, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 6", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3147, "epsg", 3147, "Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3148, "epsg", 3148, "Indian 1960 / UTM zone 48N", + "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 3149, "epsg", 3149, "Indian 1960 / UTM zone 49N", + "+proj=utm +zone=49 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 3150, "epsg", 3150, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 6", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3151, "epsg", 3151, "Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3152, "epsg", 3152, "ST74", + "+proj=tmerc +lat_0=0 +lon_0=18.05779 +k=0.99999425 +x_0=100178.1808 +y_0=-6500614.7836 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3153, "epsg", 3153, "NAD83(CSRS) / BC Albers", + "+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3154, "epsg", 3154, "NAD83(CSRS) / UTM zone 7N", + "+proj=utm +zone=7 +ellps=GRS80 +units=m +no_defs"}, + { + 3155, "epsg", 3155, "NAD83(CSRS) / UTM zone 8N", + "+proj=utm +zone=8 +ellps=GRS80 +units=m +no_defs"}, + { + 3156, "epsg", 3156, "NAD83(CSRS) / UTM zone 9N", + "+proj=utm +zone=9 +ellps=GRS80 +units=m +no_defs"}, + { + 3157, "epsg", 3157, "NAD83(CSRS) / UTM zone 10N", + "+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs"}, + { + 3158, "epsg", 3158, "NAD83(CSRS) / UTM zone 14N", + "+proj=utm +zone=14 +ellps=GRS80 +units=m +no_defs"}, + { + 3159, "epsg", 3159, "NAD83(CSRS) / UTM zone 15N", + "+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs"}, + { + 3160, "epsg", 3160, "NAD83(CSRS) / UTM zone 16N", + "+proj=utm +zone=16 +ellps=GRS80 +units=m +no_defs"}, + { + 3161, "epsg", 3161, "NAD83 / Ontario MNR Lambert", + "+proj=lcc +lat_1=44.5 +lat_2=53.5 +lat_0=0 +lon_0=-85 +x_0=930000 +y_0=6430000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3162, "epsg", 3162, "NAD83(CSRS) / Ontario MNR Lambert", + "+proj=lcc +lat_1=44.5 +lat_2=53.5 +lat_0=0 +lon_0=-85 +x_0=930000 +y_0=6430000 +ellps=GRS80 +units=m +no_defs"}, + { + 3163, "epsg", 3163, "RGNC91-93 / Lambert New Caledonia", + "+proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3164, "epsg", 3164, "ST87 Ouvea / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs"}, + { + 3165, "epsg", 3165, "NEA74 Noumea / Noumea Lambert", + "+proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs"}, + { + 3166, "epsg", 3166, "NEA74 Noumea / Noumea Lambert 2", + "+proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs"}, + { + 3167, "epsg", 3167, "Kertau (RSO) / RSO Malaya (ch)", + "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=40000 +y_0=0 +a=6377295.664 +b=6356094.667915204 +to_meter=20.116756 +no_defs"}, + { + 3168, "epsg", 3168, "Kertau (RSO) / RSO Malaya (m)", + "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804670.24 +y_0=0 +a=6377295.664 +b=6356094.667915204 +units=m +no_defs"}, + { + 3169, "epsg", 3169, "RGNC91-93 / UTM zone 57S", + "+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3170, "epsg", 3170, "RGNC91-93 / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3171, "epsg", 3171, "RGNC91-93 / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3172, "epsg", 3172, "IGN53 Mare / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=intl +units=m +no_defs"}, + { + 3174, "epsg", 3174, "NAD83 / Great Lakes Albers", + "+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-84.455955 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3175, "epsg", 3175, "NAD83 / Great Lakes and St Lawrence Albers", + "+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-83.248627 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3176, "epsg", 3176, "Indian 1960 / TM 106 NE", + "+proj=tmerc +lat_0=0 +lon_0=106 +k=0.9996 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 3177, "epsg", 3177, "LGD2006 / Libya TM", + "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9965000000000001 +x_0=1000000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3178, "epsg", 3178, "GR96 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3179, "epsg", 3179, "GR96 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3180, "epsg", 3180, "GR96 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3181, "epsg", 3181, "GR96 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3182, "epsg", 3182, "GR96 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3183, "epsg", 3183, "GR96 / UTM zone 23N", + "+proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3184, "epsg", 3184, "GR96 / UTM zone 24N", + "+proj=utm +zone=24 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3185, "epsg", 3185, "GR96 / UTM zone 25N", + "+proj=utm +zone=25 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3186, "epsg", 3186, "GR96 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3187, "epsg", 3187, "GR96 / UTM zone 27N", + "+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3188, "epsg", 3188, "GR96 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3189, "epsg", 3189, "GR96 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3190, "epsg", 3190, "LGD2006 / Libya TM zone 5", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3191, "epsg", 3191, "LGD2006 / Libya TM zone 6", + "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3192, "epsg", 3192, "LGD2006 / Libya TM zone 7", + "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3193, "epsg", 3193, "LGD2006 / Libya TM zone 8", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3194, "epsg", 3194, "LGD2006 / Libya TM zone 9", + "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3195, "epsg", 3195, "LGD2006 / Libya TM zone 10", + "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3196, "epsg", 3196, "LGD2006 / Libya TM zone 11", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3197, "epsg", 3197, "LGD2006 / Libya TM zone 12", + "+proj=tmerc +lat_0=0 +lon_0=23 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3198, "epsg", 3198, "LGD2006 / Libya TM zone 13", + "+proj=tmerc +lat_0=0 +lon_0=25 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3199, "epsg", 3199, "LGD2006 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3200, "epsg", 3200, "FD58 / Iraq zone", + "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs"}, + { + 3201, "epsg", 3201, "LGD2006 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3202, "epsg", 3202, "LGD2006 / UTM zone 34N", + "+proj=utm +zone=34 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3203, "epsg", 3203, "LGD2006 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs"}, + { + 3204, "epsg", 3204, "WGS 84 / SCAR IMW SP19-20", + "+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3205, "epsg", 3205, "WGS 84 / SCAR IMW SP21-22", + "+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3206, "epsg", 3206, "WGS 84 / SCAR IMW SP23-24", + "+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-42 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3207, "epsg", 3207, "WGS 84 / SCAR IMW SQ01-02", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-174 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3208, "epsg", 3208, "WGS 84 / SCAR IMW SQ19-20", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3209, "epsg", 3209, "WGS 84 / SCAR IMW SQ21-22", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3210, "epsg", 3210, "WGS 84 / SCAR IMW SQ37-38", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=42 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3211, "epsg", 3211, "WGS 84 / SCAR IMW SQ39-40", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3212, "epsg", 3212, "WGS 84 / SCAR IMW SQ41-42", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3213, "epsg", 3213, "WGS 84 / SCAR IMW SQ43-44", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=78 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3214, "epsg", 3214, "WGS 84 / SCAR IMW SQ45-46", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3215, "epsg", 3215, "WGS 84 / SCAR IMW SQ47-48", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=102 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3216, "epsg", 3216, "WGS 84 / SCAR IMW SQ49-50", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=114 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3217, "epsg", 3217, "WGS 84 / SCAR IMW SQ51-52", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=126 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3218, "epsg", 3218, "WGS 84 / SCAR IMW SQ53-54", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=138 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3219, "epsg", 3219, "WGS 84 / SCAR IMW SQ55-56", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3220, "epsg", 3220, "WGS 84 / SCAR IMW SQ57-58", + "+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3221, "epsg", 3221, "WGS 84 / SCAR IMW SR13-14", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-102 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3222, "epsg", 3222, "WGS 84 / SCAR IMW SR15-16", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3223, "epsg", 3223, "WGS 84 / SCAR IMW SR17-18", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-78 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3224, "epsg", 3224, "WGS 84 / SCAR IMW SR19-20", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3225, "epsg", 3225, "WGS 84 / SCAR IMW SR27-28", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-18 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3226, "epsg", 3226, "WGS 84 / SCAR IMW SR29-30", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-6 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3227, "epsg", 3227, "WGS 84 / SCAR IMW SR31-32", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=6 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3228, "epsg", 3228, "WGS 84 / SCAR IMW SR33-34", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=18 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3229, "epsg", 3229, "WGS 84 / SCAR IMW SR35-36", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=30 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3230, "epsg", 3230, "WGS 84 / SCAR IMW SR37-38", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=42 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3231, "epsg", 3231, "WGS 84 / SCAR IMW SR39-40", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3232, "epsg", 3232, "WGS 84 / SCAR IMW SR41-42", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3233, "epsg", 3233, "WGS 84 / SCAR IMW SR43-44", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=78 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3234, "epsg", 3234, "WGS 84 / SCAR IMW SR45-46", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3235, "epsg", 3235, "WGS 84 / SCAR IMW SR47-48", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=102 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3236, "epsg", 3236, "WGS 84 / SCAR IMW SR49-50", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=114 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3237, "epsg", 3237, "WGS 84 / SCAR IMW SR51-52", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=126 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3238, "epsg", 3238, "WGS 84 / SCAR IMW SR53-54", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=138 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3239, "epsg", 3239, "WGS 84 / SCAR IMW SR55-56", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3240, "epsg", 3240, "WGS 84 / SCAR IMW SR57-58", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3241, "epsg", 3241, "WGS 84 / SCAR IMW SR59-60", + "+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=174 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3242, "epsg", 3242, "WGS 84 / SCAR IMW SS04-06", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-153 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3243, "epsg", 3243, "WGS 84 / SCAR IMW SS07-09", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-135 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3244, "epsg", 3244, "WGS 84 / SCAR IMW SS10-12", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-117 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3245, "epsg", 3245, "WGS 84 / SCAR IMW SS13-15", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-99 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3246, "epsg", 3246, "WGS 84 / SCAR IMW SS16-18", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-81 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3247, "epsg", 3247, "WGS 84 / SCAR IMW SS19-21", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-63 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3248, "epsg", 3248, "WGS 84 / SCAR IMW SS25-27", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-27 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3249, "epsg", 3249, "WGS 84 / SCAR IMW SS28-30", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-9 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3250, "epsg", 3250, "WGS 84 / SCAR IMW SS31-33", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=9 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3251, "epsg", 3251, "WGS 84 / SCAR IMW SS34-36", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=27 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3252, "epsg", 3252, "WGS 84 / SCAR IMW SS37-39", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=45 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3253, "epsg", 3253, "WGS 84 / SCAR IMW SS40-42", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=63 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3254, "epsg", 3254, "WGS 84 / SCAR IMW SS43-45", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=81 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3255, "epsg", 3255, "WGS 84 / SCAR IMW SS46-48", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=99 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3256, "epsg", 3256, "WGS 84 / SCAR IMW SS49-51", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=117 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3257, "epsg", 3257, "WGS 84 / SCAR IMW SS52-54", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=135 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3258, "epsg", 3258, "WGS 84 / SCAR IMW SS55-57", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=153 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3259, "epsg", 3259, "WGS 84 / SCAR IMW SS58-60", + "+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=171 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3260, "epsg", 3260, "WGS 84 / SCAR IMW ST01-04", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-168 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3261, "epsg", 3261, "WGS 84 / SCAR IMW ST05-08", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-144 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3262, "epsg", 3262, "WGS 84 / SCAR IMW ST09-12", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-120 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3263, "epsg", 3263, "WGS 84 / SCAR IMW ST13-16", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-96 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3264, "epsg", 3264, "WGS 84 / SCAR IMW ST17-20", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-72 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3265, "epsg", 3265, "WGS 84 / SCAR IMW ST21-24", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-48 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3266, "epsg", 3266, "WGS 84 / SCAR IMW ST25-28", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-24 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3267, "epsg", 3267, "WGS 84 / SCAR IMW ST29-32", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3268, "epsg", 3268, "WGS 84 / SCAR IMW ST33-36", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=24 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3269, "epsg", 3269, "WGS 84 / SCAR IMW ST37-40", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=48 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3270, "epsg", 3270, "WGS 84 / SCAR IMW ST41-44", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=72 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3271, "epsg", 3271, "WGS 84 / SCAR IMW ST45-48", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=96 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3272, "epsg", 3272, "WGS 84 / SCAR IMW ST49-52", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=120 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3273, "epsg", 3273, "WGS 84 / SCAR IMW ST53-56", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=144 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3274, "epsg", 3274, "WGS 84 / SCAR IMW ST57-60", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=168 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3275, "epsg", 3275, "WGS 84 / SCAR IMW SU01-05", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-165 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3276, "epsg", 3276, "WGS 84 / SCAR IMW SU06-10", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-135 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3277, "epsg", 3277, "WGS 84 / SCAR IMW SU11-15", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-105 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3278, "epsg", 3278, "WGS 84 / SCAR IMW SU16-20", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-75 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3279, "epsg", 3279, "WGS 84 / SCAR IMW SU21-25", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3280, "epsg", 3280, "WGS 84 / SCAR IMW SU26-30", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-15 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3281, "epsg", 3281, "WGS 84 / SCAR IMW SU31-35", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=15 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3282, "epsg", 3282, "WGS 84 / SCAR IMW SU36-40", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3283, "epsg", 3283, "WGS 84 / SCAR IMW SU41-45", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=75 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3284, "epsg", 3284, "WGS 84 / SCAR IMW SU46-50", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=105 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3285, "epsg", 3285, "WGS 84 / SCAR IMW SU51-55", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=135 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3286, "epsg", 3286, "WGS 84 / SCAR IMW SU56-60", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=165 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3287, "epsg", 3287, "WGS 84 / SCAR IMW SV01-10", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3288, "epsg", 3288, "WGS 84 / SCAR IMW SV11-20", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-90 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3289, "epsg", 3289, "WGS 84 / SCAR IMW SV21-30", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-30 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3290, "epsg", 3290, "WGS 84 / SCAR IMW SV31-40", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=30 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3291, "epsg", 3291, "WGS 84 / SCAR IMW SV41-50", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=90 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3292, "epsg", 3292, "WGS 84 / SCAR IMW SV51-60", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3293, "epsg", 3293, "WGS 84 / SCAR IMW SW01-60", + "+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3294, "epsg", 3294, "WGS 84 / USGS Transantarctic Mountains", + "+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-78 +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3296, "epsg", 3296, "RGPF / UTM zone 5S", + "+proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs"}, + { + 3297, "epsg", 3297, "RGPF / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs"}, + { + 3298, "epsg", 3298, "RGPF / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs"}, + { + 3299, "epsg", 3299, "RGPF / UTM zone 8S", + "+proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs"}, + { + 3300, "epsg", 3300, "Estonian Coordinate System of 1992", + "+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +units=m +no_defs"}, + { + 3301, "epsg", 3301, "Estonian Coordinate System of 1997", + "+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3302, "epsg", 3302, "IGN63 Hiva Oa / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=intl +units=m +no_defs"}, + { + 3303, "epsg", 3303, "Fatu Iva 72 / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs"}, + { + 3304, "epsg", 3304, "Tahiti 79 / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=intl +units=m +no_defs"}, + { + 3305, "epsg", 3305, "Moorea 87 / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs"}, + { + 3306, "epsg", 3306, "Maupiti 83 / UTM zone 5S", + "+proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs"}, + { + 3307, "epsg", 3307, "Nakhl-e Ghanem / UTM zone 39N", + "+proj=utm +zone=39 +ellps=WGS84 +towgs84=0,-0.15,0.68,0,0,0,0 +units=m +no_defs"}, + { + 3308, "epsg", 3308, "GDA94 / NSW Lambert", + "+proj=lcc +lat_1=-30.75 +lat_2=-35.75 +lat_0=-33.25 +lon_0=147 +x_0=9300000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3309, "epsg", 3309, "NAD27 / California Albers", + "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 3310, "epsg", 3310, "NAD83 / California Albers", + "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3311, "epsg", 3311, "NAD83(HARN) / California Albers", + "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +units=m +no_defs"}, + { + 3312, "epsg", 3312, "CSG67 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs"}, + { + 3313, "epsg", 3313, "RGFG95 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs"}, + { + 3314, "epsg", 3314, "Katanga 1955 / Katanga Lambert", + "+proj=lcc +lat_1=-6.5 +lat_2=-11.5 +lat_0=0 +lon_0=26 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 3315, "epsg", 3315, "Katanga 1955 / Katanga TM", + "+proj=tmerc +lat_0=-9 +lon_0=26 +k=0.9998 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 3316, "epsg", 3316, "Kasai 1953 / Congo TM zone 22", + "+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3317, "epsg", 3317, "Kasai 1953 / Congo TM zone 24", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3318, "epsg", 3318, "IGC 1962 / Congo TM zone 12", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3319, "epsg", 3319, "IGC 1962 / Congo TM zone 14", + "+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3320, "epsg", 3320, "IGC 1962 / Congo TM zone 16", + "+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3321, "epsg", 3321, "IGC 1962 / Congo TM zone 18", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3322, "epsg", 3322, "IGC 1962 / Congo TM zone 20", + "+proj=tmerc +lat_0=0 +lon_0=20 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3323, "epsg", 3323, "IGC 1962 / Congo TM zone 22", + "+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3324, "epsg", 3324, "IGC 1962 / Congo TM zone 24", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3325, "epsg", 3325, "IGC 1962 / Congo TM zone 26", + "+proj=tmerc +lat_0=0 +lon_0=26 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3326, "epsg", 3326, "IGC 1962 / Congo TM zone 28", + "+proj=tmerc +lat_0=0 +lon_0=28 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3327, "epsg", 3327, "IGC 1962 / Congo TM zone 30", + "+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 3328, "epsg", 3328, "Pulkovo 1942(58) / GUGiK-80", + "+proj=sterea +lat_0=52.16666666666666 +lon_0=19.16666666666667 +k=0.999714 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3329, "epsg", 3329, "Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3330, "epsg", 3330, "Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3331, "epsg", 3331, "Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3332, "epsg", 3332, "Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 8", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3333, "epsg", 3333, "Pulkovo 1942(58) / Gauss-Kruger zone 3", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3334, "epsg", 3334, "Pulkovo 1942(58) / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3335, "epsg", 3335, "Pulkovo 1942(58) / Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"}, + { + 3336, "epsg", 3336, "IGN 1962 Kerguelen / UTM zone 42S", + "+proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs"}, + { + 3337, "epsg", 3337, "Le Pouce 1934 / Mauritius Grid", + "+proj=lcc +lat_1=-20.19506944444445 +lat_0=-20.19506944444445 +lon_0=57.52182777777778 +k_0=1 +x_0=1000000 +y_0=1000000 +ellps=clrk80 +towgs84=-770.1,158.4,-498.2,0,0,0,0 +units=m +no_defs"}, + { + 3338, "epsg", 3338, "NAD83 / Alaska Albers", + "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3339, "epsg", 3339, "IGCB 1955 / Congo TM zone 12", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs"}, + { + 3340, "epsg", 3340, "IGCB 1955 / Congo TM zone 14", + "+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs"}, + { + 3341, "epsg", 3341, "IGCB 1955 / Congo TM zone 16", + "+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs"}, + { + 3342, "epsg", 3342, "IGCB 1955 / UTM zone 33S", + "+proj=utm +zone=33 +south +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs"}, + { + 3343, "epsg", 3343, "Mauritania 1999 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3344, "epsg", 3344, "Mauritania 1999 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3345, "epsg", 3345, "Mauritania 1999 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3346, "epsg", 3346, "LKS94 / Lithuania TM", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3347, "epsg", 3347, "NAD83 / Statistics Canada Lambert", + "+proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3348, "epsg", 3348, "NAD83(CSRS) / Statistics Canada Lambert", + "+proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs"}, + { + 3349, "epsg", 3349, "WGS 84 / PDC Mercator", + "+proj=merc +lon_0=-150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3350, "epsg", 3350, "Pulkovo 1942 / CS63 zone C0", + "+proj=tmerc +lat_0=0.1 +lon_0=21.95 +k=1 +x_0=250000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3351, "epsg", 3351, "Pulkovo 1942 / CS63 zone C1", + "+proj=tmerc +lat_0=0.1 +lon_0=24.95 +k=1 +x_0=1250000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3352, "epsg", 3352, "Pulkovo 1942 / CS63 zone C2", + "+proj=tmerc +lat_0=0.1 +lon_0=27.95 +k=1 +x_0=2250000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3353, "epsg", 3353, "Mhast (onshore) / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs"}, + { + 3354, "epsg", 3354, "Mhast (offshore) / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs"}, + { + 3355, "epsg", 3355, "Egypt Gulf of Suez S-650 TL / Red Belt", + "+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +units=m +no_defs"}, + { + 3356, "epsg", 3356, "Grand Cayman 1959 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +units=m +no_defs"}, + { + 3357, "epsg", 3357, "Little Cayman 1961 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs"}, + { + 3358, "epsg", 3358, "NAD83(HARN) / North Carolina", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3359, "epsg", 3359, "NAD83(HARN) / North Carolina (ftUS) (deprecated)", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024385 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 3360, "epsg", 3360, "NAD83(HARN) / South Carolina", + "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3361, "epsg", 3361, "NAD83(HARN) / South Carolina (ft)", + "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs"}, + { + 3362, "epsg", 3362, "NAD83(HARN) / Pennsylvania North", + "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3363, "epsg", 3363, "NAD83(HARN) / Pennsylvania North (ftUS)", + "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3364, "epsg", 3364, "NAD83(HARN) / Pennsylvania South", + "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3365, "epsg", 3365, "NAD83(HARN) / Pennsylvania South (ftUS)", + "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3366, "epsg", 3366, "Hong Kong 1963 Grid System (deprecated)", + "+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +units=m +no_defs"}, + { + 3367, "epsg", 3367, "IGN Astro 1960 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=clrk80 +units=m +no_defs"}, + { + 3368, "epsg", 3368, "IGN Astro 1960 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs"}, + { + 3369, "epsg", 3369, "IGN Astro 1960 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs"}, + { + 3370, "epsg", 3370, "NAD27 / UTM zone 59N", + "+proj=utm +zone=59 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 3371, "epsg", 3371, "NAD27 / UTM zone 60N", + "+proj=utm +zone=60 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 3372, "epsg", 3372, "NAD83 / UTM zone 59N", + "+proj=utm +zone=59 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3373, "epsg", 3373, "NAD83 / UTM zone 60N", + "+proj=utm +zone=60 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3374, "epsg", 3374, "FD54 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=intl +units=m +no_defs"}, + { + 3375, "epsg", 3375, "GDM2000 / Peninsula RSO", + "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257964666666 +k=0.99984 +x_0=804671 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3376, "epsg", 3376, "GDM2000 / East Malaysia BRSO", + "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3377, "epsg", 3377, "GDM2000 / Johor Grid", + "+proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m +no_defs"}, + { + 3378, "epsg", 3378, "GDM2000 / Sembilan and Melaka Grid", + "+proj=cass +lat_0=2.682347636111111 +lon_0=101.9749050416667 +x_0=3673.785 +y_0=-4240.573 +ellps=GRS80 +units=m +no_defs"}, + { + 3379, "epsg", 3379, "GDM2000 / PahangGrid", + "+proj=cass +lat_0=3.769388088888889 +lon_0=102.3682989833333 +x_0=-7368.228 +y_0=6485.858 +ellps=GRS80 +units=m +no_defs"}, + { + 3380, "epsg", 3380, "GDM2000 / Selangor Grid", + "+proj=cass +lat_0=3.68464905 +lon_0=101.3891079138889 +x_0=-34836.161 +y_0=56464.049 +ellps=GRS80 +units=m +no_defs"}, + { + 3381, "epsg", 3381, "GDM2000 / Terengganu Grid", + "+proj=cass +lat_0=4.9762852 +lon_0=103.070275625 +x_0=19594.245 +y_0=3371.895 +ellps=GRS80 +units=m +no_defs"}, + { + 3382, "epsg", 3382, "GDM2000 / Pinang Grid", + "+proj=cass +lat_0=5.421517541666667 +lon_0=100.3443769638889 +x_0=-23.414 +y_0=62.283 +ellps=GRS80 +units=m +no_defs"}, + { + 3383, "epsg", 3383, "GDM2000 / Kedah and Perlis Grid", + "+proj=cass +lat_0=5.964672713888889 +lon_0=100.6363711111111 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3384, "epsg", 3384, "GDM2000 / Perak Grid", + "+proj=cass +lat_0=4.859063022222222 +lon_0=100.8154105861111 +x_0=-1.769 +y_0=133454.779 +ellps=GRS80 +units=m +no_defs"}, + { + 3385, "epsg", 3385, "GDM2000 / Kelantan Grid", + "+proj=cass +lat_0=5.972543658333334 +lon_0=102.2952416694444 +x_0=13227.851 +y_0=8739.894 +ellps=GRS80 +units=m +no_defs"}, + { + 3386, "epsg", 3386, "KKJ / Finland zone 0", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs"}, + { + 3387, "epsg", 3387, "KKJ / Finland zone 5", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=5500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs"}, + { + 3388, "epsg", 3388, "Pulkovo 1942 / Caspian Sea Mercator", + "+proj=merc +lon_0=51 +k=1 +x_0=0 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3389, "epsg", 3389, "Pulkovo 1942 / 3-degree Gauss-Kruger zone 60", + "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3390, "epsg", 3390, "Pulkovo 1995 / 3-degree Gauss-Kruger zone 60", + "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 3391, "epsg", 3391, "Karbala 1979 (Polservice) / UTM zone 37N", + "+proj=utm +zone=37 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs"}, + { + 3392, "epsg", 3392, "Karbala 1979 (Polservice) / UTM zone 38N", + "+proj=utm +zone=38 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs"}, + { + 3393, "epsg", 3393, "Karbala 1979 (Polservice) / UTM zone 39N", + "+proj=utm +zone=39 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs"}, + { + 3394, "epsg", 3394, "Nahrwan 1934 / Iraq zone", + "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs"}, + { + 3395, "epsg", 3395, "WGS 84 / World Mercator", + "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3396, "epsg", 3396, "PD/83 / Gauss-Kruger zone 3", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3397, "epsg", 3397, "PD/83 / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3398, "epsg", 3398, "RD/83 / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3399, "epsg", 3399, "RD/83 / Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 3400, "epsg", 3400, "NAD83 / Alberta 10-TM (Forest)", + "+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3401, "epsg", 3401, "NAD83 / Alberta 10-TM (Resource)", + "+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3402, "epsg", 3402, "NAD83(CSRS) / Alberta 10-TM (Forest)", + "+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3403, "epsg", 3403, "NAD83(CSRS) / Alberta 10-TM (Resource)", + "+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3404, "epsg", 3404, "NAD83(HARN) / North Carolina (ftUS)", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3405, "epsg", 3405, "VN-2000 / UTM zone 48N", + "+proj=utm +zone=48 +ellps=WGS84 +units=m +no_defs"}, + { + 3406, "epsg", 3406, "VN-2000 / UTM zone 49N", + "+proj=utm +zone=49 +ellps=WGS84 +units=m +no_defs"}, + { + 3407, "epsg", 3407, "Hong Kong 1963 Grid System", + "+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654 +no_defs"}, + { + 3408, "epsg", 3408, "NSIDC EASE-Grid North", + "+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs"}, + { + 3409, "epsg", 3409, "NSIDC EASE-Grid South", + "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs"}, + { + 3411, "epsg", 3411, "NSIDC Sea Ice Polar Stereographic North", + "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs"}, + { + 3412, "epsg", 3412, "NSIDC Sea Ice Polar Stereographic South", + "+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs"}, + { + 3413, "epsg", 3413, "WGS 84 / NSIDC Sea Ice Polar Stereographic North", + "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3414, "epsg", 3414, "SVY21 / Singapore TM", + "+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs"}, + { + 3415, "epsg", 3415, "WGS 72BE / South China Sea Lambert", + "+proj=lcc +lat_1=18 +lat_2=24 +lat_0=21 +lon_0=114 +x_0=500000 +y_0=500000 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 3416, "epsg", 3416, "ETRS89 / Austria Lambert", + "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs"}, + { + 3417, "epsg", 3417, "NAD83 / Iowa North (ft US)", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3418, "epsg", 3418, "NAD83 / Iowa South (ft US)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3419, "epsg", 3419, "NAD83 / Kansas North (ft US)", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3420, "epsg", 3420, "NAD83 / Kansas South (ft US)", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3421, "epsg", 3421, "NAD83 / Nevada East (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3422, "epsg", 3422, "NAD83 / Nevada Central (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3423, "epsg", 3423, "NAD83 / Nevada West (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3424, "epsg", 3424, "NAD83 / New Jersey (ft US)", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3425, "epsg", 3425, "NAD83(HARN) / Iowa North (ft US)", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3426, "epsg", 3426, "NAD83(HARN) / Iowa South (ft US)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3427, "epsg", 3427, "NAD83(HARN) / Kansas North (ft US)", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3428, "epsg", 3428, "NAD83(HARN) / Kansas South (ft US)", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3429, "epsg", 3429, "NAD83(HARN) / Nevada East (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3430, "epsg", 3430, "NAD83(HARN) / Nevada Central (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3431, "epsg", 3431, "NAD83(HARN) / Nevada West (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3432, "epsg", 3432, "NAD83(HARN) / New Jersey (ft US)", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3433, "epsg", 3433, "NAD83 / Arkansas North (ftUS)", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3434, "epsg", 3434, "NAD83 / Arkansas South (ftUS)", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3435, "epsg", 3435, "NAD83 / Illinois East (ftUS)", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3436, "epsg", 3436, "NAD83 / Illinois West (ftUS)", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3437, "epsg", 3437, "NAD83 / New Hampshire (ftUS)", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3438, "epsg", 3438, "NAD83 / Rhode Island (ftUS)", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3439, "epsg", 3439, "PSD93 / UTM zone 39N", + "+proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs"}, + { + 3440, "epsg", 3440, "PSD93 / UTM zone 40N", + "+proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs"}, + { + 3441, "epsg", 3441, "NAD83(HARN) / Arkansas North (ftUS)", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3442, "epsg", 3442, "NAD83(HARN) / Arkansas South (ftUS)", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3443, "epsg", 3443, "NAD83(HARN) / Illinois East (ftUS)", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3444, "epsg", 3444, "NAD83(HARN) / Illinois West (ftUS)", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3445, "epsg", 3445, "NAD83(HARN) / New Hampshire (ftUS)", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3446, "epsg", 3446, "NAD83(HARN) / Rhode Island (ftUS)", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3447, "epsg", 3447, "ETRS89 / Belgian Lambert 2005", + "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=150328 +y_0=166262 +ellps=GRS80 +units=m +no_defs"}, + { + 3448, "epsg", 3448, "JAD2001 / Jamaica Metric Grid", + "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=750000 +y_0=650000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3449, "epsg", 3449, "JAD2001 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3450, "epsg", 3450, "JAD2001 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3451, "epsg", 3451, "NAD83 / Louisiana North (ftUS)", + "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3452, "epsg", 3452, "NAD83 / Louisiana South (ftUS)", + "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3453, "epsg", 3453, "NAD83 / Louisiana Offshore (ftUS)", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3454, "epsg", 3454, "NAD83 / South Dakota North (ftUS)", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3455, "epsg", 3455, "NAD83 / South Dakota South (ftUS)", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3456, "epsg", 3456, "NAD83(HARN) / Louisiana North (ftUS)", + "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3457, "epsg", 3457, "NAD83(HARN) / Louisiana South (ftUS)", + "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3458, "epsg", 3458, "NAD83(HARN) / South Dakota North (ftUS)", + "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3459, "epsg", 3459, "NAD83(HARN) / South Dakota South (ftUS)", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3460, "epsg", 3460, "Fiji 1986 / Fiji Map Grid", + "+proj=tmerc +lat_0=-17 +lon_0=178.75 +k=0.99985 +x_0=2000000 +y_0=4000000 +ellps=WGS72 +units=m +no_defs"}, + { + 3461, "epsg", 3461, "Dabola 1981 / UTM zone 28N", + "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +units=m +no_defs"}, + { + 3462, "epsg", 3462, "Dabola 1981 / UTM zone 29N", + "+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +units=m +no_defs"}, + { + 3463, "epsg", 3463, "NAD83 / Maine CS2000 Central", + "+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3464, "epsg", 3464, "NAD83(HARN) / Maine CS2000 Central", + "+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3465, "epsg", 3465, "NAD83(NSRS2007) / Alabama East", + "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3466, "epsg", 3466, "NAD83(NSRS2007) / Alabama West", + "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3467, "epsg", 3467, "NAD83(NSRS2007) / Alaska Albers", + "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3468, "epsg", 3468, "NAD83(NSRS2007) / Alaska zone 1", + "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3469, "epsg", 3469, "NAD83(NSRS2007) / Alaska zone 2", + "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3470, "epsg", 3470, "NAD83(NSRS2007) / Alaska zone 3", + "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3471, "epsg", 3471, "NAD83(NSRS2007) / Alaska zone 4", + "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3472, "epsg", 3472, "NAD83(NSRS2007) / Alaska zone 5", + "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3473, "epsg", 3473, "NAD83(NSRS2007) / Alaska zone 6", + "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3474, "epsg", 3474, "NAD83(NSRS2007) / Alaska zone 7", + "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3475, "epsg", 3475, "NAD83(NSRS2007) / Alaska zone 8", + "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3476, "epsg", 3476, "NAD83(NSRS2007) / Alaska zone 9", + "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3477, "epsg", 3477, "NAD83(NSRS2007) / Alaska zone 10", + "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3478, "epsg", 3478, "NAD83(NSRS2007) / Arizona Central", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3479, "epsg", 3479, "NAD83(NSRS2007) / Arizona Central (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3480, "epsg", 3480, "NAD83(NSRS2007) / Arizona East", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3481, "epsg", 3481, "NAD83(NSRS2007) / Arizona East (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3482, "epsg", 3482, "NAD83(NSRS2007) / Arizona West", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3483, "epsg", 3483, "NAD83(NSRS2007) / Arizona West (ft)", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3484, "epsg", 3484, "NAD83(NSRS2007) / Arkansas North", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3485, "epsg", 3485, "NAD83(NSRS2007) / Arkansas North (ftUS)", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3486, "epsg", 3486, "NAD83(NSRS2007) / Arkansas South", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3487, "epsg", 3487, "NAD83(NSRS2007) / Arkansas South (ftUS)", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3488, "epsg", 3488, "NAD83(NSRS2007) / California Albers", + "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3489, "epsg", 3489, "NAD83(NSRS2007) / California zone 1", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3490, "epsg", 3490, "NAD83(NSRS2007) / California zone 1 (ftUS)", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3491, "epsg", 3491, "NAD83(NSRS2007) / California zone 2", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3492, "epsg", 3492, "NAD83(NSRS2007) / California zone 2 (ftUS)", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3493, "epsg", 3493, "NAD83(NSRS2007) / California zone 3", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3494, "epsg", 3494, "NAD83(NSRS2007) / California zone 3 (ftUS)", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3495, "epsg", 3495, "NAD83(NSRS2007) / California zone 4", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3496, "epsg", 3496, "NAD83(NSRS2007) / California zone 4 (ftUS)", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3497, "epsg", 3497, "NAD83(NSRS2007) / California zone 5", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3498, "epsg", 3498, "NAD83(NSRS2007) / California zone 5 (ftUS)", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3499, "epsg", 3499, "NAD83(NSRS2007) / California zone 6", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3500, "epsg", 3500, "NAD83(NSRS2007) / California zone 6 (ftUS)", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3501, "epsg", 3501, "NAD83(NSRS2007) / Colorado Central", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3502, "epsg", 3502, "NAD83(NSRS2007) / Colorado Central (ftUS)", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3503, "epsg", 3503, "NAD83(NSRS2007) / Colorado North", + "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3504, "epsg", 3504, "NAD83(NSRS2007) / Colorado North (ftUS)", + "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3505, "epsg", 3505, "NAD83(NSRS2007) / Colorado South", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3506, "epsg", 3506, "NAD83(NSRS2007) / Colorado South (ftUS)", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3507, "epsg", 3507, "NAD83(NSRS2007) / Connecticut", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3508, "epsg", 3508, "NAD83(NSRS2007) / Connecticut (ftUS)", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3509, "epsg", 3509, "NAD83(NSRS2007) / Delaware", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3510, "epsg", 3510, "NAD83(NSRS2007) / Delaware (ftUS)", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3511, "epsg", 3511, "NAD83(NSRS2007) / Florida East", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3512, "epsg", 3512, "NAD83(NSRS2007) / Florida East (ftUS)", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3513, "epsg", 3513, "NAD83(NSRS2007) / Florida GDL Albers", + "+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3514, "epsg", 3514, "NAD83(NSRS2007) / Florida North", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3515, "epsg", 3515, "NAD83(NSRS2007) / Florida North (ftUS)", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3516, "epsg", 3516, "NAD83(NSRS2007) / Florida West", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3517, "epsg", 3517, "NAD83(NSRS2007) / Florida West (ftUS)", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3518, "epsg", 3518, "NAD83(NSRS2007) / Georgia East", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3519, "epsg", 3519, "NAD83(NSRS2007) / Georgia East (ftUS)", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3520, "epsg", 3520, "NAD83(NSRS2007) / Georgia West", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3521, "epsg", 3521, "NAD83(NSRS2007) / Georgia West (ftUS)", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3522, "epsg", 3522, "NAD83(NSRS2007) / Idaho Central", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3523, "epsg", 3523, "NAD83(NSRS2007) / Idaho Central (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3524, "epsg", 3524, "NAD83(NSRS2007) / Idaho East", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3525, "epsg", 3525, "NAD83(NSRS2007) / Idaho East (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3526, "epsg", 3526, "NAD83(NSRS2007) / Idaho West", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3527, "epsg", 3527, "NAD83(NSRS2007) / Idaho West (ftUS)", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3528, "epsg", 3528, "NAD83(NSRS2007) / Illinois East", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3529, "epsg", 3529, "NAD83(NSRS2007) / Illinois East (ftUS)", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3530, "epsg", 3530, "NAD83(NSRS2007) / Illinois West", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3531, "epsg", 3531, "NAD83(NSRS2007) / Illinois West (ftUS)", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3532, "epsg", 3532, "NAD83(NSRS2007) / Indiana East", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3533, "epsg", 3533, "NAD83(NSRS2007) / Indiana East (ftUS)", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3534, "epsg", 3534, "NAD83(NSRS2007) / Indiana West", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3535, "epsg", 3535, "NAD83(NSRS2007) / Indiana West (ftUS)", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3536, "epsg", 3536, "NAD83(NSRS2007) / Iowa North", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3537, "epsg", 3537, "NAD83(NSRS2007) / Iowa North (ft US)", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3538, "epsg", 3538, "NAD83(NSRS2007) / Iowa South", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3539, "epsg", 3539, "NAD83(NSRS2007) / Iowa South (ft US)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3540, "epsg", 3540, "NAD83(NSRS2007) / Kansas North", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3541, "epsg", 3541, "NAD83(NSRS2007) / Kansas North (ft US)", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3542, "epsg", 3542, "NAD83(NSRS2007) / Kansas South", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3543, "epsg", 3543, "NAD83(NSRS2007) / Kansas South (ft US)", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3544, "epsg", 3544, "NAD83(NSRS2007) / Kentucky North", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3545, "epsg", 3545, "NAD83(NSRS2007) / Kentucky North (ftUS)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3546, "epsg", 3546, "NAD83(NSRS2007) / Kentucky Single Zone", + "+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3547, "epsg", 3547, "NAD83(NSRS2007) / Kentucky Single Zone (ftUS)", + "+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3548, "epsg", 3548, "NAD83(NSRS2007) / Kentucky South", + "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3549, "epsg", 3549, "NAD83(NSRS2007) / Kentucky South (ftUS)", + "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3550, "epsg", 3550, "NAD83(NSRS2007) / Louisiana North", + "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3551, "epsg", 3551, "NAD83(NSRS2007) / Louisiana North (ftUS)", + "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3552, "epsg", 3552, "NAD83(NSRS2007) / Louisiana South", + "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3553, "epsg", 3553, "NAD83(NSRS2007) / Louisiana South (ftUS)", + "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3554, "epsg", 3554, "NAD83(NSRS2007) / Maine CS2000 Central", + "+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3555, "epsg", 3555, "NAD83(NSRS2007) / Maine CS2000 East", + "+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3556, "epsg", 3556, "NAD83(NSRS2007) / Maine CS2000 West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3557, "epsg", 3557, "NAD83(NSRS2007) / Maine East", + "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3558, "epsg", 3558, "NAD83(NSRS2007) / Maine West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3559, "epsg", 3559, "NAD83(NSRS2007) / Maryland", + "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3560, "epsg", 3560, "NAD83 / Utah North (ftUS)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3561, "epsg", 3561, "Old Hawaiian / Hawaii zone 1", + "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs"}, + { + 3562, "epsg", 3562, "Old Hawaiian / Hawaii zone 2", + "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs"}, + { + 3563, "epsg", 3563, "Old Hawaiian / Hawaii zone 3", + "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs"}, + { + 3564, "epsg", 3564, "Old Hawaiian / Hawaii zone 4", + "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs"}, + { + 3565, "epsg", 3565, "Old Hawaiian / Hawaii zone 5", + "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs"}, + { + 3566, "epsg", 3566, "NAD83 / Utah Central (ftUS)", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3567, "epsg", 3567, "NAD83 / Utah South (ftUS)", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3568, "epsg", 3568, "NAD83(HARN) / Utah North (ftUS)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3569, "epsg", 3569, "NAD83(HARN) / Utah Central (ftUS)", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3570, "epsg", 3570, "NAD83(HARN) / Utah South (ftUS)", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3571, "epsg", 3571, "WGS 84 / North Pole LAEA Bering Sea", + "+proj=laea +lat_0=90 +lon_0=180 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3572, "epsg", 3572, "WGS 84 / North Pole LAEA Alaska", + "+proj=laea +lat_0=90 +lon_0=-150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3573, "epsg", 3573, "WGS 84 / North Pole LAEA Canada", + "+proj=laea +lat_0=90 +lon_0=-100 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3574, "epsg", 3574, "WGS 84 / North Pole LAEA Atlantic", + "+proj=laea +lat_0=90 +lon_0=-40 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3575, "epsg", 3575, "WGS 84 / North Pole LAEA Europe", + "+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3576, "epsg", 3576, "WGS 84 / North Pole LAEA Russia", + "+proj=laea +lat_0=90 +lon_0=90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3577, "epsg", 3577, "GDA94 / Australian Albers", + "+proj=aea +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=132 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3578, "epsg", 3578, "NAD83 / Yukon Albers", + "+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3579, "epsg", 3579, "NAD83(CSRS) / Yukon Albers", + "+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"}, + { + 3580, "epsg", 3580, "NAD83 / NWT Lambert", + "+proj=lcc +lat_1=62 +lat_2=70 +lat_0=0 +lon_0=-112 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 3581, "epsg", 3581, "NAD83(CSRS) / NWT Lambert", + "+proj=lcc +lat_1=62 +lat_2=70 +lat_0=0 +lon_0=-112 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 3582, "epsg", 3582, "NAD83(NSRS2007) / Maryland (ftUS)", + "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3583, "epsg", 3583, "NAD83(NSRS2007) / Massachusetts Island", + "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3584, "epsg", 3584, "NAD83(NSRS2007) / Massachusetts Island (ftUS)", + "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3585, "epsg", 3585, "NAD83(NSRS2007) / Massachusetts Mainland", + "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3586, "epsg", 3586, "NAD83(NSRS2007) / Massachusetts Mainland (ftUS)", + "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3587, "epsg", 3587, "NAD83(NSRS2007) / Michigan Central", + "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3588, "epsg", 3588, "NAD83(NSRS2007) / Michigan Central (ft)", + "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3589, "epsg", 3589, "NAD83(NSRS2007) / Michigan North", + "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3590, "epsg", 3590, "NAD83(NSRS2007) / Michigan North (ft)", + "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3591, "epsg", 3591, "NAD83(NSRS2007) / Michigan Oblique Mercator", + "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3592, "epsg", 3592, "NAD83(NSRS2007) / Michigan South", + "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3593, "epsg", 3593, "NAD83(NSRS2007) / Michigan South (ft)", + "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3594, "epsg", 3594, "NAD83(NSRS2007) / Minnesota Central", + "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3595, "epsg", 3595, "NAD83(NSRS2007) / Minnesota North", + "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3596, "epsg", 3596, "NAD83(NSRS2007) / Minnesota South", + "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3597, "epsg", 3597, "NAD83(NSRS2007) / Mississippi East", + "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3598, "epsg", 3598, "NAD83(NSRS2007) / Mississippi East (ftUS)", + "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3599, "epsg", 3599, "NAD83(NSRS2007) / Mississippi West", + "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3600, "epsg", 3600, "NAD83(NSRS2007) / Mississippi West (ftUS)", + "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3601, "epsg", 3601, "NAD83(NSRS2007) / Missouri Central", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3602, "epsg", 3602, "NAD83(NSRS2007) / Missouri East", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3603, "epsg", 3603, "NAD83(NSRS2007) / Missouri West", + "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3604, "epsg", 3604, "NAD83(NSRS2007) / Montana", + "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3605, "epsg", 3605, "NAD83(NSRS2007) / Montana (ft)", + "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3606, "epsg", 3606, "NAD83(NSRS2007) / Nebraska", + "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3607, "epsg", 3607, "NAD83(NSRS2007) / Nevada Central", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3608, "epsg", 3608, "NAD83(NSRS2007) / Nevada Central (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3609, "epsg", 3609, "NAD83(NSRS2007) / Nevada East", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3610, "epsg", 3610, "NAD83(NSRS2007) / Nevada East (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3611, "epsg", 3611, "NAD83(NSRS2007) / Nevada West", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3612, "epsg", 3612, "NAD83(NSRS2007) / Nevada West (ft US)", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3613, "epsg", 3613, "NAD83(NSRS2007) / New Hampshire", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3614, "epsg", 3614, "NAD83(NSRS2007) / New Hampshire (ftUS)", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3615, "epsg", 3615, "NAD83(NSRS2007) / New Jersey", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3616, "epsg", 3616, "NAD83(NSRS2007) / New Jersey (ft US)", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3617, "epsg", 3617, "NAD83(NSRS2007) / New Mexico Central", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3618, "epsg", 3618, "NAD83(NSRS2007) / New Mexico Central (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3619, "epsg", 3619, "NAD83(NSRS2007) / New Mexico East", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3620, "epsg", 3620, "NAD83(NSRS2007) / New Mexico East (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3621, "epsg", 3621, "NAD83(NSRS2007) / New Mexico West", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3622, "epsg", 3622, "NAD83(NSRS2007) / New Mexico West (ftUS)", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3623, "epsg", 3623, "NAD83(NSRS2007) / New York Central", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3624, "epsg", 3624, "NAD83(NSRS2007) / New York Central (ftUS)", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3625, "epsg", 3625, "NAD83(NSRS2007) / New York East", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3626, "epsg", 3626, "NAD83(NSRS2007) / New York East (ftUS)", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3627, "epsg", 3627, "NAD83(NSRS2007) / New York Long Island", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3628, "epsg", 3628, "NAD83(NSRS2007) / New York Long Island (ftUS)", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3629, "epsg", 3629, "NAD83(NSRS2007) / New York West", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3630, "epsg", 3630, "NAD83(NSRS2007) / New York West (ftUS)", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3631, "epsg", 3631, "NAD83(NSRS2007) / North Carolina", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3632, "epsg", 3632, "NAD83(NSRS2007) / North Carolina (ftUS)", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3633, "epsg", 3633, "NAD83(NSRS2007) / North Dakota North", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3634, "epsg", 3634, "NAD83(NSRS2007) / North Dakota North (ft)", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3635, "epsg", 3635, "NAD83(NSRS2007) / North Dakota South", + "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3636, "epsg", 3636, "NAD83(NSRS2007) / North Dakota South (ft)", + "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3637, "epsg", 3637, "NAD83(NSRS2007) / Ohio North", + "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3638, "epsg", 3638, "NAD83(NSRS2007) / Ohio South", + "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3639, "epsg", 3639, "NAD83(NSRS2007) / Oklahoma North", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3640, "epsg", 3640, "NAD83(NSRS2007) / Oklahoma North (ftUS)", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3641, "epsg", 3641, "NAD83(NSRS2007) / Oklahoma South", + "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3642, "epsg", 3642, "NAD83(NSRS2007) / Oklahoma South (ftUS)", + "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3643, "epsg", 3643, "NAD83(NSRS2007) / Oregon Lambert", + "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3644, "epsg", 3644, "NAD83(NSRS2007) / Oregon Lambert (ft)", + "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3645, "epsg", 3645, "NAD83(NSRS2007) / Oregon North", + "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3646, "epsg", 3646, "NAD83(NSRS2007) / Oregon North (ft)", + "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3647, "epsg", 3647, "NAD83(NSRS2007) / Oregon South", + "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3648, "epsg", 3648, "NAD83(NSRS2007) / Oregon South (ft)", + "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3649, "epsg", 3649, "NAD83(NSRS2007) / Pennsylvania North", + "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3650, "epsg", 3650, "NAD83(NSRS2007) / Pennsylvania North (ftUS)", + "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3651, "epsg", 3651, "NAD83(NSRS2007) / Pennsylvania South", + "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3652, "epsg", 3652, "NAD83(NSRS2007) / Pennsylvania South (ftUS)", + "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3653, "epsg", 3653, "NAD83(NSRS2007) / Rhode Island", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3654, "epsg", 3654, "NAD83(NSRS2007) / Rhode Island (ftUS)", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3655, "epsg", 3655, "NAD83(NSRS2007) / South Carolina", + "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3656, "epsg", 3656, "NAD83(NSRS2007) / South Carolina (ft)", + "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3657, "epsg", 3657, "NAD83(NSRS2007) / South Dakota North", + "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3658, "epsg", 3658, "NAD83(NSRS2007) / South Dakota North (ftUS)", + "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3659, "epsg", 3659, "NAD83(NSRS2007) / South Dakota South", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3660, "epsg", 3660, "NAD83(NSRS2007) / South Dakota South (ftUS)", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3661, "epsg", 3661, "NAD83(NSRS2007) / Tennessee", + "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3662, "epsg", 3662, "NAD83(NSRS2007) / Tennessee (ftUS)", + "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3663, "epsg", 3663, "NAD83(NSRS2007) / Texas Central", + "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3664, "epsg", 3664, "NAD83(NSRS2007) / Texas Central (ftUS)", + "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3665, "epsg", 3665, "NAD83(NSRS2007) / Texas Centric Albers Equal Area", + "+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3666, "epsg", 3666, "NAD83(NSRS2007) / Texas Centric Lambert Conformal", + "+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3667, "epsg", 3667, "NAD83(NSRS2007) / Texas North", + "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3668, "epsg", 3668, "NAD83(NSRS2007) / Texas North (ftUS)", + "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3669, "epsg", 3669, "NAD83(NSRS2007) / Texas North Central", + "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3670, "epsg", 3670, "NAD83(NSRS2007) / Texas North Central (ftUS)", + "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3671, "epsg", 3671, "NAD83(NSRS2007) / Texas South", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3672, "epsg", 3672, "NAD83(NSRS2007) / Texas South (ftUS)", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3673, "epsg", 3673, "NAD83(NSRS2007) / Texas South Central", + "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3674, "epsg", 3674, "NAD83(NSRS2007) / Texas South Central (ftUS)", + "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3675, "epsg", 3675, "NAD83(NSRS2007) / Utah Central", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3676, "epsg", 3676, "NAD83(NSRS2007) / Utah Central (ft)", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3677, "epsg", 3677, "NAD83(NSRS2007) / Utah Central (ftUS)", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3678, "epsg", 3678, "NAD83(NSRS2007) / Utah North", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3679, "epsg", 3679, "NAD83(NSRS2007) / Utah North (ft)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3680, "epsg", 3680, "NAD83(NSRS2007) / Utah North (ftUS)", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3681, "epsg", 3681, "NAD83(NSRS2007) / Utah South", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3682, "epsg", 3682, "NAD83(NSRS2007) / Utah South (ft)", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs"}, + { + 3683, "epsg", 3683, "NAD83(NSRS2007) / Utah South (ftUS)", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3684, "epsg", 3684, "NAD83(NSRS2007) / Vermont", + "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3685, "epsg", 3685, "NAD83(NSRS2007) / Virginia North", + "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3686, "epsg", 3686, "NAD83(NSRS2007) / Virginia North (ftUS)", + "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3687, "epsg", 3687, "NAD83(NSRS2007) / Virginia South", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3688, "epsg", 3688, "NAD83(NSRS2007) / Virginia South (ftUS)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3689, "epsg", 3689, "NAD83(NSRS2007) / Washington North", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3690, "epsg", 3690, "NAD83(NSRS2007) / Washington North (ftUS)", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3691, "epsg", 3691, "NAD83(NSRS2007) / Washington South", + "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3692, "epsg", 3692, "NAD83(NSRS2007) / Washington South (ftUS)", + "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3693, "epsg", 3693, "NAD83(NSRS2007) / West Virginia North", + "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3694, "epsg", 3694, "NAD83(NSRS2007) / West Virginia South", + "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3695, "epsg", 3695, "NAD83(NSRS2007) / Wisconsin Central", + "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3696, "epsg", 3696, "NAD83(NSRS2007) / Wisconsin Central (ftUS)", + "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3697, "epsg", 3697, "NAD83(NSRS2007) / Wisconsin North", + "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3698, "epsg", 3698, "NAD83(NSRS2007) / Wisconsin North (ftUS)", + "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3699, "epsg", 3699, "NAD83(NSRS2007) / Wisconsin South", + "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3700, "epsg", 3700, "NAD83(NSRS2007) / Wisconsin South (ftUS)", + "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3701, "epsg", 3701, "NAD83(NSRS2007) / Wisconsin Transverse Mercator", + "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3702, "epsg", 3702, "NAD83(NSRS2007) / Wyoming East", + "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3703, "epsg", 3703, "NAD83(NSRS2007) / Wyoming East Central", + "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3704, "epsg", 3704, "NAD83(NSRS2007) / Wyoming West Central", + "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3705, "epsg", 3705, "NAD83(NSRS2007) / Wyoming West", + "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3706, "epsg", 3706, "NAD83(NSRS2007) / UTM zone 59N", + "+proj=utm +zone=59 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3707, "epsg", 3707, "NAD83(NSRS2007) / UTM zone 60N", + "+proj=utm +zone=60 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3708, "epsg", 3708, "NAD83(NSRS2007) / UTM zone 1N", + "+proj=utm +zone=1 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3709, "epsg", 3709, "NAD83(NSRS2007) / UTM zone 2N", + "+proj=utm +zone=2 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3710, "epsg", 3710, "NAD83(NSRS2007) / UTM zone 3N", + "+proj=utm +zone=3 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3711, "epsg", 3711, "NAD83(NSRS2007) / UTM zone 4N", + "+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3712, "epsg", 3712, "NAD83(NSRS2007) / UTM zone 5N", + "+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3713, "epsg", 3713, "NAD83(NSRS2007) / UTM zone 6N", + "+proj=utm +zone=6 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3714, "epsg", 3714, "NAD83(NSRS2007) / UTM zone 7N", + "+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3715, "epsg", 3715, "NAD83(NSRS2007) / UTM zone 8N", + "+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3716, "epsg", 3716, "NAD83(NSRS2007) / UTM zone 9N", + "+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3717, "epsg", 3717, "NAD83(NSRS2007) / UTM zone 10N", + "+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3718, "epsg", 3718, "NAD83(NSRS2007) / UTM zone 11N", + "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3719, "epsg", 3719, "NAD83(NSRS2007) / UTM zone 12N", + "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3720, "epsg", 3720, "NAD83(NSRS2007) / UTM zone 13N", + "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3721, "epsg", 3721, "NAD83(NSRS2007) / UTM zone 14N", + "+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3722, "epsg", 3722, "NAD83(NSRS2007) / UTM zone 15N", + "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3723, "epsg", 3723, "NAD83(NSRS2007) / UTM zone 16N", + "+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3724, "epsg", 3724, "NAD83(NSRS2007) / UTM zone 17N", + "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3725, "epsg", 3725, "NAD83(NSRS2007) / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3726, "epsg", 3726, "NAD83(NSRS2007) / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 3727, "epsg", 3727, "Reunion 1947 / TM Reunion", + "+proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs"}, + { + 3728, "epsg", 3728, "NAD83(NSRS2007) / Ohio North (ftUS)", + "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3729, "epsg", 3729, "NAD83(NSRS2007) / Ohio South (ftUS)", + "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3730, "epsg", 3730, "NAD83(NSRS2007) / Wyoming East (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3731, "epsg", 3731, "NAD83(NSRS2007) / Wyoming East Central (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3732, "epsg", 3732, "NAD83(NSRS2007) / Wyoming West Central (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3733, "epsg", 3733, "NAD83(NSRS2007) / Wyoming West (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3734, "epsg", 3734, "NAD83 / Ohio North (ftUS)", + "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3735, "epsg", 3735, "NAD83 / Ohio South (ftUS)", + "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3736, "epsg", 3736, "NAD83 / Wyoming East (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3737, "epsg", 3737, "NAD83 / Wyoming East Central (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3738, "epsg", 3738, "NAD83 / Wyoming West Central (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3739, "epsg", 3739, "NAD83 / Wyoming West (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3740, "epsg", 3740, "NAD83(HARN) / UTM zone 10N", + "+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs"}, + { + 3741, "epsg", 3741, "NAD83(HARN) / UTM zone 11N", + "+proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs"}, + { + 3742, "epsg", 3742, "NAD83(HARN) / UTM zone 12N", + "+proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs"}, + { + 3743, "epsg", 3743, "NAD83(HARN) / UTM zone 13N", + "+proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs"}, + { + 3744, "epsg", 3744, "NAD83(HARN) / UTM zone 14N", + "+proj=utm +zone=14 +ellps=GRS80 +units=m +no_defs"}, + { + 3745, "epsg", 3745, "NAD83(HARN) / UTM zone 15N", + "+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs"}, + { + 3746, "epsg", 3746, "NAD83(HARN) / UTM zone 16N", + "+proj=utm +zone=16 +ellps=GRS80 +units=m +no_defs"}, + { + 3747, "epsg", 3747, "NAD83(HARN) / UTM zone 17N", + "+proj=utm +zone=17 +ellps=GRS80 +units=m +no_defs"}, + { + 3748, "epsg", 3748, "NAD83(HARN) / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +units=m +no_defs"}, + { + 3749, "epsg", 3749, "NAD83(HARN) / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +units=m +no_defs"}, + { + 3750, "epsg", 3750, "NAD83(HARN) / UTM zone 4N", + "+proj=utm +zone=4 +ellps=GRS80 +units=m +no_defs"}, + { + 3751, "epsg", 3751, "NAD83(HARN) / UTM zone 5N", + "+proj=utm +zone=5 +ellps=GRS80 +units=m +no_defs"}, + { + 3752, "epsg", 3752, "WGS 84 / Mercator 41", + "+proj=merc +lon_0=100 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3753, "epsg", 3753, "NAD83(HARN) / Ohio North (ftUS)", + "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3754, "epsg", 3754, "NAD83(HARN) / Ohio South (ftUS)", + "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3755, "epsg", 3755, "NAD83(HARN) / Wyoming East (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3756, "epsg", 3756, "NAD83(HARN) / Wyoming East Central (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3757, "epsg", 3757, "NAD83(HARN) / Wyoming West Central (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3758, "epsg", 3758, "NAD83(HARN) / Wyoming West (ftUS)", + "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3759, "epsg", 3759, "NAD83 / Hawaii zone 3 (ftUS)", + "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 3760, "epsg", 3760, "NAD83(HARN) / Hawaii zone 3 (ftUS)", + "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs"}, + { + 3761, "epsg", 3761, "NAD83(CSRS) / UTM zone 22N", + "+proj=utm +zone=22 +ellps=GRS80 +units=m +no_defs"}, + { + 3762, "epsg", 3762, "WGS 84 / South Georgia Lambert", + "+proj=lcc +lat_1=-54 +lat_2=-54.75 +lat_0=-55 +lon_0=-37 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 3920, "epsg", 3920, "Puerto Rico / UTM zone 20N", + "+proj=utm +zone=20 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=m +no_defs"}, + { + 3991, "epsg", 3991, "Puerto Rico State Plane CS of 1927", + "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 3992, "epsg", 3992, "Puerto Rico / St. Croix", + "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012192 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +to_meter=0.3048006096012192 +no_defs"}, + { + 4001, "epsg", 4001, "Unknown datum based upon the Airy 1830 ellipsoid", + "+proj=longlat +ellps=airy +no_defs"}, + { + 4002, "epsg", 4002, + "Unknown datum based upon the Airy Modified 1849 ellipsoid", + "+proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs"}, + { + 4003, "epsg", 4003, + "Unknown datum based upon the Australian National Spheroid", + "+proj=longlat +ellps=aust_SA +no_defs"}, + { + 4004, "epsg", 4004, "Unknown datum based upon the Bessel 1841 ellipsoid", + "+proj=longlat +ellps=bessel +no_defs"}, + { + 4005, "epsg", 4005, + "Unknown datum based upon the Bessel Modified ellipsoid", + "+proj=longlat +a=6377492.018 +b=6356173.508712696 +no_defs"}, + { + 4006, "epsg", 4006, + "Unknown datum based upon the Bessel Namibia ellipsoid", + "+proj=longlat +ellps=bess_nam +no_defs"}, + { + 4007, "epsg", 4007, "Unknown datum based upon the Clarke 1858 ellipsoid", + "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs"}, + { + 4008, "epsg", 4008, "Unknown datum based upon the Clarke 1866 ellipsoid", + "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4009, "epsg", 4009, + "Unknown datum based upon the Clarke 1866 Michigan ellipsoid", + "+proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs"}, + { + 4010, "epsg", 4010, + "Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid", + "+proj=longlat +a=6378300.789 +b=6356566.435 +no_defs"}, + { + 4011, "epsg", 4011, + "Unknown datum based upon the Clarke 1880 (IGN) ellipsoid", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4012, "epsg", 4012, + "Unknown datum based upon the Clarke 1880 (RGS) ellipsoid", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4013, "epsg", 4013, + "Unknown datum based upon the Clarke 1880 (Arc) ellipsoid", + "+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs"}, + { + 4014, "epsg", 4014, + "Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid", + "+proj=longlat +a=6378249.2 +b=6356514.996941779 +no_defs"}, + { + 4015, "epsg", 4015, + "Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs"}, + { + 4016, "epsg", 4016, + "Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid", + "+proj=longlat +ellps=evrstSS +no_defs"}, + { + 4018, "epsg", 4018, + "Unknown datum based upon the Everest 1830 Modified ellipsoid", + "+proj=longlat +a=6377304.063 +b=6356103.038993155 +no_defs"}, + { + 4019, "epsg", 4019, "Unknown datum based upon the GRS 1980 ellipsoid", + "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4020, "epsg", 4020, "Unknown datum based upon the Helmert 1906 ellipsoid", + "+proj=longlat +ellps=helmert +no_defs"}, + { + 4021, "epsg", 4021, + "Unknown datum based upon the Indonesian National Spheroid", + "+proj=longlat +a=6378160 +b=6356774.50408554 +no_defs"}, + { + 4022, "epsg", 4022, + "Unknown datum based upon the International 1924 ellipsoid", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4024, "epsg", 4024, + "Unknown datum based upon the Krassowsky 1940 ellipsoid", + "+proj=longlat +ellps=krass +no_defs"}, + { + 4025, "epsg", 4025, "Unknown datum based upon the NWL 9D ellipsoid", + "+proj=longlat +ellps=WGS66 +no_defs"}, + { + 4027, "epsg", 4027, "Unknown datum based upon the Plessis 1817 ellipsoid", + "+proj=longlat +a=6376523 +b=6355862.933255573 +no_defs"}, + { + 4028, "epsg", 4028, "Unknown datum based upon the Struve 1860 ellipsoid", + "+proj=longlat +a=6378298.3 +b=6356657.142669561 +no_defs"}, + { + 4029, "epsg", 4029, "Unknown datum based upon the War Office ellipsoid", + "+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs"}, + { + 4030, "epsg", 4030, "Unknown datum based upon the WGS 84 ellipsoid", + "+proj=longlat +ellps=WGS84 +no_defs"}, + { + 4031, "epsg", 4031, "Unknown datum based upon the GEM 10C ellipsoid", + "+proj=longlat +ellps=WGS84 +no_defs"}, + { + 4032, "epsg", 4032, "Unknown datum based upon the OSU86F ellipsoid", + "+proj=longlat +a=6378136.2 +b=6356751.516927429 +no_defs"}, + { + 4033, "epsg", 4033, "Unknown datum based upon the OSU91A ellipsoid", + "+proj=longlat +a=6378136.3 +b=6356751.616592146 +no_defs"}, + { + 4034, "epsg", 4034, "Unknown datum based upon the Clarke 1880 ellipsoid", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4035, "epsg", 4035, "Unknown datum based upon the Authalic Sphere", + "+proj=longlat +a=6371000 +b=6371000 +no_defs"}, + { + 4036, "epsg", 4036, "Unknown datum based upon the GRS 1967 ellipsoid", + "+proj=longlat +ellps=GRS67 +no_defs"}, + { + 4041, "epsg", 4041, + "Unknown datum based upon the Average Terrestrial System 1977 ellipsoid", + "+proj=longlat +a=6378135 +b=6356750.304921594 +no_defs"}, + { + 4042, "epsg", 4042, + "Unknown datum based upon the Everest (1830 Definition) ellipsoid", + "+proj=longlat +a=6377299.36559538 +b=6356098.357204818 +no_defs"}, + { + 4043, "epsg", 4043, "Unknown datum based upon the WGS 72 ellipsoid", + "+proj=longlat +ellps=WGS72 +no_defs"}, + { + 4044, "epsg", 4044, + "Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid", + "+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs"}, + { + 4045, "epsg", 4045, + "Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid", + "+proj=longlat +a=6377299.151 +b=6356098.145120132 +no_defs"}, + { + 4047, "epsg", 4047, + "Unspecified datum based upon the GRS 1980 Authalic Sphere", + "+proj=longlat +a=6371007 +b=6371007 +no_defs"}, + { + 4052, "epsg", 4052, + "Unspecified datum based upon the Clarke 1866 Authalic Sphere", + "+proj=longlat +a=6370997 +b=6370997 +no_defs"}, + { + 4053, "epsg", 4053, + "Unspecified datum based upon the International 1924 Authalic Sphere", + "+proj=longlat +a=6371228 +b=6371228 +no_defs"}, + { + 4054, "epsg", 4054, + "Unspecified datum based upon the Hughes 1980 ellipsoid", + "+proj=longlat +a=6378273 +b=6356889.449 +no_defs"}, + { + 4120, "epsg", 4120, "Greek", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4121, "epsg", 4121, "GGRS87", + "+proj=longlat +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +no_defs"}, + { + 4122, "epsg", 4122, "ATS77", + "+proj=longlat +a=6378135 +b=6356750.304921594 +no_defs"}, + { + 4123, "epsg", 4123, "KKJ", + "+proj=longlat +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +no_defs"}, + { + 4124, "epsg", 4124, "RT90", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4125, "epsg", 4125, "Samboja", + "+proj=longlat +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +no_defs"}, + { + 4126, "epsg", 4126, "LKS94 (ETRS89)", + "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4127, "epsg", 4127, "Tete", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4128, "epsg", 4128, "Madzansua", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4129, "epsg", 4129, "Observatario", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4130, "epsg", 4130, "Moznet", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +no_defs"}, + { + 4131, "epsg", 4131, "Indian 1960", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs"}, + { + 4132, "epsg", 4132, "FD58", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4133, "epsg", 4133, "EST92", + "+proj=longlat +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +no_defs"}, + { + 4134, "epsg", 4134, "PDO Survey Datum 1993", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4135, "epsg", 4135, "Old Hawaiian", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4136, "epsg", 4136, "St. Lawrence Island", + "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4137, "epsg", 4137, "St. Paul Island", + "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4138, "epsg", 4138, "St. George Island", + "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4139, "epsg", 4139, "Puerto Rico", + "+proj=longlat +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +no_defs"}, + { + 4140, "epsg", 4140, "NAD83(CSRS98)", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4141, "epsg", 4141, "Israel", + "+proj=longlat +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +no_defs"}, + { + 4142, "epsg", 4142, "Locodjo 1965", + "+proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +no_defs"}, + { + 4143, "epsg", 4143, "Abidjan 1987", + "+proj=longlat +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +no_defs"}, + { + 4144, "epsg", 4144, "Kalianpur 1937", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs"}, + { + 4145, "epsg", 4145, "Kalianpur 1962", + "+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs"}, + { + 4146, "epsg", 4146, "Kalianpur 1975", + "+proj=longlat +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +no_defs"}, + { + 4147, "epsg", 4147, "Hanoi 1972", + "+proj=longlat +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +no_defs"}, + { + 4148, "epsg", 4148, "Hartebeesthoek94", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4149, "epsg", 4149, "CH1903", + "+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs"}, + { + 4150, "epsg", 4150, "CH1903+", + "+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs"}, + { + 4151, "epsg", 4151, "CHTRF95", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4152, "epsg", 4152, "NAD83(HARN)", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4153, "epsg", 4153, "Rassadiran", + "+proj=longlat +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +no_defs"}, + { + 4154, "epsg", 4154, "ED50(ED77)", "+proj=longlat +ellps=intl +no_defs"}, + { + 4155, "epsg", 4155, "Dabola 1981", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +no_defs"}, + { + 4156, "epsg", 4156, "S-JTSK", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4157, "epsg", 4157, "Mount Dillon", + "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs"}, + { + 4158, "epsg", 4158, "Naparima 1955", "+proj=longlat +ellps=intl +no_defs"}, + { + 4159, "epsg", 4159, "ELD79", "+proj=longlat +ellps=intl +no_defs"}, + { + 4160, "epsg", 4160, "Chos Malal 1914", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4161, "epsg", 4161, "Pampa del Castillo", + "+proj=longlat +ellps=intl +towgs84=27.5,14,186.4,0,0,0,0 +no_defs"}, + { + 4162, "epsg", 4162, "Korean 1985", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4163, "epsg", 4163, "Yemen NGN96", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4164, "epsg", 4164, "South Yemen", + "+proj=longlat +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +no_defs"}, + { + 4165, "epsg", 4165, "Bissau", + "+proj=longlat +ellps=intl +towgs84=-173,253,27,0,0,0,0 +no_defs"}, + { + 4166, "epsg", 4166, "Korean 1995", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4167, "epsg", 4167, "NZGD2000", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4168, "epsg", 4168, "Accra", + "+proj=longlat +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +no_defs"}, + { + 4169, "epsg", 4169, "American Samoa 1962", + "+proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +no_defs"}, + { + 4170, "epsg", 4170, "SIRGAS", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4171, "epsg", 4171, "RGF93", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4172, "epsg", 4172, "POSGAR", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4173, "epsg", 4173, "IRENET95", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4174, "epsg", 4174, "Sierra Leone 1924", + "+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs"}, + { + 4175, "epsg", 4175, "Sierra Leone 1968", + "+proj=longlat +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +no_defs"}, + { + 4176, "epsg", 4176, "Australian Antarctic", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4178, "epsg", 4178, "Pulkovo 1942(83)", + "+proj=longlat +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +no_defs"}, + { + 4179, "epsg", 4179, "Pulkovo 1942(58)", + "+proj=longlat +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +no_defs"}, + { + 4180, "epsg", 4180, "EST97", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4181, "epsg", 4181, "Luxembourg 1930", + "+proj=longlat +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +no_defs"}, + { + 4182, "epsg", 4182, "Azores Occidental 1939", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4183, "epsg", 4183, "Azores Central 1948", + "+proj=longlat +ellps=intl +towgs84=-104,167,-38,0,0,0,0 +no_defs"}, + { + 4184, "epsg", 4184, "Azores Oriental 1940", + "+proj=longlat +ellps=intl +towgs84=-203,141,53,0,0,0,0 +no_defs"}, + { + 4185, "epsg", 4185, "Madeira 1936", "+proj=longlat +ellps=intl +no_defs"}, + { + 4188, "epsg", 4188, "OSNI 1952", + "+proj=longlat +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +no_defs"}, + { + 4189, "epsg", 4189, "REGVEN", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4190, "epsg", 4190, "POSGAR 98", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4191, "epsg", 4191, "Albanian 1987", "+proj=longlat +ellps=krass +no_defs"}, + { + 4192, "epsg", 4192, "Douala 1948", + "+proj=longlat +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +no_defs"}, + { + 4193, "epsg", 4193, "Manoca 1962", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs"}, + { + 4194, "epsg", 4194, "Qornoq 1927", "+proj=longlat +ellps=intl +no_defs"}, + { + 4195, "epsg", 4195, "Scoresbysund 1952", + "+proj=longlat +ellps=intl +towgs84=105,326,-102.5,0,0,0.814,-0.6 +no_defs"}, + { + 4196, "epsg", 4196, "Ammassalik 1958", + "+proj=longlat +ellps=intl +towgs84=-45,417,-3.5,0,0,0.814,-0.6 +no_defs"}, + { + 4197, "epsg", 4197, "Garoua", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4198, "epsg", 4198, "Kousseri", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4199, "epsg", 4199, "Egypt 1930", "+proj=longlat +ellps=intl +no_defs"}, + { + 4200, "epsg", 4200, "Pulkovo 1995", "+proj=longlat +ellps=krass +no_defs"}, + { + 4201, "epsg", 4201, "Adindan", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4202, "epsg", 4202, "AGD66", "+proj=longlat +ellps=aust_SA +no_defs"}, + { + 4203, "epsg", 4203, "AGD84", "+proj=longlat +ellps=aust_SA +no_defs"}, + { + 4204, "epsg", 4204, "Ain el Abd", "+proj=longlat +ellps=intl +no_defs"}, + { + 4205, "epsg", 4205, "Afgooye", + "+proj=longlat +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +no_defs"}, + { + 4206, "epsg", 4206, "Agadez", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4207, "epsg", 4207, "Lisbon", "+proj=longlat +ellps=intl +no_defs"}, + { + 4208, "epsg", 4208, "Aratu", "+proj=longlat +ellps=intl +no_defs"}, + { + 4209, "epsg", 4209, "Arc 1950", + "+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs"}, + { + 4210, "epsg", 4210, "Arc 1960", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4211, "epsg", 4211, "Batavia", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4212, "epsg", 4212, "Barbados 1938", + "+proj=longlat +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +no_defs"}, + { + 4213, "epsg", 4213, "Beduaram", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-106,-87,188,0,0,0,0 +no_defs"}, + { + 4214, "epsg", 4214, "Beijing 1954", "+proj=longlat +ellps=krass +no_defs"}, + { + 4215, "epsg", 4215, "Belge 1950", "+proj=longlat +ellps=intl +no_defs"}, + { + 4216, "epsg", 4216, "Bermuda 1957", + "+proj=longlat +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0 +no_defs"}, + { + 4218, "epsg", 4218, "Bogota 1975", + "+proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 +no_defs"}, + { + 4219, "epsg", 4219, "Bukit Rimpah", + "+proj=longlat +ellps=bessel +towgs84=-384,664,-48,0,0,0,0 +no_defs"}, + { + 4220, "epsg", 4220, "Camacupa", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4221, "epsg", 4221, "Campo Inchauspe", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4222, "epsg", 4222, "Cape", + "+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs"}, + { + 4223, "epsg", 4223, "Carthage", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4224, "epsg", 4224, "Chua", + "+proj=longlat +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +no_defs"}, + { + 4225, "epsg", 4225, "Corrego Alegre", + "+proj=longlat +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +no_defs"}, + { + 4226, "epsg", 4226, "Cote d'Ivoire", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4227, "epsg", 4227, "Deir ez Zor", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4228, "epsg", 4228, "Douala", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4229, "epsg", 4229, "Egypt 1907", "+proj=longlat +ellps=helmert +no_defs"}, + { + 4230, "epsg", 4230, "ED50", "+proj=longlat +ellps=intl +no_defs"}, + { + 4231, "epsg", 4231, "ED87", "+proj=longlat +ellps=intl +no_defs"}, + { + 4232, "epsg", 4232, "Fahud", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4233, "epsg", 4233, "Gandajika 1970", + "+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 +no_defs"}, + { + 4234, "epsg", 4234, "Garoua", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4235, "epsg", 4235, "Guyane Francaise", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4236, "epsg", 4236, "Hu Tzu Shan", + "+proj=longlat +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +no_defs"}, + { + 4237, "epsg", 4237, "HD72", "+proj=longlat +ellps=GRS67 +no_defs"}, + { + 4238, "epsg", 4238, "ID74", + "+proj=longlat +a=6378160 +b=6356774.50408554 +no_defs"}, + { + 4239, "epsg", 4239, "Indian 1954", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +no_defs"}, + { + 4240, "epsg", 4240, "Indian 1975", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs"}, + { + 4241, "epsg", 4241, "Jamaica 1875", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4242, "epsg", 4242, "JAD69", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4243, "epsg", 4243, "Kalianpur 1880", + "+proj=longlat +a=6377299.36559538 +b=6356098.357204818 +no_defs"}, + { + 4244, "epsg", 4244, "Kandawala", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=-97,787,86,0,0,0,0 +no_defs"}, + { + 4245, "epsg", 4245, "Kertau 1968", + "+proj=longlat +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +no_defs"}, + { + 4246, "epsg", 4246, "KOC", + "+proj=longlat +ellps=clrk80 +towgs84=-294.7,-200.1,525.5,0,0,0,0 +no_defs"}, + { + 4247, "epsg", 4247, "La Canoa", + "+proj=longlat +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +no_defs"}, + { + 4248, "epsg", 4248, "PSAD56", "+proj=longlat +ellps=intl +no_defs"}, + { + 4249, "epsg", 4249, "Lake", "+proj=longlat +ellps=intl +no_defs"}, + { + 4250, "epsg", 4250, "Leigon", + "+proj=longlat +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +no_defs"}, + { + 4251, "epsg", 4251, "Liberia 1964", + "+proj=longlat +ellps=clrk80 +towgs84=-90,40,88,0,0,0,0 +no_defs"}, + { + 4252, "epsg", 4252, "Lome", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4253, "epsg", 4253, "Luzon 1911", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4254, "epsg", 4254, "Hito XVIII 1963", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4255, "epsg", 4255, "Herat North", + "+proj=longlat +ellps=intl +towgs84=-333,-222,114,0,0,0,0 +no_defs"}, + { + 4256, "epsg", 4256, "Mahe 1971", + "+proj=longlat +ellps=clrk80 +towgs84=41,-220,-134,0,0,0,0 +no_defs"}, + { + 4257, "epsg", 4257, "Makassar", + "+proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +no_defs"}, + { + 4258, "epsg", 4258, "ETRS89", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4259, "epsg", 4259, "Malongo 1987", "+proj=longlat +ellps=intl +no_defs"}, + { + 4260, "epsg", 4260, "Manoca", + "+proj=longlat +ellps=clrk80 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs"}, + { + 4261, "epsg", 4261, "Merchich", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +no_defs"}, + { + 4262, "epsg", 4262, "Massawa", + "+proj=longlat +ellps=bessel +towgs84=639,405,60,0,0,0,0 +no_defs"}, + { + 4263, "epsg", 4263, "Minna", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4264, "epsg", 4264, "Mhast", + "+proj=longlat +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +no_defs"}, + { + 4265, "epsg", 4265, "Monte Mario", "+proj=longlat +ellps=intl +no_defs"}, + { + 4266, "epsg", 4266, "M'poraloko", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4267, "epsg", 4267, "NAD27", + "+proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs"}, + { + 4268, "epsg", 4268, "NAD27 Michigan", + "+proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs"}, + { + 4269, "epsg", 4269, "NAD83", + "+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs"}, + { + 4270, "epsg", 4270, "Nahrwan 1967", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4271, "epsg", 4271, "Naparima 1972", "+proj=longlat +ellps=intl +no_defs"}, + { + 4272, "epsg", 4272, "NZGD49", + "+proj=longlat +ellps=intl +datum=nzgd49 +no_defs"}, + { + 4273, "epsg", 4273, "NGO 1948", + "+proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +no_defs"}, + { + 4274, "epsg", 4274, "Datum 73", "+proj=longlat +ellps=intl +no_defs"}, + { + 4275, "epsg", 4275, "NTF", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs"}, + { + 4276, "epsg", 4276, "NSWC 9Z-2", "+proj=longlat +ellps=WGS66 +no_defs"}, + { + 4277, "epsg", 4277, "OSGB 1936", + "+proj=longlat +ellps=airy +datum=OSGB36 +no_defs"}, + { + 4278, "epsg", 4278, "OSGB70", "+proj=longlat +ellps=airy +no_defs"}, + { + 4279, "epsg", 4279, "OS(SN)80", "+proj=longlat +ellps=airy +no_defs"}, + { + 4280, "epsg", 4280, "Padang", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4281, "epsg", 4281, "Palestine 1923", + "+proj=longlat +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +no_defs"}, + { + 4282, "epsg", 4282, "Pointe Noire", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4283, "epsg", 4283, "GDA94", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4284, "epsg", 4284, "Pulkovo 1942", "+proj=longlat +ellps=krass +no_defs"}, + { + 4285, "epsg", 4285, "Qatar 1974", "+proj=longlat +ellps=intl +no_defs"}, + { + 4286, "epsg", 4286, "Qatar 1948", "+proj=longlat +ellps=helmert +no_defs"}, + { + 4287, "epsg", 4287, "Qornoq", + "+proj=longlat +ellps=intl +towgs84=164,138,-189,0,0,0,0 +no_defs"}, + { + 4288, "epsg", 4288, "Loma Quintana", "+proj=longlat +ellps=intl +no_defs"}, + { + 4289, "epsg", 4289, "Amersfoort", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4291, "epsg", 4291, "SAD69", "+proj=longlat +ellps=GRS67 +no_defs"}, + { + 4292, "epsg", 4292, "Sapper Hill 1943", + "+proj=longlat +ellps=intl +towgs84=-355,21,72,0,0,0,0 +no_defs"}, + { + 4293, "epsg", 4293, "Schwarzeck", "+proj=longlat +ellps=bess_nam +no_defs"}, + { + 4294, "epsg", 4294, "Segora", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4295, "epsg", 4295, "Serindung", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4296, "epsg", 4296, "Sudan", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4297, "epsg", 4297, "Tananarive", + "+proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +no_defs"}, + { + 4298, "epsg", 4298, "Timbalai 1948", + "+proj=longlat +ellps=evrstSS +no_defs"}, + { + 4299, "epsg", 4299, "TM65", + "+proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs"}, + { + 4300, "epsg", 4300, "TM75", + "+proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs"}, + { + 4301, "epsg", 4301, "Tokyo", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4302, "epsg", 4302, "Trinidad 1903", + "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs"}, + { + 4303, "epsg", 4303, "TC(1948)", "+proj=longlat +ellps=helmert +no_defs"}, + { + 4304, "epsg", 4304, "Voirol 1875", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +no_defs"}, + { + 4306, "epsg", 4306, "Bern 1938", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4307, "epsg", 4307, "Nord Sahara 1959", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4308, "epsg", 4308, "RT38", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4309, "epsg", 4309, "Yacare", + "+proj=longlat +ellps=intl +towgs84=-155,171,37,0,0,0,0 +no_defs"}, + { + 4310, "epsg", 4310, "Yoff", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4311, "epsg", 4311, "Zanderij", + "+proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +no_defs"}, + { + 4312, "epsg", 4312, "MGI", + "+proj=longlat +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +no_defs"}, + { + 4313, "epsg", 4313, "Belge 1972", + "+proj=longlat +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +no_defs"}, + { + 4314, "epsg", 4314, "DHDN", + "+proj=longlat +ellps=bessel +datum=potsdam +no_defs"}, + { + 4315, "epsg", 4315, "Conakry 1905", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +no_defs"}, + { + 4316, "epsg", 4316, "Dealul Piscului 1933", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4317, "epsg", 4317, "Dealul Piscului 1970", + "+proj=longlat +ellps=krass +no_defs"}, + { + 4318, "epsg", 4318, "NGN", + "+proj=longlat +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +no_defs"}, + { + 4319, "epsg", 4319, "KUDAMS", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4322, "epsg", 4322, "WGS 72", "+proj=longlat +ellps=WGS72 +no_defs"}, + { + 4324, "epsg", 4324, "WGS 72BE", + "+proj=longlat +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +no_defs"}, + { + 4326, "epsg", 4326, "WGS 84", + "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"}, + { + 4600, "epsg", 4600, "Anguilla 1957", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4601, "epsg", 4601, "Antigua 1943", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4602, "epsg", 4602, "Dominica 1945", + "+proj=longlat +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +no_defs"}, + { + 4603, "epsg", 4603, "Grenada 1953", + "+proj=longlat +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +no_defs"}, + { + 4604, "epsg", 4604, "Montserrat 1958", + "+proj=longlat +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +no_defs"}, + { + 4605, "epsg", 4605, "St. Kitts 1955", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4606, "epsg", 4606, "St. Lucia 1955", + "+proj=longlat +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +no_defs"}, + { + 4607, "epsg", 4607, "St. Vincent 1945", + "+proj=longlat +ellps=clrk80 +towgs84=195.671,332.517,274.607,0,0,0,0 +no_defs"}, + { + 4608, "epsg", 4608, "NAD27(76)", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4609, "epsg", 4609, "NAD27(CGQ77)", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4610, "epsg", 4610, "Xian 1980", + "+proj=longlat +a=6378140 +b=6356755.288157528 +no_defs"}, + { + 4611, "epsg", 4611, "Hong Kong 1980", + "+proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +no_defs"}, + { + 4612, "epsg", 4612, "JGD2000", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4613, "epsg", 4613, "Segara", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4614, "epsg", 4614, "QND95", + "+proj=longlat +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +no_defs"}, + { + 4615, "epsg", 4615, "Porto Santo", + "+proj=longlat +ellps=intl +towgs84=-499,-249,314,0,0,0,0 +no_defs"}, + { + 4616, "epsg", 4616, "Selvagem Grande", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4617, "epsg", 4617, "NAD83(CSRS)", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4618, "epsg", 4618, "SAD69", "+proj=longlat +ellps=aust_SA +no_defs"}, + { + 4619, "epsg", 4619, "SWEREF99", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4620, "epsg", 4620, "Point 58", + "+proj=longlat +ellps=clrk80 +towgs84=-106,-129,165,0,0,0,0 +no_defs"}, + { + 4621, "epsg", 4621, "Fort Marigot", + "+proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs"}, + { + 4622, "epsg", 4622, "Guadeloupe 1948", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4623, "epsg", 4623, "CSG67", + "+proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs"}, + { + 4624, "epsg", 4624, "RGFG95", + "+proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs"}, + { + 4625, "epsg", 4625, "Martinique 1938", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4626, "epsg", 4626, "Reunion 1947", "+proj=longlat +ellps=intl +no_defs"}, + { + 4627, "epsg", 4627, "RGR92", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4628, "epsg", 4628, "Tahiti 52", + "+proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs"}, + { + 4629, "epsg", 4629, "Tahaa 54", "+proj=longlat +ellps=intl +no_defs"}, + { + 4630, "epsg", 4630, "IGN72 Nuku Hiva", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4631, "epsg", 4631, "K0 1949", + "+proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs"}, + { + 4632, "epsg", 4632, "Combani 1950", + "+proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs"}, + { + 4633, "epsg", 4633, "IGN56 Lifou", "+proj=longlat +ellps=intl +no_defs"}, + { + 4634, "epsg", 4634, "IGN72 Grand Terre", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4635, "epsg", 4635, "ST87 Ouvea", + "+proj=longlat +ellps=intl +towgs84=-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +no_defs"}, + { + 4636, "epsg", 4636, "Petrels 1972", + "+proj=longlat +ellps=intl +towgs84=365,194,166,0,0,0,0 +no_defs"}, + { + 4637, "epsg", 4637, "Perroud 1950", + "+proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs"}, + { + 4638, "epsg", 4638, "Saint Pierre et Miquelon 1950", + "+proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs"}, + { + 4639, "epsg", 4639, "MOP78", "+proj=longlat +ellps=intl +no_defs"}, + { + 4640, "epsg", 4640, "RRAF 1991", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4641, "epsg", 4641, "IGN53 Mare", "+proj=longlat +ellps=intl +no_defs"}, + { + 4642, "epsg", 4642, "ST84 Ile des Pins", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4643, "epsg", 4643, "ST71 Belep", + "+proj=longlat +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +no_defs"}, + { + 4644, "epsg", 4644, "NEA74 Noumea", "+proj=longlat +ellps=intl +no_defs"}, + { + 4645, "epsg", 4645, "RGNC 1991", + "+proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4646, "epsg", 4646, "Grand Comoros", "+proj=longlat +ellps=intl +no_defs"}, + { + 4657, "epsg", 4657, "Reykjavik 1900", + "+proj=longlat +a=6377019.27 +b=6355762.5391 +towgs84=-28,199,5,0,0,0,0 +no_defs"}, + { + 4658, "epsg", 4658, "Hjorsey 1955", + "+proj=longlat +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +no_defs"}, + { + 4659, "epsg", 4659, "ISN93", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4660, "epsg", 4660, "Helle 1954", + "+proj=longlat +ellps=intl +towgs84=982.609,552.753,-540.873,32.3934,-153.257,-96.2266,16.805 +no_defs"}, + { + 4661, "epsg", 4661, "LKS92", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4662, "epsg", 4662, "IGN72 Grande Terre", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4663, "epsg", 4663, "Porto Santo 1995", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4664, "epsg", 4664, "Azores Oriental 1995", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4665, "epsg", 4665, "Azores Central 1995", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4666, "epsg", 4666, "Lisbon 1890", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4667, "epsg", 4667, "IKBD-92", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4668, "epsg", 4668, "ED79", + "+proj=longlat +ellps=intl +towgs84=-86,-98,-119,0,0,0,0 +no_defs"}, + { + 4669, "epsg", 4669, "LKS94", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4670, "epsg", 4670, "IGM95", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4671, "epsg", 4671, "Voirol 1879", + "+proj=longlat +a=6378249.2 +b=6356515 +no_defs"}, + { + 4672, "epsg", 4672, "CI1971", + "+proj=longlat +ellps=intl +towgs84=175,-38,113,0,0,0,0 +no_defs"}, + { + 4673, "epsg", 4673, "CI1979", + "+proj=longlat +ellps=intl +towgs84=174.05,-25.49,112.57,-0,-0,0.554,0.2263 +no_defs"}, + { + 4674, "epsg", 4674, "SIRGAS 2000", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4675, "epsg", 4675, "Guam 1963", + "+proj=longlat +ellps=clrk66 +towgs84=-100,-248,259,0,0,0,0 +no_defs"}, + { + 4676, "epsg", 4676, "Vientiane 1982", + "+proj=longlat +ellps=krass +no_defs"}, + { + 4677, "epsg", 4677, "Lao 1993", "+proj=longlat +ellps=krass +no_defs"}, + { + 4678, "epsg", 4678, "Lao 1997", + "+proj=longlat +ellps=krass +towgs84=44.585,-131.212,-39.544,0,0,0,0 +no_defs"}, + { + 4679, "epsg", 4679, "Jouik 1961", + "+proj=longlat +ellps=clrk80 +towgs84=-80.01,253.26,291.19,0,0,0,0 +no_defs"}, + { + 4680, "epsg", 4680, "Nouakchott 1965", + "+proj=longlat +ellps=clrk80 +towgs84=124.5,-63.5,-281,0,0,0,0 +no_defs"}, + { + 4681, "epsg", 4681, "Mauritania 1999", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4682, "epsg", 4682, "Gulshan 303", + "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs"}, + { + 4683, "epsg", 4683, "PRS92", + "+proj=longlat +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +no_defs"}, + { + 4684, "epsg", 4684, "Gan 1970", + "+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 +no_defs"}, + { + 4685, "epsg", 4685, "Gandajika", "+proj=longlat +ellps=intl +no_defs"}, + { + 4686, "epsg", 4686, "MAGNA-SIRGAS", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4687, "epsg", 4687, "RGPF", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4688, "epsg", 4688, "Fatu Iva 72", + "+proj=longlat +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +no_defs"}, + { + 4689, "epsg", 4689, "IGN63 Hiva Oa", "+proj=longlat +ellps=intl +no_defs"}, + { + 4690, "epsg", 4690, "Tahiti 79", "+proj=longlat +ellps=intl +no_defs"}, + { + 4691, "epsg", 4691, "Moorea 87", + "+proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs"}, + { + 4692, "epsg", 4692, "Maupiti 83", + "+proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs"}, + { + 4693, "epsg", 4693, "Nakhl-e Ghanem", + "+proj=longlat +ellps=WGS84 +towgs84=0,-0.15,0.68,0,0,0,0 +no_defs"}, + { + 4694, "epsg", 4694, "POSGAR 94", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4695, "epsg", 4695, "Katanga 1955", "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4696, "epsg", 4696, "Kasai 1953", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4697, "epsg", 4697, "IGC 1962 6th Parallel South", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4698, "epsg", 4698, "IGN 1962 Kerguelen", + "+proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs"}, + { + 4699, "epsg", 4699, "Le Pouce 1934", + "+proj=longlat +ellps=clrk80 +towgs84=-770.1,158.4,-498.2,0,0,0,0 +no_defs"}, + { + 4700, "epsg", 4700, "IGN Astro 1960", + "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4701, "epsg", 4701, "IGCB 1955", + "+proj=longlat +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +no_defs"}, + { + 4702, "epsg", 4702, "Mauritania 1999", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4703, "epsg", 4703, "Mhast 1951", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4704, "epsg", 4704, "Mhast (onshore)", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4705, "epsg", 4705, "Mhast (offshore)", + "+proj=longlat +ellps=intl +no_defs"}, + { + 4706, "epsg", 4706, "Egypt Gulf of Suez S-650 TL", + "+proj=longlat +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +no_defs"}, + { + 4707, "epsg", 4707, "Tern Island 1961", + "+proj=longlat +ellps=intl +towgs84=114,-116,-333,0,0,0,0 +no_defs"}, + { + 4708, "epsg", 4708, "Cocos Islands 1965", + "+proj=longlat +ellps=aust_SA +towgs84=-491,-22,435,0,0,0,0 +no_defs"}, + { + 4709, "epsg", 4709, "Iwo Jima 1945", + "+proj=longlat +ellps=intl +towgs84=145,75,-272,0,0,0,0 +no_defs"}, + { + 4710, "epsg", 4710, "St. Helena 1971", + "+proj=longlat +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +no_defs"}, + { + 4711, "epsg", 4711, "Marcus Island 1952", + "+proj=longlat +ellps=intl +towgs84=124,-234,-25,0,0,0,0 +no_defs"}, + { + 4712, "epsg", 4712, "Ascension Island 1958", + "+proj=longlat +ellps=intl +towgs84=-205,107,53,0,0,0,0 +no_defs"}, + { + 4713, "epsg", 4713, "Ayabelle Lighthouse", + "+proj=longlat +ellps=clrk80 +towgs84=-79,-129,145,0,0,0,0 +no_defs"}, + { + 4714, "epsg", 4714, "Bellevue", + "+proj=longlat +ellps=intl +towgs84=-127,-769,472,0,0,0,0 +no_defs"}, + { + 4715, "epsg", 4715, "Camp Area Astro", + "+proj=longlat +ellps=intl +towgs84=-104,-129,239,0,0,0,0 +no_defs"}, + { + 4716, "epsg", 4716, "Phoenix Islands 1966", + "+proj=longlat +ellps=intl +towgs84=298,-304,-375,0,0,0,0 +no_defs"}, + { + 4717, "epsg", 4717, "Cape Canaveral", + "+proj=longlat +ellps=clrk66 +towgs84=-2,151,181,0,0,0,0 +no_defs"}, + { + 4718, "epsg", 4718, "Solomon 1968", "+proj=longlat +ellps=intl +no_defs"}, + { + 4719, "epsg", 4719, "Easter Island 1967", + "+proj=longlat +ellps=intl +towgs84=211,147,111,0,0,0,0 +no_defs"}, + { + 4720, "epsg", 4720, "Fiji 1986", "+proj=longlat +ellps=WGS72 +no_defs"}, + { + 4721, "epsg", 4721, "Fiji 1956", + "+proj=longlat +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +no_defs"}, + { + 4722, "epsg", 4722, "South Georgia 1968", + "+proj=longlat +ellps=intl +towgs84=-794,119,-298,0,0,0,0 +no_defs"}, + { + 4723, "epsg", 4723, "Grand Cayman 1959", + "+proj=longlat +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +no_defs"}, + { + 4724, "epsg", 4724, "Diego Garcia 1969", + "+proj=longlat +ellps=intl +towgs84=208,-435,-229,0,0,0,0 +no_defs"}, + { + 4725, "epsg", 4725, "Johnston Island 1961", + "+proj=longlat +ellps=intl +towgs84=189,-79,-202,0,0,0,0 +no_defs"}, + { + 4726, "epsg", 4726, "Little Cayman 1961", + "+proj=longlat +ellps=clrk66 +no_defs"}, + { + 4727, "epsg", 4727, "Midway 1961", "+proj=longlat +ellps=intl +no_defs"}, + { + 4728, "epsg", 4728, "Pico de la Nieves", + "+proj=longlat +ellps=intl +towgs84=-307,-92,127,0,0,0,0 +no_defs"}, + { + 4729, "epsg", 4729, "Pitcairn 1967", + "+proj=longlat +ellps=intl +towgs84=185,165,42,0,0,0,0 +no_defs"}, + { + 4730, "epsg", 4730, "Santo 1965", + "+proj=longlat +ellps=intl +towgs84=170,42,84,0,0,0,0 +no_defs"}, + { + 4731, "epsg", 4731, "Viti Levu 1916", + "+proj=longlat +ellps=clrk80 +towgs84=51,391,-36,0,0,0,0 +no_defs"}, + { + 4732, "epsg", 4732, "Marshall Islands 1960", + "+proj=longlat +a=6378270 +b=6356794.343434343 +towgs84=102,52,-38,0,0,0,0 +no_defs"}, + { + 4733, "epsg", 4733, "Wake Island 1952", + "+proj=longlat +ellps=intl +towgs84=276,-57,149,0,0,0,0 +no_defs"}, + { + 4734, "epsg", 4734, "Tristan 1968", + "+proj=longlat +ellps=intl +towgs84=-632,438,-609,0,0,0,0 +no_defs"}, + { + 4735, "epsg", 4735, "Kusaie 1951", + "+proj=longlat +ellps=intl +towgs84=647,1777,-1124,0,0,0,0 +no_defs"}, + { + 4736, "epsg", 4736, "Deception Island", + "+proj=longlat +ellps=clrk80 +towgs84=260,12,-147,0,0,0,0 +no_defs"}, + { + 4737, "epsg", 4737, "Korea 2000", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4738, "epsg", 4738, "Hong Kong 1963", + "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs"}, + { + 4739, "epsg", 4739, "Hong Kong 1963(67)", + "+proj=longlat +ellps=intl +towgs84=-156,-271,-189,0,0,0,0 +no_defs"}, + { + 4740, "epsg", 4740, "PZ-90", + "+proj=longlat +a=6378136 +b=6356751.361745712 +towgs84=0,0,1.5,-0,-0,0.076,0 +no_defs"}, + { + 4741, "epsg", 4741, "FD54", "+proj=longlat +ellps=intl +no_defs"}, + { + 4742, "epsg", 4742, "GDM2000", "+proj=longlat +ellps=GRS80 +no_defs"}, + { + 4743, "epsg", 4743, "Karbala 1979 (Polservice)", + "+proj=longlat +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +no_defs"}, + { + 4744, "epsg", 4744, "Nahrwan 1934", "+proj=longlat +ellps=clrk80 +no_defs"}, + { + 4745, "epsg", 4745, "RD/83", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4746, "epsg", 4746, "PD/83", "+proj=longlat +ellps=bessel +no_defs"}, + { + 4747, "epsg", 4747, "GR96", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4748, "epsg", 4748, "Vanua Levu 1915", + "+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +no_defs"}, + { + 4749, "epsg", 4749, "RGNC91-93", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4750, "epsg", 4750, "ST87 Ouvea", + "+proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs"}, + { + 4751, "epsg", 4751, "Kertau (RSO)", + "+proj=longlat +a=6377295.664 +b=6356094.667915204 +no_defs"}, + { + 4752, "epsg", 4752, "Viti Levu 1912", + "+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +no_defs"}, + { + 4753, "epsg", 4753, "fk89", "+proj=longlat +ellps=intl +no_defs"}, + { + 4754, "epsg", 4754, "LGD2006", + "+proj=longlat +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +no_defs"}, + { + 4755, "epsg", 4755, "DGN95", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4756, "epsg", 4756, "VN-2000", "+proj=longlat +ellps=WGS84 +no_defs"}, + { + 4757, "epsg", 4757, "SVY21", "+proj=longlat +ellps=WGS84 +no_defs"}, + { + 4758, "epsg", 4758, "JAD2001", + "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4759, "epsg", 4759, "NAD83(NSRS2007)", + "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"}, + { + 4760, "epsg", 4760, "WGS 66", "+proj=longlat +ellps=WGS66 +no_defs"}, + { + 4801, "epsg", 4801, "Bern 1898 (Bern)", + "+proj=longlat +ellps=bessel +pm=bern +no_defs"}, + { + 4802, "epsg", 4802, "Bogota 1975 (Bogota)", + "+proj=longlat +ellps=intl +pm=bogota +no_defs"}, + { + 4803, "epsg", 4803, "Lisbon (Lisbon)", + "+proj=longlat +ellps=intl +pm=lisbon +no_defs"}, + { + 4804, "epsg", 4804, "Makassar (Jakarta)", + "+proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +no_defs"}, + { + 4805, "epsg", 4805, "MGI (Ferro)", + "+proj=longlat +ellps=bessel +pm=ferro +no_defs"}, + { + 4806, "epsg", 4806, "Monte Mario (Rome)", + "+proj=longlat +ellps=intl +pm=rome +no_defs"}, + { + 4807, "epsg", 4807, "NTF (Paris)", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs"}, + { + 4808, "epsg", 4808, "Padang (Jakarta)", + "+proj=longlat +ellps=bessel +pm=jakarta +no_defs"}, + { + 4809, "epsg", 4809, "Belge 1950 (Brussels)", + "+proj=longlat +ellps=intl +pm=brussels +no_defs"}, + { + 4810, "epsg", 4810, "Tananarive (Paris)", + "+proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +no_defs"}, + { + 4811, "epsg", 4811, "Voirol 1875 (Paris)", + "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +pm=paris +no_defs"}, + { + 4813, "epsg", 4813, "Batavia (Jakarta)", + "+proj=longlat +ellps=bessel +pm=jakarta +no_defs"}, + { + 4814, "epsg", 4814, "RT38 (Stockholm)", + "+proj=longlat +ellps=bessel +pm=stockholm +no_defs"}, + { + 4815, "epsg", 4815, "Greek (Athens)", + "+proj=longlat +ellps=bessel +pm=athens +no_defs"}, + { + 4816, "epsg", 4816, "Carthage (Paris)", + "+proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs"}, + { + 4817, "epsg", 4817, "NGO 1948 (Oslo)", + "+proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +no_defs"}, + { + 4818, "epsg", 4818, "S-JTSK (Ferro)", + "+proj=longlat +ellps=bessel +pm=ferro +no_defs"}, + { + 4819, "epsg", 4819, "Nord Sahara 1959 (Paris)", + "+proj=longlat +ellps=clrk80 +pm=paris +no_defs"}, + { + 4820, "epsg", 4820, "Segara (Jakarta)", + "+proj=longlat +ellps=bessel +pm=jakarta +no_defs"}, + { + 4821, "epsg", 4821, "Voirol 1879 (Paris)", + "+proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs"}, + { + 4901, "epsg", 4901, "ATF (Paris)", + "+proj=longlat +a=6376523 +b=6355862.933255573 +pm=paris +no_defs"}, + { + 4902, "epsg", 4902, "NDG (Paris)", + "+proj=longlat +a=6376523 +b=6355862.933255573 +pm=paris +no_defs"}, + { + 4903, "epsg", 4903, "Madrid 1870 (Madrid)", + "+proj=longlat +a=6378298.3 +b=6356657.142669561 +pm=madrid +no_defs"}, + { + 4904, "epsg", 4904, "Lisbon 1890 (Lisbon)", + "+proj=longlat +ellps=bessel +pm=lisbon +no_defs"}, + { + 20004, "epsg", 20004, "Pulkovo 1995 / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20005, "epsg", 20005, "Pulkovo 1995 / Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20006, "epsg", 20006, "Pulkovo 1995 / Gauss-Kruger zone 6", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20007, "epsg", 20007, "Pulkovo 1995 / Gauss-Kruger zone 7", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20008, "epsg", 20008, "Pulkovo 1995 / Gauss-Kruger zone 8", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20009, "epsg", 20009, "Pulkovo 1995 / Gauss-Kruger zone 9", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20010, "epsg", 20010, "Pulkovo 1995 / Gauss-Kruger zone 10", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20011, "epsg", 20011, "Pulkovo 1995 / Gauss-Kruger zone 11", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20012, "epsg", 20012, "Pulkovo 1995 / Gauss-Kruger zone 12", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20013, "epsg", 20013, "Pulkovo 1995 / Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20014, "epsg", 20014, "Pulkovo 1995 / Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20015, "epsg", 20015, "Pulkovo 1995 / Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20016, "epsg", 20016, "Pulkovo 1995 / Gauss-Kruger zone 16", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20017, "epsg", 20017, "Pulkovo 1995 / Gauss-Kruger zone 17", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20018, "epsg", 20018, "Pulkovo 1995 / Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20019, "epsg", 20019, "Pulkovo 1995 / Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20020, "epsg", 20020, "Pulkovo 1995 / Gauss-Kruger zone 20", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20021, "epsg", 20021, "Pulkovo 1995 / Gauss-Kruger zone 21", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20022, "epsg", 20022, "Pulkovo 1995 / Gauss-Kruger zone 22", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20023, "epsg", 20023, "Pulkovo 1995 / Gauss-Kruger zone 23", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20024, "epsg", 20024, "Pulkovo 1995 / Gauss-Kruger zone 24", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20025, "epsg", 20025, "Pulkovo 1995 / Gauss-Kruger zone 25", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20026, "epsg", 20026, "Pulkovo 1995 / Gauss-Kruger zone 26", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20027, "epsg", 20027, "Pulkovo 1995 / Gauss-Kruger zone 27", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20028, "epsg", 20028, "Pulkovo 1995 / Gauss-Kruger zone 28", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20029, "epsg", 20029, "Pulkovo 1995 / Gauss-Kruger zone 29", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20030, "epsg", 20030, "Pulkovo 1995 / Gauss-Kruger zone 30", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20031, "epsg", 20031, "Pulkovo 1995 / Gauss-Kruger zone 31", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20032, "epsg", 20032, "Pulkovo 1995 / Gauss-Kruger zone 32", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20064, "epsg", 20064, "Pulkovo 1995 / Gauss-Kruger 4N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20065, "epsg", 20065, "Pulkovo 1995 / Gauss-Kruger 5N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20066, "epsg", 20066, "Pulkovo 1995 / Gauss-Kruger 6N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20067, "epsg", 20067, "Pulkovo 1995 / Gauss-Kruger 7N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20068, "epsg", 20068, "Pulkovo 1995 / Gauss-Kruger 8N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20069, "epsg", 20069, "Pulkovo 1995 / Gauss-Kruger 9N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20070, "epsg", 20070, "Pulkovo 1995 / Gauss-Kruger 10N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20071, "epsg", 20071, "Pulkovo 1995 / Gauss-Kruger 11N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20072, "epsg", 20072, "Pulkovo 1995 / Gauss-Kruger 12N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20073, "epsg", 20073, "Pulkovo 1995 / Gauss-Kruger 13N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20074, "epsg", 20074, "Pulkovo 1995 / Gauss-Kruger 14N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20075, "epsg", 20075, "Pulkovo 1995 / Gauss-Kruger 15N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20076, "epsg", 20076, "Pulkovo 1995 / Gauss-Kruger 16N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20077, "epsg", 20077, "Pulkovo 1995 / Gauss-Kruger 17N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20078, "epsg", 20078, "Pulkovo 1995 / Gauss-Kruger 18N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20079, "epsg", 20079, "Pulkovo 1995 / Gauss-Kruger 19N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20080, "epsg", 20080, "Pulkovo 1995 / Gauss-Kruger 20N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20081, "epsg", 20081, "Pulkovo 1995 / Gauss-Kruger 21N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20082, "epsg", 20082, "Pulkovo 1995 / Gauss-Kruger 22N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20083, "epsg", 20083, "Pulkovo 1995 / Gauss-Kruger 23N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20084, "epsg", 20084, "Pulkovo 1995 / Gauss-Kruger 24N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20085, "epsg", 20085, "Pulkovo 1995 / Gauss-Kruger 25N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20086, "epsg", 20086, "Pulkovo 1995 / Gauss-Kruger 26N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20087, "epsg", 20087, "Pulkovo 1995 / Gauss-Kruger 27N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20088, "epsg", 20088, "Pulkovo 1995 / Gauss-Kruger 28N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20089, "epsg", 20089, "Pulkovo 1995 / Gauss-Kruger 29N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20090, "epsg", 20090, "Pulkovo 1995 / Gauss-Kruger 30N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20091, "epsg", 20091, "Pulkovo 1995 / Gauss-Kruger 31N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20092, "epsg", 20092, "Pulkovo 1995 / Gauss-Kruger 32N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 20135, "epsg", 20135, "Adindan / UTM zone 35N", + "+proj=utm +zone=35 +ellps=clrk80 +units=m +no_defs"}, + { + 20136, "epsg", 20136, "Adindan / UTM zone 36N", + "+proj=utm +zone=36 +ellps=clrk80 +units=m +no_defs"}, + { + 20137, "epsg", 20137, "Adindan / UTM zone 37N", + "+proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs"}, + { + 20138, "epsg", 20138, "Adindan / UTM zone 38N", + "+proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs"}, + { + 20248, "epsg", 20248, "AGD66 / AMG zone 48", + "+proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20249, "epsg", 20249, "AGD66 / AMG zone 49", + "+proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20250, "epsg", 20250, "AGD66 / AMG zone 50", + "+proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20251, "epsg", 20251, "AGD66 / AMG zone 51", + "+proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20252, "epsg", 20252, "AGD66 / AMG zone 52", + "+proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20253, "epsg", 20253, "AGD66 / AMG zone 53", + "+proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20254, "epsg", 20254, "AGD66 / AMG zone 54", + "+proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20255, "epsg", 20255, "AGD66 / AMG zone 55", + "+proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20256, "epsg", 20256, "AGD66 / AMG zone 56", + "+proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20257, "epsg", 20257, "AGD66 / AMG zone 57", + "+proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20258, "epsg", 20258, "AGD66 / AMG zone 58", + "+proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20348, "epsg", 20348, "AGD84 / AMG zone 48", + "+proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20349, "epsg", 20349, "AGD84 / AMG zone 49", + "+proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20350, "epsg", 20350, "AGD84 / AMG zone 50", + "+proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20351, "epsg", 20351, "AGD84 / AMG zone 51", + "+proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20352, "epsg", 20352, "AGD84 / AMG zone 52", + "+proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20353, "epsg", 20353, "AGD84 / AMG zone 53", + "+proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20354, "epsg", 20354, "AGD84 / AMG zone 54", + "+proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20355, "epsg", 20355, "AGD84 / AMG zone 55", + "+proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20356, "epsg", 20356, "AGD84 / AMG zone 56", + "+proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20357, "epsg", 20357, "AGD84 / AMG zone 57", + "+proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20358, "epsg", 20358, "AGD84 / AMG zone 58", + "+proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs"}, + { + 20436, "epsg", 20436, "Ain el Abd / UTM zone 36N", + "+proj=utm +zone=36 +ellps=intl +units=m +no_defs"}, + { + 20437, "epsg", 20437, "Ain el Abd / UTM zone 37N", + "+proj=utm +zone=37 +ellps=intl +units=m +no_defs"}, + { + 20438, "epsg", 20438, "Ain el Abd / UTM zone 38N", + "+proj=utm +zone=38 +ellps=intl +units=m +no_defs"}, + { + 20439, "epsg", 20439, "Ain el Abd / UTM zone 39N", + "+proj=utm +zone=39 +ellps=intl +units=m +no_defs"}, + { + 20440, "epsg", 20440, "Ain el Abd / UTM zone 40N", + "+proj=utm +zone=40 +ellps=intl +units=m +no_defs"}, + { + 20499, "epsg", 20499, "Ain el Abd / Bahrain Grid", + "+proj=utm +zone=39 +ellps=intl +units=m +no_defs"}, + { + 20538, "epsg", 20538, "Afgooye / UTM zone 38N", + "+proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs"}, + { + 20539, "epsg", 20539, "Afgooye / UTM zone 39N", + "+proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs"}, + { + 20790, "epsg", 20790, "Lisbon (Lisbon)/Portuguese National Grid", + "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +pm=lisbon +units=m +no_defs"}, + { + 20791, "epsg", 20791, "Lisbon (Lisbon)/Portuguese Grid", + "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=0 +y_0=0 +ellps=intl +pm=lisbon +units=m +no_defs"}, + { + 20822, "epsg", 20822, "Aratu / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=intl +units=m +no_defs"}, + { + 20823, "epsg", 20823, "Aratu / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=intl +units=m +no_defs"}, + { + 20824, "epsg", 20824, "Aratu / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=intl +units=m +no_defs"}, + { + 20934, "epsg", 20934, "Arc 1950 / UTM zone 34S", + "+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs"}, + { + 20935, "epsg", 20935, "Arc 1950 / UTM zone 35S", + "+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs"}, + { + 20936, "epsg", 20936, "Arc 1950 / UTM zone 36S", + "+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs"}, + { + 21035, "epsg", 21035, "Arc 1960 / UTM zone 35S", + "+proj=utm +zone=35 +south +ellps=clrk80 +units=m +no_defs"}, + { + 21036, "epsg", 21036, "Arc 1960 / UTM zone 36S", + "+proj=utm +zone=36 +south +ellps=clrk80 +units=m +no_defs"}, + { + 21037, "epsg", 21037, "Arc 1960 / UTM zone 37S", + "+proj=utm +zone=37 +south +ellps=clrk80 +units=m +no_defs"}, + { + 21095, "epsg", 21095, "Arc 1960 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=clrk80 +units=m +no_defs"}, + { + 21096, "epsg", 21096, "Arc 1960 / UTM zone 36N", + "+proj=utm +zone=36 +ellps=clrk80 +units=m +no_defs"}, + { + 21097, "epsg", 21097, "Arc 1960 / UTM zone 37N", + "+proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs"}, + { + 21100, "epsg", 21100, "Batavia (Jakarta) / NEIEZ (deprecated)", + "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs"}, + { + 21148, "epsg", 21148, "Batavia / UTM zone 48S", + "+proj=utm +zone=48 +south +ellps=bessel +units=m +no_defs"}, + { + 21149, "epsg", 21149, "Batavia / UTM zone 49S", + "+proj=utm +zone=49 +south +ellps=bessel +units=m +no_defs"}, + { + 21150, "epsg", 21150, "Batavia / UTM zone 50S", + "+proj=utm +zone=50 +south +ellps=bessel +units=m +no_defs"}, + { + 21291, "epsg", 21291, "Barbados 1938 / British West Indies Grid", + "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs"}, + { + 21292, "epsg", 21292, "Barbados 1938 / Barbados National Grid", + "+proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222222222 +k=0.9999986 +x_0=30000 +y_0=75000 +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs"}, + { + 21413, "epsg", 21413, "Beijing 1954 / Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21414, "epsg", 21414, "Beijing 1954 / Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21415, "epsg", 21415, "Beijing 1954 / Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21416, "epsg", 21416, "Beijing 1954 / Gauss-Kruger zone 16", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21417, "epsg", 21417, "Beijing 1954 / Gauss-Kruger zone 17", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21418, "epsg", 21418, "Beijing 1954 / Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21419, "epsg", 21419, "Beijing 1954 / Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21420, "epsg", 21420, "Beijing 1954 / Gauss-Kruger zone 20", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21421, "epsg", 21421, "Beijing 1954 / Gauss-Kruger zone 21", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21422, "epsg", 21422, "Beijing 1954 / Gauss-Kruger zone 22", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21423, "epsg", 21423, "Beijing 1954 / Gauss-Kruger zone 23", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21453, "epsg", 21453, "Beijing 1954 / Gauss-Kruger CM 75E", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21454, "epsg", 21454, "Beijing 1954 / Gauss-Kruger CM 81E", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21455, "epsg", 21455, "Beijing 1954 / Gauss-Kruger CM 87E", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21456, "epsg", 21456, "Beijing 1954 / Gauss-Kruger CM 93E", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21457, "epsg", 21457, "Beijing 1954 / Gauss-Kruger CM 99E", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21458, "epsg", 21458, "Beijing 1954 / Gauss-Kruger CM 105E", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21459, "epsg", 21459, "Beijing 1954 / Gauss-Kruger CM 111E", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21460, "epsg", 21460, "Beijing 1954 / Gauss-Kruger CM 117E", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21461, "epsg", 21461, "Beijing 1954 / Gauss-Kruger CM 123E", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21462, "epsg", 21462, "Beijing 1954 / Gauss-Kruger CM 129E", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21463, "epsg", 21463, "Beijing 1954 / Gauss-Kruger CM 135E", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21473, "epsg", 21473, "Beijing 1954 / Gauss-Kruger 13N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21474, "epsg", 21474, "Beijing 1954 / Gauss-Kruger 14N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21475, "epsg", 21475, "Beijing 1954 / Gauss-Kruger 15N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21476, "epsg", 21476, "Beijing 1954 / Gauss-Kruger 16N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21477, "epsg", 21477, "Beijing 1954 / Gauss-Kruger 17N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21478, "epsg", 21478, "Beijing 1954 / Gauss-Kruger 18N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21479, "epsg", 21479, "Beijing 1954 / Gauss-Kruger 19N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21480, "epsg", 21480, "Beijing 1954 / Gauss-Kruger 20N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21481, "epsg", 21481, "Beijing 1954 / Gauss-Kruger 21N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21482, "epsg", 21482, "Beijing 1954 / Gauss-Kruger 22N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21483, "epsg", 21483, "Beijing 1954 / Gauss-Kruger 23N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 21500, "epsg", 21500, "Belge 1950 (Brussels) / Belge Lambert 50", + "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=0 +x_0=150000 +y_0=5400000 +ellps=intl +pm=brussels +units=m +no_defs"}, + { + 21780, "epsg", 21780, "Bern 1898 (Bern) / LV03C", + "+proj=somerc +lat_0=46.95240555555556 +lon_0=0 +x_0=0 +y_0=0 +ellps=bessel +pm=bern +units=m +no_defs"}, + { + 21781, "epsg", 21781, "CH1903 / LV03", + "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"}, + { + 21817, "epsg", 21817, "Bogota 1975 / UTM zone 17N (deprecated)", + "+proj=utm +zone=17 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21818, "epsg", 21818, "Bogota 1975 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21891, "epsg", 21891, "Bogota 1975 / Colombia West zone (deprecated)", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21892, "epsg", 21892, "Bogota 1975 / Colombia Bogota zone (deprecated)", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21893, "epsg", 21893, + "Bogota 1975 / Colombia East Central zone (deprecated)", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21894, "epsg", 21894, "Bogota 1975 / Colombia East (deprecated)", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21896, "epsg", 21896, "Bogota 1975 / Colombia West zone", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21897, "epsg", 21897, "Bogota 1975 / Colombia Bogota zone", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21898, "epsg", 21898, "Bogota 1975 / Colombia East Central zone", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 21899, "epsg", 21899, "Bogota 1975 / Colombia East", + "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs"}, + { + 22032, "epsg", 22032, "Camacupa / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=clrk80 +units=m +no_defs"}, + { + 22033, "epsg", 22033, "Camacupa / UTM zone 33S", + "+proj=utm +zone=33 +south +ellps=clrk80 +units=m +no_defs"}, + { + 22091, "epsg", 22091, "Camacupa / TM 11.30 SE", + "+proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 22092, "epsg", 22092, "Camacupa / TM 12 SE", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs"}, + { + 22171, "epsg", 22171, "POSGAR 98 / Argentina 1", + "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22172, "epsg", 22172, "POSGAR 98 / Argentina 2", + "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22173, "epsg", 22173, "POSGAR 98 / Argentina 3", + "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22174, "epsg", 22174, "POSGAR 98 / Argentina 4", + "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22175, "epsg", 22175, "POSGAR 98 / Argentina 5", + "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22176, "epsg", 22176, "POSGAR 98 / Argentina 6", + "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22177, "epsg", 22177, "POSGAR 98 / Argentina 7", + "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22181, "epsg", 22181, "POSGAR 94 / Argentina 1", + "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22182, "epsg", 22182, "POSGAR 94 / Argentina 2", + "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22183, "epsg", 22183, "POSGAR 94 / Argentina 3", + "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22184, "epsg", 22184, "POSGAR 94 / Argentina 4", + "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22185, "epsg", 22185, "POSGAR 94 / Argentina 5", + "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22186, "epsg", 22186, "POSGAR 94 / Argentina 6", + "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22187, "epsg", 22187, "POSGAR 94 / Argentina 7", + "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 22191, "epsg", 22191, "Campo Inchauspe / Argentina 1", + "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22192, "epsg", 22192, "Campo Inchauspe / Argentina 2", + "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22193, "epsg", 22193, "Campo Inchauspe / Argentina 3", + "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22194, "epsg", 22194, "Campo Inchauspe / Argentina 4", + "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22195, "epsg", 22195, "Campo Inchauspe / Argentina 5", + "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22196, "epsg", 22196, "Campo Inchauspe / Argentina 6", + "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22197, "epsg", 22197, "Campo Inchauspe / Argentina 7", + "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 22234, "epsg", 22234, "Cape / UTM zone 34S", + "+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs"}, + { + 22235, "epsg", 22235, "Cape / UTM zone 35S", + "+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs"}, + { + 22236, "epsg", 22236, "Cape / UTM zone 36S", + "+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs"}, + { + 22332, "epsg", 22332, "Carthage / UTM zone 32N", + "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22391, "epsg", 22391, "Carthage / Nord Tunisie", + "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22392, "epsg", 22392, "Carthage / Sud Tunisie", + "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=9.9 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22521, "epsg", 22521, "Corrego Alegre / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs"}, + { + 22522, "epsg", 22522, "Corrego Alegre / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs"}, + { + 22523, "epsg", 22523, "Corrego Alegre / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs"}, + { + 22524, "epsg", 22524, "Corrego Alegre / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs"}, + { + 22525, "epsg", 22525, "Corrego Alegre / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs"}, + { + 22700, "epsg", 22700, "Deir ez Zor / Levant Zone", + "+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22770, "epsg", 22770, "Deir ez Zor / Syria Lambert", + "+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22780, "epsg", 22780, "Deir ez Zor / Levant Stereographic", + "+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22832, "epsg", 22832, "Douala / UTM zone 32N (deprecated)", + "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 22991, "epsg", 22991, "Egypt 1907 / Blue Belt", + "+proj=tmerc +lat_0=30 +lon_0=35 +k=1 +x_0=300000 +y_0=1100000 +ellps=helmert +units=m +no_defs"}, + { + 22992, "epsg", 22992, "Egypt 1907 / Red Belt", + "+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +units=m +no_defs"}, + { + 22993, "epsg", 22993, "Egypt 1907 / Purple Belt", + "+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=200000 +ellps=helmert +units=m +no_defs"}, + { + 22994, "epsg", 22994, "Egypt 1907 / Extended Purple Belt", + "+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=1200000 +ellps=helmert +units=m +no_defs"}, + { + 23028, "epsg", 23028, "ED50 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=intl +units=m +no_defs"}, + { + 23029, "epsg", 23029, "ED50 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=intl +units=m +no_defs"}, + { + 23030, "epsg", 23030, "ED50 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=intl +units=m +no_defs"}, + { + 23031, "epsg", 23031, "ED50 / UTM zone 31N", + "+proj=utm +zone=31 +ellps=intl +units=m +no_defs"}, + { + 23032, "epsg", 23032, "ED50 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=intl +units=m +no_defs"}, + { + 23033, "epsg", 23033, "ED50 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=intl +units=m +no_defs"}, + { + 23034, "epsg", 23034, "ED50 / UTM zone 34N", + "+proj=utm +zone=34 +ellps=intl +units=m +no_defs"}, + { + 23035, "epsg", 23035, "ED50 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=intl +units=m +no_defs"}, + { + 23036, "epsg", 23036, "ED50 / UTM zone 36N", + "+proj=utm +zone=36 +ellps=intl +units=m +no_defs"}, + { + 23037, "epsg", 23037, "ED50 / UTM zone 37N", + "+proj=utm +zone=37 +ellps=intl +units=m +no_defs"}, + { + 23038, "epsg", 23038, "ED50 / UTM zone 38N", + "+proj=utm +zone=38 +ellps=intl +units=m +no_defs"}, + { + 23090, "epsg", 23090, "ED50 / TM 0 N", + "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 23095, "epsg", 23095, "ED50 / TM 5 NE", + "+proj=tmerc +lat_0=0 +lon_0=5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"}, + { + 23239, "epsg", 23239, "Fahud / UTM zone 39N", + "+proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs"}, + { + 23240, "epsg", 23240, "Fahud / UTM zone 40N", + "+proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs"}, + { + 23433, "epsg", 23433, "Garoua / UTM zone 33N (deprecated)", + "+proj=utm +zone=33 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 23700, "epsg", 23700, "HD72 / EOV", + "+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs"}, + { + 23830, "epsg", 23830, "DGN95 / Indonesia TM-3 zone 46.2", + "+proj=tmerc +lat_0=0 +lon_0=94.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23831, "epsg", 23831, "DGN95 / Indonesia TM-3 zone 47.1", + "+proj=tmerc +lat_0=0 +lon_0=97.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23832, "epsg", 23832, "DGN95 / Indonesia TM-3 zone 47.2", + "+proj=tmerc +lat_0=0 +lon_0=100.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23833, "epsg", 23833, "DGN95 / Indonesia TM-3 zone 48.1", + "+proj=tmerc +lat_0=0 +lon_0=103.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23834, "epsg", 23834, "DGN95 / Indonesia TM-3 zone 48.2", + "+proj=tmerc +lat_0=0 +lon_0=106.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23835, "epsg", 23835, "DGN95 / Indonesia TM-3 zone 49.1", + "+proj=tmerc +lat_0=0 +lon_0=109.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23836, "epsg", 23836, "DGN95 / Indonesia TM-3 zone 49.2", + "+proj=tmerc +lat_0=0 +lon_0=112.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23837, "epsg", 23837, "DGN95 / Indonesia TM-3 zone 50.1", + "+proj=tmerc +lat_0=0 +lon_0=115.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23838, "epsg", 23838, "DGN95 / Indonesia TM-3 zone 50.2", + "+proj=tmerc +lat_0=0 +lon_0=118.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23839, "epsg", 23839, "DGN95 / Indonesia TM-3 zone 51.1", + "+proj=tmerc +lat_0=0 +lon_0=121.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23840, "epsg", 23840, "DGN95 / Indonesia TM-3 zone 51.2", + "+proj=tmerc +lat_0=0 +lon_0=124.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23841, "epsg", 23841, "DGN95 / Indonesia TM-3 zone 52.1", + "+proj=tmerc +lat_0=0 +lon_0=127.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23842, "epsg", 23842, "DGN95 / Indonesia TM-3 zone 52.2", + "+proj=tmerc +lat_0=0 +lon_0=130.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23843, "epsg", 23843, "DGN95 / Indonesia TM-3 zone 53.1", + "+proj=tmerc +lat_0=0 +lon_0=133.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23844, "epsg", 23844, "DGN95 / Indonesia TM-3 zone 53.2", + "+proj=tmerc +lat_0=0 +lon_0=136.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23845, "epsg", 23845, "DGN95 / Indonesia TM-3 zone 54.1", + "+proj=tmerc +lat_0=0 +lon_0=139.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23846, "epsg", 23846, "ID74 / UTM zone 46N", + "+proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23847, "epsg", 23847, "ID74 / UTM zone 47N", + "+proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23848, "epsg", 23848, "ID74 / UTM zone 48N", + "+proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23849, "epsg", 23849, "ID74 / UTM zone 49N", + "+proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23850, "epsg", 23850, "ID74 / UTM zone 50N", + "+proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23851, "epsg", 23851, "ID74 / UTM zone 51N", + "+proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23852, "epsg", 23852, "ID74 / UTM zone 52N", + "+proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23853, "epsg", 23853, "ID74 / UTM zone 53N (deprecated)", + "+proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23866, "epsg", 23866, "DGN95 / UTM zone 46N", + "+proj=utm +zone=46 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23867, "epsg", 23867, "DGN95 / UTM zone 47N", + "+proj=utm +zone=47 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23868, "epsg", 23868, "DGN95 / UTM zone 48N", + "+proj=utm +zone=48 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23869, "epsg", 23869, "DGN95 / UTM zone 49N", + "+proj=utm +zone=49 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23870, "epsg", 23870, "DGN95 / UTM zone 50N", + "+proj=utm +zone=50 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23871, "epsg", 23871, "DGN95 / UTM zone 51N", + "+proj=utm +zone=51 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23872, "epsg", 23872, "DGN95 / UTM zone 52N", + "+proj=utm +zone=52 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23877, "epsg", 23877, "DGN95 / UTM zone 47S", + "+proj=utm +zone=47 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23878, "epsg", 23878, "DGN95 / UTM zone 48S", + "+proj=utm +zone=48 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23879, "epsg", 23879, "DGN95 / UTM zone 49S", + "+proj=utm +zone=49 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23880, "epsg", 23880, "DGN95 / UTM zone 50S", + "+proj=utm +zone=50 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23881, "epsg", 23881, "DGN95 / UTM zone 51S", + "+proj=utm +zone=51 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23882, "epsg", 23882, "DGN95 / UTM zone 52S", + "+proj=utm +zone=52 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23883, "epsg", 23883, "DGN95 / UTM zone 53S", + "+proj=utm +zone=53 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23884, "epsg", 23884, "DGN95 / UTM zone 54S", + "+proj=utm +zone=54 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 23886, "epsg", 23886, "ID74 / UTM zone 46S (deprecated)", + "+proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23887, "epsg", 23887, "ID74 / UTM zone 47S", + "+proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23888, "epsg", 23888, "ID74 / UTM zone 48S", + "+proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23889, "epsg", 23889, "ID74 / UTM zone 49S", + "+proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23890, "epsg", 23890, "ID74 / UTM zone 50S", + "+proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23891, "epsg", 23891, "ID74 / UTM zone 51S", + "+proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23892, "epsg", 23892, "ID74 / UTM zone 52S", + "+proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23893, "epsg", 23893, "ID74 / UTM zone 53S", + "+proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23894, "epsg", 23894, "ID74 / UTM zone 54S", + "+proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs"}, + { + 23946, "epsg", 23946, "Indian 1954 / UTM zone 46N", + "+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs"}, + { + 23947, "epsg", 23947, "Indian 1954 / UTM zone 47N", + "+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs"}, + { + 23948, "epsg", 23948, "Indian 1954 / UTM zone 48N", + "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs"}, + { + 24047, "epsg", 24047, "Indian 1975 / UTM zone 47N", + "+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 24048, "epsg", 24048, "Indian 1975 / UTM zone 48N", + "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 24100, "epsg", 24100, "Jamaica 1875 / Jamaica (Old Grid)", + "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167638.49597 +y_0=121918.90616 +ellps=clrk80 +to_meter=0.3047972654 +no_defs"}, + { + 24200, "epsg", 24200, "JAD69 / Jamaica National Grid", + "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250000 +y_0=150000 +ellps=clrk66 +units=m +no_defs"}, + { + 24305, "epsg", 24305, "Kalianpur 1937 / UTM zone 45N", + "+proj=utm +zone=45 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 24306, "epsg", 24306, "Kalianpur 1937 / UTM zone 46N", + "+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 24311, "epsg", 24311, "Kalianpur 1962 / UTM zone 41N", + "+proj=utm +zone=41 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs"}, + { + 24312, "epsg", 24312, "Kalianpur 1962 / UTM zone 42N", + "+proj=utm +zone=42 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs"}, + { + 24313, "epsg", 24313, "Kalianpur 1962 / UTM zone 43N", + "+proj=utm +zone=43 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs"}, + { + 24342, "epsg", 24342, "Kalianpur 1975 / UTM zone 42N", + "+proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24343, "epsg", 24343, "Kalianpur 1975 / UTM zone 43N", + "+proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24344, "epsg", 24344, "Kalianpur 1975 / UTM zone 44N", + "+proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24345, "epsg", 24345, "Kalianpur 1975 / UTM zone 45N", + "+proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24346, "epsg", 24346, "Kalianpur 1975 / UTM zone 46N", + "+proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24347, "epsg", 24347, "Kalianpur 1975 / UTM zone 47N", + "+proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24370, "epsg", 24370, "Kalianpur 1880 / India zone 0", + "+proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377299.36559538 +b=6356098.357204818 +to_meter=0.9143985307444408 +no_defs"}, + { + 24371, "epsg", 24371, "Kalianpur 1880 / India zone I", + "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204818 +to_meter=0.9143985307444408 +no_defs"}, + { + 24372, "epsg", 24372, "Kalianpur 1880 / India zone IIa", + "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204818 +to_meter=0.9143985307444408 +no_defs"}, + { + 24373, "epsg", 24373, "Kalianpur 1880 / India zone III", + "+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204818 +to_meter=0.9143985307444408 +no_defs"}, + { + 24374, "epsg", 24374, "Kalianpur 1880 / India zone IV", + "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204818 +to_meter=0.9143985307444408 +no_defs"}, + { + 24375, "epsg", 24375, "Kalianpur 1937 / India zone IIb", + "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs"}, + { + 24376, "epsg", 24376, "Kalianpur 1962 / India zone I", + "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs"}, + { + 24377, "epsg", 24377, "Kalianpur 1962 / India zone IIa", + "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs"}, + { + 24378, "epsg", 24378, "Kalianpur 1975 / India zone I", + "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24379, "epsg", 24379, "Kalianpur 1975 / India zone IIa", + "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24380, "epsg", 24380, "Kalianpur 1975 / India zone IIb", + "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24381, "epsg", 24381, "Kalianpur 1975 / India zone III", + "+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24382, "epsg", 24382, "Kalianpur 1880 / India zone IIb", + "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204818 +to_meter=0.9143985307444408 +no_defs"}, + { + 24383, "epsg", 24383, "Kalianpur 1975 / India zone IV", + "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"}, + { + 24500, "epsg", 24500, "Kertau 1968 / Singapore Grid", + "+proj=cass +lat_0=1.287646666666667 +lon_0=103.8530022222222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs"}, + { + 24547, "epsg", 24547, "Kertau 1968 / UTM zone 47N", + "+proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs"}, + { + 24548, "epsg", 24548, "Kertau 1968 / UTM zone 48N", + "+proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs"}, + { + 24571, "epsg", 24571, "Kertau / R.S.O. Malaya (ch) (deprecated)", + "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804671.2997750348 +y_0=0 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_defs"}, + { + 24600, "epsg", 24600, "KOC Lambert", + "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +towgs84=-294.7,-200.1,525.5,0,0,0,0 +units=m +no_defs"}, + { + 24718, "epsg", 24718, "La Canoa / UTM zone 18N", + "+proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs"}, + { + 24719, "epsg", 24719, "La Canoa / UTM zone 19N", + "+proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs"}, + { + 24720, "epsg", 24720, "La Canoa / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs"}, + { + 24817, "epsg", 24817, "PSAD56 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=intl +units=m +no_defs"}, + { + 24818, "epsg", 24818, "PSAD56 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=intl +units=m +no_defs"}, + { + 24819, "epsg", 24819, "PSAD56 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=intl +units=m +no_defs"}, + { + 24820, "epsg", 24820, "PSAD56 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +units=m +no_defs"}, + { + 24821, "epsg", 24821, "PSAD56 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=intl +units=m +no_defs"}, + { + 24877, "epsg", 24877, "PSAD56 / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=intl +units=m +no_defs"}, + { + 24878, "epsg", 24878, "PSAD56 / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=intl +units=m +no_defs"}, + { + 24879, "epsg", 24879, "PSAD56 / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs"}, + { + 24880, "epsg", 24880, "PSAD56 / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=intl +units=m +no_defs"}, + { + 24881, "epsg", 24881, "PSAD56 / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=intl +units=m +no_defs"}, + { + 24882, "epsg", 24882, "PSAD56 / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=intl +units=m +no_defs"}, + { + 24891, "epsg", 24891, "PSAD56 / Peru west zone", + "+proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.99983008 +x_0=222000 +y_0=1426834.743 +ellps=intl +units=m +no_defs"}, + { + 24892, "epsg", 24892, "PSAD56 / Peru central zone", + "+proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.99932994 +x_0=720000 +y_0=1039979.159 +ellps=intl +units=m +no_defs"}, + { + 24893, "epsg", 24893, "PSAD56 / Peru east zone", + "+proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.99952992 +x_0=1324000 +y_0=1040084.558 +ellps=intl +units=m +no_defs"}, + { + 25000, "epsg", 25000, "Leigon / Ghana Metre Grid", + "+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.99975 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +units=m +no_defs"}, + { + 25231, "epsg", 25231, "Lome / UTM zone 31N", + "+proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 25391, "epsg", 25391, "Luzon 1911 / Philippines zone I", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 25392, "epsg", 25392, "Luzon 1911 / Philippines zone II", + "+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 25393, "epsg", 25393, "Luzon 1911 / Philippines zone III", + "+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 25394, "epsg", 25394, "Luzon 1911 / Philippines zone IV", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 25395, "epsg", 25395, "Luzon 1911 / Philippines zone V", + "+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs"}, + { + 25700, "epsg", 25700, "Makassar (Jakarta) / NEIEZ (deprecated)", + "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +units=m +no_defs"}, + { + 25828, "epsg", 25828, "ETRS89 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=GRS80 +units=m +no_defs"}, + { + 25829, "epsg", 25829, "ETRS89 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=GRS80 +units=m +no_defs"}, + { + 25830, "epsg", 25830, "ETRS89 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs"}, + { + 25831, "epsg", 25831, "ETRS89 / UTM zone 31N", + "+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs"}, + { + 25832, "epsg", 25832, "ETRS89 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs"}, + { + 25833, "epsg", 25833, "ETRS89 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs"}, + { + 25834, "epsg", 25834, "ETRS89 / UTM zone 34N", + "+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs"}, + { + 25835, "epsg", 25835, "ETRS89 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs"}, + { + 25836, "epsg", 25836, "ETRS89 / UTM zone 36N", + "+proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs"}, + { + 25837, "epsg", 25837, "ETRS89 / UTM zone 37N", + "+proj=utm +zone=37 +ellps=GRS80 +units=m +no_defs"}, + { + 25838, "epsg", 25838, "ETRS89 / UTM zone 38N", + "+proj=utm +zone=38 +ellps=GRS80 +units=m +no_defs"}, + { + 25884, "epsg", 25884, "ETRS89 / TM Baltic93", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 25932, "epsg", 25932, "Malongo 1987 / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs"}, + { + 26191, "epsg", 26191, "Merchich / Nord Maroc", + "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs"}, + { + 26192, "epsg", 26192, "Merchich / Sud Maroc", + "+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs"}, + { + 26193, "epsg", 26193, "Merchich / Sahara (deprecated)", + "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs"}, + { + 26194, "epsg", 26194, "Merchich / Sahara Nord", + "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999616304 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs"}, + { + 26195, "epsg", 26195, "Merchich / Sahara Sud", + "+proj=lcc +lat_1=22.5 +lat_0=22.5 +lon_0=-5.4 +k_0=0.999616437 +x_0=1500000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs"}, + { + 26237, "epsg", 26237, "Massawa / UTM zone 37N", + "+proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0,0,0 +units=m +no_defs"}, + { + 26331, "epsg", 26331, "Minna / UTM zone 31N", + "+proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs"}, + { + 26332, "epsg", 26332, "Minna / UTM zone 32N", + "+proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs"}, + { + 26391, "epsg", 26391, "Minna / Nigeria West Belt", + "+proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.99975 +x_0=230738.26 +y_0=0 +ellps=clrk80 +units=m +no_defs"}, + { + 26392, "epsg", 26392, "Minna / Nigeria Mid Belt", + "+proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.99975 +x_0=670553.98 +y_0=0 +ellps=clrk80 +units=m +no_defs"}, + { + 26393, "epsg", 26393, "Minna / Nigeria East Belt", + "+proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.99975 +x_0=1110369.7 +y_0=0 +ellps=clrk80 +units=m +no_defs"}, + { + 26432, "epsg", 26432, "Mhast / UTM zone 32S (deprecated)", + "+proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +units=m +no_defs"}, + { + 26591, "epsg", 26591, "Monte Mario (Rome) / Italy zone 1 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-3.45233333333333 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs"}, + { + 26592, "epsg", 26592, "Monte Mario (Rome) / Italy zone 2 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=2.54766666666666 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs"}, + { + 26632, "epsg", 26632, "M'poraloko / UTM zone 32N", + "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 26692, "epsg", 26692, "M'poraloko / UTM zone 32S", + "+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 26701, "epsg", 26701, "NAD27 / UTM zone 1N", + "+proj=utm +zone=1 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26702, "epsg", 26702, "NAD27 / UTM zone 2N", + "+proj=utm +zone=2 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26703, "epsg", 26703, "NAD27 / UTM zone 3N", + "+proj=utm +zone=3 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26704, "epsg", 26704, "NAD27 / UTM zone 4N", + "+proj=utm +zone=4 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26705, "epsg", 26705, "NAD27 / UTM zone 5N", + "+proj=utm +zone=5 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26706, "epsg", 26706, "NAD27 / UTM zone 6N", + "+proj=utm +zone=6 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26707, "epsg", 26707, "NAD27 / UTM zone 7N", + "+proj=utm +zone=7 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26708, "epsg", 26708, "NAD27 / UTM zone 8N", + "+proj=utm +zone=8 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26709, "epsg", 26709, "NAD27 / UTM zone 9N", + "+proj=utm +zone=9 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26710, "epsg", 26710, "NAD27 / UTM zone 10N", + "+proj=utm +zone=10 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26711, "epsg", 26711, "NAD27 / UTM zone 11N", + "+proj=utm +zone=11 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26712, "epsg", 26712, "NAD27 / UTM zone 12N", + "+proj=utm +zone=12 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26713, "epsg", 26713, "NAD27 / UTM zone 13N", + "+proj=utm +zone=13 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26714, "epsg", 26714, "NAD27 / UTM zone 14N", + "+proj=utm +zone=14 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26715, "epsg", 26715, "NAD27 / UTM zone 15N", + "+proj=utm +zone=15 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26716, "epsg", 26716, "NAD27 / UTM zone 16N", + "+proj=utm +zone=16 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26717, "epsg", 26717, "NAD27 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26718, "epsg", 26718, "NAD27 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26719, "epsg", 26719, "NAD27 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26720, "epsg", 26720, "NAD27 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26721, "epsg", 26721, "NAD27 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26722, "epsg", 26722, "NAD27 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 26729, "epsg", 26729, "NAD27 / Alabama East", + "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26730, "epsg", 26730, "NAD27 / Alabama West", + "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26731, "epsg", 26731, "NAD27 / Alaska zone 1", + "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5000000.001016002 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26732, "epsg", 26732, "NAD27 / Alaska zone 2", + "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26733, "epsg", 26733, "NAD27 / Alaska zone 3", + "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26734, "epsg", 26734, "NAD27 / Alaska zone 4", + "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26735, "epsg", 26735, "NAD27 / Alaska zone 5", + "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26736, "epsg", 26736, "NAD27 / Alaska zone 6", + "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26737, "epsg", 26737, "NAD27 / Alaska zone 7", + "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=213360.4267208534 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26738, "epsg", 26738, "NAD27 / Alaska zone 8", + "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26739, "epsg", 26739, "NAD27 / Alaska zone 9", + "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26740, "epsg", 26740, "NAD27 / Alaska zone 10", + "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26741, "epsg", 26741, "NAD27 / California zone I", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26742, "epsg", 26742, "NAD27 / California zone II", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26743, "epsg", 26743, "NAD27 / California zone III", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26744, "epsg", 26744, "NAD27 / California zone IV", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26745, "epsg", 26745, "NAD27 / California zone V", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26746, "epsg", 26746, "NAD27 / California zone VI", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26747, "epsg", 26747, "NAD27 / California zone VII (deprecated)", + "+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=127079.524511049 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26748, "epsg", 26748, "NAD27 / Arizona East", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26749, "epsg", 26749, "NAD27 / Arizona Central", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26750, "epsg", 26750, "NAD27 / Arizona West", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26751, "epsg", 26751, "NAD27 / Arkansas North", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26752, "epsg", 26752, "NAD27 / Arkansas South", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26753, "epsg", 26753, "NAD27 / Colorado North", + "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26754, "epsg", 26754, "NAD27 / Colorado Central", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26755, "epsg", 26755, "NAD27 / Colorado South", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26756, "epsg", 26756, "NAD27 / Connecticut", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26757, "epsg", 26757, "NAD27 / Delaware", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26758, "epsg", 26758, "NAD27 / Florida East", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26759, "epsg", 26759, "NAD27 / Florida West", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26760, "epsg", 26760, "NAD27 / Florida North", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26766, "epsg", 26766, "NAD27 / Georgia East", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26767, "epsg", 26767, "NAD27 / Georgia West", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26768, "epsg", 26768, "NAD27 / Idaho East", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26769, "epsg", 26769, "NAD27 / Idaho Central", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26770, "epsg", 26770, "NAD27 / Idaho West", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26771, "epsg", 26771, "NAD27 / Illinois East", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26772, "epsg", 26772, "NAD27 / Illinois West", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26773, "epsg", 26773, "NAD27 / Indiana East", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26774, "epsg", 26774, "NAD27 / Indiana West", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26775, "epsg", 26775, "NAD27 / Iowa North", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26776, "epsg", 26776, "NAD27 / Iowa South", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26777, "epsg", 26777, "NAD27 / Kansas North", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26778, "epsg", 26778, "NAD27 / Kansas South", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26779, "epsg", 26779, "NAD27 / Kentucky North", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26780, "epsg", 26780, "NAD27 / Kentucky South", + "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26781, "epsg", 26781, "NAD27 / Louisiana North", + "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26782, "epsg", 26782, "NAD27 / Louisiana South", + "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26783, "epsg", 26783, "NAD27 / Maine East", + "+proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26784, "epsg", 26784, "NAD27 / Maine West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26785, "epsg", 26785, "NAD27 / Maryland", + "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26786, "epsg", 26786, "NAD27 / Massachusetts Mainland", + "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26787, "epsg", 26787, "NAD27 / Massachusetts Island", + "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26791, "epsg", 26791, "NAD27 / Minnesota North", + "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26792, "epsg", 26792, "NAD27 / Minnesota Central", + "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26793, "epsg", 26793, "NAD27 / Minnesota South", + "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26794, "epsg", 26794, "NAD27 / Mississippi East", + "+proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26795, "epsg", 26795, "NAD27 / Mississippi West", + "+proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26796, "epsg", 26796, "NAD27 / Missouri East", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26797, "epsg", 26797, "NAD27 / Missouri Central", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26798, "epsg", 26798, "NAD27 / Missouri West", + "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26799, "epsg", 26799, "NAD27 / California zone VII", + "+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=1268253.006858014 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 26801, "epsg", 26801, "NAD Michigan / Michigan East", + "+proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.999942857 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs"}, + { + 26802, "epsg", 26802, "NAD Michigan / Michigan Old Central", + "+proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs"}, + { + 26803, "epsg", 26803, "NAD Michigan / Michigan West", + "+proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs"}, + { + 26811, "epsg", 26811, "NAD Michigan / Michigan North", + "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs"}, + { + 26812, "epsg", 26812, "NAD Michigan / Michigan Central", + "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs"}, + { + 26813, "epsg", 26813, "NAD Michigan / Michigan South", + "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs"}, + { + 26901, "epsg", 26901, "NAD83 / UTM zone 1N", + "+proj=utm +zone=1 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26902, "epsg", 26902, "NAD83 / UTM zone 2N", + "+proj=utm +zone=2 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26903, "epsg", 26903, "NAD83 / UTM zone 3N", + "+proj=utm +zone=3 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26904, "epsg", 26904, "NAD83 / UTM zone 4N", + "+proj=utm +zone=4 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26905, "epsg", 26905, "NAD83 / UTM zone 5N", + "+proj=utm +zone=5 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26906, "epsg", 26906, "NAD83 / UTM zone 6N", + "+proj=utm +zone=6 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26907, "epsg", 26907, "NAD83 / UTM zone 7N", + "+proj=utm +zone=7 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26908, "epsg", 26908, "NAD83 / UTM zone 8N", + "+proj=utm +zone=8 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26909, "epsg", 26909, "NAD83 / UTM zone 9N", + "+proj=utm +zone=9 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26910, "epsg", 26910, "NAD83 / UTM zone 10N", + "+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26911, "epsg", 26911, "NAD83 / UTM zone 11N", + "+proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26912, "epsg", 26912, "NAD83 / UTM zone 12N", + "+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26913, "epsg", 26913, "NAD83 / UTM zone 13N", + "+proj=utm +zone=13 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26914, "epsg", 26914, "NAD83 / UTM zone 14N", + "+proj=utm +zone=14 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26915, "epsg", 26915, "NAD83 / UTM zone 15N", + "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26916, "epsg", 26916, "NAD83 / UTM zone 16N", + "+proj=utm +zone=16 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26917, "epsg", 26917, "NAD83 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26918, "epsg", 26918, "NAD83 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26919, "epsg", 26919, "NAD83 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26920, "epsg", 26920, "NAD83 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26921, "epsg", 26921, "NAD83 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26922, "epsg", 26922, "NAD83 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26923, "epsg", 26923, "NAD83 / UTM zone 23N", + "+proj=utm +zone=23 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26929, "epsg", 26929, "NAD83 / Alabama East", + "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26930, "epsg", 26930, "NAD83 / Alabama West", + "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26931, "epsg", 26931, "NAD83 / Alaska zone 1", + "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26932, "epsg", 26932, "NAD83 / Alaska zone 2", + "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26933, "epsg", 26933, "NAD83 / Alaska zone 3", + "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26934, "epsg", 26934, "NAD83 / Alaska zone 4", + "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26935, "epsg", 26935, "NAD83 / Alaska zone 5", + "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26936, "epsg", 26936, "NAD83 / Alaska zone 6", + "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26937, "epsg", 26937, "NAD83 / Alaska zone 7", + "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26938, "epsg", 26938, "NAD83 / Alaska zone 8", + "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26939, "epsg", 26939, "NAD83 / Alaska zone 9", + "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26940, "epsg", 26940, "NAD83 / Alaska zone 10", + "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26941, "epsg", 26941, "NAD83 / California zone 1", + "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26942, "epsg", 26942, "NAD83 / California zone 2", + "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26943, "epsg", 26943, "NAD83 / California zone 3", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26944, "epsg", 26944, "NAD83 / California zone 4", + "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26945, "epsg", 26945, "NAD83 / California zone 5", + "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26946, "epsg", 26946, "NAD83 / California zone 6", + "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26948, "epsg", 26948, "NAD83 / Arizona East", + "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26949, "epsg", 26949, "NAD83 / Arizona Central", + "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26950, "epsg", 26950, "NAD83 / Arizona West", + "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26951, "epsg", 26951, "NAD83 / Arkansas North", + "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26952, "epsg", 26952, "NAD83 / Arkansas South", + "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26953, "epsg", 26953, "NAD83 / Colorado North", + "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26954, "epsg", 26954, "NAD83 / Colorado Central", + "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26955, "epsg", 26955, "NAD83 / Colorado South", + "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26956, "epsg", 26956, "NAD83 / Connecticut", + "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26957, "epsg", 26957, "NAD83 / Delaware", + "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26958, "epsg", 26958, "NAD83 / Florida East", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26959, "epsg", 26959, "NAD83 / Florida West", + "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26960, "epsg", 26960, "NAD83 / Florida North", + "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26961, "epsg", 26961, "NAD83 / Hawaii zone 1", + "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26962, "epsg", 26962, "NAD83 / Hawaii zone 2", + "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26963, "epsg", 26963, "NAD83 / Hawaii zone 3", + "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26964, "epsg", 26964, "NAD83 / Hawaii zone 4", + "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26965, "epsg", 26965, "NAD83 / Hawaii zone 5", + "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26966, "epsg", 26966, "NAD83 / Georgia East", + "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26967, "epsg", 26967, "NAD83 / Georgia West", + "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26968, "epsg", 26968, "NAD83 / Idaho East", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26969, "epsg", 26969, "NAD83 / Idaho Central", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26970, "epsg", 26970, "NAD83 / Idaho West", + "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26971, "epsg", 26971, "NAD83 / Illinois East", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26972, "epsg", 26972, "NAD83 / Illinois West", + "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26973, "epsg", 26973, "NAD83 / Indiana East", + "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26974, "epsg", 26974, "NAD83 / Indiana West", + "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26975, "epsg", 26975, "NAD83 / Iowa North", + "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26976, "epsg", 26976, "NAD83 / Iowa South", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26977, "epsg", 26977, "NAD83 / Kansas North", + "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26978, "epsg", 26978, "NAD83 / Kansas South", + "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26979, "epsg", 26979, "NAD83 / Kentucky North (deprecated)", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26980, "epsg", 26980, "NAD83 / Kentucky South", + "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26981, "epsg", 26981, "NAD83 / Louisiana North", + "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26982, "epsg", 26982, "NAD83 / Louisiana South", + "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26983, "epsg", 26983, "NAD83 / Maine East", + "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26984, "epsg", 26984, "NAD83 / Maine West", + "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26985, "epsg", 26985, "NAD83 / Maryland", + "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26986, "epsg", 26986, "NAD83 / Massachusetts Mainland", + "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26987, "epsg", 26987, "NAD83 / Massachusetts Island", + "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26988, "epsg", 26988, "NAD83 / Michigan North", + "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26989, "epsg", 26989, "NAD83 / Michigan Central", + "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26990, "epsg", 26990, "NAD83 / Michigan South", + "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26991, "epsg", 26991, "NAD83 / Minnesota North", + "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26992, "epsg", 26992, "NAD83 / Minnesota Central", + "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26993, "epsg", 26993, "NAD83 / Minnesota South", + "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26994, "epsg", 26994, "NAD83 / Mississippi East", + "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26995, "epsg", 26995, "NAD83 / Mississippi West", + "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26996, "epsg", 26996, "NAD83 / Missouri East", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26997, "epsg", 26997, "NAD83 / Missouri Central", + "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 26998, "epsg", 26998, "NAD83 / Missouri West", + "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 27037, "epsg", 27037, "Nahrwan 1967 / UTM zone 37N", + "+proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs"}, + { + 27038, "epsg", 27038, "Nahrwan 1967 / UTM zone 38N", + "+proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs"}, + { + 27039, "epsg", 27039, "Nahrwan 1967 / UTM zone 39N", + "+proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs"}, + { + 27040, "epsg", 27040, "Nahrwan 1967 / UTM zone 40N", + "+proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs"}, + { + 27120, "epsg", 27120, "Naparima 1972 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=intl +units=m +no_defs"}, + { + 27200, "epsg", 27200, "NZGD49 / New Zealand Map Grid", + "+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27205, "epsg", 27205, "NZGD49 / Mount Eden Circuit", + "+proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393611111 +k=0.9999 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27206, "epsg", 27206, "NZGD49 / Bay of Plenty Circuit", + "+proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.46619725 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27207, "epsg", 27207, "NZGD49 / Poverty Bay Circuit", + "+proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27208, "epsg", 27208, "NZGD49 / Hawkes Bay Circuit", + "+proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805277778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27209, "epsg", 27209, "NZGD49 / Taranaki Circuit", + "+proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.22801175 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27210, "epsg", 27210, "NZGD49 / Tuhirangi Circuit", + "+proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27211, "epsg", 27211, "NZGD49 / Wanganui Circuit", + "+proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27212, "epsg", 27212, "NZGD49 / Wairarapa Circuit", + "+proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27213, "epsg", 27213, "NZGD49 / Wellington Circuit", + "+proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27214, "epsg", 27214, "NZGD49 / Collingwood Circuit", + "+proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27215, "epsg", 27215, "NZGD49 / Nelson Circuit", + "+proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168055555 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27216, "epsg", 27216, "NZGD49 / Karamea Circuit", + "+proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27217, "epsg", 27217, "NZGD49 / Buller Circuit", + "+proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600555556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27218, "epsg", 27218, "NZGD49 / Grey Circuit", + "+proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27219, "epsg", 27219, "NZGD49 / Amuri Circuit", + "+proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333888889 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27220, "epsg", 27220, "NZGD49 / Marlborough Circuit", + "+proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27221, "epsg", 27221, "NZGD49 / Hokitika Circuit", + "+proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27222, "epsg", 27222, "NZGD49 / Okarito Circuit", + "+proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27223, "epsg", 27223, "NZGD49 / Jacksons Bay Circuit", + "+proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27224, "epsg", 27224, "NZGD49 / Mount Pleasant Circuit", + "+proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27225, "epsg", 27225, "NZGD49 / Gawler Circuit", + "+proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484722222 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27226, "epsg", 27226, "NZGD49 / Timaru Circuit", + "+proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27227, "epsg", 27227, "NZGD49 / Lindis Peak Circuit", + "+proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27228, "epsg", 27228, "NZGD49 / Mount Nicholas Circuit", + "+proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27229, "epsg", 27229, "NZGD49 / Mount York Circuit", + "+proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27230, "epsg", 27230, "NZGD49 / Observation Point Circuit", + "+proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27231, "epsg", 27231, "NZGD49 / North Taieri Circuit", + "+proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891111111 +k=0.99996 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27232, "epsg", 27232, "NZGD49 / Bluff Circuit", + "+proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 +k=1 +x_0=300002.66 +y_0=699999.58 +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27258, "epsg", 27258, "NZGD49 / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27259, "epsg", 27259, "NZGD49 / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27260, "epsg", 27260, "NZGD49 / UTM zone 60S", + "+proj=utm +zone=60 +south +ellps=intl +datum=nzgd49 +units=m +no_defs"}, + { + 27291, "epsg", 27291, "NZGD49 / North Island Grid", + "+proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1 +x_0=274319.5243848086 +y_0=365759.3658464114 +ellps=intl +datum=nzgd49 +to_meter=0.9143984146160287 +no_defs"}, + { + 27292, "epsg", 27292, "NZGD49 / South Island Grid", + "+proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1 +x_0=457199.2073080143 +y_0=457199.2073080143 +ellps=intl +datum=nzgd49 +to_meter=0.9143984146160287 +no_defs"}, + { + 27391, "epsg", 27391, "NGO 1948 (Oslo) / NGO zone I", + "+proj=tmerc +lat_0=58 +lon_0=-4.666666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27392, "epsg", 27392, "NGO 1948 (Oslo) / NGO zone II", + "+proj=tmerc +lat_0=58 +lon_0=-2.333333333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27393, "epsg", 27393, "NGO 1948 (Oslo) / NGO zone III", + "+proj=tmerc +lat_0=58 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27394, "epsg", 27394, "NGO 1948 (Oslo) / NGO zone IV", + "+proj=tmerc +lat_0=58 +lon_0=2.5 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27395, "epsg", 27395, "NGO 1948 (Oslo) / NGO zone V", + "+proj=tmerc +lat_0=58 +lon_0=6.166666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27396, "epsg", 27396, "NGO 1948 (Oslo) / NGO zone VI", + "+proj=tmerc +lat_0=58 +lon_0=10.16666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27397, "epsg", 27397, "NGO 1948 (Oslo) / NGO zone VII", + "+proj=tmerc +lat_0=58 +lon_0=14.16666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27398, "epsg", 27398, "NGO 1948 (Oslo) / NGO zone VIII", + "+proj=tmerc +lat_0=58 +lon_0=18.33333333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs"}, + { + 27429, "epsg", 27429, "Datum 73 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=intl +units=m +no_defs"}, + { + 27492, "epsg", 27492, "Datum 73 / Modified Portuguese Grid", + "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs"}, + { + 27500, "epsg", 27500, "ATF (Paris) / Nord de Guerre", + "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=5.399999999999999 +k_0=0.99950908 +x_0=500000 +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=paris +units=m +no_defs"}, + { + 27561, "epsg", 27561, "NTF (Paris) / Lambert Nord France", + "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27562, "epsg", 27562, "NTF (Paris) / Lambert Centre France", + "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27563, "epsg", 27563, "NTF (Paris) / Lambert Sud France", + "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27564, "epsg", 27564, "NTF (Paris) / Lambert Corse", + "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27571, "epsg", 27571, "NTF (Paris) / Lambert zone I", + "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27572, "epsg", 27572, "NTF (Paris) / Lambert zone II", + "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27573, "epsg", 27573, "NTF (Paris) / Lambert zone III", + "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27574, "epsg", 27574, "NTF (Paris) / Lambert zone IV", + "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27581, "epsg", 27581, "NTF (Paris) / France I (deprecated)", + "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27582, "epsg", 27582, "NTF (Paris) / France II (deprecated)", + "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27583, "epsg", 27583, "NTF (Paris) / France III (deprecated)", + "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27584, "epsg", 27584, "NTF (Paris) / France IV (deprecated)", + "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27591, "epsg", 27591, "NTF (Paris) / Nord France (deprecated)", + "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27592, "epsg", 27592, "NTF (Paris) / Centre France (deprecated)", + "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27593, "epsg", 27593, "NTF (Paris) / Sud France (deprecated)", + "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27594, "epsg", 27594, "NTF (Paris) / Corse (deprecated)", + "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 27700, "epsg", 27700, "OSGB 1936 / British National Grid", + "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"}, + { + 28191, "epsg", 28191, "Palestine 1923 / Palestine Grid", + "+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs"}, + { + 28192, "epsg", 28192, "Palestine 1923 / Palestine Belt", + "+proj=tmerc +lat_0=31.73409694444445 +lon_0=35.21208055555556 +k=1 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs"}, + { + 28193, "epsg", 28193, "Palestine 1923 / Israeli CS Grid", + "+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs"}, + { + 28232, "epsg", 28232, "Pointe Noire / UTM zone 32S", + "+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 28348, "epsg", 28348, "GDA94 / MGA zone 48", + "+proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28349, "epsg", 28349, "GDA94 / MGA zone 49", + "+proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28350, "epsg", 28350, "GDA94 / MGA zone 50", + "+proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28351, "epsg", 28351, "GDA94 / MGA zone 51", + "+proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28352, "epsg", 28352, "GDA94 / MGA zone 52", + "+proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28353, "epsg", 28353, "GDA94 / MGA zone 53", + "+proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28354, "epsg", 28354, "GDA94 / MGA zone 54", + "+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28355, "epsg", 28355, "GDA94 / MGA zone 55", + "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28356, "epsg", 28356, "GDA94 / MGA zone 56", + "+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28357, "epsg", 28357, "GDA94 / MGA zone 57", + "+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28358, "epsg", 28358, "GDA94 / MGA zone 58", + "+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 28402, "epsg", 28402, "Pulkovo 1942 / Gauss-Kruger zone 2", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28403, "epsg", 28403, "Pulkovo 1942 / Gauss-Kruger zone 3", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28404, "epsg", 28404, "Pulkovo 1942 / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28405, "epsg", 28405, "Pulkovo 1942 / Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28406, "epsg", 28406, "Pulkovo 1942 / Gauss-Kruger zone 6", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28407, "epsg", 28407, "Pulkovo 1942 / Gauss-Kruger zone 7", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28408, "epsg", 28408, "Pulkovo 1942 / Gauss-Kruger zone 8", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28409, "epsg", 28409, "Pulkovo 1942 / Gauss-Kruger zone 9", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28410, "epsg", 28410, "Pulkovo 1942 / Gauss-Kruger zone 10", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28411, "epsg", 28411, "Pulkovo 1942 / Gauss-Kruger zone 11", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28412, "epsg", 28412, "Pulkovo 1942 / Gauss-Kruger zone 12", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28413, "epsg", 28413, "Pulkovo 1942 / Gauss-Kruger zone 13", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28414, "epsg", 28414, "Pulkovo 1942 / Gauss-Kruger zone 14", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28415, "epsg", 28415, "Pulkovo 1942 / Gauss-Kruger zone 15", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28416, "epsg", 28416, "Pulkovo 1942 / Gauss-Kruger zone 16", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28417, "epsg", 28417, "Pulkovo 1942 / Gauss-Kruger zone 17", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28418, "epsg", 28418, "Pulkovo 1942 / Gauss-Kruger zone 18", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28419, "epsg", 28419, "Pulkovo 1942 / Gauss-Kruger zone 19", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28420, "epsg", 28420, "Pulkovo 1942 / Gauss-Kruger zone 20", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28421, "epsg", 28421, "Pulkovo 1942 / Gauss-Kruger zone 21", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28422, "epsg", 28422, "Pulkovo 1942 / Gauss-Kruger zone 22", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28423, "epsg", 28423, "Pulkovo 1942 / Gauss-Kruger zone 23", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28424, "epsg", 28424, "Pulkovo 1942 / Gauss-Kruger zone 24", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28425, "epsg", 28425, "Pulkovo 1942 / Gauss-Kruger zone 25", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28426, "epsg", 28426, "Pulkovo 1942 / Gauss-Kruger zone 26", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28427, "epsg", 28427, "Pulkovo 1942 / Gauss-Kruger zone 27", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28428, "epsg", 28428, "Pulkovo 1942 / Gauss-Kruger zone 28", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28429, "epsg", 28429, "Pulkovo 1942 / Gauss-Kruger zone 29", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28430, "epsg", 28430, "Pulkovo 1942 / Gauss-Kruger zone 30", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28431, "epsg", 28431, "Pulkovo 1942 / Gauss-Kruger zone 31", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28432, "epsg", 28432, "Pulkovo 1942 / Gauss-Kruger zone 32", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28462, "epsg", 28462, "Pulkovo 1942 / Gauss-Kruger 2N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28463, "epsg", 28463, "Pulkovo 1942 / Gauss-Kruger 3N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28464, "epsg", 28464, "Pulkovo 1942 / Gauss-Kruger 4N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28465, "epsg", 28465, "Pulkovo 1942 / Gauss-Kruger 5N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28466, "epsg", 28466, "Pulkovo 1942 / Gauss-Kruger 6N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28467, "epsg", 28467, "Pulkovo 1942 / Gauss-Kruger 7N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28468, "epsg", 28468, "Pulkovo 1942 / Gauss-Kruger 8N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28469, "epsg", 28469, "Pulkovo 1942 / Gauss-Kruger 9N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28470, "epsg", 28470, "Pulkovo 1942 / Gauss-Kruger 10N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28471, "epsg", 28471, "Pulkovo 1942 / Gauss-Kruger 11N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28472, "epsg", 28472, "Pulkovo 1942 / Gauss-Kruger 12N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28473, "epsg", 28473, "Pulkovo 1942 / Gauss-Kruger 13N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28474, "epsg", 28474, "Pulkovo 1942 / Gauss-Kruger 14N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28475, "epsg", 28475, "Pulkovo 1942 / Gauss-Kruger 15N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28476, "epsg", 28476, "Pulkovo 1942 / Gauss-Kruger 16N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28477, "epsg", 28477, "Pulkovo 1942 / Gauss-Kruger 17N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28478, "epsg", 28478, "Pulkovo 1942 / Gauss-Kruger 18N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28479, "epsg", 28479, "Pulkovo 1942 / Gauss-Kruger 19N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28480, "epsg", 28480, "Pulkovo 1942 / Gauss-Kruger 20N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28481, "epsg", 28481, "Pulkovo 1942 / Gauss-Kruger 21N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28482, "epsg", 28482, "Pulkovo 1942 / Gauss-Kruger 22N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28483, "epsg", 28483, "Pulkovo 1942 / Gauss-Kruger 23N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28484, "epsg", 28484, "Pulkovo 1942 / Gauss-Kruger 24N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28485, "epsg", 28485, "Pulkovo 1942 / Gauss-Kruger 25N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28486, "epsg", 28486, "Pulkovo 1942 / Gauss-Kruger 26N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28487, "epsg", 28487, "Pulkovo 1942 / Gauss-Kruger 27N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28488, "epsg", 28488, "Pulkovo 1942 / Gauss-Kruger 28N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28489, "epsg", 28489, "Pulkovo 1942 / Gauss-Kruger 29N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28490, "epsg", 28490, "Pulkovo 1942 / Gauss-Kruger 30N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28491, "epsg", 28491, "Pulkovo 1942 / Gauss-Kruger 31N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28492, "epsg", 28492, "Pulkovo 1942 / Gauss-Kruger 32N (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs"}, + { + 28600, "epsg", 28600, "Qatar 1974 / Qatar National Grid", + "+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs"}, + { + 28991, "epsg", 28991, "Amersfoort / RD Old", + "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 28992, "epsg", 28992, "Amersfoort / RD New", + "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs"}, + { + 29100, "epsg", 29100, "SAD69 / Brazil Polyconic (deprecated)", + "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS67 +units=m +no_defs"}, + { + 29101, "epsg", 29101, "SAD69 / Brazil Polyconic", + "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"}, + { + 29118, "epsg", 29118, "SAD69 / UTM zone 18N (deprecated)", + "+proj=utm +zone=18 +ellps=GRS67 +units=m +no_defs"}, + { + 29119, "epsg", 29119, "SAD69 / UTM zone 19N (deprecated)", + "+proj=utm +zone=19 +ellps=GRS67 +units=m +no_defs"}, + { + 29120, "epsg", 29120, "SAD69 / UTM zone 20N (deprecated)", + "+proj=utm +zone=20 +ellps=GRS67 +units=m +no_defs"}, + { + 29121, "epsg", 29121, "SAD69 / UTM zone 21N (deprecated)", + "+proj=utm +zone=21 +ellps=GRS67 +units=m +no_defs"}, + { + 29122, "epsg", 29122, "SAD69 / UTM zone 22N (deprecated)", + "+proj=utm +zone=22 +ellps=GRS67 +units=m +no_defs"}, + { + 29168, "epsg", 29168, "SAD69 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=aust_SA +units=m +no_defs"}, + { + 29169, "epsg", 29169, "SAD69 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs"}, + { + 29170, "epsg", 29170, "SAD69 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs"}, + { + 29171, "epsg", 29171, "SAD69 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs"}, + { + 29172, "epsg", 29172, "SAD69 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs"}, + { + 29177, "epsg", 29177, "SAD69 / UTM zone 17S (deprecated)", + "+proj=utm +zone=17 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29178, "epsg", 29178, "SAD69 / UTM zone 18S (deprecated)", + "+proj=utm +zone=18 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29179, "epsg", 29179, "SAD69 / UTM zone 19S (deprecated)", + "+proj=utm +zone=19 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29180, "epsg", 29180, "SAD69 / UTM zone 20S (deprecated)", + "+proj=utm +zone=20 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29181, "epsg", 29181, "SAD69 / UTM zone 21S (deprecated)", + "+proj=utm +zone=21 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29182, "epsg", 29182, "SAD69 / UTM zone 22S (deprecated)", + "+proj=utm +zone=22 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29183, "epsg", 29183, "SAD69 / UTM zone 23S (deprecated)", + "+proj=utm +zone=23 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29184, "epsg", 29184, "SAD69 / UTM zone 24S (deprecated)", + "+proj=utm +zone=24 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29185, "epsg", 29185, "SAD69 / UTM zone 25S (deprecated)", + "+proj=utm +zone=25 +south +ellps=GRS67 +units=m +no_defs"}, + { + 29187, "epsg", 29187, "SAD69 / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29188, "epsg", 29188, "SAD69 / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29189, "epsg", 29189, "SAD69 / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29190, "epsg", 29190, "SAD69 / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29191, "epsg", 29191, "SAD69 / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29192, "epsg", 29192, "SAD69 / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29193, "epsg", 29193, "SAD69 / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29194, "epsg", 29194, "SAD69 / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29195, "epsg", 29195, "SAD69 / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}, + { + 29220, "epsg", 29220, "Sapper Hill 1943 / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs"}, + { + 29221, "epsg", 29221, "Sapper Hill 1943 / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs"}, + { + 29333, "epsg", 29333, "Schwarzeck / UTM zone 33S", + "+proj=utm +zone=33 +south +ellps=bess_nam +units=m +no_defs"}, + { + 29635, "epsg", 29635, "Sudan / UTM zone 35N (deprecated)", + "+proj=utm +zone=35 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 29636, "epsg", 29636, "Sudan / UTM zone 36N (deprecated)", + "+proj=utm +zone=36 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 29700, "epsg", 29700, "Tananarive (Paris) / Laborde Grid (deprecated)", + "+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 29702, "epsg", 29702, "Tananarive (Paris) / Laborde Grid approximation", + "+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs"}, + { + 29738, "epsg", 29738, "Tananarive / UTM zone 38S", + "+proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs"}, + { + 29739, "epsg", 29739, "Tananarive / UTM zone 39S", + "+proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs"}, + { + 29849, "epsg", 29849, "Timbalai 1948 / UTM zone 49N", + "+proj=utm +zone=49 +ellps=evrstSS +units=m +no_defs"}, + { + 29850, "epsg", 29850, "Timbalai 1948 / UTM zone 50N", + "+proj=utm +zone=50 +ellps=evrstSS +units=m +no_defs"}, + { + 29871, "epsg", 29871, "Timbalai 1948 / RSO Borneo (ch)", + "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 +ellps=evrstSS +to_meter=20.11676512155263 +no_defs"}, + { + 29872, "epsg", 29872, "Timbalai 1948 / RSO Borneo (ft)", + "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985 +ellps=evrstSS +to_meter=0.3047994715386762 +no_defs"}, + { + 29873, "epsg", 29873, "Timbalai 1948 / RSO Borneo (m)", + "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +units=m +no_defs"}, + { + 29900, "epsg", 29900, "TM65 / Irish National Grid (deprecated)", + "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs"}, + { + 29901, "epsg", 29901, "OSNI 1952 / Irish National Grid", + "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1 +x_0=200000 +y_0=250000 +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs"}, + { + 29902, "epsg", 29902, "TM65 / Irish Grid", + "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs"}, + { + 29903, "epsg", 29903, "TM75 / Irish Grid", + "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs"}, + { + 30161, "epsg", 30161, "Tokyo / Japan Plane Rectangular CS I", + "+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30162, "epsg", 30162, "Tokyo / Japan Plane Rectangular CS II", + "+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30163, "epsg", 30163, "Tokyo / Japan Plane Rectangular CS III", + "+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30164, "epsg", 30164, "Tokyo / Japan Plane Rectangular CS IV", + "+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30165, "epsg", 30165, "Tokyo / Japan Plane Rectangular CS V", + "+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30166, "epsg", 30166, "Tokyo / Japan Plane Rectangular CS VI", + "+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30167, "epsg", 30167, "Tokyo / Japan Plane Rectangular CS VII", + "+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30168, "epsg", 30168, "Tokyo / Japan Plane Rectangular CS VIII", + "+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30169, "epsg", 30169, "Tokyo / Japan Plane Rectangular CS IX", + "+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30170, "epsg", 30170, "Tokyo / Japan Plane Rectangular CS X", + "+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30171, "epsg", 30171, "Tokyo / Japan Plane Rectangular CS XI", + "+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30172, "epsg", 30172, "Tokyo / Japan Plane Rectangular CS XII", + "+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30173, "epsg", 30173, "Tokyo / Japan Plane Rectangular CS XIII", + "+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30174, "epsg", 30174, "Tokyo / Japan Plane Rectangular CS XIV", + "+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30175, "epsg", 30175, "Tokyo / Japan Plane Rectangular CS XV", + "+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30176, "epsg", 30176, "Tokyo / Japan Plane Rectangular CS XVI", + "+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30177, "epsg", 30177, "Tokyo / Japan Plane Rectangular CS XVII", + "+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30178, "epsg", 30178, "Tokyo / Japan Plane Rectangular CS XVIII", + "+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30179, "epsg", 30179, "Tokyo / Japan Plane Rectangular CS XIX", + "+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 30200, "epsg", 30200, "Trinidad 1903 / Trinidad Grid", + "+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392051999 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164 +no_defs"}, + { + 30339, "epsg", 30339, "TC(1948) / UTM zone 39N", + "+proj=utm +zone=39 +ellps=helmert +units=m +no_defs"}, + { + 30340, "epsg", 30340, "TC(1948) / UTM zone 40N", + "+proj=utm +zone=40 +ellps=helmert +units=m +no_defs"}, + { + 30491, "epsg", 30491, "Voirol 1875 / Nord Algerie (ancienne)", + "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs"}, + { + 30492, "epsg", 30492, "Voirol 1875 / Sud Algerie (ancienne)", + "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs"}, + { + 30493, "epsg", 30493, "Voirol 1879 / Nord Algerie (ancienne)", + "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 30494, "epsg", 30494, "Voirol 1879 / Sud Algerie (ancienne)", + "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 30729, "epsg", 30729, "Nord Sahara 1959 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs"}, + { + 30730, "epsg", 30730, "Nord Sahara 1959 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs"}, + { + 30731, "epsg", 30731, "Nord Sahara 1959 / UTM zone 31N", + "+proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs"}, + { + 30732, "epsg", 30732, "Nord Sahara 1959 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs"}, + { + 30791, "epsg", 30791, "Nord Sahara 1959 / Voirol Unifie Nord", + "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs"}, + { + 30792, "epsg", 30792, "Nord Sahara 1959 / Voirol Unifie Sud", + "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs"}, + { + 30800, "epsg", 30800, "RT38 2.5 gon W (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"}, + { + 31028, "epsg", 31028, "Yoff / UTM zone 28N", + "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +units=m +no_defs"}, + { + 31121, "epsg", 31121, "Zanderij / UTM zone 21N", + "+proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs"}, + { + 31154, "epsg", 31154, "Zanderij / TM 54 NW", + "+proj=tmerc +lat_0=0 +lon_0=-54 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs"}, + { + 31170, "epsg", 31170, "Zanderij / Suriname Old TM", + "+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs"}, + { + 31171, "epsg", 31171, "Zanderij / Suriname TM", + "+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9999 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs"}, + { + 31251, "epsg", 31251, "MGI (Ferro) / Austria GK West Zone", + "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31252, "epsg", 31252, "MGI (Ferro) / Austria GK Central Zone", + "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31253, "epsg", 31253, "MGI (Ferro) / Austria GK East Zone", + "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31254, "epsg", 31254, "MGI / Austria GK West", + "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31255, "epsg", 31255, "MGI / Austria GK Central", + "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31256, "epsg", 31256, "MGI / Austria GK East", + "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31257, "epsg", 31257, "MGI / Austria GK M28", + "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31258, "epsg", 31258, "MGI / Austria GK M31", + "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31259, "epsg", 31259, "MGI / Austria GK M34", + "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31265, "epsg", 31265, "MGI / 3-degree Gauss zone 5 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31266, "epsg", 31266, "MGI / 3-degree Gauss zone 6 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31267, "epsg", 31267, "MGI / 3-degree Gauss zone 7 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31268, "epsg", 31268, "MGI / 3-degree Gauss zone 8 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31275, "epsg", 31275, "MGI / Balkans zone 5", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31276, "epsg", 31276, "MGI / Balkans zone 6", + "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31277, "epsg", 31277, "MGI / Balkans zone 7", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31278, "epsg", 31278, "MGI / Balkans zone 8 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31279, "epsg", 31279, "MGI / Balkans zone 8", + "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31281, "epsg", 31281, "MGI (Ferro) / Austria West Zone", + "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31282, "epsg", 31282, "MGI (Ferro) / Austria Central Zone", + "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31283, "epsg", 31283, "MGI (Ferro) / Austria East Zone", + "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31284, "epsg", 31284, "MGI / Austria M28", + "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31285, "epsg", 31285, "MGI / Austria M31", + "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31286, "epsg", 31286, "MGI / Austria M34", + "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31287, "epsg", 31287, "MGI / Austria Lambert", + "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31288, "epsg", 31288, "MGI (Ferro) / M28", + "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31289, "epsg", 31289, "MGI (Ferro) / M31", + "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31290, "epsg", 31290, "MGI (Ferro) / M34", + "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31291, "epsg", 31291, "MGI (Ferro) / Austria West Zone (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31292, "epsg", 31292, "MGI (Ferro) / Austria Central Zone (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31293, "epsg", 31293, "MGI (Ferro) / Austria East Zone (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"}, + { + 31294, "epsg", 31294, "MGI / M28 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31295, "epsg", 31295, "MGI / M31 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31296, "epsg", 31296, "MGI / M34 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31297, "epsg", 31297, "MGI / Austria Lambert (deprecated)", + "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"}, + { + 31300, "epsg", 31300, "Belge 1972 / Belge Lambert 72", + "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +units=m +no_defs"}, + { + 31370, "epsg", 31370, "Belge 1972 / Belgian Lambert 72", + "+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +units=m +no_defs"}, + { + 31461, "epsg", 31461, "DHDN / 3-degree Gauss zone 1 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31462, "epsg", 31462, "DHDN / 3-degree Gauss zone 2 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31463, "epsg", 31463, "DHDN / 3-degree Gauss zone 3 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31464, "epsg", 31464, "DHDN / 3-degree Gauss zone 4 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31465, "epsg", 31465, "DHDN / 3-degree Gauss zone 5 (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31466, "epsg", 31466, "DHDN / Gauss-Kruger zone 2", + "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31467, "epsg", 31467, "DHDN / Gauss-Kruger zone 3", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31468, "epsg", 31468, "DHDN / Gauss-Kruger zone 4", + "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31469, "epsg", 31469, "DHDN / Gauss-Kruger zone 5", + "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"}, + { + 31528, "epsg", 31528, "Conakry 1905 / UTM zone 28N", + "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs"}, + { + 31529, "epsg", 31529, "Conakry 1905 / UTM zone 29N", + "+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs"}, + { + 31600, "epsg", 31600, "Dealul Piscului 1933/ Stereo 33", + "+proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9996667 +x_0=500000 +y_0=500000 +ellps=intl +units=m +no_defs"}, + { + 31700, "epsg", 31700, "Dealul Piscului 1970/ Stereo 70", + "+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs"}, + { + 31838, "epsg", 31838, "NGN / UTM zone 38N", + "+proj=utm +zone=38 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +units=m +no_defs"}, + { + 31839, "epsg", 31839, "NGN / UTM zone 39N", + "+proj=utm +zone=39 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +units=m +no_defs"}, + { + 31900, "epsg", 31900, "KUDAMS / KTM (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=48 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 31901, "epsg", 31901, "KUDAMS / KTM", + "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}, + { + 31965, "epsg", 31965, "SIRGAS 2000 / UTM zone 11N", + "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31966, "epsg", 31966, "SIRGAS 2000 / UTM zone 12N", + "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31967, "epsg", 31967, "SIRGAS 2000 / UTM zone 13N", + "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31968, "epsg", 31968, "SIRGAS 2000 / UTM zone 14N", + "+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31969, "epsg", 31969, "SIRGAS 2000 / UTM zone 15N", + "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31970, "epsg", 31970, "SIRGAS 2000 / UTM zone 16N", + "+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31971, "epsg", 31971, "SIRGAS 2000 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31972, "epsg", 31972, "SIRGAS 2000 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31973, "epsg", 31973, "SIRGAS 2000 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31974, "epsg", 31974, "SIRGAS 2000 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31975, "epsg", 31975, "SIRGAS 2000 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31976, "epsg", 31976, "SIRGAS 2000 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31977, "epsg", 31977, "SIRGAS 2000 / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31978, "epsg", 31978, "SIRGAS 2000 / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31979, "epsg", 31979, "SIRGAS 2000 / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31980, "epsg", 31980, "SIRGAS 2000 / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31981, "epsg", 31981, "SIRGAS 2000 / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31982, "epsg", 31982, "SIRGAS 2000 / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31983, "epsg", 31983, "SIRGAS 2000 / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31984, "epsg", 31984, "SIRGAS 2000 / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31985, "epsg", 31985, "SIRGAS 2000 / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31986, "epsg", 31986, "SIRGAS / UTM zone 17N", + "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31987, "epsg", 31987, "SIRGAS / UTM zone 18N", + "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31988, "epsg", 31988, "SIRGAS / UTM zone 19N", + "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31989, "epsg", 31989, "SIRGAS / UTM zone 20N", + "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31990, "epsg", 31990, "SIRGAS / UTM zone 21N", + "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31991, "epsg", 31991, "SIRGAS / UTM zone 22N", + "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31992, "epsg", 31992, "SIRGAS / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31993, "epsg", 31993, "SIRGAS / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31994, "epsg", 31994, "SIRGAS / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31995, "epsg", 31995, "SIRGAS / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31996, "epsg", 31996, "SIRGAS / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31997, "epsg", 31997, "SIRGAS / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31998, "epsg", 31998, "SIRGAS / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 31999, "epsg", 31999, "SIRGAS / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 32000, "epsg", 32000, "SIRGAS / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}, + { + 32001, "epsg", 32001, "NAD27 / Montana North", + "+proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=47 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32002, "epsg", 32002, "NAD27 / Montana Central", + "+proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=45.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32003, "epsg", 32003, "NAD27 / Montana South", + "+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32005, "epsg", 32005, "NAD27 / Nebraska North", + "+proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=41.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32006, "epsg", 32006, "NAD27 / Nebraska South", + "+proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32007, "epsg", 32007, "NAD27 / Nevada East", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32008, "epsg", 32008, "NAD27 / Nevada Central", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32009, "epsg", 32009, "NAD27 / Nevada West", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32010, "epsg", 32010, "NAD27 / New Hampshire", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32011, "epsg", 32011, "NAD27 / New Jersey", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666666667 +k=0.9999749999999999 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32012, "epsg", 32012, "NAD27 / New Mexico East", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32013, "epsg", 32013, "NAD27 / New Mexico Central", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32014, "epsg", 32014, "NAD27 / New Mexico West", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32015, "epsg", 32015, "NAD27 / New York East", + "+proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32016, "epsg", 32016, "NAD27 / New York Central", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32017, "epsg", 32017, "NAD27 / New York West", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32018, "epsg", 32018, "NAD27 / New York Long Island", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32019, "epsg", 32019, "NAD27 / North Carolina", + "+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32020, "epsg", 32020, "NAD27 / North Dakota North", + "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32021, "epsg", 32021, "NAD27 / North Dakota South", + "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32022, "epsg", 32022, "NAD27 / Ohio North", + "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32023, "epsg", 32023, "NAD27 / Ohio South", + "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32024, "epsg", 32024, "NAD27 / Oklahoma North", + "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32025, "epsg", 32025, "NAD27 / Oklahoma South", + "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32026, "epsg", 32026, "NAD27 / Oregon North", + "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32027, "epsg", 32027, "NAD27 / Oregon South", + "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32028, "epsg", 32028, "NAD27 / Pennsylvania North", + "+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32029, "epsg", 32029, "NAD27 / Pennsylvania South", + "+proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32030, "epsg", 32030, "NAD27 / Rhode Island", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9999938 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32031, "epsg", 32031, "NAD27 / South Carolina North", + "+proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32033, "epsg", 32033, "NAD27 / South Carolina South", + "+proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32034, "epsg", 32034, "NAD27 / South Dakota North", + "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32035, "epsg", 32035, "NAD27 / South Dakota South", + "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32036, "epsg", 32036, "NAD27 / Tennessee (deprecated)", + "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32037, "epsg", 32037, "NAD27 / Texas North", + "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32038, "epsg", 32038, "NAD27 / Texas North Central", + "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32039, "epsg", 32039, "NAD27 / Texas Central", + "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32040, "epsg", 32040, "NAD27 / Texas South Central", + "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32041, "epsg", 32041, "NAD27 / Texas South", + "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32042, "epsg", 32042, "NAD27 / Utah North", + "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32043, "epsg", 32043, "NAD27 / Utah Central", + "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32044, "epsg", 32044, "NAD27 / Utah South", + "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32045, "epsg", 32045, "NAD27 / Vermont", + "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32046, "epsg", 32046, "NAD27 / Virginia North", + "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32047, "epsg", 32047, "NAD27 / Virginia South", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32048, "epsg", 32048, "NAD27 / Washington North", + "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32049, "epsg", 32049, "NAD27 / Washington South", + "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32050, "epsg", 32050, "NAD27 / West Virginia North", + "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32051, "epsg", 32051, "NAD27 / West Virginia South", + "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32052, "epsg", 32052, "NAD27 / Wisconsin North", + "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32053, "epsg", 32053, "NAD27 / Wisconsin Central", + "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32054, "epsg", 32054, "NAD27 / Wisconsin South", + "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32055, "epsg", 32055, "NAD27 / Wyoming East", + "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32056, "epsg", 32056, "NAD27 / Wyoming East Central", + "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32057, "epsg", 32057, "NAD27 / Wyoming West Central", + "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32058, "epsg", 32058, "NAD27 / Wyoming West", + "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32061, "epsg", 32061, "NAD27 / Guatemala Norte", + "+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=500000 +y_0=292209.579 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32062, "epsg", 32062, "NAD27 / Guatemala Sur", + "+proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32064, "epsg", 32064, "NAD27 / BLM 14N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32065, "epsg", 32065, "NAD27 / BLM 15N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32066, "epsg", 32066, "NAD27 / BLM 16N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32067, "epsg", 32067, "NAD27 / BLM 17N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32074, "epsg", 32074, "NAD27 / BLM 14N (feet) (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32075, "epsg", 32075, "NAD27 / BLM 15N (feet) (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32076, "epsg", 32076, "NAD27 / BLM 16N (feet) (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32077, "epsg", 32077, "NAD27 / BLM 17N (feet) (deprecated)", + "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32081, "epsg", 32081, "NAD27 / MTM zone 1", + "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32082, "epsg", 32082, "NAD27 / MTM zone 2", + "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32083, "epsg", 32083, "NAD27 / MTM zone 3", + "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32084, "epsg", 32084, "NAD27 / MTM zone 4", + "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32085, "epsg", 32085, "NAD27 / MTM zone 5", + "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32086, "epsg", 32086, "NAD27 / MTM zone 6", + "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32098, "epsg", 32098, "NAD27 / Quebec Lambert", + "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"}, + { + 32099, "epsg", 32099, "NAD27 / Louisiana Offshore", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"}, + { + 32100, "epsg", 32100, "NAD83 / Montana", + "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32104, "epsg", 32104, "NAD83 / Nebraska", + "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32107, "epsg", 32107, "NAD83 / Nevada East", + "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32108, "epsg", 32108, "NAD83 / Nevada Central", + "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32109, "epsg", 32109, "NAD83 / Nevada West", + "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32110, "epsg", 32110, "NAD83 / New Hampshire", + "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32111, "epsg", 32111, "NAD83 / New Jersey", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32112, "epsg", 32112, "NAD83 / New Mexico East", + "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32113, "epsg", 32113, "NAD83 / New Mexico Central", + "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32114, "epsg", 32114, "NAD83 / New Mexico West", + "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32115, "epsg", 32115, "NAD83 / New York East", + "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32116, "epsg", 32116, "NAD83 / New York Central", + "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32117, "epsg", 32117, "NAD83 / New York West", + "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32118, "epsg", 32118, "NAD83 / New York Long Island", + "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32119, "epsg", 32119, "NAD83 / North Carolina", + "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32120, "epsg", 32120, "NAD83 / North Dakota North", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32121, "epsg", 32121, "NAD83 / North Dakota South", + "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32122, "epsg", 32122, "NAD83 / Ohio North", + "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32123, "epsg", 32123, "NAD83 / Ohio South", + "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32124, "epsg", 32124, "NAD83 / Oklahoma North", + "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32125, "epsg", 32125, "NAD83 / Oklahoma South", + "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32126, "epsg", 32126, "NAD83 / Oregon North", + "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32127, "epsg", 32127, "NAD83 / Oregon South", + "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32128, "epsg", 32128, "NAD83 / Pennsylvania North", + "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32129, "epsg", 32129, "NAD83 / Pennsylvania South", + "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32130, "epsg", 32130, "NAD83 / Rhode Island", + "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32133, "epsg", 32133, "NAD83 / South Carolina", + "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32134, "epsg", 32134, "NAD83 / South Dakota North", + "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32135, "epsg", 32135, "NAD83 / South Dakota South", + "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32136, "epsg", 32136, "NAD83 / Tennessee", + "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32137, "epsg", 32137, "NAD83 / Texas North", + "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32138, "epsg", 32138, "NAD83 / Texas North Central", + "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32139, "epsg", 32139, "NAD83 / Texas Central", + "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32140, "epsg", 32140, "NAD83 / Texas South Central", + "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32141, "epsg", 32141, "NAD83 / Texas South", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32142, "epsg", 32142, "NAD83 / Utah North", + "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32143, "epsg", 32143, "NAD83 / Utah Central", + "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32144, "epsg", 32144, "NAD83 / Utah South", + "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32145, "epsg", 32145, "NAD83 / Vermont", + "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32146, "epsg", 32146, "NAD83 / Virginia North", + "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32147, "epsg", 32147, "NAD83 / Virginia South", + "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32148, "epsg", 32148, "NAD83 / Washington North", + "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32149, "epsg", 32149, "NAD83 / Washington South", + "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32150, "epsg", 32150, "NAD83 / West Virginia North", + "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32151, "epsg", 32151, "NAD83 / West Virginia South", + "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32152, "epsg", 32152, "NAD83 / Wisconsin North", + "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32153, "epsg", 32153, "NAD83 / Wisconsin Central", + "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32154, "epsg", 32154, "NAD83 / Wisconsin South", + "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32155, "epsg", 32155, "NAD83 / Wyoming East", + "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32156, "epsg", 32156, "NAD83 / Wyoming East Central", + "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32157, "epsg", 32157, "NAD83 / Wyoming West Central", + "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32158, "epsg", 32158, "NAD83 / Wyoming West", + "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32161, "epsg", 32161, "NAD83 / Puerto Rico & Virgin Is.", + "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32164, "epsg", 32164, "NAD83 / BLM 14N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 32165, "epsg", 32165, "NAD83 / BLM 15N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 32166, "epsg", 32166, "NAD83 / BLM 16N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 32167, "epsg", 32167, "NAD83 / BLM 17N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"}, + { + 32180, "epsg", 32180, "NAD83 / SCoPQ zone 2", + "+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32181, "epsg", 32181, "NAD83 / MTM zone 1", + "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32182, "epsg", 32182, "NAD83 / MTM zone 2", + "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32183, "epsg", 32183, "NAD83 / MTM zone 3", + "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32184, "epsg", 32184, "NAD83 / MTM zone 4", + "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32185, "epsg", 32185, "NAD83 / MTM zone 5", + "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32186, "epsg", 32186, "NAD83 / MTM zone 6", + "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32187, "epsg", 32187, "NAD83 / MTM zone 7", + "+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32188, "epsg", 32188, "NAD83 / MTM zone 8", + "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32189, "epsg", 32189, "NAD83 / MTM zone 9", + "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32190, "epsg", 32190, "NAD83 / MTM zone 10", + "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32191, "epsg", 32191, "NAD83 / MTM zone 11", + "+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32192, "epsg", 32192, "NAD83 / MTM zone 12", + "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32193, "epsg", 32193, "NAD83 / MTM zone 13", + "+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32194, "epsg", 32194, "NAD83 / MTM zone 14", + "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32195, "epsg", 32195, "NAD83 / MTM zone 15", + "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32196, "epsg", 32196, "NAD83 / MTM zone 16", + "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32197, "epsg", 32197, "NAD83 / MTM zone 17", + "+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32198, "epsg", 32198, "NAD83 / Quebec Lambert", + "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32199, "epsg", 32199, "NAD83 / Louisiana Offshore", + "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"}, + { + 32201, "epsg", 32201, "WGS 72 / UTM zone 1N", + "+proj=utm +zone=1 +ellps=WGS72 +units=m +no_defs"}, + { + 32202, "epsg", 32202, "WGS 72 / UTM zone 2N", + "+proj=utm +zone=2 +ellps=WGS72 +units=m +no_defs"}, + { + 32203, "epsg", 32203, "WGS 72 / UTM zone 3N", + "+proj=utm +zone=3 +ellps=WGS72 +units=m +no_defs"}, + { + 32204, "epsg", 32204, "WGS 72 / UTM zone 4N", + "+proj=utm +zone=4 +ellps=WGS72 +units=m +no_defs"}, + { + 32205, "epsg", 32205, "WGS 72 / UTM zone 5N", + "+proj=utm +zone=5 +ellps=WGS72 +units=m +no_defs"}, + { + 32206, "epsg", 32206, "WGS 72 / UTM zone 6N", + "+proj=utm +zone=6 +ellps=WGS72 +units=m +no_defs"}, + { + 32207, "epsg", 32207, "WGS 72 / UTM zone 7N", + "+proj=utm +zone=7 +ellps=WGS72 +units=m +no_defs"}, + { + 32208, "epsg", 32208, "WGS 72 / UTM zone 8N", + "+proj=utm +zone=8 +ellps=WGS72 +units=m +no_defs"}, + { + 32209, "epsg", 32209, "WGS 72 / UTM zone 9N", + "+proj=utm +zone=9 +ellps=WGS72 +units=m +no_defs"}, + { + 32210, "epsg", 32210, "WGS 72 / UTM zone 10N", + "+proj=utm +zone=10 +ellps=WGS72 +units=m +no_defs"}, + { + 32211, "epsg", 32211, "WGS 72 / UTM zone 11N", + "+proj=utm +zone=11 +ellps=WGS72 +units=m +no_defs"}, + { + 32212, "epsg", 32212, "WGS 72 / UTM zone 12N", + "+proj=utm +zone=12 +ellps=WGS72 +units=m +no_defs"}, + { + 32213, "epsg", 32213, "WGS 72 / UTM zone 13N", + "+proj=utm +zone=13 +ellps=WGS72 +units=m +no_defs"}, + { + 32214, "epsg", 32214, "WGS 72 / UTM zone 14N", + "+proj=utm +zone=14 +ellps=WGS72 +units=m +no_defs"}, + { + 32215, "epsg", 32215, "WGS 72 / UTM zone 15N", + "+proj=utm +zone=15 +ellps=WGS72 +units=m +no_defs"}, + { + 32216, "epsg", 32216, "WGS 72 / UTM zone 16N", + "+proj=utm +zone=16 +ellps=WGS72 +units=m +no_defs"}, + { + 32217, "epsg", 32217, "WGS 72 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=WGS72 +units=m +no_defs"}, + { + 32218, "epsg", 32218, "WGS 72 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=WGS72 +units=m +no_defs"}, + { + 32219, "epsg", 32219, "WGS 72 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=WGS72 +units=m +no_defs"}, + { + 32220, "epsg", 32220, "WGS 72 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=WGS72 +units=m +no_defs"}, + { + 32221, "epsg", 32221, "WGS 72 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=WGS72 +units=m +no_defs"}, + { + 32222, "epsg", 32222, "WGS 72 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=WGS72 +units=m +no_defs"}, + { + 32223, "epsg", 32223, "WGS 72 / UTM zone 23N", + "+proj=utm +zone=23 +ellps=WGS72 +units=m +no_defs"}, + { + 32224, "epsg", 32224, "WGS 72 / UTM zone 24N", + "+proj=utm +zone=24 +ellps=WGS72 +units=m +no_defs"}, + { + 32225, "epsg", 32225, "WGS 72 / UTM zone 25N", + "+proj=utm +zone=25 +ellps=WGS72 +units=m +no_defs"}, + { + 32226, "epsg", 32226, "WGS 72 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=WGS72 +units=m +no_defs"}, + { + 32227, "epsg", 32227, "WGS 72 / UTM zone 27N", + "+proj=utm +zone=27 +ellps=WGS72 +units=m +no_defs"}, + { + 32228, "epsg", 32228, "WGS 72 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=WGS72 +units=m +no_defs"}, + { + 32229, "epsg", 32229, "WGS 72 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=WGS72 +units=m +no_defs"}, + { + 32230, "epsg", 32230, "WGS 72 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=WGS72 +units=m +no_defs"}, + { + 32231, "epsg", 32231, "WGS 72 / UTM zone 31N", + "+proj=utm +zone=31 +ellps=WGS72 +units=m +no_defs"}, + { + 32232, "epsg", 32232, "WGS 72 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=WGS72 +units=m +no_defs"}, + { + 32233, "epsg", 32233, "WGS 72 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=WGS72 +units=m +no_defs"}, + { + 32234, "epsg", 32234, "WGS 72 / UTM zone 34N", + "+proj=utm +zone=34 +ellps=WGS72 +units=m +no_defs"}, + { + 32235, "epsg", 32235, "WGS 72 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=WGS72 +units=m +no_defs"}, + { + 32236, "epsg", 32236, "WGS 72 / UTM zone 36N", + "+proj=utm +zone=36 +ellps=WGS72 +units=m +no_defs"}, + { + 32237, "epsg", 32237, "WGS 72 / UTM zone 37N", + "+proj=utm +zone=37 +ellps=WGS72 +units=m +no_defs"}, + { + 32238, "epsg", 32238, "WGS 72 / UTM zone 38N", + "+proj=utm +zone=38 +ellps=WGS72 +units=m +no_defs"}, + { + 32239, "epsg", 32239, "WGS 72 / UTM zone 39N", + "+proj=utm +zone=39 +ellps=WGS72 +units=m +no_defs"}, + { + 32240, "epsg", 32240, "WGS 72 / UTM zone 40N", + "+proj=utm +zone=40 +ellps=WGS72 +units=m +no_defs"}, + { + 32241, "epsg", 32241, "WGS 72 / UTM zone 41N", + "+proj=utm +zone=41 +ellps=WGS72 +units=m +no_defs"}, + { + 32242, "epsg", 32242, "WGS 72 / UTM zone 42N", + "+proj=utm +zone=42 +ellps=WGS72 +units=m +no_defs"}, + { + 32243, "epsg", 32243, "WGS 72 / UTM zone 43N", + "+proj=utm +zone=43 +ellps=WGS72 +units=m +no_defs"}, + { + 32244, "epsg", 32244, "WGS 72 / UTM zone 44N", + "+proj=utm +zone=44 +ellps=WGS72 +units=m +no_defs"}, + { + 32245, "epsg", 32245, "WGS 72 / UTM zone 45N", + "+proj=utm +zone=45 +ellps=WGS72 +units=m +no_defs"}, + { + 32246, "epsg", 32246, "WGS 72 / UTM zone 46N", + "+proj=utm +zone=46 +ellps=WGS72 +units=m +no_defs"}, + { + 32247, "epsg", 32247, "WGS 72 / UTM zone 47N", + "+proj=utm +zone=47 +ellps=WGS72 +units=m +no_defs"}, + { + 32248, "epsg", 32248, "WGS 72 / UTM zone 48N", + "+proj=utm +zone=48 +ellps=WGS72 +units=m +no_defs"}, + { + 32249, "epsg", 32249, "WGS 72 / UTM zone 49N", + "+proj=utm +zone=49 +ellps=WGS72 +units=m +no_defs"}, + { + 32250, "epsg", 32250, "WGS 72 / UTM zone 50N", + "+proj=utm +zone=50 +ellps=WGS72 +units=m +no_defs"}, + { + 32251, "epsg", 32251, "WGS 72 / UTM zone 51N", + "+proj=utm +zone=51 +ellps=WGS72 +units=m +no_defs"}, + { + 32252, "epsg", 32252, "WGS 72 / UTM zone 52N", + "+proj=utm +zone=52 +ellps=WGS72 +units=m +no_defs"}, + { + 32253, "epsg", 32253, "WGS 72 / UTM zone 53N", + "+proj=utm +zone=53 +ellps=WGS72 +units=m +no_defs"}, + { + 32254, "epsg", 32254, "WGS 72 / UTM zone 54N", + "+proj=utm +zone=54 +ellps=WGS72 +units=m +no_defs"}, + { + 32255, "epsg", 32255, "WGS 72 / UTM zone 55N", + "+proj=utm +zone=55 +ellps=WGS72 +units=m +no_defs"}, + { + 32256, "epsg", 32256, "WGS 72 / UTM zone 56N", + "+proj=utm +zone=56 +ellps=WGS72 +units=m +no_defs"}, + { + 32257, "epsg", 32257, "WGS 72 / UTM zone 57N", + "+proj=utm +zone=57 +ellps=WGS72 +units=m +no_defs"}, + { + 32258, "epsg", 32258, "WGS 72 / UTM zone 58N", + "+proj=utm +zone=58 +ellps=WGS72 +units=m +no_defs"}, + { + 32259, "epsg", 32259, "WGS 72 / UTM zone 59N", + "+proj=utm +zone=59 +ellps=WGS72 +units=m +no_defs"}, + { + 32260, "epsg", 32260, "WGS 72 / UTM zone 60N", + "+proj=utm +zone=60 +ellps=WGS72 +units=m +no_defs"}, + { + 32301, "epsg", 32301, "WGS 72 / UTM zone 1S", + "+proj=utm +zone=1 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32302, "epsg", 32302, "WGS 72 / UTM zone 2S", + "+proj=utm +zone=2 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32303, "epsg", 32303, "WGS 72 / UTM zone 3S", + "+proj=utm +zone=3 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32304, "epsg", 32304, "WGS 72 / UTM zone 4S", + "+proj=utm +zone=4 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32305, "epsg", 32305, "WGS 72 / UTM zone 5S", + "+proj=utm +zone=5 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32306, "epsg", 32306, "WGS 72 / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32307, "epsg", 32307, "WGS 72 / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32308, "epsg", 32308, "WGS 72 / UTM zone 8S", + "+proj=utm +zone=8 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32309, "epsg", 32309, "WGS 72 / UTM zone 9S", + "+proj=utm +zone=9 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32310, "epsg", 32310, "WGS 72 / UTM zone 10S", + "+proj=utm +zone=10 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32311, "epsg", 32311, "WGS 72 / UTM zone 11S", + "+proj=utm +zone=11 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32312, "epsg", 32312, "WGS 72 / UTM zone 12S", + "+proj=utm +zone=12 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32313, "epsg", 32313, "WGS 72 / UTM zone 13S", + "+proj=utm +zone=13 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32314, "epsg", 32314, "WGS 72 / UTM zone 14S", + "+proj=utm +zone=14 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32315, "epsg", 32315, "WGS 72 / UTM zone 15S", + "+proj=utm +zone=15 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32316, "epsg", 32316, "WGS 72 / UTM zone 16S", + "+proj=utm +zone=16 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32317, "epsg", 32317, "WGS 72 / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32318, "epsg", 32318, "WGS 72 / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32319, "epsg", 32319, "WGS 72 / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32320, "epsg", 32320, "WGS 72 / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32321, "epsg", 32321, "WGS 72 / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32322, "epsg", 32322, "WGS 72 / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32323, "epsg", 32323, "WGS 72 / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32324, "epsg", 32324, "WGS 72 / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32325, "epsg", 32325, "WGS 72 / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32326, "epsg", 32326, "WGS 72 / UTM zone 26S", + "+proj=utm +zone=26 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32327, "epsg", 32327, "WGS 72 / UTM zone 27S", + "+proj=utm +zone=27 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32328, "epsg", 32328, "WGS 72 / UTM zone 28S", + "+proj=utm +zone=28 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32329, "epsg", 32329, "WGS 72 / UTM zone 29S", + "+proj=utm +zone=29 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32330, "epsg", 32330, "WGS 72 / UTM zone 30S", + "+proj=utm +zone=30 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32331, "epsg", 32331, "WGS 72 / UTM zone 31S", + "+proj=utm +zone=31 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32332, "epsg", 32332, "WGS 72 / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32333, "epsg", 32333, "WGS 72 / UTM zone 33S", + "+proj=utm +zone=33 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32334, "epsg", 32334, "WGS 72 / UTM zone 34S", + "+proj=utm +zone=34 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32335, "epsg", 32335, "WGS 72 / UTM zone 35S", + "+proj=utm +zone=35 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32336, "epsg", 32336, "WGS 72 / UTM zone 36S", + "+proj=utm +zone=36 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32337, "epsg", 32337, "WGS 72 / UTM zone 37S", + "+proj=utm +zone=37 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32338, "epsg", 32338, "WGS 72 / UTM zone 38S", + "+proj=utm +zone=38 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32339, "epsg", 32339, "WGS 72 / UTM zone 39S", + "+proj=utm +zone=39 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32340, "epsg", 32340, "WGS 72 / UTM zone 40S", + "+proj=utm +zone=40 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32341, "epsg", 32341, "WGS 72 / UTM zone 41S", + "+proj=utm +zone=41 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32342, "epsg", 32342, "WGS 72 / UTM zone 42S", + "+proj=utm +zone=42 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32343, "epsg", 32343, "WGS 72 / UTM zone 43S", + "+proj=utm +zone=43 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32344, "epsg", 32344, "WGS 72 / UTM zone 44S", + "+proj=utm +zone=44 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32345, "epsg", 32345, "WGS 72 / UTM zone 45S", + "+proj=utm +zone=45 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32346, "epsg", 32346, "WGS 72 / UTM zone 46S", + "+proj=utm +zone=46 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32347, "epsg", 32347, "WGS 72 / UTM zone 47S", + "+proj=utm +zone=47 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32348, "epsg", 32348, "WGS 72 / UTM zone 48S", + "+proj=utm +zone=48 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32349, "epsg", 32349, "WGS 72 / UTM zone 49S", + "+proj=utm +zone=49 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32350, "epsg", 32350, "WGS 72 / UTM zone 50S", + "+proj=utm +zone=50 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32351, "epsg", 32351, "WGS 72 / UTM zone 51S", + "+proj=utm +zone=51 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32352, "epsg", 32352, "WGS 72 / UTM zone 52S", + "+proj=utm +zone=52 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32353, "epsg", 32353, "WGS 72 / UTM zone 53S", + "+proj=utm +zone=53 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32354, "epsg", 32354, "WGS 72 / UTM zone 54S", + "+proj=utm +zone=54 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32355, "epsg", 32355, "WGS 72 / UTM zone 55S", + "+proj=utm +zone=55 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32356, "epsg", 32356, "WGS 72 / UTM zone 56S", + "+proj=utm +zone=56 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32357, "epsg", 32357, "WGS 72 / UTM zone 57S", + "+proj=utm +zone=57 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32358, "epsg", 32358, "WGS 72 / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32359, "epsg", 32359, "WGS 72 / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32360, "epsg", 32360, "WGS 72 / UTM zone 60S", + "+proj=utm +zone=60 +south +ellps=WGS72 +units=m +no_defs"}, + { + 32401, "epsg", 32401, "WGS 72BE / UTM zone 1N", + "+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32402, "epsg", 32402, "WGS 72BE / UTM zone 2N", + "+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32403, "epsg", 32403, "WGS 72BE / UTM zone 3N", + "+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32404, "epsg", 32404, "WGS 72BE / UTM zone 4N", + "+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32405, "epsg", 32405, "WGS 72BE / UTM zone 5N", + "+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32406, "epsg", 32406, "WGS 72BE / UTM zone 6N", + "+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32407, "epsg", 32407, "WGS 72BE / UTM zone 7N", + "+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32408, "epsg", 32408, "WGS 72BE / UTM zone 8N", + "+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32409, "epsg", 32409, "WGS 72BE / UTM zone 9N", + "+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32410, "epsg", 32410, "WGS 72BE / UTM zone 10N", + "+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32411, "epsg", 32411, "WGS 72BE / UTM zone 11N", + "+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32412, "epsg", 32412, "WGS 72BE / UTM zone 12N", + "+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32413, "epsg", 32413, "WGS 72BE / UTM zone 13N", + "+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32414, "epsg", 32414, "WGS 72BE / UTM zone 14N", + "+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32415, "epsg", 32415, "WGS 72BE / UTM zone 15N", + "+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32416, "epsg", 32416, "WGS 72BE / UTM zone 16N", + "+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32417, "epsg", 32417, "WGS 72BE / UTM zone 17N", + "+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32418, "epsg", 32418, "WGS 72BE / UTM zone 18N", + "+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32419, "epsg", 32419, "WGS 72BE / UTM zone 19N", + "+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32420, "epsg", 32420, "WGS 72BE / UTM zone 20N", + "+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32421, "epsg", 32421, "WGS 72BE / UTM zone 21N", + "+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32422, "epsg", 32422, "WGS 72BE / UTM zone 22N", + "+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32423, "epsg", 32423, "WGS 72BE / UTM zone 23N", + "+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32424, "epsg", 32424, "WGS 72BE / UTM zone 24N", + "+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32425, "epsg", 32425, "WGS 72BE / UTM zone 25N", + "+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32426, "epsg", 32426, "WGS 72BE / UTM zone 26N", + "+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32427, "epsg", 32427, "WGS 72BE / UTM zone 27N", + "+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32428, "epsg", 32428, "WGS 72BE / UTM zone 28N", + "+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32429, "epsg", 32429, "WGS 72BE / UTM zone 29N", + "+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32430, "epsg", 32430, "WGS 72BE / UTM zone 30N", + "+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32431, "epsg", 32431, "WGS 72BE / UTM zone 31N", + "+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32432, "epsg", 32432, "WGS 72BE / UTM zone 32N", + "+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32433, "epsg", 32433, "WGS 72BE / UTM zone 33N", + "+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32434, "epsg", 32434, "WGS 72BE / UTM zone 34N", + "+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32435, "epsg", 32435, "WGS 72BE / UTM zone 35N", + "+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32436, "epsg", 32436, "WGS 72BE / UTM zone 36N", + "+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32437, "epsg", 32437, "WGS 72BE / UTM zone 37N", + "+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32438, "epsg", 32438, "WGS 72BE / UTM zone 38N", + "+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32439, "epsg", 32439, "WGS 72BE / UTM zone 39N", + "+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32440, "epsg", 32440, "WGS 72BE / UTM zone 40N", + "+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32441, "epsg", 32441, "WGS 72BE / UTM zone 41N", + "+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32442, "epsg", 32442, "WGS 72BE / UTM zone 42N", + "+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32443, "epsg", 32443, "WGS 72BE / UTM zone 43N", + "+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32444, "epsg", 32444, "WGS 72BE / UTM zone 44N", + "+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32445, "epsg", 32445, "WGS 72BE / UTM zone 45N", + "+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32446, "epsg", 32446, "WGS 72BE / UTM zone 46N", + "+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32447, "epsg", 32447, "WGS 72BE / UTM zone 47N", + "+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32448, "epsg", 32448, "WGS 72BE / UTM zone 48N", + "+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32449, "epsg", 32449, "WGS 72BE / UTM zone 49N", + "+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32450, "epsg", 32450, "WGS 72BE / UTM zone 50N", + "+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32451, "epsg", 32451, "WGS 72BE / UTM zone 51N", + "+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32452, "epsg", 32452, "WGS 72BE / UTM zone 52N", + "+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32453, "epsg", 32453, "WGS 72BE / UTM zone 53N", + "+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32454, "epsg", 32454, "WGS 72BE / UTM zone 54N", + "+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32455, "epsg", 32455, "WGS 72BE / UTM zone 55N", + "+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32456, "epsg", 32456, "WGS 72BE / UTM zone 56N", + "+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32457, "epsg", 32457, "WGS 72BE / UTM zone 57N", + "+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32458, "epsg", 32458, "WGS 72BE / UTM zone 58N", + "+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32459, "epsg", 32459, "WGS 72BE / UTM zone 59N", + "+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32460, "epsg", 32460, "WGS 72BE / UTM zone 60N", + "+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32501, "epsg", 32501, "WGS 72BE / UTM zone 1S", + "+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32502, "epsg", 32502, "WGS 72BE / UTM zone 2S", + "+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32503, "epsg", 32503, "WGS 72BE / UTM zone 3S", + "+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32504, "epsg", 32504, "WGS 72BE / UTM zone 4S", + "+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32505, "epsg", 32505, "WGS 72BE / UTM zone 5S", + "+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32506, "epsg", 32506, "WGS 72BE / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32507, "epsg", 32507, "WGS 72BE / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32508, "epsg", 32508, "WGS 72BE / UTM zone 8S", + "+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32509, "epsg", 32509, "WGS 72BE / UTM zone 9S", + "+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32510, "epsg", 32510, "WGS 72BE / UTM zone 10S", + "+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32511, "epsg", 32511, "WGS 72BE / UTM zone 11S", + "+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32512, "epsg", 32512, "WGS 72BE / UTM zone 12S", + "+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32513, "epsg", 32513, "WGS 72BE / UTM zone 13S", + "+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32514, "epsg", 32514, "WGS 72BE / UTM zone 14S", + "+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32515, "epsg", 32515, "WGS 72BE / UTM zone 15S", + "+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32516, "epsg", 32516, "WGS 72BE / UTM zone 16S", + "+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32517, "epsg", 32517, "WGS 72BE / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32518, "epsg", 32518, "WGS 72BE / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32519, "epsg", 32519, "WGS 72BE / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32520, "epsg", 32520, "WGS 72BE / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32521, "epsg", 32521, "WGS 72BE / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32522, "epsg", 32522, "WGS 72BE / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32523, "epsg", 32523, "WGS 72BE / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32524, "epsg", 32524, "WGS 72BE / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32525, "epsg", 32525, "WGS 72BE / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32526, "epsg", 32526, "WGS 72BE / UTM zone 26S", + "+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32527, "epsg", 32527, "WGS 72BE / UTM zone 27S", + "+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32528, "epsg", 32528, "WGS 72BE / UTM zone 28S", + "+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32529, "epsg", 32529, "WGS 72BE / UTM zone 29S", + "+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32530, "epsg", 32530, "WGS 72BE / UTM zone 30S", + "+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32531, "epsg", 32531, "WGS 72BE / UTM zone 31S", + "+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32532, "epsg", 32532, "WGS 72BE / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32533, "epsg", 32533, "WGS 72BE / UTM zone 33S", + "+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32534, "epsg", 32534, "WGS 72BE / UTM zone 34S", + "+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32535, "epsg", 32535, "WGS 72BE / UTM zone 35S", + "+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32536, "epsg", 32536, "WGS 72BE / UTM zone 36S", + "+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32537, "epsg", 32537, "WGS 72BE / UTM zone 37S", + "+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32538, "epsg", 32538, "WGS 72BE / UTM zone 38S", + "+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32539, "epsg", 32539, "WGS 72BE / UTM zone 39S", + "+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32540, "epsg", 32540, "WGS 72BE / UTM zone 40S", + "+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32541, "epsg", 32541, "WGS 72BE / UTM zone 41S", + "+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32542, "epsg", 32542, "WGS 72BE / UTM zone 42S", + "+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32543, "epsg", 32543, "WGS 72BE / UTM zone 43S", + "+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32544, "epsg", 32544, "WGS 72BE / UTM zone 44S", + "+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32545, "epsg", 32545, "WGS 72BE / UTM zone 45S", + "+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32546, "epsg", 32546, "WGS 72BE / UTM zone 46S", + "+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32547, "epsg", 32547, "WGS 72BE / UTM zone 47S", + "+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32548, "epsg", 32548, "WGS 72BE / UTM zone 48S", + "+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32549, "epsg", 32549, "WGS 72BE / UTM zone 49S", + "+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32550, "epsg", 32550, "WGS 72BE / UTM zone 50S", + "+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32551, "epsg", 32551, "WGS 72BE / UTM zone 51S", + "+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32552, "epsg", 32552, "WGS 72BE / UTM zone 52S", + "+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32553, "epsg", 32553, "WGS 72BE / UTM zone 53S", + "+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32554, "epsg", 32554, "WGS 72BE / UTM zone 54S", + "+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32555, "epsg", 32555, "WGS 72BE / UTM zone 55S", + "+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32556, "epsg", 32556, "WGS 72BE / UTM zone 56S", + "+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32557, "epsg", 32557, "WGS 72BE / UTM zone 57S", + "+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32558, "epsg", 32558, "WGS 72BE / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32559, "epsg", 32559, "WGS 72BE / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32560, "epsg", 32560, "WGS 72BE / UTM zone 60S", + "+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs"}, + { + 32601, "epsg", 32601, "WGS 84 / UTM zone 1N", + "+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32602, "epsg", 32602, "WGS 84 / UTM zone 2N", + "+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32603, "epsg", 32603, "WGS 84 / UTM zone 3N", + "+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32604, "epsg", 32604, "WGS 84 / UTM zone 4N", + "+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32605, "epsg", 32605, "WGS 84 / UTM zone 5N", + "+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32606, "epsg", 32606, "WGS 84 / UTM zone 6N", + "+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32607, "epsg", 32607, "WGS 84 / UTM zone 7N", + "+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32608, "epsg", 32608, "WGS 84 / UTM zone 8N", + "+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32609, "epsg", 32609, "WGS 84 / UTM zone 9N", + "+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32610, "epsg", 32610, "WGS 84 / UTM zone 10N", + "+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32611, "epsg", 32611, "WGS 84 / UTM zone 11N", + "+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32612, "epsg", 32612, "WGS 84 / UTM zone 12N", + "+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32613, "epsg", 32613, "WGS 84 / UTM zone 13N", + "+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32614, "epsg", 32614, "WGS 84 / UTM zone 14N", + "+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32615, "epsg", 32615, "WGS 84 / UTM zone 15N", + "+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32616, "epsg", 32616, "WGS 84 / UTM zone 16N", + "+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32617, "epsg", 32617, "WGS 84 / UTM zone 17N", + "+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32618, "epsg", 32618, "WGS 84 / UTM zone 18N", + "+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32619, "epsg", 32619, "WGS 84 / UTM zone 19N", + "+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32620, "epsg", 32620, "WGS 84 / UTM zone 20N", + "+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32621, "epsg", 32621, "WGS 84 / UTM zone 21N", + "+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32622, "epsg", 32622, "WGS 84 / UTM zone 22N", + "+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32623, "epsg", 32623, "WGS 84 / UTM zone 23N", + "+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32624, "epsg", 32624, "WGS 84 / UTM zone 24N", + "+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32625, "epsg", 32625, "WGS 84 / UTM zone 25N", + "+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32626, "epsg", 32626, "WGS 84 / UTM zone 26N", + "+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32627, "epsg", 32627, "WGS 84 / UTM zone 27N", + "+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32628, "epsg", 32628, "WGS 84 / UTM zone 28N", + "+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32629, "epsg", 32629, "WGS 84 / UTM zone 29N", + "+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32630, "epsg", 32630, "WGS 84 / UTM zone 30N", + "+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32631, "epsg", 32631, "WGS 84 / UTM zone 31N", + "+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32632, "epsg", 32632, "WGS 84 / UTM zone 32N", + "+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32633, "epsg", 32633, "WGS 84 / UTM zone 33N", + "+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32634, "epsg", 32634, "WGS 84 / UTM zone 34N", + "+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32635, "epsg", 32635, "WGS 84 / UTM zone 35N", + "+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32636, "epsg", 32636, "WGS 84 / UTM zone 36N", + "+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32637, "epsg", 32637, "WGS 84 / UTM zone 37N", + "+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32638, "epsg", 32638, "WGS 84 / UTM zone 38N", + "+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32639, "epsg", 32639, "WGS 84 / UTM zone 39N", + "+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32640, "epsg", 32640, "WGS 84 / UTM zone 40N", + "+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32641, "epsg", 32641, "WGS 84 / UTM zone 41N", + "+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32642, "epsg", 32642, "WGS 84 / UTM zone 42N", + "+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32643, "epsg", 32643, "WGS 84 / UTM zone 43N", + "+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32644, "epsg", 32644, "WGS 84 / UTM zone 44N", + "+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32645, "epsg", 32645, "WGS 84 / UTM zone 45N", + "+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32646, "epsg", 32646, "WGS 84 / UTM zone 46N", + "+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32647, "epsg", 32647, "WGS 84 / UTM zone 47N", + "+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32648, "epsg", 32648, "WGS 84 / UTM zone 48N", + "+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32649, "epsg", 32649, "WGS 84 / UTM zone 49N", + "+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32650, "epsg", 32650, "WGS 84 / UTM zone 50N", + "+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32651, "epsg", 32651, "WGS 84 / UTM zone 51N", + "+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32652, "epsg", 32652, "WGS 84 / UTM zone 52N", + "+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32653, "epsg", 32653, "WGS 84 / UTM zone 53N", + "+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32654, "epsg", 32654, "WGS 84 / UTM zone 54N", + "+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32655, "epsg", 32655, "WGS 84 / UTM zone 55N", + "+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32656, "epsg", 32656, "WGS 84 / UTM zone 56N", + "+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32657, "epsg", 32657, "WGS 84 / UTM zone 57N", + "+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32658, "epsg", 32658, "WGS 84 / UTM zone 58N", + "+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32659, "epsg", 32659, "WGS 84 / UTM zone 59N", + "+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32660, "epsg", 32660, "WGS 84 / UTM zone 60N", + "+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32661, "epsg", 32661, "WGS 84 / UPS North", + "+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32662, "epsg", 32662, "WGS 84 / Plate Carree", + "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32664, "epsg", 32664, "WGS 84 / BLM 14N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +to_meter=0.3048006096012192 +no_defs"}, + { + 32665, "epsg", 32665, "WGS 84 / BLM 15N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +to_meter=0.3048006096012192 +no_defs"}, + { + 32666, "epsg", 32666, "WGS 84 / BLM 16N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +to_meter=0.3048006096012192 +no_defs"}, + { + 32667, "epsg", 32667, "WGS 84 / BLM 17N (ftUS)", + "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +to_meter=0.3048006096012192 +no_defs"}, + { + 32701, "epsg", 32701, "WGS 84 / UTM zone 1S", + "+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32702, "epsg", 32702, "WGS 84 / UTM zone 2S", + "+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32703, "epsg", 32703, "WGS 84 / UTM zone 3S", + "+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32704, "epsg", 32704, "WGS 84 / UTM zone 4S", + "+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32705, "epsg", 32705, "WGS 84 / UTM zone 5S", + "+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32706, "epsg", 32706, "WGS 84 / UTM zone 6S", + "+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32707, "epsg", 32707, "WGS 84 / UTM zone 7S", + "+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32708, "epsg", 32708, "WGS 84 / UTM zone 8S", + "+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32709, "epsg", 32709, "WGS 84 / UTM zone 9S", + "+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32710, "epsg", 32710, "WGS 84 / UTM zone 10S", + "+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32711, "epsg", 32711, "WGS 84 / UTM zone 11S", + "+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32712, "epsg", 32712, "WGS 84 / UTM zone 12S", + "+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32713, "epsg", 32713, "WGS 84 / UTM zone 13S", + "+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32714, "epsg", 32714, "WGS 84 / UTM zone 14S", + "+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32715, "epsg", 32715, "WGS 84 / UTM zone 15S", + "+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32716, "epsg", 32716, "WGS 84 / UTM zone 16S", + "+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32717, "epsg", 32717, "WGS 84 / UTM zone 17S", + "+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32718, "epsg", 32718, "WGS 84 / UTM zone 18S", + "+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32719, "epsg", 32719, "WGS 84 / UTM zone 19S", + "+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32720, "epsg", 32720, "WGS 84 / UTM zone 20S", + "+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32721, "epsg", 32721, "WGS 84 / UTM zone 21S", + "+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32722, "epsg", 32722, "WGS 84 / UTM zone 22S", + "+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32723, "epsg", 32723, "WGS 84 / UTM zone 23S", + "+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32724, "epsg", 32724, "WGS 84 / UTM zone 24S", + "+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32725, "epsg", 32725, "WGS 84 / UTM zone 25S", + "+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32726, "epsg", 32726, "WGS 84 / UTM zone 26S", + "+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32727, "epsg", 32727, "WGS 84 / UTM zone 27S", + "+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32728, "epsg", 32728, "WGS 84 / UTM zone 28S", + "+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32729, "epsg", 32729, "WGS 84 / UTM zone 29S", + "+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32730, "epsg", 32730, "WGS 84 / UTM zone 30S", + "+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32731, "epsg", 32731, "WGS 84 / UTM zone 31S", + "+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32732, "epsg", 32732, "WGS 84 / UTM zone 32S", + "+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32733, "epsg", 32733, "WGS 84 / UTM zone 33S", + "+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32734, "epsg", 32734, "WGS 84 / UTM zone 34S", + "+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32735, "epsg", 32735, "WGS 84 / UTM zone 35S", + "+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32736, "epsg", 32736, "WGS 84 / UTM zone 36S", + "+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32737, "epsg", 32737, "WGS 84 / UTM zone 37S", + "+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32738, "epsg", 32738, "WGS 84 / UTM zone 38S", + "+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32739, "epsg", 32739, "WGS 84 / UTM zone 39S", + "+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32740, "epsg", 32740, "WGS 84 / UTM zone 40S", + "+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32741, "epsg", 32741, "WGS 84 / UTM zone 41S", + "+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32742, "epsg", 32742, "WGS 84 / UTM zone 42S", + "+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32743, "epsg", 32743, "WGS 84 / UTM zone 43S", + "+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32744, "epsg", 32744, "WGS 84 / UTM zone 44S", + "+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32745, "epsg", 32745, "WGS 84 / UTM zone 45S", + "+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32746, "epsg", 32746, "WGS 84 / UTM zone 46S", + "+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32747, "epsg", 32747, "WGS 84 / UTM zone 47S", + "+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32748, "epsg", 32748, "WGS 84 / UTM zone 48S", + "+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32749, "epsg", 32749, "WGS 84 / UTM zone 49S", + "+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32750, "epsg", 32750, "WGS 84 / UTM zone 50S", + "+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32751, "epsg", 32751, "WGS 84 / UTM zone 51S", + "+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32752, "epsg", 32752, "WGS 84 / UTM zone 52S", + "+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32753, "epsg", 32753, "WGS 84 / UTM zone 53S", + "+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32754, "epsg", 32754, "WGS 84 / UTM zone 54S", + "+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32755, "epsg", 32755, "WGS 84 / UTM zone 55S", + "+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32756, "epsg", 32756, "WGS 84 / UTM zone 56S", + "+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32757, "epsg", 32757, "WGS 84 / UTM zone 57S", + "+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32758, "epsg", 32758, "WGS 84 / UTM zone 58S", + "+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32759, "epsg", 32759, "WGS 84 / UTM zone 59S", + "+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32760, "epsg", 32760, "WGS 84 / UTM zone 60S", + "+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32761, "epsg", 32761, "WGS 84 / UPS South", + "+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + 32766, "epsg", 32766, "WGS 84 / TM 36 SE", + "+proj=tmerc +lat_0=0 +lon_0=36 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"}, + { + -1, NULL, -1, NULL, NULL}}; + struct epsg_defs *p = epsg; + char sql[1024]; + char *errMsg = NULL; + int ret; + sqlite3_stmt *stmt; + ::wxBeginBusyCursor(); +// +// starting a transaction +// + ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CreateSpatialMetaData error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto error; + } +// creating the Spatial Metadata Tables + strcpy(sql, "SELECT InitSpatialMetaData()"); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CreateSpatialMetaData error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto error; + } +// preparing the SQL parameterized statement + strcpy(sql, "INSERT INTO spatial_ref_sys "); + strcat(sql, "(srid, auth_name, auth_srid, ref_sys_name, proj4text) "); + strcat(sql, "VALUES (?, ?, ?, ?, ?)"); + ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("CreateSpatialMetaData error: ") + err, + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + goto error; + } + while (1) + { + if (p->srid < 0 || p->auth_name == NULL) + break; + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int(stmt, 1, p->srid); + sqlite3_bind_text(stmt, 2, p->auth_name, strlen(p->auth_name), + SQLITE_STATIC); + sqlite3_bind_int(stmt, 3, p->auth_srid); + sqlite3_bind_text(stmt, 4, p->ref_sys_name, strlen(p->ref_sys_name), + SQLITE_STATIC); + sqlite3_bind_text(stmt, 5, p->proj4text, strlen(p->proj4text), + SQLITE_STATIC); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("CreateSpatialMetaData error: ") + err, + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto error; + } + p++; + } + sqlite3_finalize(stmt); +// +// confirming the transaction +// + ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CreateSpatialMetaData error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto error; + } + ::wxEndBusyCursor(); + return true; +error: +// +// trying to perform a ROLLBACK anyway +// + ret = sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CreateSpatialMetaData error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto error; + } + ::wxEndBusyCursor(); + return false; +} ADDED Network.cpp Index: Network.cpp ================================================================== --- Network.cpp +++ Network.cpp @@ -0,0 +1,1491 @@ +/* +/ Network.cpp +/ methods related to Network building +/ +/ version 1.2, 2008 October 9 +/ +/ Author: Sandro Furieri a-furieri@lqt.it +/ +/ Copyright (C) 2008 Alessandro Furieri +/ +/ This program is free software: you can redistribute it and/or modify +/ it under the terms of the GNU General Public License as published by +/ the Free Software Foundation, either version 3 of the License, or +/ (at your option) any later version. +/ +/ This program is distributed in the hope that it will be useful, +/ but WITHOUT ANY WARRANTY; without even the implied warranty of +/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +/ GNU General Public License for more details. +/ +/ You should have received a copy of the GNU General Public License +/ along with this program. If not, see . +/ +*/ + +#include "Classdef.h" +#include + +#define MAX_BLOCK 1048576 + +void + MyFrame::BuildNetwork(wxString & table, wxString & from, wxString & to, + wxString & geometry, bool cost_length, wxString & cost, + bool bidirectional, bool one_way, + wxString & one_way_from_to, wxString & one_way_to_from) +{ +// +// trying to build a Network +// + int ret; + sqlite3_stmt *stmt; + Network *p_graph = NULL; + wxString sql; + char xsql[2048]; + char **results; + int n_rows; + int n_columns; + int i; + char *errMsg = NULL; + char *col_name; + int type; + bool ok_from_column = false; + bool ok_to_column = false; + bool ok_cost_column = false; + bool ok_geom_column = false; + bool ok_oneway_tofrom = false; + bool ok_oneway_fromto = false; + bool from_null = false; + bool from_int = false; + bool from_double = false; + bool from_text = false; + bool from_blob = false; + bool to_null = false; + bool to_int = false; + bool to_double = false; + bool to_text = false; + bool to_blob = false; + bool cost_null = false; + bool cost_int = false; + bool cost_double = false; + bool cost_text = false; + bool cost_blob = false; + bool tofrom_null = false; + bool tofrom_int = false; + bool tofrom_double = false; + bool tofrom_text = false; + bool tofrom_blob = false; + bool fromto_null = false; + bool fromto_int = false; + bool fromto_double = false; + bool fromto_text = false; + bool fromto_blob = false; + bool geom_null = false; + bool geom_not_linestring = false; + int col_n; + int cost_n; + int fromto_n = 0; + int tofrom_n = 0; + int rowid; + int id_from = -1; + int id_to = -1; + char code_from[1024]; + char code_to[1024]; + double node_from_x; + double node_from_y; + double node_to_x; + double node_to_y; + double cost_val; + int fromto; + int tofrom; + wxString endMsg; + wxString msg; + bool wr; + ::wxBeginBusyCursor(); +// checking for table existence + sql = wxT("SELECT tbl_name FROM sqlite_master WHERE tbl_name LIKE '"); + sql += table; + sql += wxT("' AND type = 'table'"); + strcpy(xsql, sql.ToUTF8()); + ret = + sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, + &errMsg); + if (ret != SQLITE_OK) + { +// some error occurred + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (n_rows == 0) + { + // required table does not exists + wxMessageBox(wxT("ERROR: table \"") + table + wxT("\" does not exists"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + goto abort; + } else + sqlite3_free_table(results); +// checking for columns existence + sql = wxT("PRAGMA table_info(\""); + sql += table; + sql += wxT("\")"); + strcpy(xsql, sql.ToUTF8()); + ret = + sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, + &errMsg); + if (ret != SQLITE_OK) + { +// some error occurred + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (n_rows > 1) + { + for (i = 1; i <= n_rows; i++) + { + char xcol[256]; + col_name = results[(i * n_columns) + 1]; + strcpy(xcol, from.ToUTF8()); + if (strcasecmp(xcol, col_name) == 0) + ok_from_column = true; + strcpy(xcol, to.ToUTF8()); + if (strcasecmp(xcol, col_name) == 0) + ok_to_column = true; + if (cost_length == false) + { + strcpy(xcol, cost.ToUTF8()); + if (strcasecmp(xcol, col_name) == 0) + ok_cost_column = true; + } + strcpy(xcol, geometry.ToUTF8()); + if (strcasecmp(xcol, col_name) == 0) + ok_geom_column = true; + if (one_way == true) + { + strcpy(xcol, one_way_from_to.ToUTF8()); + if (strcasecmp(xcol, col_name) == 0) + ok_oneway_tofrom = true; + } + if (one_way == true) + { + strcpy(xcol, one_way_to_from.ToUTF8()); + if (strcasecmp(xcol, col_name) == 0) + ok_oneway_fromto = true; + } + } + sqlite3_free_table(results); + } + if (ok_from_column == true && ok_to_column == true && ok_geom_column == true) + ; + else + goto abort; + if (cost_length == false && ok_cost_column == false) + goto abort; + if (one_way == true && ok_oneway_tofrom == false) + goto abort; + if (one_way == true && ok_oneway_fromto == false) + goto abort; +// checking column types + p_graph = new Network(); + sql = + wxT("SELECT \"") + from + wxT("\", \"") + to + wxT("\", GeometryType(\"") + + geometry + wxT("\")"); + col_n = 3; + if (cost_length == false) + { + sql += wxT(", \"") + cost + wxT("\""); + cost_n = col_n; + col_n++; + } + if (one_way == true) + { + sql += wxT(", \"") + one_way_to_from + wxT("\""); + tofrom_n = col_n; + col_n++; + sql += wxT(", \"") + one_way_from_to + wxT("\""); + fromto_n = col_n; + col_n++; + } + sql += wxT(" FROM \"") + table; + sql += wxT("\""); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + goto abort; + } + n_columns = sqlite3_column_count(stmt); + while (1) + { + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; + if (ret == SQLITE_ROW) + { + // the NodeFrom type + type = sqlite3_column_type(stmt, 0); + if (type == SQLITE_NULL) + from_null = true; + if (type == SQLITE_INTEGER) + { + from_int = true; + id_from = sqlite3_column_int(stmt, 0); + p_graph->InsertNode(id_from); + } + if (type == SQLITE_FLOAT) + from_double = true; + if (type == SQLITE_TEXT) + { + from_text = true; + strcpy(code_from, (char *) sqlite3_column_text(stmt, 0)); + p_graph->InsertNode(code_from); + } + if (type == SQLITE_BLOB) + from_blob = true; + // the NodeTo type + type = sqlite3_column_type(stmt, 1); + if (type == SQLITE_NULL) + to_null = true; + if (type == SQLITE_INTEGER) + { + to_int = true; + id_to = sqlite3_column_int(stmt, 1); + p_graph->InsertNode(id_to); + } + if (type == SQLITE_FLOAT) + to_double = true; + if (type == SQLITE_TEXT) + { + to_text = true; + strcpy(code_to, (char *) sqlite3_column_text(stmt, 1)); + p_graph->InsertNode(code_to); + } + if (type == SQLITE_BLOB) + to_blob = true; + // the Geometry type + type = sqlite3_column_type(stmt, 2); + if (type == SQLITE_NULL) + geom_null = true; + else if (strcmp("LINESTRING", (char *) sqlite3_column_text(stmt, 2)) + != 0) + geom_not_linestring = true; + if (cost_length == false) + { + // the Cost type + type = sqlite3_column_type(stmt, 3); + if (type == SQLITE_NULL) + cost_null = true; + if (type == SQLITE_INTEGER) + cost_int = true; + if (type == SQLITE_FLOAT) + cost_double = true; + if (type == SQLITE_TEXT) + cost_text = true; + if (type == SQLITE_BLOB) + cost_blob = true; + } + if (one_way == true) + { + // the FromTo type + type = sqlite3_column_type(stmt, 4); + if (type == SQLITE_NULL) + fromto_null = true; + if (type == SQLITE_INTEGER) + fromto_int = true; + if (type == SQLITE_FLOAT) + fromto_double = true; + if (type == SQLITE_TEXT) + fromto_text = true; + if (type == SQLITE_BLOB) + fromto_blob = true; + // the ToFrom type + type = sqlite3_column_type(stmt, 5); + if (type == SQLITE_NULL) + tofrom_null = true; + if (type == SQLITE_INTEGER) + tofrom_int = true; + if (type == SQLITE_FLOAT) + tofrom_double = true; + if (type == SQLITE_TEXT) + tofrom_text = true; + if (type == SQLITE_BLOB) + tofrom_blob = true; + } + } else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto abort; + } + } + sqlite3_finalize(stmt); + ret = 1; + if (from_null == true) + ret = 0; + if (from_blob == true) + ret = 0; + if (from_double == true) + ret = 0; + if (to_null == true) + ret = 0; + if (to_blob == true) + ret = 0; + if (to_double == true) + ret = 0; + if (geom_null == true) + ret = 0; + if (geom_not_linestring == true) + ret = 0; + if (cost_length == false) + { + if (cost_null == true) + ret = 0; + if (cost_blob == true) + ret = 0; + if (cost_text == true) + ret = 0; + } + if (one_way == true) + { + if (fromto_null == true) + ret = 0; + if (fromto_blob == true) + ret = 0; + if (fromto_text == true) + ret = 0; + if (fromto_double == true) + ret = 0; + if (tofrom_null == true) + ret = 0; + if (tofrom_blob == true) + ret = 0; + if (tofrom_text == true) + ret = 0; + if (tofrom_double == true) + ret = 0; + } + if (!ret) + goto abort; + if (from_int == true && to_int == true) + { + // each node is identified by an INTEGER id + p_graph->SetNodeCode(false); + } else if (from_text == true && to_text == true) + { + // each node is identified by a TEXT code + p_graph->SetNodeCode(true); + } else + goto abort; + p_graph->InitNodes(); +// checking topologic consistency + sql = wxT("SELECT ROWID, \"") + from + wxT("\", \"") + to + wxT("\", "); + sql += + wxT("X(StartPoint(\"") + geometry + wxT("\")), Y(StartPoint(\"") + + geometry + wxT("\")), "); + sql += + wxT("X(EndPoint(\"") + geometry + wxT("\")), Y(EndPoint(\"") + geometry + + wxT("\"))"); + if (cost_length == false) + sql += wxT(", ") + cost; + else + sql += wxT(", GLength(\"") + geometry + wxT("\")"); + col_n = 8; + if (one_way == true) + { + sql += wxT(", \"") + one_way_to_from + wxT("\""); + tofrom_n = col_n; + col_n++; + sql += wxT(", \"") + one_way_from_to + wxT("\""); + fromto_n = col_n; + col_n++; + } + sql += wxT(" FROM \"") + table + wxT("\""); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + goto abort; + } + n_columns = sqlite3_column_count(stmt); + while (1) + { + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; + if (ret == SQLITE_ROW) + { + fromto = true; + tofrom = true; + if (p_graph->IsNodeCode() == true) + { + id_from = -1; + id_to = -1; + } else + { + *code_from = '\0'; + *code_to = '\0'; + } + // fetching the ROWID + rowid = sqlite3_column_int(stmt, 0); + // fetching the NodeFrom value + if (p_graph->IsNodeCode() == true) + strcpy(code_from, (char *) sqlite3_column_text(stmt, 1)); + else + id_from = sqlite3_column_int(stmt, 1); + // fetching the NodeTo value + if (p_graph->IsNodeCode() == true) + strcpy(code_to, (char *) sqlite3_column_text(stmt, 2)); + else + id_to = sqlite3_column_int(stmt, 2); + // fetching the NodeFromX value + node_from_x = sqlite3_column_double(stmt, 3); + // fetching the NodeFromY value + node_from_y = sqlite3_column_double(stmt, 4); + // fetching the NodeFromX value + node_to_x = sqlite3_column_double(stmt, 5); + // fetching the NodeFromY value + node_to_y = sqlite3_column_double(stmt, 6); + // fetching the Cost value + cost_val = sqlite3_column_double(stmt, 7); + if (one_way == true) + { + // fetching the OneWay-FromTo value + fromto = sqlite3_column_int(stmt, fromto_n); + // fetching the OneWay-ToFrom value + tofrom = sqlite3_column_int(stmt, tofrom_n); + } + if (cost_val <= 0.0) + p_graph->SetError(); + if (bidirectional == true) + { + if (fromto) + { + if (p_graph->IsNodeCode() == true) + p_graph->AddArc(rowid, code_from, code_to, node_from_x, + node_from_y, node_to_x, node_to_y, + cost_val); + else + p_graph->AddArc(rowid, id_from, id_to, node_from_x, + node_from_y, node_to_x, node_to_y, + cost_val); + } + if (tofrom) + { + if (p_graph->IsNodeCode() == true) + p_graph->AddArc(rowid, code_to, code_from, node_to_x, + node_to_y, node_from_x, node_from_y, + cost_val); + else + p_graph->AddArc(rowid, id_to, id_from, node_to_x, node_to_y, + node_from_x, node_from_y, cost_val); + } + } else + { + if (p_graph->IsNodeCode() == true) + p_graph->AddArc(rowid, code_from, code_to, node_from_x, + node_from_y, node_to_x, node_to_y, cost_val); + else + p_graph->AddArc(rowid, id_from, id_to, node_from_x, node_from_y, + node_to_x, node_to_y, cost_val); + } + if (p_graph->IsError() == true) + { + sqlite3_finalize(stmt); + goto abort; + } + } else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto abort; + } + } + sqlite3_finalize(stmt); + ::wxEndBusyCursor(); + wr = CreateNetwork(p_graph, table, from, to, geometry); + if (wr == true) + { + endMsg = + wxT("OK: VirtualNetwork table '") + table + + wxT("_net' successfully created"); + wxMessageBox(endMsg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, + this); + } else + { + endMsg = + wxT("DB ERROR: VirtualNetwork table '") + table + + wxT("_net' was not created"); + wxMessageBox(endMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + } + if (p_graph) + delete p_graph; + InitTableTree(); + return; +abort: + ::wxEndBusyCursor(); + msg = + wxT + ("It's impossible to build a Network using the given configuration;\nsome fatal error occurred\n\n"); + msg += wxT("please note: using the 'spatialite_network' command-line tool\n"); + msg += + wxT + ("you can obtain a full detailed report explaining causes for this failure"); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (p_graph) + delete p_graph; +} + +void + MyFrame::OutputNetNode(unsigned char *auxbuf, int *size, int ind, + bool node_code, int max_node_length, NetNode * pN, + int endian_arch) +{ +// +// exporting a Node into NETWORK-DATA +// + int n_star; + int i; + NetArc **arc_array; + NetArc *pA; + unsigned char *out = auxbuf; + *out++ = GAIA_NET_NODE; + gaiaExport32(out, ind, 1, endian_arch); // the Node internal index + out += 4; + if (node_code) + { + // Nodes are identified by a TEXT Code + memset(out, '\0', max_node_length); + strcpy((char *) out, pN->GetCode().ToUTF8()); + out += max_node_length; + } else + { + // Nodes are identified by an INTEGER Id + gaiaExport32(out, pN->GetId(), 1, endian_arch); // the Node ID + out += 4; + } + arc_array = pN->PrepareOutcomings(&n_star); + gaiaExport16(out, n_star, 1, endian_arch); // # of outcoming arcs + out += 2; + for (i = 0; i < n_star; i++) + { + // exporting the outcoming arcs + pA = *(arc_array + i); + *out++ = GAIA_NET_ARC; + gaiaExport32(out, pA->GetRowId(), 1, endian_arch); // the Arc rowid + out += 4; + gaiaExport32(out, pA->GetTo()->GetInternalIndex(), 1, endian_arch); // the ToNode internal index + out += 4; + gaiaExport64(out, pA->GetCost(), 1, endian_arch); // the Arc Cost + out += 8; + *out++ = GAIA_NET_END; + } + if (arc_array) + delete[]arc_array; + *out++ = GAIA_NET_END; + *size = out - auxbuf; +} + +bool MyFrame::CreateNetwork(Network * p_graph, wxString & table, + wxString & from, wxString & to, wxString & geometry) +{ +// +// creates the NETWORK-DATA table +// + int ret; + wxString sql; + char xsql[1024]; + char *errMsg = NULL; + unsigned char *auxbuf = new unsigned char[MAX_BLOCK]; + unsigned char *buf = new unsigned char[MAX_BLOCK]; + unsigned char *out; + sqlite3_stmt *stmt; + int i; + int size; + int endian_arch = gaiaEndianArch(); + NetNode *pN; + int pk = 0; + int nodes_cnt = 0; + int len; + bool net_data_exists = false; + bool net_exists = false; + bool delete_existing = false; + wxString data_table = table + wxT("_net_data"); + wxString net_table = table + wxT("_net"); + net_data_exists = TableAlreadyExists(data_table); + net_exists = TableAlreadyExists(net_table); + if (net_data_exists == true || net_exists == true) + { + // asking permission to overwrite existing tables + wxString msg; + if (net_data_exists == true) + msg += wxT("A table named '") + data_table + wxT("' already exists\n"); + if (net_exists == true) + msg += wxT("A table named '") + net_table + wxT("' already exists\n"); + msg += wxT("\nDo you allow DROPping existing table(s) ?"); + wxMessageDialog confirm(this, msg, wxT("Confirm overwrite"), + wxYES_NO | wxICON_QUESTION); + ret = confirm.ShowModal(); + if (ret == wxID_YES) + delete_existing = true; + } + ::wxBeginBusyCursor(); + for (i = 0; i < p_graph->GetNumNodes(); i++) + { + // setting the internal index to each Node + pN = p_graph->GetSortedNode(i); + pN->SetInternalIndex(i); + } +// starts a transaction + ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (delete_existing == true) + { + sql = wxT("DROP TABLE IF EXISTS \"") + net_table + wxT("\""); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + sql = wxT("DROP TABLE IF EXISTS \"") + data_table + wxT("\""); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + } +// creating the NETWORK-DATA table + sql = wxT("CREATE TABLE \"") + data_table; + sql += wxT("\" (\"Id\" INTEGER PRIMARY KEY, \"NetworkData\" BLOB NOT NULL)"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CREATE TABLE error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// preparing the SQL statement + sql = + wxT("INSERT INTO \"") + data_table + + wxT("\" (\"Id\", \"NetworkData\") VALUES (?, ?)"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("INSERT error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + goto abort; + } + if (pk == 0) + { + // preparing the HEADER block + out = buf; + *out++ = GAIA_NET_START; + *out++ = GAIA_NET_HEADER; + gaiaExport32(out, p_graph->GetNumNodes(), 1, endian_arch); // how many Nodes are there + out += 4; + if (p_graph->IsNodeCode() == true) + *out++ = GAIA_NET_CODE; // Nodes are identified by a TEXT code + else + *out++ = GAIA_NET_ID; // Nodes are identified by an INTEGER id + if (p_graph->IsNodeCode() == true) + *out++ = p_graph->GetMaxCodeLength(); // max TEXT code length + else + *out++ = 0x00; + // inserting the main Table name + *out++ = GAIA_NET_TABLE; + len = table.Len() + 1; + gaiaExport16(out, len, 1, endian_arch); // the Table Name length, including last '\0' + out += 2; + memset(out, '\0', len); + strcpy((char *) out, table.ToUTF8()); + out += len; + // inserting the NodeFrom column name + *out++ = GAIA_NET_FROM; + len = from.Len() + 1; + gaiaExport16(out, len, 1, endian_arch); // the NodeFrom column Name length, including last '\0' + out += 2; + memset(out, '\0', len); + strcpy((char *) out, from.ToUTF8()); + out += len; + // inserting the NodeTo column name + *out++ = GAIA_NET_TO; + len = to.Len() + 1; + gaiaExport16(out, len, 1, endian_arch); // the NodeTo column Name length, including last '\0' + out += 2; + memset(out, '\0', len); + strcpy((char *) out, to.ToUTF8()); + out += len; + // inserting the Geometry column name + *out++ = GAIA_NET_GEOM; + len = geometry.Len() + 1; + gaiaExport16(out, len, 1, endian_arch); // the Geometry column Name length, including last '\0' + out += 2; + memset(out, '\0', len); + strcpy((char *) out, geometry.ToUTF8()); + out += len; + *out++ = GAIA_NET_END; + // INSERTing the Header block + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int64(stmt, 1, pk); + sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto abort; + } + pk++; + // preparing a new block + out = buf; + *out++ = GAIA_NET_BLOCK; + gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block + out += 2; + nodes_cnt = 0; + } + for (i = 0; i < p_graph->GetNumNodes(); i++) + { + // looping on each Node + pN = p_graph->GetSortedNode(i); + OutputNetNode(auxbuf, &size, i, p_graph->IsNodeCode(), + p_graph->GetMaxCodeLength(), pN, endian_arch); + if (size >= (MAX_BLOCK - (out - buf))) + { + // inserting the last block + gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int64(stmt, 1, pk); + sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("sqlite3_step error: ") + err, + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto abort; + } + pk++; + // preparing a new block + out = buf; + *out++ = GAIA_NET_BLOCK; + gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block + out += 2; + nodes_cnt = 0; + } + // inserting the current Node into the block + nodes_cnt++; + memcpy(out, auxbuf, size); + out += size; + } + if (nodes_cnt) + { + // inserting the last block + gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int64(stmt, 1, pk); + sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + goto abort; + } + } + sqlite3_finalize(stmt); +// creating the VirtualNetwork NET-table + sql = wxT("CREATE VIRTUAL TABLE \"") + net_table; + sql += wxT("\" USING VirtualNetwork("); + sql += data_table + wxT(")"); + strcpy(xsql, sql.ToUTF8()); + ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("CREATE VIRTUAL TABLE error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } +// commits the transaction + ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto abort; + } + if (buf) + delete[]buf; + if (auxbuf) + delete[]auxbuf; + ::wxEndBusyCursor(); + return true; +abort: + ::wxEndBusyCursor(); + if (buf) + delete[]buf; + if (auxbuf) + delete[]auxbuf; + return true; + return false; +} + +int cmp_prenodes_code(const void *p1, const void *p2) +{ +// +// compares two preliminary nodes by CODE [for QSORT] +// + NetNodePre *pP1 = *((NetNodePre **) p1); + NetNodePre *pP2 = *((NetNodePre **) p2); + return pP1->GetCode().Cmp(pP2->GetCode()); +} + +int cmp_prenodes_id(const void *p1, const void *p2) +{ +// +// compares two preliminary nodes by ID [for QSORT] +// + NetNodePre *pP1 = *((NetNodePre **) p1); + NetNodePre *pP2 = *((NetNodePre **) p2); + return pP1->GetId() - pP2->GetId(); +} + +int cmp_nodes2_code(const void *p1, const void *p2) +{ +// +// compares two nodes by CODE [for BSEARCH] +// + NetNode *pN1 = (NetNode *) p1; + NetNode *pN2 = *((NetNode **) p2); + return pN1->GetCode().Cmp(pN2->GetCode()); +} + +int cmp_nodes2_id(const void *p1, const void *p2) +{ +// +// compares two nodes by ID [for BSEARCH] +// + NetNode *pN1 = (NetNode *) p1; + NetNode *pN2 = *((NetNode **) p2); + return pN1->GetId() - pN2->GetId(); +} + +int cmp_nodes1_code(const void *p1, const void *p2) +{ +// +// compares two nodes by CODE [for QSORT] +// + NetNode *pN1 = *((NetNode **) p1); + NetNode *pN2 = *((NetNode **) p2); + return pN1->GetCode().Cmp(pN2->GetCode()); +} + +int cmp_nodes1_id(const void *p1, const void *p2) +{ +// +// compares two nodes by ID [for QSORT ] +// + NetNode *pN1 = *((NetNode **) p1); + NetNode *pN2 = *((NetNode **) p2); + return pN1->GetId() - pN2->GetId(); +} + +NetNodePre::NetNodePre(int id) +{ +// +// Network Node [preliminary] constructor +// + Id = id; + Code = wxT(""); + Next = NULL; +} + +NetNodePre::NetNodePre(const char *code) +{ +// +// Network Node [preliminary] constructor +// + Id = -1; + Code = wxString::FromUTF8(code); + Code.Truncate(30); + Next = NULL; +} + +NetNode::NetNode(int id) +{ +// +// Network Node [final] constructor +// + InternalIndex = -1; + Id = id; + Code = wxT(""); + X = DBL_MAX; + Y = DBL_MAX; + First = NULL; + Last = NULL; + Next = NULL; +} + +NetNode::NetNode(wxString & code) +{ +// +// Network Node [final] constructor +// + InternalIndex = -1; + Id = -1; + Code = code; + X = DBL_MAX; + Y = DBL_MAX; + First = NULL; + Last = NULL; + Next = NULL; +} + +NetNode::~NetNode() +{ +// Network Node [final] destructor + NetArcRef *pAR; + NetArcRef *pARn; + pAR = First; + while (pAR) + { + pARn = pAR->GetNext(); + delete pAR; + pAR = pARn; + } +} + +void NetNode::AddOutcoming(NetArc * pA) +{ +// +// adds an outcoming Arc to a Node +// + NetArcRef *pAR = new NetArcRef(pA); + if (!First) + First = pAR; + if (Last) + Last->SetNext(pAR); + Last = pAR; +} + +NetArc **NetNode::PrepareOutcomings(int *count) +{ +// +// preparing the outcoming arc array +// + NetArc **arc_array; + int n = 0; + int i; + bool ok; + NetArcRef *pAR; + NetArc *pA0; + NetArc *pA1; + pAR = First; + while (pAR) + { + // counting how many outcoming arcs are there + n++; + pAR = pAR->GetNext(); + } + if (!n) + { + *count = 0; + return NULL; + } + arc_array = new NetArc *[n]; + i = 0; + pAR = First; + while (pAR) + { + // populating the arcs array + *(arc_array + i++) = pAR->GetReference(); + pAR = pAR->GetNext(); + } + ok = true; + while (ok == true) + { + // bubble sorting the arcs by Cost + ok = false; + for (i = 1; i < n; i++) + { + pA0 = *(arc_array + i - 1); + pA1 = *(arc_array + i); + if (pA0->GetCost() > pA1->GetCost()) + { + // swapping the arcs + *(arc_array + i - 1) = pA1; + *(arc_array + i) = pA0; + ok = true; + } + } + } + *count = n; + return arc_array; +} + +NetArc::NetArc(int rowid, NetNode * from, NetNode * to, double cost) +{ +// +// Network Arc constructor +// + RowId = rowid; + From = from; + To = to; + Cost = cost; + Next = NULL; +} + +Network::Network() +{ +// +// Network constructor +// + FirstPre = NULL; + LastPre = NULL; + NumPreNodes = 0; + SortedPreNodes = NULL; + NumPreNodes = 0; + SortedPreNodes = NULL; + FirstArc = NULL; + LastArc = NULL; + FirstNode = NULL; + LastNode = NULL; + NumNodes = 0; + SortedNodes = NULL; + Error = false; + NodeCode = false; + MaxCodeLength = 0; +} + +Network::~Network() +{ +// +// Network destructor +// + NetArc *pA; + NetArc *pAn; + NetNode *pN; + NetNode *pNn; + CleanPreNodes(); + pA = FirstArc; + while (pA) + { + pAn = pA->GetNext(); + delete pA; + pA = pAn; + } + pN = FirstNode; + while (pN) + { + pNn = pN->GetNext(); + delete pN; + pN = pNn; + } + if (SortedNodes) + delete[]SortedNodes; +} + +void Network::CleanPreNodes() +{ +// +// cleaning up the preliminary Nodes list +// + NetNodePre *pP; + NetNodePre *pPn; + pP = FirstPre; + while (pP) + { + pPn = pP->GetNext(); + delete pP; + pP = pPn; + } + FirstPre = NULL; + LastPre = NULL; + NumPreNodes = 0; + if (SortedPreNodes) + delete[]SortedPreNodes; + SortedPreNodes = NULL; +} + +void Network::InsertNode(int id) +{ +// +// inserts a Node into the preliminary list +// + NetNodePre *pP = new NetNodePre(id); + if (!FirstPre) + FirstPre = pP; + if (LastPre) + LastPre->SetNext(pP); + LastPre = pP; +} + +void Network::InsertNode(const char *code) +{ +// +// inserts a Node into the preliminary list +// + NetNodePre *pP = new NetNodePre(code); + if (!FirstPre) + FirstPre = pP; + if (LastPre) + LastPre->SetNext(pP); + LastPre = pP; +} + +void Network::AddNode(int id) +{ +// +// inserts a Node into the final list +// + NetNode *pN = new NetNode(id); + if (!FirstNode) + FirstNode = pN; + if (LastNode) + LastNode->SetNext(pN); + LastNode = pN; +} + +void Network::AddNode(wxString & code) +{ +// +// inserts a Node into the final list +// + int len; + NetNode *pN = new NetNode(code); + len = pN->GetCode().Len() + 1; + if (len > MaxCodeLength) + MaxCodeLength = len; + if (!FirstNode) + FirstNode = pN; + if (LastNode) + LastNode->SetNext(pN); + LastNode = pN; +} + +NetNode *Network::ProcessNode(int id, double x, double y, NetNode ** pOther) +{ +// +// inserts a new node or retrieves an already defined one +// + NetNode *pN = Find(id); + *pOther = NULL; + if (pN) + { + // this Node already exists into the sorted list + if (pN->GetX() == DBL_MAX && pN->GetY() == DBL_MAX) + ; + else + { + if (pN->GetX() == x && pN->GetY() == y) + ; + else + *pOther = pN; + } + return pN; + } +// unexpected error; undefined Node + return NULL; +} + +NetNode *Network::ProcessNode(wxString & code, double x, double y, + NetNode ** pOther) +{ +// +// inserts a new node or retrieves an already defined one +// + NetNode *pN = Find(code); + *pOther = NULL; + if (pN) + { + // this Node already exists into the sorted list + if (pN->GetX() == DBL_MAX && pN->GetY() == DBL_MAX) + ; + else + { + if (pN->GetX() == x && pN->GetY() == y) + ; + else + *pOther = pN; + } + return pN; + } +// unexpected error; undefined Node + return NULL; +} + +void + Network::AddArc(int rowid, int id_from, int id_to, double node_from_x, + double node_from_y, double node_to_x, double node_to_y, + double cost) +{ +// +// inserting an arc into the memory structures +// + NetNode *pFrom; + NetNode *pTo; + NetNode *pN2; + NetArc *pA; + pFrom = ProcessNode(id_from, node_from_x, node_from_y, &pN2); + if (pN2) + Error = true; + pTo = ProcessNode(id_to, node_to_x, node_to_y, &pN2); + if (pN2) + Error = true; + if (!pFrom) + Error = true; + if (!pTo) + Error = true; + if (pFrom == pTo) + Error = true; + if (Error == true) + return; + pA = new NetArc(rowid, pFrom, pTo, cost); + if (!FirstArc) + FirstArc = pA; + if (LastArc) + LastArc->SetNext(pA); + LastArc = pA; +// updating Node connections + pFrom->AddOutcoming(pA); +} + +void + Network::AddArc(int rowid, const char *code_from, const char *code_to, + double node_from_x, double node_from_y, double node_to_x, + double node_to_y, double cost) +{ +// +// inserting an arc into the memory structures +// + NetNode *pFrom; + NetNode *pTo; + NetNode *pN2; + NetArc *pA; + wxString stCode = wxString::FromUTF8(code_from); + pFrom = ProcessNode(stCode, node_from_x, node_from_y, &pN2); + if (pN2) + Error = true; + stCode = wxString::FromUTF8(code_to); + pTo = ProcessNode(stCode, node_to_x, node_to_y, &pN2); + if (pN2) + Error = true; + if (!pFrom) + Error = true; + if (!pTo) + Error = true; + if (pFrom == pTo) + Error = true; + if (Error == true) + return; + pA = new NetArc(rowid, pFrom, pTo, cost); + if (!FirstArc) + FirstArc = pA; + if (LastArc) + LastArc->SetNext(pA); + LastArc = pA; +// updating Node connections + pFrom->AddOutcoming(pA); +} + +void Network::Sort() +{ +// +// updating the Nodes sorted list +// + int i; + NetNode *pN; + NumNodes = 0; + if (SortedNodes) + { + // we must free the already existent sorted list + delete[]SortedNodes; + } + SortedNodes = NULL; + pN = FirstNode; + while (pN) + { + NumNodes++; + pN = pN->GetNext(); + } + if (!NumNodes) + return; + SortedNodes = new NetNode *[NumNodes]; + i = 0; + pN = FirstNode; + while (pN) + { + *(SortedNodes + i++) = pN; + pN = pN->GetNext(); + } + if (NodeCode == true) + { + // Nodes are identified by a TEXT code + qsort(SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes1_code); + } else + { + // Nodes are identified by an INTEGER id + qsort(SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes1_id); + } +} + +NetNode *Network::GetSortedNode(int x) +{ +// +// return a sorted Node [by position] +// + if (x >= 0 && x < NumNodes) + return *(SortedNodes + x); + return NULL; +} + +NetNode *Network::Find(int id) +{ +// +// searching a Node into the sorted list +// + NetNode **ret; + NetNode pN(id); + if (!SortedNodes) + return NULL; +// Nodes are identified by an INTEGER id + ret = + (NetNode **) bsearch(&pN, SortedNodes, NumNodes, sizeof(NetNode *), + cmp_nodes2_id); + if (!ret) + return NULL; + return *ret; +} + +NetNode *Network::Find(wxString & code) +{ +// +// searching a Node into the sorted list +// + NetNode **ret; + NetNode pN(code); + if (!SortedNodes) + return NULL; +// Nodes are identified by a TEXT code + ret = + (NetNode **) bsearch(&pN, SortedNodes, NumNodes, sizeof(NetNode *), + cmp_nodes2_code); + if (!ret) + return NULL; + return *ret; +} + +void Network::InitNodes() +{ +// +// prepares the final Nodes list +// + int last_id; + wxString last_code; + int i; + NetNodePre *pP; + NumPreNodes = 0; +// sorting preliminary nodes + if (SortedPreNodes) + { + // we must free the already existent sorted list + delete[]SortedPreNodes; + } + SortedPreNodes = NULL; + pP = FirstPre; + while (pP) + { + NumPreNodes++; + pP = pP->GetNext(); + } + if (!NumPreNodes) + return; + SortedPreNodes = new NetNodePre *[NumPreNodes]; + i = 0; + pP = FirstPre; + while (pP) + { + *(SortedPreNodes + i++) = pP; + pP = pP->GetNext(); + } + if (NodeCode == true) + { + // Nodes are identified by a TEXT code + qsort(SortedPreNodes, NumPreNodes, sizeof(NetNodePre *), + cmp_prenodes_code); + } else + { + // Nodes are identified by an INTEGER id + qsort(SortedPreNodes, NumPreNodes, sizeof(NetNodePre *), cmp_prenodes_id); + } +// creating the final Nodes linked list + last_id = -1; + last_code = wxT(""); + for (i = 0; i < NumPreNodes; i++) + { + pP = *(SortedPreNodes + i); + if (NodeCode == true) + { + // Nodes are identified by a TEXT code + if (pP->GetCode().Cmp(last_code) != 0) + AddNode(pP->GetCode()); + } else + { + // Nodes are identified by an INTEGER id + if (pP->GetId() != last_id) + AddNode(pP->GetId()); + } + last_id = pP->GetId(); + last_code = pP->GetCode(); + } +// sorting the final Nodes list + Sort(); +// cleaning up the preliminary Nodes structs + CleanPreNodes(); +} Index: Objects.cpp ================================================================== --- Objects.cpp +++ Objects.cpp @@ -1,10 +1,10 @@ /* / Objects.cpp / miscellaneous ancillary classes implementation / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -23,698 +23,697 @@ / */ #include "Classdef.h" -MyObject::MyObject (int type, wxString & name) +MyObject::MyObject(int type, wxString & name) { // // constructor - TreeItemData // - Type = type; - Name = name; - Column = wxT (""); + Type = type; + Name = name; + Column = wxT(""); } -MyObject::MyObject (int type, wxString & name, wxString & column) +MyObject::MyObject(int type, wxString & name, wxString & column) { // // constructor - TreeItemData // - Type = type; - Name = name; - Column = column; + Type = type; + Name = name; + Column = column; } -void -MyVariant::Copy (MyVariant * other) +void MyVariant::Copy(MyVariant * other) { // // transfers a BLOB value // - if (other->Type != MY_BLOB_VARIANT) - return; - if (!(other->Blob)) - return; - if (Blob) - delete[]Blob; - Type = MY_BLOB_VARIANT; - BlobSize = other->BlobSize; - Blob = other->Blob; - other->Type = MY_NULL_VARIANT; - other->Blob = NULL; - other->BlobSize = 0; + if (other->Type != MY_BLOB_VARIANT) + return; + if (!(other->Blob)) + return; + if (Blob) + delete[]Blob; + Type = MY_BLOB_VARIANT; + BlobSize = other->BlobSize; + Blob = other->Blob; + other->Type = MY_NULL_VARIANT; + other->Blob = NULL; + other->BlobSize = 0; } -void -MyVariant::Set (const unsigned char *text) +void MyVariant::Set(const unsigned char *text) { // // sets a String value for this Variant value // - Type = MY_TXT_VARIANT; - TxtValue = wxString::FromUTF8 ((const char *) text); + Type = MY_TXT_VARIANT; + TxtValue = wxString::FromUTF8((const char *) text); } -void -MyVariant::Set (const void *blob, int size) +void MyVariant::Set(const void *blob, int size) { // // sets a BLOB value for this Variant value // - if (size <= 0) - return; - Type = MY_BLOB_VARIANT; - BlobSize = size; - Blob = new unsigned char[size]; - memcpy (Blob, blob, size); + if (size <= 0) + return; + Type = MY_BLOB_VARIANT; + BlobSize = size; + Blob = new unsigned char[size]; + memcpy(Blob, blob, size); } -void -MyRowVariant::Create (int cols) +void MyRowVariant::Create(int cols) { // // creating the row variant // - if (ColumnArray) - delete[]ColumnArray; - NumCols = cols; - ColumnArray = new MyVariant[NumCols]; + if (ColumnArray) + delete[]ColumnArray; + NumCols = cols; + ColumnArray = new MyVariant[NumCols]; } -void -MyRowVariant::Set (int col, int value) +void MyRowVariant::Set(int col, sqlite3_int64 value) { // // setting an Integer value for the Nth column // - MyVariant *var; - if (col < 0 || col >= NumCols) - return; - var = ColumnArray + col; - var->Set (value); + MyVariant *var; + if (col < 0 || col >= NumCols) + return; + var = ColumnArray + col; + var->Set(value); } -void -MyRowVariant::Set (int col, double value) +void MyRowVariant::Set(int col, double value) { // // setting a Double value for the Nth column // - MyVariant *var; - if (col < 0 || col >= NumCols) - return; - var = ColumnArray + col; - var->Set (value); + MyVariant *var; + if (col < 0 || col >= NumCols) + return; + var = ColumnArray + col; + var->Set(value); } -void -MyRowVariant::Set (int col, const unsigned char *value) +void MyRowVariant::Set(int col, const unsigned char *value) { // // setting a String value for the Nth column // - MyVariant *var; - if (col < 0 || col >= NumCols) - return; - var = ColumnArray + col; - var->Set (value); + MyVariant *var; + if (col < 0 || col >= NumCols) + return; + var = ColumnArray + col; + var->Set(value); } -void -MyRowVariant::Set (int col, const void *blob, int size) +void MyRowVariant::Set(int col, const void *blob, int size) { // // setting a BLOB value for the Nth column // - MyVariant *var; - if (col < 0 || col >= NumCols) - return; - var = ColumnArray + col; - var->Set (blob, size); + MyVariant *var; + if (col < 0 || col >= NumCols) + return; + var = ColumnArray + col; + var->Set(blob, size); } -MyVariant * -MyRowVariant::GetColumn (int col) +MyVariant *MyRowVariant::GetColumn(int col) { // // returns a Column Variant Value // - MyVariant *var; - if (col < 0 || col >= NumCols) - return NULL; - var = ColumnArray + col; - return var; + MyVariant *var; + if (col < 0 || col >= NumCols) + return NULL; + var = ColumnArray + col; + return var; } -MyVariantList::MyVariantList () +MyVariantList::MyVariantList() { // // constructor - result set container // - NumCols = 0; - ColumnName = NULL; - First = NULL; - Last = NULL; + NumCols = 0; + ColumnName = NULL; + First = NULL; + Last = NULL; } -MyVariantList::~MyVariantList () +MyVariantList::~MyVariantList() { // // destructor - result set container // - MyRowVariant *el; - MyRowVariant *elN; - if (ColumnName) - delete[]ColumnName; - el = First; - while (el) - { - elN = el->GetNext (); - delete el; - el = elN; - } + MyRowVariant *el; + MyRowVariant *elN; + if (ColumnName) + delete[]ColumnName; + el = First; + while (el) + { + elN = el->GetNext(); + delete el; + el = elN; + } } -int -MyVariantList::GetRows () +int MyVariantList::GetRows() { // // counting how many rows are there // - int cnt = 0; - MyRowVariant *el = First; - while (el) - { - cnt++; - el = el->GetNext (); - } - return cnt; + int cnt = 0; + MyRowVariant *el = First; + while (el) + { + cnt++; + el = el->GetNext(); + } + return cnt; } -MyRowVariant * -MyVariantList::Add (int columns) +MyRowVariant *MyVariantList::Add(int columns) { // // adds a row into the result set // - if (!NumCols) - { - NumCols = columns; - ColumnName = new wxString[NumCols]; - } - MyRowVariant *el = new MyRowVariant (columns); - if (!First) - First = el; - if (Last) - Last->SetNext (el); - Last = el; - return el; + if (!NumCols) + { + NumCols = columns; + ColumnName = new wxString[NumCols]; + } + MyRowVariant *el = new MyRowVariant(columns); + if (!First) + First = el; + if (Last) + Last->SetNext(el); + Last = el; + return el; } -void -MyVariantList::SetColumnName (int col, const char *name) +void MyVariantList::SetColumnName(int col, const char *name) { // // storing a column name // - if (col < 0 || col >= NumCols) - return; - ColumnName[col] = wxString::FromUTF8 (name); + if (col < 0 || col >= NumCols) + return; + ColumnName[col] = wxString::FromUTF8(name); } -wxString & MyVariantList::GetColumnName (int col) +wxString & MyVariantList::GetColumnName(int col) { // // retrieving a column name // - return ColumnName[col]; + return ColumnName[col]; } -MyBlobs::MyBlobs (int rows, int cols) +MyBlobs::MyBlobs(int rows, int cols) { // // constructor - a BLOB matrix // - int r; - MyRowVariant *rowVar; - NumRows = 0; - NumCols = 0; - Rows = NULL; - if (rows < 1 || cols < 1) - return; - NumRows = rows; - NumCols = cols; - Rows = new MyRowVariant[rows]; - for (r = 0; r < rows; r++) - { - rowVar = Rows + r; - rowVar->Create (cols); - } + int r; + MyRowVariant *rowVar; + NumRows = 0; + NumCols = 0; + Rows = NULL; + if (rows < 1 || cols < 1) + return; + NumRows = rows; + NumCols = cols; + Rows = new MyRowVariant[rows]; + for (r = 0; r < rows; r++) + { + rowVar = Rows + r; + rowVar->Create(cols); + } } -MyBlobs::~MyBlobs () +MyBlobs::~MyBlobs() { // // destructor - a BLOB matrix // - if (Rows) - delete[]Rows; + if (Rows) + delete[]Rows; } -void -MyBlobs::SetBlob (int row, int col, MyVariant * org) +void MyBlobs::SetBlob(int row, int col, MyVariant * org) { // // setting a BLOB value // - MyRowVariant *rowVar; - MyVariant *dest; - if (row < 0 || row >= NumRows) - return; - if (col < 0 || col >= NumCols) - return; - rowVar = Rows + row; - if (!rowVar) - return; - dest = rowVar->GetColumn (col); - if (!dest) - return; - dest->Copy (org); + MyRowVariant *rowVar; + MyVariant *dest; + if (row < 0 || row >= NumRows) + return; + if (col < 0 || col >= NumCols) + return; + rowVar = Rows + row; + if (!rowVar) + return; + dest = rowVar->GetColumn(col); + if (!dest) + return; + dest->Copy(org); } -MyVariant * -MyBlobs::GetBlob (int row, int col) +MyVariant *MyBlobs::GetBlob(int row, int col) { // // return a BLOB value // - MyRowVariant *rowVar; - MyVariant *dest; - if (row < 0 || row >= NumRows) - return NULL; - if (col < 0 || col >= NumCols) - return NULL; - rowVar = Rows + row; - if (!rowVar) - return NULL; - dest = rowVar->GetColumn (col); - if (!dest) - return NULL; - if (dest->GetType () != MY_BLOB_VARIANT) - return NULL; - return dest; + MyRowVariant *rowVar; + MyVariant *dest; + if (row < 0 || row >= NumRows) + return NULL; + if (col < 0 || col >= NumCols) + return NULL; + rowVar = Rows + row; + if (!rowVar) + return NULL; + dest = rowVar->GetColumn(col); + if (!dest) + return NULL; + if (dest->GetType() != MY_BLOB_VARIANT) + return NULL; + return dest; } -MyValues::MyValues (int rows, int cols) +MyValues::MyValues(int rows, int cols) { // // constructor - a generic values matrix // - int r; - MyRowVariant *rowVar; - NumRows = 0; - NumCols = 0; - Rows = NULL; - if (rows < 1 || cols < 1) - return; - NumRows = rows; - NumCols = cols; - Rows = new MyRowVariant[rows]; - for (r = 0; r < rows; r++) - { - rowVar = Rows + r; - rowVar->Create (cols); - } + int r; + MyRowVariant *rowVar; + NumRows = 0; + NumCols = 0; + Rows = NULL; + if (rows < 1 || cols < 1) + return; + NumRows = rows; + NumCols = cols; + Rows = new MyRowVariant[rows]; + for (r = 0; r < rows; r++) + { + rowVar = Rows + r; + rowVar->Create(cols); + } } -MyValues::~MyValues () +MyValues::~MyValues() { // // destructor - a generic values matrix // - if (Rows) - delete[]Rows; + if (Rows) + delete[]Rows; } -void -MyValues::SetValue (int row, int col, int value) +void MyValues::SetValue(int row, int col, sqlite3_int64 value) { // // setting an integer value // - MyRowVariant *rowVar; - MyVariant *dest; - if (row < 0 || row >= NumRows) - return; - if (col < 0 || col >= NumCols) - return; - rowVar = Rows + row; - if (!rowVar) - return; - dest = rowVar->GetColumn (col); - if (!dest) - return; - dest->Set (value); + MyRowVariant *rowVar; + MyVariant *dest; + if (row < 0 || row >= NumRows) + return; + if (col < 0 || col >= NumCols) + return; + rowVar = Rows + row; + if (!rowVar) + return; + dest = rowVar->GetColumn(col); + if (!dest) + return; + dest->Set(value); } -void -MyValues::SetValue (int row, int col, double value) +void MyValues::SetValue(int row, int col, double value) { // // setting a double value // - MyRowVariant *rowVar; - MyVariant *dest; - if (row < 0 || row >= NumRows) - return; - if (col < 0 || col >= NumCols) - return; - rowVar = Rows + row; - if (!rowVar) - return; - dest = rowVar->GetColumn (col); - if (!dest) - return; - dest->Set (value); + MyRowVariant *rowVar; + MyVariant *dest; + if (row < 0 || row >= NumRows) + return; + if (col < 0 || col >= NumCols) + return; + rowVar = Rows + row; + if (!rowVar) + return; + dest = rowVar->GetColumn(col); + if (!dest) + return; + dest->Set(value); } -void -MyValues::SetValue (int row, int col, wxString & value) +void MyValues::SetValue(int row, int col, wxString & value) { // // setting a string value // - MyRowVariant *rowVar; - MyVariant *dest; - if (row < 0 || row >= NumRows) - return; - if (col < 0 || col >= NumCols) - return; - rowVar = Rows + row; - if (!rowVar) - return; - dest = rowVar->GetColumn (col); - if (!dest) - return; - dest->Set (value); + MyRowVariant *rowVar; + MyVariant *dest; + if (row < 0 || row >= NumRows) + return; + if (col < 0 || col >= NumCols) + return; + rowVar = Rows + row; + if (!rowVar) + return; + dest = rowVar->GetColumn(col); + if (!dest) + return; + dest->Set(value); } -MyVariant * -MyValues::GetValue (int row, int col) +MyVariant *MyValues::GetValue(int row, int col) { // // return a generic value // - MyRowVariant *rowVar; - MyVariant *dest; - if (row < 0 || row >= NumRows) - return NULL; - if (col < 0 || col >= NumCols) - return NULL; - rowVar = Rows + row; - if (!rowVar) - return NULL; - dest = rowVar->GetColumn (col); - if (!dest) - return NULL; - return dest; + MyRowVariant *rowVar; + MyVariant *dest; + if (row < 0 || row >= NumRows) + return NULL; + if (col < 0 || col >= NumCols) + return NULL; + rowVar = Rows + row; + if (!rowVar) + return NULL; + dest = rowVar->GetColumn(col); + if (!dest) + return NULL; + return dest; } -MyRowVariant * -MyValues::GetRow (int row) +MyRowVariant *MyValues::GetRow(int row) { // // return a row of generic values // - MyRowVariant *rowVar; - if (row < 0 || row >= NumRows) - return NULL; - rowVar = Rows + row; - return rowVar; + MyRowVariant *rowVar; + if (row < 0 || row >= NumRows) + return NULL; + rowVar = Rows + row; + return rowVar; } -MyColumnInfo::MyColumnInfo (wxString & name, bool pkey) +MyColumnInfo::MyColumnInfo(wxString & name, bool pkey) { // // constructor - a table column object // - Name = name; - PrimaryKey = pkey; - Geometry = false; - GeometryIndex = false; - Next = NULL; + Name = name; + PrimaryKey = pkey; + Geometry = false; + GeometryIndex = false; + MbrCache = false; + Next = NULL; } -MyIndexInfo::MyIndexInfo (wxString & name) +MyIndexInfo::MyIndexInfo(wxString & name) { // // constructor - a table index object // - Name = name; - Next = NULL; + Name = name; + Next = NULL; } -MyTriggerInfo::MyTriggerInfo (wxString & name) +MyTriggerInfo::MyTriggerInfo(wxString & name) { // // constructor - a table trigger object // - Name = name; - Next = NULL; + Name = name; + Next = NULL; } -MyTableInfo::~MyTableInfo () +MyTableInfo::~MyTableInfo() { // // destructor - a table columns collection // - MyColumnInfo *elc; - MyColumnInfo *elcN; - MyIndexInfo *eli; - MyIndexInfo *eliN; - MyTriggerInfo *elt; - MyTriggerInfo *eltN; - elc = FirstColumn; - while (elc) - { - elcN = elc->GetNext (); - delete elc; - elc = elcN; - } - eli = FirstIndex; - while (eli) - { - eliN = eli->GetNext (); - delete eli; - eli = eliN; - } - elt = FirstTrigger; - while (elt) - { - eltN = elt->GetNext (); - delete elt; - elt = eltN; - } -} - -void -MyTableInfo::AddColumn (wxString & name, bool pkey) + MyColumnInfo *elc; + MyColumnInfo *elcN; + MyIndexInfo *eli; + MyIndexInfo *eliN; + MyTriggerInfo *elt; + MyTriggerInfo *eltN; + elc = FirstColumn; + while (elc) + { + elcN = elc->GetNext(); + delete elc; + elc = elcN; + } + eli = FirstIndex; + while (eli) + { + eliN = eli->GetNext(); + delete eli; + eli = eliN; + } + elt = FirstTrigger; + while (elt) + { + eltN = elt->GetNext(); + delete elt; + elt = eltN; + } +} + +void MyTableInfo::AddColumn(wxString & name, bool pkey) { // // inserting a column def into a table // - MyColumnInfo *el = new MyColumnInfo (name, pkey); - if (!FirstColumn) - FirstColumn = el; - if (LastColumn) - LastColumn->SetNext (el); - LastColumn = el; + MyColumnInfo *el = new MyColumnInfo(name, pkey); + if (!FirstColumn) + FirstColumn = el; + if (LastColumn) + LastColumn->SetNext(el); + LastColumn = el; } -void -MyTableInfo::SetGeometry (wxString & name, bool index, bool cached) +void MyTableInfo::SetGeometry(wxString & name, bool index, bool cached) { // //setting a geometry column // - MyColumnInfo *elc; - elc = FirstColumn; - while (elc) - { - if (name == elc->GetName ()) - { - elc->SetGeometry (); - if (index == true) - elc->SetGeometryIndex (); - if (cached == true) - elc->SetMbrCache (); - } - elc = elc->GetNext (); - } + MyColumnInfo *elc; + elc = FirstColumn; + while (elc) + { + if (name == elc->GetName()) + { + elc->SetGeometry(); + if (index == true) + elc->SetGeometryIndex(); + if (cached == true) + elc->SetMbrCache(); + } + elc = elc->GetNext(); + } } -void -MyTableInfo::AddIndex (wxString & name) +void MyTableInfo::AddIndex(wxString & name) { // // inserting an index def into a table // - MyIndexInfo *el = new MyIndexInfo (name); - if (!FirstIndex) - FirstIndex = el; - if (LastIndex) - LastIndex->SetNext (el); - LastIndex = el; + MyIndexInfo *el = new MyIndexInfo(name); + if (!FirstIndex) + FirstIndex = el; + if (LastIndex) + LastIndex->SetNext(el); + LastIndex = el; } -void -MyTableInfo::AddTrigger (wxString & name) +void MyTableInfo::AddTrigger(wxString & name) { // // inserting a trigger def into a table // - MyTriggerInfo *el = new MyTriggerInfo (name); - if (!FirstTrigger) - FirstTrigger = el; - if (LastTrigger) - LastTrigger->SetNext (el); - LastTrigger = el; + MyTriggerInfo *el = new MyTriggerInfo(name); + if (!FirstTrigger) + FirstTrigger = el; + if (LastTrigger) + LastTrigger->SetNext(el); + LastTrigger = el; } -MyViewInfo::~MyViewInfo () +MyViewInfo::~MyViewInfo() { // // destructor - a view columns collection // - MyColumnInfo *elc; - MyColumnInfo *elcN; - elc = First; - while (elc) - { - elcN = elc->GetNext (); - delete elc; - elc = elcN; - } + MyColumnInfo *elc; + MyColumnInfo *elcN; + elc = First; + while (elc) + { + elcN = elc->GetNext(); + delete elc; + elc = elcN; + } } -void -MyViewInfo::AddColumn (wxString & name) +void MyViewInfo::AddColumn(wxString & name) { // // inserting a column def into a view // - MyColumnInfo *el = new MyColumnInfo (name, false); - if (!First) - First = el; - if (Last) - Last->SetNext (el); - Last = el; + MyColumnInfo *el = new MyColumnInfo(name, false); + if (!First) + First = el; + if (Last) + Last->SetNext(el); + Last = el; } -MySqlHistory::~MySqlHistory () +MySqlHistory::~MySqlHistory() { // // destructor - the SQL queries history // - MySqlQuery *elq; - MySqlQuery *elqN; - elq = First; - while (elq) - { - elqN = elq->GetNext (); - delete elq; - elq = elqN; - } + MySqlQuery *elq; + MySqlQuery *elqN; + elq = First; + while (elq) + { + elqN = elq->GetNext(); + delete elq; + elq = elqN; + } } -void -MySqlHistory::Add (wxString & sql) +void MySqlHistory::Add(wxString & sql) { // // inserting an SQL query into the history // - if (Last) - { - // avoiding stupid duplicates - if (Last->GetSql () == sql) - return; - } - MySqlQuery *el = new MySqlQuery (sql); - if (!First) - First = el; - el->SetPrev (Last); - if (Last) - Last->SetNext (el); - Last = el; - Current = el; + if (Last) + { + // avoiding stupid duplicates + if (Last->GetSql() == sql) + return; + } + MySqlQuery *el = new MySqlQuery(sql); + if (!First) + First = el; + el->SetPrev(Last); + if (Last) + Last->SetNext(el); + Last = el; + Current = el; } -MySqlQuery * -MySqlHistory::GetNext () +MySqlQuery *MySqlHistory::GetNext() { // // return the next SQL query // - if (Current) - { - if (Current->GetNext ()) - { - Current = Current->GetNext (); - return Current; - } - else - return NULL; - } - return NULL; + if (Current) + { + if (Current->GetNext()) + { + Current = Current->GetNext(); + return Current; + } else + return NULL; + } + return NULL; } -MySqlQuery * -MySqlHistory::GetPrev () +MySqlQuery *MySqlHistory::GetPrev() { // // return the previous SQL query // - if (Current) - { - if (Current->GetPrev ()) - { - Current = Current->GetPrev (); - return Current; - } - else - return NULL; - } - return NULL; + if (Current) + { + if (Current->GetPrev()) + { + Current = Current->GetPrev(); + return Current; + } else + return NULL; + } + return NULL; } -bool -MySqlHistory::TestNext () +bool MySqlHistory::TestNext() { // // tests if the next SQL query exists // - if (Current) - { - if (Current->GetNext ()) - return true; - else - return false; - } - return false; + if (Current) + { + if (Current->GetNext()) + return true; + else + return false; + } + return false; } -bool -MySqlHistory::TestPrev () +bool MySqlHistory::TestPrev() { // // tests if the previous SQL query exists // - if (Current) - { - if (Current->GetPrev ()) - return true; - else - return false; - } - return false; + if (Current) + { + if (Current->GetPrev()) + return true; + else + return false; + } + return false; +} + +AutoFDOTables::~AutoFDOTables() +{ +// +// destructor - auto FDO-OGR wrapper linked list +// + AutoFDOTable *el; + AutoFDOTable *elN; + el = First; + while (el) + { + elN = el->GetNext(); + delete el; + el = elN; + } +} + +void AutoFDOTables::Add(const char *name, const int len) +{ +// +// adding a table name to the auto FDO-OGR wrapper linked list +// + AutoFDOTable *el = new AutoFDOTable(name, len); + if (!First) + First = el; + if (Last) + Last->SetNext(el); + Last = el; } Index: QueryView.cpp ================================================================== --- QueryView.cpp +++ QueryView.cpp @@ -1,10 +1,10 @@ /* / QueryView.cpp -/ a panel to set and show SQL queries +/ a panel to set SQL queries / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -34,1558 +34,979 @@ #include "icons/sql_go.xpm" #include "icons/hs_back.xpm" #include "icons/hs_back_no.xpm" #include "icons/hs_forward.xpm" #include "icons/hs_forward_no.xpm" -#include "icons/rs_first.xpm" -#include "icons/rs_last.xpm" -#include "icons/rs_next.xpm" -#include "icons/rs_previous.xpm" -#include "icons/refresh.xpm" -MyQueryView::MyQueryView (MyFrame * parent, wxWindowID id): -wxPanel (parent, id, wxDefaultPosition, wxSize (440, 480), wxBORDER_SUNKEN) +MyQueryView::MyQueryView(MyFrame * parent, wxWindowID id): +wxPanel(parent, id, wxDefaultPosition, wxSize(440, 76), wxBORDER_SUNKEN) { // // constructor: a frame for SQL Queries // - RsBlock = 500; // the ResultSet block size - RowIds = new int[RsBlock]; - ReadOnly = true; - InsertRow = NULL; - MainFrame = parent; + MainFrame = parent; + BracketStart = -1; + BracketEnd = -1; + IgnoreEvent = false; // SQL statement - SqlCtrl = - new wxTextCtrl (this, ID_SQL, wxT (""), wxPoint (40, 5), - wxSize (200, 20), - wxTE_MULTILINE | wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | - wxHSCROLL); - BtnSqlGo = - new wxBitmapButton (this, ID_SQL_GO, wxBitmap (sql_go_xpm), - wxPoint (340, 30), wxSize (32, 48)); - BtnSqlGo->SetToolTip (wxT ("Execute SQL statement")); - BtnHistoryBack = - new wxBitmapButton (this, ID_HISTORY_BACK, wxBitmap (hs_back_xpm), - wxPoint (5, 5), wxSize (32, 48)); - BtnHistoryBack->SetBitmapDisabled (wxBitmap (hs_back_no_xpm)); - BtnHistoryBack->SetToolTip (wxT ("History: previous SQL statement")); - BtnHistoryForward = - new wxBitmapButton (this, ID_HISTORY_FORWARD, wxBitmap (hs_forward_xpm), - wxPoint (5, 55), wxSize (32, 48)); - BtnHistoryForward->SetBitmapDisabled (wxBitmap (hs_forward_no_xpm)); - BtnHistoryForward->SetToolTip (wxT ("History: next SQL statement")); - BtnRsFirst = - new wxBitmapButton (this, ID_RS_FIRST, wxBitmap (rs_first_xpm), - wxPoint (5, 400), wxSize (32, 32)); - BtnRsFirst->SetToolTip (wxT ("ResultSet: go to first row")); - BtnRsPrevious = - new wxBitmapButton (this, ID_RS_PREVIOUS, wxBitmap (rs_previous_xpm), - wxPoint (55, 400), wxSize (32, 32)); - BtnRsPrevious->SetToolTip (wxT ("ResultSet: go to previous block")); - BtnRefresh = - new wxBitmapButton (this, ID_REFRESH, wxBitmap (refresh_xpm), - wxPoint (55, 400), wxSize (32, 32)); - BtnRefresh->SetToolTip (wxT ("ResultSet: refresh")); - BtnRsNext = - new wxBitmapButton (this, ID_RS_NEXT, wxBitmap (rs_next_xpm), - wxPoint (105, 400), wxSize (32, 32)); - BtnRsNext->SetToolTip (wxT ("ResultSet: go to next block")); - BtnRsLast = - new wxBitmapButton (this, ID_RS_LAST, wxBitmap (rs_last_xpm), - wxPoint (155, 400), wxSize (32, 32)); - BtnRsLast->SetToolTip (wxT ("ResultSet: go to last row")); - RsCurrentBlock = - new wxStaticText (this, ID_RS_BLOCK, wxT (""), wxPoint (210, 400), - wxSize (200, 18)); - TableView = NULL; - TableBlobs = NULL; - TableValues = NULL; - CurrentBlob = NULL; - SetHistoryStates (); + SqlCtrl = + new MySqlControl(this, ID_SQL, wxT(""), wxPoint(40, 5), + wxSize(20, 20), + wxTE_MULTILINE | wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | + wxHSCROLL | wxTE_RICH); + BtnSqlGo = + new wxBitmapButton(this, ID_SQL_GO, wxBitmap(sql_go_xpm), wxPoint(340, 5), + wxSize(32, 69)); + BtnSqlGo->SetToolTip(wxT("Execute SQL statement")); + BtnHistoryBack = + new wxBitmapButton(this, ID_HISTORY_BACK, wxBitmap(hs_back_xpm), + wxPoint(5, 5), wxSize(32, 32)); + BtnHistoryBack->SetBitmapDisabled(wxBitmap(hs_back_no_xpm)); + BtnHistoryBack->SetToolTip(wxT("History: previous SQL statement")); + BtnHistoryForward = + new wxBitmapButton(this, ID_HISTORY_FORWARD, wxBitmap(hs_forward_xpm), + wxPoint(5, 40), wxSize(32, 32)); + BtnHistoryForward->SetBitmapDisabled(wxBitmap(hs_forward_no_xpm)); + BtnHistoryForward->SetToolTip(wxT("History: next SQL statement")); + SetHistoryStates(); // setting up event handlers - Connect (ID_SQL_GO, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnSqlGo); - Connect (ID_HISTORY_BACK, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnHistoryBack); - Connect (ID_HISTORY_FORWARD, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnHistoryForward); - Connect (ID_RS_FIRST, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnRsFirst); - Connect (ID_RS_PREVIOUS, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnRsPrevious); - Connect (ID_RS_NEXT, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnRsNext); - Connect (ID_RS_LAST, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnRsLast); - Connect (ID_REFRESH, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) & MyQueryView::OnRefresh); - Connect (wxID_ANY, wxEVT_SIZE, - (wxObjectEventFunction) & MyQueryView::OnSize); - Connect (wxID_ANY, wxEVT_GRID_SELECT_CELL, - (wxObjectEventFunction) & MyQueryView::OnCellSelected); - Connect (wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, - (wxObjectEventFunction) & MyQueryView::OnRightClick); - Connect (wxID_ANY, wxEVT_GRID_CELL_CHANGE, - (wxObjectEventFunction) & MyQueryView::OnCellChanged); - Connect (Grid_Delete, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdDelete); - Connect (Grid_Insert, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdInsert); - Connect (Grid_Abort, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdAbort); - Connect (Grid_Clear, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdClearSelection); - Connect (Grid_All, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdSelectAll); - Connect (Grid_Row, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdSelectRow); - Connect (Grid_Column, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdSelectColumn); - Connect (Grid_Copy, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdCopy); - Connect (Grid_Blob, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdBlob); - Connect (Grid_BlobIn, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdBlobIn); - Connect (Grid_BlobOut, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdBlobOut); - Connect (Grid_BlobNull, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyQueryView::OnCmdBlobNull); -} - -void -MyQueryView::ShowSqlControls () + Connect(ID_SQL_GO, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyQueryView::OnSqlGo); + Connect(ID_HISTORY_BACK, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyQueryView::OnHistoryBack); + Connect(ID_HISTORY_FORWARD, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyQueryView::OnHistoryForward); + Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & MyQueryView::OnSize); + Connect(wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, + (wxObjectEventFunction) & MyQueryView::OnSqlSyntaxColor); +} + +void MyQueryView::ShowControls() { // // making all SQL controls to be visible // - SqlCtrl->Show (true); - BtnSqlGo->Show (true); - BtnHistoryBack->Show (true); - BtnHistoryForward->Show (true); - SetHistoryStates (); + SqlCtrl->Show(true); + BtnSqlGo->Show(true); + BtnHistoryBack->Show(true); + BtnHistoryForward->Show(true); + SetHistoryStates(); } -void -MyQueryView::ShowRsControls () -{ -// -// making all ResultSet controls to be visible -// - BtnRsFirst->Show (true); - BtnRsPrevious->Show (true); - BtnRsNext->Show (true); - BtnRsLast->Show (true); - BtnRefresh->Show (true); - RsCurrentBlock->Show (true); - if (TableView) - TableView->Show (true); -} - -void -MyQueryView::HideControls () +void MyQueryView::HideControls() { // // making all controls to be invisible // - SqlCtrl->Show (false); - BtnSqlGo->Show (false); - BtnHistoryBack->Show (false); - BtnHistoryForward->Show (false); - BtnRsFirst->Show (false); - BtnRsPrevious->Show (false); - BtnRsNext->Show (false); - BtnRsLast->Show (false); - BtnRefresh->Show (false); - RsCurrentBlock->Show (false); - if (TableView) - TableView->Show (false); -} - -void -MyQueryView::HideRsControls () -{ -// -// making all ResultSet controls to be invisible -// - BtnRsFirst->Show (false); - BtnRsPrevious->Show (false); - BtnRsNext->Show (false); - BtnRsLast->Show (false); - BtnRefresh->Show (false); - RsCurrentBlock->Show (false); - if (TableView) - TableView->Show (false); -} - -void -MyQueryView::SetHistoryStates () + SqlCtrl->Show(false); + BtnSqlGo->Show(false); + BtnHistoryBack->Show(false); + BtnHistoryForward->Show(false); + +} + +void MyQueryView::AddToHistory(wxString & sql) +{ +// +// adds an SQL statement to history +// + History.Add(sql); + SetHistoryStates(); +} + +void MyQueryView::SetHistoryStates() { // // updates the history buttons state // - BtnHistoryForward->Enable (History.TestNext ()); - BtnHistoryBack->Enable (History.TestPrev ()); + BtnHistoryForward->Enable(History.TestNext()); + BtnHistoryBack->Enable(History.TestPrev()); } -void -MyQueryView::EditTable (wxString & sql, int *primaryKeys, int *blobCols, - wxString & table) -{ -// -// starting the edit table sequence -// - int i; - for (i = 0; i < 1024; i++) - { - PrimaryKeys[i] = *(primaryKeys + i); - BlobColumns[i] = *(blobCols + i); - } - ReadOnly = false; - TableName = table; - SqlCtrl->SetValue (sql); - if (ExecuteSql (sql, 0) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); -} - -void -MyQueryView::SetSql (wxString & sql, bool execute) +void MyQueryView::SetSql(wxString & sql, bool execute) { // // sets an SQL statement [and maybe executes it] // - ReadOnly = true; - SqlCtrl->SetValue (sql); - if (execute == true) - { - if (ExecuteSql (sql, 0) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, MainFrame); - } -} - -bool -MyQueryView::ExecuteSql (wxString & sql, int from) -{ -// -// executing some SQL statement -// - char *xSql = NULL; - char err_msg[2048]; - int columns; - int i_col; - int i_row; - int end_row = 0; - wxString blobType; - MyVariantList list; - MyRowVariant *row; - MyVariant *value; - wxString cellValue; - wxString currentBlock; - sqlite3_stmt *stmt; - sqlite3 *sqlite = MainFrame->GetSqlite (); - SqlErrorMsg = wxT (""); - if (TableView) - TableView->Destroy (); - TableView = NULL; - if (TableBlobs) - delete TableBlobs; - if (TableValues) - delete TableValues; - TableBlobs = NULL; - TableValues = NULL; - CurrentBlob = NULL; - HideRsControls (); - RsBeginRow = 0; - RsEndRow = 0; - RsMaxRow = 0; - for (i_row = 0; i_row < RsBlock; i_row++) - RowIds[i_row] = -1; - i_row = 0; - xSql = new char[65536]; - strcpy (xSql, sql.ToUTF8 ()); - ::wxBeginBusyCursor (); - int ret = sqlite3_prepare_v2 (sqlite, xSql, strlen (xSql), &stmt, NULL); - if (ret != SQLITE_OK) - { - sprintf (err_msg, "SQL error: \"%s\"", sqlite3_errmsg (sqlite)); - SqlErrorMsg = wxString::FromUTF8 (err_msg); - ::wxEndBusyCursor (); - delete[]xSql; - return false; - } - RsCurrentBlock->Show (true); - while (1) - { - // - // fetching the result set rows - // - ret = sqlite3_step (stmt); - if (ret == SQLITE_DONE) - break; // end of result set - if (ret == SQLITE_ROW) - { - // - // fetching a row - // - if ((i_row % 100) == 0) - { - currentBlock.Printf (wxT - ("fetching the result set: %d rows"), - i_row); - RsCurrentBlock->SetLabel (currentBlock); - } - if (i_row < from) - { - i_row++; - continue; - } - if ((i_row - from) >= RsBlock) - { - i_row++; - continue; - } - end_row = i_row; - columns = sqlite3_column_count (stmt); - MyRowVariant *rowVariant = list.Add (columns); - for (i_col = 0; i_col < columns; i_col++) - { - int int_value; - double dbl_value; - const unsigned char *txt_value; - const void *blob_value; - int blobSize; - list.SetColumnName (i_col, - sqlite3_column_name (stmt, i_col)); - switch (sqlite3_column_type (stmt, i_col)) - { - case SQLITE_INTEGER: - int_value = sqlite3_column_int (stmt, i_col); - rowVariant->Set (i_col, int_value); - break; - case SQLITE_FLOAT: - dbl_value = sqlite3_column_double (stmt, i_col); - rowVariant->Set (i_col, dbl_value); - break; - case SQLITE_TEXT: - txt_value = sqlite3_column_text (stmt, i_col); - rowVariant->Set (i_col, txt_value); - break; - case SQLITE_BLOB: - blob_value = sqlite3_column_blob (stmt, i_col); - blobSize = sqlite3_column_bytes (stmt, i_col); - rowVariant->Set (i_col, blob_value, blobSize); - break; - case SQLITE_NULL: - default: - break; - }; - } - i_row++; - } - else - { - sprintf (err_msg, "SQL error: \"%s\"", sqlite3_errmsg (sqlite)); - SqlErrorMsg = wxString::FromUTF8 (err_msg); - goto error; - } - } - sqlite3_finalize (stmt); - RsBeginRow = from; - RsEndRow = end_row; - RsMaxRow = i_row; - if (list.GetRows () == 0) - { - // - // this one is an EMPTY Result Set - // - if (ReadOnly == false) - { - // preparing the insert row - int numCols = 0; - wxString *colNames = - MainFrame->GetColumnNames (TableName, &numCols); - CreateGrid (0, numCols + 1); - TableView->SetColLabelValue (0, wxT ("ROWID")); - for (i_col = 0; i_col < numCols; i_col++) - TableView->SetColLabelValue (i_col + 1, - *(colNames + i_col)); - TableView->EnableEditing (true); - delete[]colNames; - } - else - { - // simply showing a warning message - CreateGrid (1, 1); - TableView->SetColLabelValue (0, wxT ("Message")); - TableView->SetRowLabelValue (0, wxT ("Message")); - TableView->SetCellValue (0, 0, - wxT - ("SQL query returned an empty ResultSet\n\nThis is not an error")); - } - } - else - { - // - // preparing the Grid to show the result set - // - CreateGrid (list.GetRows (), list.GetColumns ()); - if (ReadOnly == true) - TableView->EnableEditing (false); - else - TableView->EnableEditing (true); - for (i_col = 0; i_col < list.GetColumns (); i_col++) - TableView->SetColLabelValue (i_col, list.GetColumnName (i_col)); - if (ReadOnly == false) - TableView->SetColLabelValue (0, wxT ("ROWID")); - i_row = 0; - row = list.GetFirst (); - while (row) - { - cellValue.Printf (wxT ("%d"), i_row + RsBeginRow + 1); - TableView->SetRowLabelValue (i_row, cellValue); - if (ReadOnly == false) - { - // storing the ROWID value into the RowIds array - value = row->GetColumn (0); - if (value->GetType () == MY_INT_VARIANT) - RowIds[i_row] = value->GetIntValue (); - } - for (i_col = 0; i_col < row->GetNumCols (); i_col++) - { - value = row->GetColumn (i_col); - if (value) - { - switch (value->GetType ()) - { - case MY_INT_VARIANT: - cellValue.Printf (wxT ("%d"), - value->GetIntValue ()); - TableView->SetCellValue (i_row, i_col, - cellValue); - if (ReadOnly == false) - TableValues->SetValue (i_row, i_col, - value->GetIntValue - ()); - break; - case MY_DBL_VARIANT: - cellValue.Printf (wxT ("%1.4lf"), - value->GetDblValue ()); - TableView->SetCellValue (i_row, i_col, - cellValue); - if (ReadOnly == false) - TableValues->SetValue (i_row, i_col, - value->GetDblValue - ()); - break; - case MY_TXT_VARIANT: - TableView->SetCellValue (i_row, i_col, - value->GetTxtValue - ()); - if (ReadOnly == false) - TableValues->SetValue (i_row, i_col, - value->GetTxtValue - ()); - break; - case MY_BLOB_VARIANT: - blobType = wxT ("UNKNOWN type"); - switch (MainFrame->GuessBlobType - (value->GetBlobSize (), - value->GetBlob ())) - { - case MyFrame::BLOB_GEOMETRY: - blobType = wxT ("GEOMETRY"); - break; - case MyFrame::BLOB_EXIF: - case MyFrame::BLOB_JFIF: - case MyFrame::BLOB_JPEG: - blobType = wxT ("JPEG image"); - break; - case MyFrame::BLOB_PNG: - blobType = wxT ("PNG image"); - break; - case MyFrame::BLOB_GIF: - blobType = wxT ("GIF image"); - break; - case MyFrame::BLOB_PDF: - blobType = wxT ("PDF document"); - break; - case MyFrame::BLOB_ZIP: - blobType = wxT ("ZIP archive"); - break; - }; - cellValue.Printf (wxT ("BLOB sz=%d "), - value->GetBlobSize ()); - cellValue += blobType; - TableView->SetCellValue (i_row, i_col, - cellValue); - TableView->SetReadOnly (i_row, i_col); - TableBlobs->SetBlob (i_row, i_col, value); - break; - case MY_NULL_VARIANT: - default: - TableView->SetCellValue (i_row, i_col, - wxT ("NULL")); - break; - }; - } - else - TableView->SetCellValue (i_row, i_col, wxT ("NULL")); - if (ReadOnly == false) - { - if (IsPrimaryKey (i_col) == true) - TableView->SetReadOnly (i_row, i_col); - if (IsBlobColumn (i_col) == true) - TableView->SetReadOnly (i_row, i_col); - } - } - i_row++; - row = row->GetNext (); - } - } - if (ReadOnly == false) - { - // prepearing the insert row - TableView->SetRowLabelValue (TableView->GetNumberRows () - 1, - wxT ("Insert row")); - InsertPending = false; - for (i_col = 0; i_col < TableView->GetNumberCols (); i_col++) - { - TableView->SetCellValue (TableView->GetNumberRows () - 1, i_col, - wxT ("")); - TableView->SetCellBackgroundColour (TableView-> - GetNumberRows () - 1, i_col, - wxColour (0, 0, 0)); - TableView->SetReadOnly (TableView->GetNumberRows () - 1, i_col); - } - } - TableView->AutoSize (); - ResizeTableView (); - currentBlock.Printf (wxT ("current block: %d / %d [%d rows]"), - RsBeginRow + 1, RsEndRow + 1, RsMaxRow); - RsCurrentBlock->SetLabel (currentBlock); - ShowRsControls (); - History.Add (sql); - SetHistoryStates (); - ::wxEndBusyCursor (); - if (xSql) - delete[]xSql; - return true; - error: - ::wxEndBusyCursor (); - sqlite3_finalize (stmt); - if (xSql) - delete[]xSql; - return false; -} - -bool -MyQueryView::IsPrimaryKey (int column) -{ -// -// checks if this column is a Primary Key one -// - int i; - for (i = 0; i < 1024; i++) - { - if (PrimaryKeys[i] == column) - return true; - } - return false; -} - -bool -MyQueryView::IsBlobColumn (int column) -{ -// -// checks if this column is a BLOB-type column -// - int i; - for (i = 0; i < 1024; i++) - { - if (BlobColumns[i] == column) - return true; - } - return false; -} - -void -MyQueryView::CreateGrid (int rows, int cols) -{ -// -// creating a new Grid to show the result set -// - int extra = 0; - if (ReadOnly == false) - extra = 1; - wxSize sz = GetClientSize (); - TableView = - new wxGrid (this, wxID_ANY, wxPoint (5, 120), wxSize (200, 200)); - TableView->Show (false); - TableView->CreateGrid (rows + extra, cols); - TableBlobs = new MyBlobs (rows, cols); - if (ReadOnly == false) - TableValues = new MyValues (rows, cols); -} - -void -MyQueryView::ResizeTableView () -{ -// -// resizing the Grid to show the result set -// - wxSize sz = GetClientSize (); - if (TableView) - { - TableView->SetSize (sz.GetWidth () - 10, sz.GetHeight () - 160); - TableView->Show (true); - } -} - -void -MyQueryView::OnSize (wxSizeEvent & event) + SqlCtrl->SetValue(sql); + if (execute == true) + { + if (MainFrame->GetRsView()->ExecuteSql(sql, 0, true) == false) + wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, MainFrame); + } +} + +void MyQueryView::OnSize(wxSizeEvent & event) { // // this window has changed its size // - wxSize sz = GetClientSize (); - SqlCtrl->SetSize (sz.GetWidth () - 80, 100); - BtnSqlGo->Move (sz.GetWidth () - 35, 30); - if (TableView) - TableView->SetSize (sz.GetWidth () - 10, sz.GetHeight () - 160); - BtnRsFirst->Move (5, sz.GetHeight () - 35); - BtnRsPrevious->Move (40, sz.GetHeight () - 35); - BtnRefresh->Move (75, sz.GetHeight () - 35); - BtnRsNext->Move (110, sz.GetHeight () - 35); - BtnRsLast->Move (145, sz.GetHeight () - 35); - RsCurrentBlock->Move (180, sz.GetHeight () - 25); -} - -void -MyQueryView::OnSqlGo (wxCommandEvent & WXUNUSED (event)) + int vert; + int vertBack; + wxSize sz = GetClientSize(); +// setting the SQL statement pane size + SqlCtrl->SetSize(sz.GetWidth() - 80, sz.GetHeight() - 10); +// setting the SQL GO button position + vert = (sz.GetHeight() - 69) / 2; + if (vert < 5) + vert = 5; + BtnSqlGo->Move(sz.GetWidth() - 35, 5); +// setting the SQL GO button size + vert = sz.GetHeight() - 10; + if (vert < 66) + vert = 66; + BtnSqlGo->SetSize(32, vert); +// setting the HISTORY BACK button position + BtnHistoryBack->Move(5, 5); +// setting the HISTORY BACK button size + vert = (sz.GetHeight() - 15) / 2; + if (vert < 32) + vert = 32; + BtnHistoryBack->SetSize(32, vert); + vertBack = 10 + vert; +// setting the HISTORY FORWARD button position + BtnHistoryForward->Move(5, vertBack); +// setting the HISTORY FORWARD button size + BtnHistoryForward->SetSize(32, vert); +} + +void MyQueryView::OnSqlGo(wxCommandEvent & WXUNUSED(event)) { // // executing an SQL statement // - ReadOnly = true; - wxString sql = SqlCtrl->GetValue (); - if (ExecuteSql (sql, 0) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); + wxString sql = SqlCtrl->GetValue(); + if (MainFrame->GetRsView()->ExecuteSql(sql, 0, true) == false) + wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, MainFrame); } -void -MyQueryView::OnHistoryBack (wxCommandEvent & WXUNUSED (event)) +void MyQueryView::OnHistoryBack(wxCommandEvent & WXUNUSED(event)) { // // going backward into the SQL Queries History // - MySqlQuery *sql = History.GetPrev (); - if (sql) - { - SetSql (sql->GetSql (), false); - SetHistoryStates (); - } + MySqlQuery *sql = History.GetPrev(); + if (sql) + { + SetSql(sql->GetSql(), false); + SetHistoryStates(); + } } -void -MyQueryView::OnHistoryForward (wxCommandEvent & WXUNUSED (event)) +void MyQueryView::OnHistoryForward(wxCommandEvent & WXUNUSED(event)) { // // going forward into the SQL Queries History // - MySqlQuery *sql = History.GetNext (); - if (sql) - { - SetSql (sql->GetSql (), false); - SetHistoryStates (); - } + MySqlQuery *sql = History.GetNext(); + if (sql) + { + SetSql(sql->GetSql(), false); + SetHistoryStates(); + } +} + +bool MyQueryView::IsSqlString(wxString & str) +{ +// checks if this one is an SQL string constant + char word[4096]; + strcpy(word, str.ToUTF8()); + int len = strlen(word); + if (len < 2) + return false; + if (word[0] == '\'' && word[len - 1] == '\'') + return true; + if (word[0] == '"' && word[len - 1] == '"') + return true; + return false; +} + +bool MyQueryView::IsSqlNumber(wxString & str) +{ +// checks if this one is an SQL numeric constant + double dbl; + return str.ToDouble(&dbl); +} + +bool MyQueryView::IsSqliteExtra(wxString & str) +{ +// checks if this one is an extra SQLite keyword + if (str.CmpNoCase(wxT("asc")) == 0) + return true; + if (str.CmpNoCase(wxT("desc")) == 0) + return true; + if (str.CmpNoCase(wxT("null")) == 0) + return true; + if (str.CmpNoCase(wxT("trigger")) == 0) + return true; + if (str.CmpNoCase(wxT("for")) == 0) + return true; + if (str.CmpNoCase(wxT("each")) == 0) + return true; + if (str.CmpNoCase(wxT("row")) == 0) + return true; + if (str.CmpNoCase(wxT("begin")) == 0) + return true; + if (str.CmpNoCase(wxT("end")) == 0) + return true; + if (str.CmpNoCase(wxT("before")) == 0) + return true; + if (str.CmpNoCase(wxT("after")) == 0) + return true; + if (str.CmpNoCase(wxT("virtual")) == 0) + return true; + return false; +} + +bool MyQueryView::IsSqlFunction(wxString & str, char next_c) +{ +// checks if this one is an SQL function + if (next_c != '(') + return false; + if (str.CmpNoCase(wxT("raise")) == 0) + return true; + if (str.CmpNoCase(wxT("avg")) == 0) + return true; + if (str.CmpNoCase(wxT("count")) == 0) + return true; + if (str.CmpNoCase(wxT("group_concat")) == 0) + return true; + if (str.CmpNoCase(wxT("max")) == 0) + return true; + if (str.CmpNoCase(wxT("min")) == 0) + return true; + if (str.CmpNoCase(wxT("sum")) == 0) + return true; + if (str.CmpNoCase(wxT("total")) == 0) + return true; + if (str.CmpNoCase(wxT("abs")) == 0) + return true; + if (str.CmpNoCase(wxT("coalesce")) == 0) + return true; + if (str.CmpNoCase(wxT("glob")) == 0) + return true; + if (str.CmpNoCase(wxT("ifnull")) == 0) + return true; + if (str.CmpNoCase(wxT("hex")) == 0) + return true; + if (str.CmpNoCase(wxT("last_insert_rowid")) == 0) + return true; + if (str.CmpNoCase(wxT("length")) == 0) + return true; + if (str.CmpNoCase(wxT("load_extension")) == 0) + return true; + if (str.CmpNoCase(wxT("lower")) == 0) + return true; + if (str.CmpNoCase(wxT("ltrim")) == 0) + return true; + if (str.CmpNoCase(wxT("nullif")) == 0) + return true; + if (str.CmpNoCase(wxT("quote")) == 0) + return true; + if (str.CmpNoCase(wxT("random")) == 0) + return true; + if (str.CmpNoCase(wxT("randomblob")) == 0) + return true; + if (str.CmpNoCase(wxT("replace")) == 0) + return true; + if (str.CmpNoCase(wxT("round")) == 0) + return true; + if (str.CmpNoCase(wxT("rtrim")) == 0) + return true; + if (str.CmpNoCase(wxT("soundex")) == 0) + return true; + if (str.CmpNoCase(wxT("sqlite_version")) == 0) + return true; + if (str.CmpNoCase(wxT("substr")) == 0) + return true; + if (str.CmpNoCase(wxT("trim")) == 0) + return true; + if (str.CmpNoCase(wxT("typeof")) == 0) + return true; + if (str.CmpNoCase(wxT("upper")) == 0) + return true; + if (str.CmpNoCase(wxT("zeroblob")) == 0) + return true; + return false; +} + +bool MyQueryView::IsSqlGeoFunction(wxString & str, char next_c) +{ +// checks if this one is an SQL geo-function + if (next_c != '(') + return false; + if (str.CmpNoCase(wxT("MakePoint")) == 0) + return true; + if (str.CmpNoCase(wxT("BuildMbr")) == 0) + return true; + if (str.CmpNoCase(wxT("BuildCircleMbr")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrMinX")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrMinY")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrMaxX")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrMaxY")) == 0) + return true; + if (str.CmpNoCase(wxT("GeomFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("PointFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("LineFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("LineStringFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("PolyFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("PolygonFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("MPointFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("MultiPointFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("MLineFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("MultiLineStringFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("MPolyFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("MultiPolygonFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("GeomCollFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("GeometryCollectionFromText")) == 0) + return true; + if (str.CmpNoCase(wxT("GeomFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("PointFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("LineFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("LineStringFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("PolyFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("PolygonFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("MPointFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("MultiPointFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("MLineFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("MultiLineStringFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("MPolyFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("MultiPolygonFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("GeomCollFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("GeometryCollectionFromWKB")) == 0) + return true; + if (str.CmpNoCase(wxT("AsText")) == 0) + return true; + if (str.CmpNoCase(wxT("AsBinary")) == 0) + return true; + if (str.CmpNoCase(wxT("Dimension")) == 0) + return true; + if (str.CmpNoCase(wxT("GeometryType")) == 0) + return true; + if (str.CmpNoCase(wxT("SRID")) == 0) + return true; + if (str.CmpNoCase(wxT("SetSRID")) == 0) + return true; + if (str.CmpNoCase(wxT("IsEmpty")) == 0) + return true; + if (str.CmpNoCase(wxT("IsSimple")) == 0) + return true; + if (str.CmpNoCase(wxT("IsValid")) == 0) + return true; + if (str.CmpNoCase(wxT("Boundary")) == 0) + return true; + if (str.CmpNoCase(wxT("Envelope")) == 0) + return true; + if (str.CmpNoCase(wxT("X")) == 0) + return true; + if (str.CmpNoCase(wxT("Y")) == 0) + return true; + if (str.CmpNoCase(wxT("StartPoint")) == 0) + return true; + if (str.CmpNoCase(wxT("EndPoint")) == 0) + return true; + if (str.CmpNoCase(wxT("GLength")) == 0) + return true; + if (str.CmpNoCase(wxT("IsClosed")) == 0) + return true; + if (str.CmpNoCase(wxT("IsRing")) == 0) + return true; + if (str.CmpNoCase(wxT("Simplify")) == 0) + return true; + if (str.CmpNoCase(wxT("SimplifyPreserveTopology")) == 0) + return true; + if (str.CmpNoCase(wxT("NumPoints")) == 0) + return true; + if (str.CmpNoCase(wxT("PointN")) == 0) + return true; + if (str.CmpNoCase(wxT("Centroid")) == 0) + return true; + if (str.CmpNoCase(wxT("PointOnSurface")) == 0) + return true; + if (str.CmpNoCase(wxT("Area")) == 0) + return true; + if (str.CmpNoCase(wxT("ExteriorRing")) == 0) + return true; + if (str.CmpNoCase(wxT("NumInteriorRing")) == 0) + return true; + if (str.CmpNoCase(wxT("NumInteriorRings")) == 0) + return true; + if (str.CmpNoCase(wxT("InteriorRingN")) == 0) + return true; + if (str.CmpNoCase(wxT("NumGeometries")) == 0) + return true; + if (str.CmpNoCase(wxT("GeometryN")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrEqual")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrDisjoint")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrTouches")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrWithin")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrOverlaps")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrIntersects")) == 0) + return true; + if (str.CmpNoCase(wxT("MbrContains")) == 0) + return true; + if (str.CmpNoCase(wxT("Equals")) == 0) + return true; + if (str.CmpNoCase(wxT("Disjoint")) == 0) + return true; + if (str.CmpNoCase(wxT("Touches")) == 0) + return true; + if (str.CmpNoCase(wxT("Within")) == 0) + return true; + if (str.CmpNoCase(wxT("Overlaps")) == 0) + return true; + if (str.CmpNoCase(wxT("Crosses")) == 0) + return true; + if (str.CmpNoCase(wxT("Intersects")) == 0) + return true; + if (str.CmpNoCase(wxT("Contains")) == 0) + return true; + if (str.CmpNoCase(wxT("Relate")) == 0) + return true; + if (str.CmpNoCase(wxT("Distance")) == 0) + return true; + if (str.CmpNoCase(wxT("Intersection")) == 0) + return true; + if (str.CmpNoCase(wxT("Difference")) == 0) + return true; + if (str.CmpNoCase(wxT("GUnion")) == 0) + return true; + if (str.CmpNoCase(wxT("SymDifference")) == 0) + return true; + if (str.CmpNoCase(wxT("Buffer")) == 0) + return true; + if (str.CmpNoCase(wxT("ConvexHull")) == 0) + return true; + if (str.CmpNoCase(wxT("Transform")) == 0) + return true; + if (str.CmpNoCase(wxT("ShiftCoords")) == 0) + return true; + if (str.CmpNoCase(wxT("ShiftCoordinates")) == 0) + return true; + if (str.CmpNoCase(wxT("ScaleCoords")) == 0) + return true; + if (str.CmpNoCase(wxT("ScaleCoordinates")) == 0) + return true; + if (str.CmpNoCase(wxT("RotateCoords")) == 0) + return true; + if (str.CmpNoCase(wxT("RotateCoordinates")) == 0) + return true; + if (str.CmpNoCase(wxT("ReflectCoords")) == 0) + return true; + if (str.CmpNoCase(wxT("ReflectCoordinates")) == 0) + return true; + if (str.CmpNoCase(wxT("SwapCoords")) == 0) + return true; + if (str.CmpNoCase(wxT("SwapCoordinates")) == 0) + return true; + if (str.CmpNoCase(wxT("InitSpatialMetaData")) == 0) + return true; + if (str.CmpNoCase(wxT("AddGeometryColumn")) == 0) + return true; + if (str.CmpNoCase(wxT("RecoverGeometryColumn")) == 0) + return true; + if (str.CmpNoCase(wxT("DiscardGeometryColumn")) == 0) + return true; + if (str.CmpNoCase(wxT("CreateSpatialIndex")) == 0) + return true; + if (str.CmpNoCase(wxT("CreateMbrCache")) == 0) + return true; + if (str.CmpNoCase(wxT("DisableSpatialIndex")) == 0) + return true; + if (str.CmpNoCase(wxT("FilterMbrWithin")) == 0) + return true; + if (str.CmpNoCase(wxT("FilterMbrContains")) == 0) + return true; + if (str.CmpNoCase(wxT("FilterMbrIntersects")) == 0) + return true; + if (str.CmpNoCase(wxT("BuildMbrFilter")) == 0) + return true; + return false; +} + +void MyQueryView::DoSqlSyntaxColor() +{ +// +// evidencing a nice colored SQL syntax +// + IgnoreEvent = true; + SqlCtrl->Hide(); + wxTextAttr normal_style(wxColour(128, 128, 128), wxColour(255, 255, 255), + wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_NORMAL)); + wxTextAttr sql_style(wxColour(0, 0, 255), wxColour(255, 255, 255), + wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_BOLD)); + wxTextAttr const_style(wxColour(255, 0, 255), wxColour(255, 255, 255), + wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_NORMAL)); + wxTextAttr fnct_style(wxColour(192, 128, 0), wxColour(255, 255, 255), + wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_BOLD)); + wxTextAttr bracket_style(wxColour(255, 0, 0), wxColour(192, 192, 192), + wxFont(12, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_BOLD)); + wxString sql = SqlCtrl->GetValue(); +// setting the base style + SqlCtrl->SetStyle(0, sql.Len(), normal_style); + wxString right = sql; + int from; + int to = 0; + int i; + char c; + char next_c; + SqlTokenizer tokenizer(sql); + while (tokenizer.HasMoreTokens()) + { + wxString token = tokenizer.GetNextToken(); + from = to + right.Find(token); + to = from + token.Len(); + // extracting the unparsed portion of the SQL string + right = sql.Mid(to); + next_c = '\0'; + for (i = 0; i < (int) right.Len(); i++) + { + c = right.GetChar(i); + if (c == ' ' || c == '\t' || c == '\r' || c == '\n') + continue; + next_c = c; + break; + } + char word[4096]; + strcpy(word, token.ToUTF8()); + if (gaiaIsReservedSqliteName(word)) + { + // setting the SQL keyword style + SqlCtrl->SetStyle(from, to, sql_style); + } else if (IsSqliteExtra(token)) + { + // setting the SQL keyword style + SqlCtrl->SetStyle(from, to, sql_style); + } else if (IsSqlString(token) == true) + { + // setting the SQL string constant style + SqlCtrl->SetStyle(from, to, const_style); + } else if (IsSqlNumber(token) == true) + { + // setting the SQL numeric constant style + SqlCtrl->SetStyle(from, to, const_style); + } else if (IsSqlFunction(token, next_c) == true) + { + // setting the SQL function style + SqlCtrl->SetStyle(from, to, fnct_style); + } else if (IsSqlGeoFunction(token, next_c) == true) + { + // setting the SQL geo-function style + SqlCtrl->SetStyle(from, to, fnct_style); + } + } + if (BracketStart >= 0) + { + // evidencing an opening bracket + SqlCtrl->SetStyle(BracketStart, BracketStart + 1, bracket_style); + } + if (BracketEnd >= 0) + { + // evidencing a closing bracket + SqlCtrl->SetStyle(BracketEnd, BracketEnd + 1, bracket_style); + } + SqlCtrl->Show(); + SqlCtrl->SetFocus(); + IgnoreEvent = false; +} + +void MyQueryView::OnSqlSyntaxColor(wxCommandEvent & event) +{ +// +// EVENT: updating the SQL syntax +// + if (IgnoreEvent == true) + { + // processing is still in progress; ignoring any internally generated call + return; + } + event.Skip(); + EventBrackets(); +} + +void MyQueryView::EvidBrackets(int on, int off) +{ +// evidencing corresponding brackets [open/close] + BracketStart = -1; + BracketEnd = -1; + if (on >= 0) + BracketStart = on; + if (off >= 0) + BracketEnd = off; + DoSqlSyntaxColor(); +} + +void MyQueryView::EventBrackets() +{ +// +// evidencing brackets [balancing open-close pairs] +// + if (IgnoreEvent == true) + { + // processing is still in progress; ignoring any internally generated call + return; + } + int pos = SqlCtrl->GetInsertionPoint(); + int on; + int off; + wxString sql = SqlCtrl->GetValue(); + char pre = '\0'; + char post = '\0'; + if (pos > 0) + pre = sql.GetChar(pos - 1); + if (pos < (int) sql.Len()) + post = sql.GetChar(pos); + if (post == '(') + { + // positioned before an opening bracket + if (CheckBrackets(pos, false, &on, &off) == true) + EvidBrackets(on, off); + else + EvidBrackets(pos, -1); + return; + } + if (pre == ')') + { + // positioned after a closing bracket + if (CheckBrackets(pos - 1, true, &on, &off) == true) + EvidBrackets(on, off); + else + EvidBrackets(-1, pos - 1); + return; + } + EvidBrackets(-1, -1); +} + +bool MyQueryView::CheckBrackets(int pos, bool reverse_direction, int *on, + int *off) +{ +// trying to balance a brackets pair [opening/closing] + int i; + int len; + int level = 0; + char c; + int single_quoted = 0; + int double_quoted = 0; + wxString sql = SqlCtrl->GetValue(); + if (reverse_direction == true) + { + // going backward from CLOSE to OPEN + for (i = pos - 1; i >= 0; i--) + { + c = sql.GetChar(i); + if (c == '\'' && !double_quoted) + { + // single quoting start-stop + if (single_quoted) + single_quoted = 0; + else + single_quoted = 1; + } + if (c == '"' && !single_quoted) + { + // double quoting start-stop + if (double_quoted) + double_quoted = 0; + else + double_quoted = 1; + } + if (single_quoted || double_quoted) + continue; + if (c == ')') + level++; + if (c == '(') + { + if (level == 0) + { + *on = i; + *off = pos; + return true; + } + level--; + } + } + } else + { + // going forward from OPEN to CLOSE + len = sql.Len(); + for (i = pos + 1; i < len; i++) + { + c = sql.GetChar(i); + if (c == '\'' && !double_quoted) + { + // single quoting start-stop + if (single_quoted) + single_quoted = 0; + else + single_quoted = 1; + } + if (c == '"' && !single_quoted) + { + // double quoting start-stop + if (double_quoted) + double_quoted = 0; + else + double_quoted = 1; + } + if (single_quoted || double_quoted) + continue; + if (c == '(') + level++; + if (c == ')') + { + if (level == 0) + { + *on = pos; + *off = i; + return true; + } + level--; + } + } + } + return false; +} + +MySqlControl::MySqlControl(MyQueryView * parent, wxWindowID id, const wxString & value, const wxPoint & pos, const wxSize & size, long style): +wxTextCtrl(parent, id, value, pos, size, style) +{ +// +// constructor: SQL text control +// + Parent = parent; + Connect(wxID_ANY, wxEVT_LEFT_DOWN, + (wxObjectEventFunction) & MySqlControl::OnSqlMousePosition); + Connect(wxID_ANY, wxEVT_KEY_UP, + (wxObjectEventFunction) & MySqlControl::OnSqlArrowPosition); } -void -MyQueryView::OnRsFirst (wxCommandEvent & WXUNUSED (event)) +void MySqlControl::OnSqlMousePosition(wxMouseEvent & event) { // -// scrolling to the result set beginning +// intercepting mouse clicks // - wxString sql = SqlCtrl->GetValue (); - if (ExecuteSql (sql, 0) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); + if (Parent->IsIgnoreEvent() == true) + return; + event.Skip(); + Parent->EventBrackets(); } -void -MyQueryView::OnRsPrevious (wxCommandEvent & WXUNUSED (event)) +void MySqlControl::OnSqlArrowPosition(wxKeyEvent & event) { // -// scrolling to the result set previous block +// intercepting arrow keys // - wxString sql = SqlCtrl->GetValue (); - int start = RsBeginRow - RsBlock; - if (start < 0) - start = 0; - if (ExecuteSql (sql, start) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); + if (Parent->IsIgnoreEvent() == true) + return; + event.Skip(); + int key_code = event.GetKeyCode(); + switch (key_code) + { + case WXK_DELETE: + case WXK_HOME: + case WXK_LEFT: + case WXK_UP: + case WXK_RIGHT: + case WXK_DOWN: + case WXK_PAGEUP: + case WXK_PAGEDOWN: + case WXK_NUMPAD_DELETE: + case WXK_NUMPAD_HOME: + case WXK_NUMPAD_LEFT: + case WXK_NUMPAD_UP: + case WXK_NUMPAD_RIGHT: + case WXK_NUMPAD_DOWN: + case WXK_NUMPAD_PAGEUP: + case WXK_NUMPAD_PAGEDOWN: + Parent->EventBrackets(); + break; + default: + break; + }; } -void -MyQueryView::OnRsNext (wxCommandEvent & WXUNUSED (event)) +SqlTokenizer::SqlTokenizer(wxString & sql) { -// -// scrolling to the result set next block -// - wxString sql = SqlCtrl->GetValue (); - int start = RsEndRow + 1; - if (ExecuteSql (sql, start) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); +// breaking tokens from an SQL expression + Block = 1024; + Max = Block; + int i; + char c; + int single_quoted = 0; + int double_quoted = 0; + int white_space = 0; + int start = -1; + int len; +// initial allocation for the token list + TokenList = new wxString *[Max]; + for (i = 0; i < Max; i++) + TokenList[i] = NULL; + Index = 0; + for (i = 0; i < (int) sql.Len(); i++) + { + // scanning the SQL statement + c = sql.GetChar(i); + if (c == '\'' && !double_quoted) + { + if (single_quoted) + { + single_quoted = 0; + len = i - start; + len++; + wxString *token = new wxString(sql.Mid(start, len)); + Insert(token); + start = -1; + } else + { + single_quoted = 1; + start = i; + } + continue; + } + if (c == '"' && !single_quoted) + { + if (double_quoted) + { + double_quoted = 0; + len = i - start; + len++; + wxString *token = new wxString(sql.Mid(start, len)); + Insert(token); + start = -1; + } else + { + double_quoted = 1; + start = i; + } + continue; + } + if (single_quoted || double_quoted) + continue; + if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '(' + || c == ')' || c == ';' || c == ',') + { + if (white_space) + continue; + if (start >= 0) + { + // ok, we have a valid SQL token + len = i - start; + wxString *token = new wxString(sql.Mid(start, len)); + Insert(token); + } + start = -1; + white_space = 1; + continue; + } + white_space = 0; + if (start < 0) + start = i; + } + if (start >= 0) + { + // fetching the last token + i = sql.Len(); + len = i - start; + wxString *token = new wxString(sql.Mid(start, len)); + Insert(token); + } + Index = 0; } -void -MyQueryView::OnRsLast (wxCommandEvent & WXUNUSED (event)) +SqlTokenizer::~SqlTokenizer() { -// -// scrolling to the result set ending -// - wxString sql = SqlCtrl->GetValue (); - int start = RsMaxRow - RsBlock; - if (start < 0) - start = 0; - if (ExecuteSql (sql, start) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); -} - -void -MyQueryView::OnRefresh (wxCommandEvent & WXUNUSED (event)) -{ -// -// refreshing the result set -// - wxString sql = SqlCtrl->GetValue (); - int start = RsBeginRow; - if (ExecuteSql (sql, start) == false) - wxMessageBox (SqlErrorMsg, wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - MainFrame); +// destructor + wxString *token; + Index = 0; + while (1) + { + token = TokenList[Index]; + if (token == NULL) + break; + delete token; + Index++; + } + delete[]TokenList; } -void -MyQueryView::OnRightClick (wxGridEvent & event) +void SqlTokenizer::Expand() { -// -// right click on some cell [mouse action] -// - MyVariant *blobVar; - wxMenu menu; - wxMenuItem *menuItem; - wxPoint pt = event.GetPosition (); - if (ReadOnly == false && event.GetRow () == TableView->GetNumberRows () - 1) - { - // this is the INSERT ROW - if (InsertPending == true) - { - menuItem = - new wxMenuItem (&menu, Grid_Insert, - wxT ("&Confirm insertion")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Grid_Abort, - wxT ("&Abort insertion")); - menu.Append (menuItem); - } - else - { - menuItem = - new wxMenuItem (&menu, Grid_Insert, - wxT ("&Insert new row")); - menu.Append (menuItem); - } - TableView->PopupMenu (&menu, pt); - return; - } - CurrentEvtRow = event.GetRow (); - CurrentEvtColumn = event.GetCol (); - blobVar = TableBlobs->GetBlob (CurrentEvtRow, CurrentEvtColumn); - if (blobVar) - { - // this one is a BLOB cell - if (ReadOnly == false) - { - MyRowVariant *varRow = TableValues->GetRow (CurrentEvtRow); - if (varRow->IsDeleted () == false) - { - menuItem = - new wxMenuItem (&menu, Grid_Delete, - wxT ("&Delete row")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Grid_Insert, - wxT ("&Insert new row")); - menu.Append (menuItem); - menu.AppendSeparator (); - } - } - menuItem = new wxMenuItem (&menu, Grid_Blob, wxT ("BLOB &explore")); - menu.Append (menuItem); - if (MainFrame->GuessBlobType (blobVar->GetBlobSize (), - blobVar->GetBlob ()) == - MyFrame::BLOB_GEOMETRY) - ; - else - { - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Grid_BlobIn, wxT ("BLOB &import")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Grid_BlobOut, wxT ("BLOB &export")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Grid_BlobNull, - wxT ("Set BLOB as &NULL")); - menu.Append (menuItem); - } - CurrentBlob = blobVar; - } - else - { - // this one is an ordinary cell - CurrentBlob = NULL; - if (ReadOnly == false) - { - MyRowVariant *varRow = TableValues->GetRow (CurrentEvtRow); - if (varRow->IsDeleted () == false) - { - menuItem = - new wxMenuItem (&menu, Grid_Delete, - wxT ("&Delete row")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Grid_Insert, - wxT ("&Insert new row")); - menu.Append (menuItem); - if (IsBlobColumn (CurrentEvtColumn) == true) - { - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Grid_BlobIn, - wxT ("BLOB &import")); - menu.Append (menuItem); - } - menu.AppendSeparator (); - } - } - menuItem = - new wxMenuItem (&menu, Grid_Clear, wxT ("&Clear selection")); - menu.Append (menuItem); - menuItem = new wxMenuItem (&menu, Grid_All, wxT ("Select &all")); - menu.Append (menuItem); - menuItem = new wxMenuItem (&menu, Grid_Row, wxT ("Select &row")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Grid_Column, wxT ("&Select column")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Grid_Copy, wxT ("&Copy")); - menu.Append (menuItem); - if (TableView->IsSelection () == false) - menuItem->Enable (false); - } - TableView->PopupMenu (&menu, pt); +// expanding the token list + int newSize = Max + Block; + int i; + wxString **newList = new wxString *[newSize]; + for (i = 0; i < newSize; i++) + newList[i] = NULL; + for (i = 0; i < Max; i++) + newList[i] = TokenList[i]; + delete[]TokenList; + TokenList = newList; + Max = newSize; } -void -MyQueryView::OnCellSelected (wxGridEvent & event) +void SqlTokenizer::Insert(wxString * token) { -// -// cell selection changed -// - if (InsertPending == true) - { - // an INSERT row is still pending - if (event.GetRow () != TableView->GetNumberRows () - 1) - DoInsert (false); - } - event.Skip (); -} - -void -MyQueryView::OnCellChanged (wxGridEvent & event) -{ -// -// user changed value in some cell -// - MyVariant *oldValue; - MyVariant *insValue; - wxString value; - wxString numValue; - wxString newValue = wxT ("NULL"); - wxString sql; - wxString rowid; - char *errMsg = NULL; - bool error = false; - long int_value; - bool okIntValue = false; - double dbl_value; - bool okDblValue = false; - int ret; - int row = event.GetRow (); - int column = event.GetCol (); - value = TableView->GetCellValue (row, column); - if (InsertPending == true) - { - // an INSERT row is still pending - insValue = InsertRow->GetColumn (column); - numValue = value; - numValue.Replace (wxT (","), wxT (".")); - okIntValue = numValue.ToLong (&int_value); - okDblValue = numValue.ToDouble (&dbl_value); - if (okIntValue == true) - insValue->Set ((int) int_value); - else if (okDblValue == true) - insValue->Set (dbl_value); - else - insValue->Set (value); - if (row != TableView->GetNumberRows () - 1) - DoInsert (false); - return; - } - if (value.Len () > 0) - { - numValue = value; - numValue.Replace (wxT (","), wxT (".")); - okIntValue = numValue.ToLong (&int_value); - okDblValue = numValue.ToDouble (&dbl_value); - if (okIntValue == true) - newValue.Printf (wxT ("%d"), int_value); - else if (okDblValue == true) - newValue.Printf (wxT ("%1.6lf"), dbl_value); - else - { - value.Replace (wxT ("'"), wxT ("''")); - newValue = wxT ("'") + value + wxT ("'"); - } - } - oldValue = TableValues->GetValue (row, 0); - rowid.Printf (wxT ("%d"), oldValue->GetIntValue ()); - sql = - wxT ("UPDATE ") + TableName + wxT (" SET ") + - TableView->GetColLabelValue (column) + wxT (" = ") + newValue + - wxT (" WHERE ROWID = ") + rowid; - ret = - sqlite3_exec (MainFrame->GetSqlite (), sql.ToUTF8 (), NULL, NULL, - &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - error = true; - } - oldValue = TableValues->GetValue (row, column); - if (error == true) - { - // update failed; restorig old cell value - value = wxT ("NULL"); - if (oldValue) - { - if (oldValue->GetType () == MY_INT_VARIANT) - value.Printf (wxT ("%d"), oldValue->GetIntValue ()); - if (oldValue->GetType () == MY_DBL_VARIANT) - value.Printf (wxT ("%1.6lf"), oldValue->GetDblValue ()); - if (oldValue->GetType () == MY_TXT_VARIANT) - value = oldValue->GetTxtValue (); - } - TableView->SetCellValue (row, column, value); - TableView->ForceRefresh (); - } - else - { - // marking cell as modified - TableView->SetCellTextColour (row, column, wxColour (0, 0, 192)); - TableView->SetCellBackgroundColour (row, column, - wxColour (255, 255, 204)); - TableView->ForceRefresh (); - } +// inserting a new token + if (Index == (Max - 1)) + Expand(); + TokenList[Index++] = token; } -void -MyQueryView::DoInsert (bool confirmed) +bool SqlTokenizer::HasMoreTokens() { -// -// performing actual row INSERT -// - int i; - int ret; - MyVariant *var; - wxString value; - wxString strValue; - wxString sql; - char *errMsg = NULL; - if (confirmed == false) - { - ret = - wxMessageBox (wxT - ("A new row is ready for insertion\n\nConfirm ?"), - wxT ("spatialite-gui"), wxYES_NO | wxICON_QUESTION, - this); - if (ret != wxYES) - goto close_insert; - } - sql = wxT ("INSERT INTO ") + TableName + wxT (" ("); - for (i = 1; i < TableView->GetNumberCols (); i++) - { - if (i > 1) - sql += wxT (", "); - sql += TableView->GetColLabelValue (i); - } - sql += wxT (") VALUES ("); - for (i = 1; i < InsertRow->GetNumCols (); i++) - { - if (i > 1) - sql += wxT (", "); - var = InsertRow->GetColumn (i); - value = wxT ("NULL"); - if (var->GetType () == MY_INT_VARIANT) - value.Printf (wxT ("%d"), var->GetIntValue ()); - if (var->GetType () == MY_DBL_VARIANT) - value.Printf (wxT ("%d"), var->GetDblValue ()); - if (var->GetType () == MY_TXT_VARIANT) - { - strValue = var->GetTxtValue (); - strValue.Replace (wxT ("'"), wxT ("''")); - value = wxT ("'") + strValue + wxT ("'"); - } - sql += value; - } - sql += wxT (")"); - ret = - sqlite3_exec (MainFrame->GetSqlite (), sql.ToUTF8 (), NULL, NULL, - &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - } - close_insert: -// -// closing insert row -// - InsertPending = false; - delete InsertRow; - InsertRow = NULL; - for (i = 0; i < TableView->GetNumberCols (); i++) - { - TableView->SetCellValue (TableView->GetNumberRows () - 1, i, - wxT ("")); - TableView->SetCellBackgroundColour (TableView->GetNumberRows () - 1, - i, wxColour (0, 0, 0)); - TableView->SetReadOnly (TableView->GetNumberRows () - 1, i); - } -} - -void -MyQueryView::OnCmdDelete (wxCommandEvent & event) -{ -// -// user required row deletion -// - char *errMsg = NULL; - bool error = false; - int ret; - int i; - wxString sql; - wxString rowid; - MyVariant *value; - MyRowVariant *varRow = TableValues->GetRow (CurrentEvtRow); - if (varRow->IsDeleted () == true) - return; - value = TableValues->GetValue (CurrentEvtRow, 0); - rowid.Printf (wxT ("%d"), value->GetIntValue ()); - ret = - wxMessageBox (wxT ("Requested deletion for row identified by RowId = ") - + rowid + wxT ("\n\nConfirm ?"), wxT ("spatialite-gui"), - wxYES_NO | wxICON_QUESTION, this); - if (ret != wxYES) - return; - sql = wxT ("DELETE FROM ") + TableName + wxT (" WHERE ROWID = ") + rowid; - ret = - sqlite3_exec (MainFrame->GetSqlite (), sql.ToUTF8 (), NULL, NULL, - &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - error = true; - } - if (error == false) - { - // marking row as deleted - varRow->SetDeleted (); - for (i = 0; i < TableView->GetNumberCols (); i++) - { - TableView->SetCellTextColour (CurrentEvtRow, i, - wxColour (0, 0, 0)); - TableView->SetCellBackgroundColour (CurrentEvtRow, i, - wxColour (128, 128, 128)); - TableView->SetReadOnly (CurrentEvtRow, i); - } - TableView->ForceRefresh (); - } -} - -void -MyQueryView::OnCmdInsert (wxCommandEvent & event) -{ -// -// user required row insertion -// - int i; - if (ReadOnly == true) - return; - if (InsertPending == true) - { - // an INSERT is still pending, and the user required actual insertion - DoInsert (true); - return; - } - InsertRow = new MyRowVariant (TableView->GetNumberCols ()); - TableView->MakeCellVisible (TableView->GetNumberRows () - 1, 1); - InsertPending = true; - for (i = 1; i < TableView->GetNumberCols (); i++) - { - TableView->SetCellValue (TableView->GetNumberRows () - 1, i, - wxT ("")); - TableView->SetCellBackgroundColour (TableView->GetNumberRows () - 1, - i, wxColour (255, 255, 255)); - TableView->SetReadOnly (TableView->GetNumberRows () - 1, i, false); - } + wxString *token = TokenList[Index]; + if (token == NULL) + return false; + return true; } -void -MyQueryView::OnCmdAbort (wxCommandEvent & event) +wxString & SqlTokenizer::GetNextToken() { -// -// user cancelled current row insertion -// - int i; - if (InsertPending) - { - InsertPending = false; - delete InsertRow; - InsertRow = NULL; - for (i = 0; i < TableView->GetNumberCols (); i++) - { - TableView->SetCellValue (TableView->GetNumberRows () - 1, i, - wxT ("")); - TableView->SetCellBackgroundColour (TableView-> - GetNumberRows () - 1, i, - wxColour (0, 0, 0)); - TableView->SetReadOnly (TableView->GetNumberRows () - 1, i); - } - } -} - -void -MyQueryView::OnCmdClearSelection (wxCommandEvent & event) -{ -// -// clearing current selection -// - TableView->ClearSelection (); -} - -void -MyQueryView::OnCmdSelectAll (wxCommandEvent & event) -{ -// -// selecting all -// - TableView->SelectAll (); -} - -void -MyQueryView::OnCmdSelectRow (wxCommandEvent & event) -{ -// -// selecting the current row -// - TableView->SelectRow (CurrentEvtRow); -} - -void -MyQueryView::OnCmdSelectColumn (wxCommandEvent & event) -{ -// -// selecting column -// - TableView->SelectCol (CurrentEvtColumn); -} - -void -MyQueryView::OnCmdCopy (wxCommandEvent & event) -{ -// -// copying the selection into the clipboard -// - wxString copyData; - int row; - int col; - bool newRow; - bool firstRow = true; - for (row = 0; row < TableView->GetNumberRows (); row++) - { - newRow = true; - for (col = 0; col < TableView->GetNumberCols (); col++) - { - if (TableView->IsInSelection (row, col) == true) - { - // ok, this cell is included into the selection to copy - if (firstRow == true) - { - newRow = false; - firstRow = false; - } - else if (newRow == true) - { - newRow = false; - copyData += wxT ("\n"); - } - else - copyData += wxT ("\t"); - copyData += TableView->GetCellValue (row, col); - } - } - } - if (wxTheClipboard->Open ()) - { - wxTheClipboard->SetData (new wxTextDataObject (copyData)); - wxTheClipboard->Close (); - } -} - -void -MyQueryView::OnCmdBlob (wxCommandEvent & event) -{ -// -// exploring some BLOB value -// - if (!CurrentBlob) - return; - BlobExplorerDialog dlg; - dlg.Create (MainFrame, CurrentBlob->GetBlobSize (), - CurrentBlob->GetBlob ()); - dlg.ShowModal (); -} - -void -MyQueryView::OnCmdBlobIn (wxCommandEvent & event) -{ -// importing an external file into a BLOB-value - FILE *in = NULL; - char path[2048]; - int rd; - int maxSize = 1024 * 1024; // limit BLOB size to 1MB - wxString fileList; - wxString rowid; - wxString sql; - wxString blobValue; - wxString hex; - MyVariant *value; - bool error = false; - unsigned char *buffer = NULL; - int ret; - char *errMsg = NULL; - wxString lastDir; - fileList = - wxT - ("BLOB Document (*.jpg;*.jpeg;*.png;*.gif;*.pdf;*.zip)|*.jpg;*.jpeg;*.png;*.gif;*.pdf;*.zip|"); - fileList += - wxT ("Image (*.jpg;*.jpeg;*.png;*.gif)|*.jpg;*.jpeg;*.png;*.gif|"); - fileList += - wxT - ("JPEG Image (*.jpg;*.jpeg)|*.jpg;*.jpeg|PNG Image (*.png)|*.png|GIF Image (*.gif)|*.gif"); - fileList += - wxT - ("PDF Document (*.pdf)|*.pdf|ZIP Archive|(*.zip)|All files (*.*)|*.*"); - wxFileDialog *fileDialog = - new wxFileDialog (this, wxT ("loading a BLOB value"), - wxT (""), wxT (""), fileList, - wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, - wxDefaultSize, wxT ("filedlg")); - lastDir = MainFrame->GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - strcpy (path, fileDialog->GetPath ().ToUTF8 ()); - in = fopen (path, "rb"); - if (!in) - { - wxMessageBox (wxT ("Cannot open '") + fileDialog->GetPath () + - wxT ("' for reading"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; - } - wxFileName file (fileDialog->GetPath ()); - lastDir = file.GetPath (); - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - buffer = new unsigned char[maxSize]; - rd = fread (buffer, 1, maxSize, in); - if (rd == maxSize && !(feof (in))) - { - // exceding 1MB; it's too big for a BLOB - wxMessageBox (wxT - ("Selected file excedes 1MB; cowardly refusing to load it as a BLOB value ..."), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - goto end; - } - if (ferror (in)) - { - // I/O error - wxMessageBox (wxT ("an I/O error occurred"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - goto end; - } - // - // preparing theSQL UPDATE statement - // - value = TableValues->GetValue (CurrentEvtRow, 0); - rowid.Printf (wxT ("%d"), value->GetIntValue ()); - HexBlobValue (buffer, rd, hex); - sql = - wxT ("UPDATE ") + TableName + wxT (" SET ") + - TableView->GetColLabelValue (CurrentEvtColumn); - sql += wxT (" = ") + hex + wxT (" WHERE ROWID = ") + rowid; - ret = - sqlite3_exec (MainFrame->GetSqlite (), sql.ToUTF8 (), NULL, NULL, - &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - error = true; - } - ::wxEndBusyCursor (); - value = TableValues->GetValue (CurrentEvtRow, CurrentEvtColumn); - if (error == false) - { - // updating the Grid cell - blobValue.Printf (wxT ("BLOB sz=%d "), rd); - switch (MainFrame->GuessBlobType (rd, buffer)) - { - case MyFrame::BLOB_EXIF: - case MyFrame::BLOB_JFIF: - case MyFrame::BLOB_JPEG: - blobValue += wxT ("JPEG image"); - break; - case MyFrame::BLOB_PNG: - blobValue += wxT ("PNG image"); - break; - case MyFrame::BLOB_GIF: - blobValue += wxT ("GIF image"); - break; - case MyFrame::BLOB_PDF: - blobValue += wxT ("PDF document"); - break; - case MyFrame::BLOB_ZIP: - blobValue += wxT ("ZIP archive"); - break; - default: - blobValue += wxT ("UNKNOWN type"); - }; - TableView->SetCellValue (CurrentEvtRow, CurrentEvtColumn, - blobValue); - TableView->SetCellTextColour (CurrentEvtRow, CurrentEvtColumn, - wxColour (0, 0, 192)); - TableView->SetCellBackgroundColour (CurrentEvtRow, - CurrentEvtColumn, - wxColour (255, 255, 204)); - TableView->ForceRefresh (); - } - } - end: -// clean-up - if (in) - fclose (in); - if (buffer) - delete[]buffer; -} - -void -MyQueryView::HexBlobValue (unsigned char *blob, int size, wxString & hex) -{ -// -// builds the HEX BLOB as X'01234567890abcdef' -// - int i; - wxString digit; - hex = wxT ("X'"); - for (i = 0; i < size; i++) - { - digit.Printf (wxT ("%02x"), *(blob + i)); - hex += digit; - } - hex += wxT ("'"); -} - -void -MyQueryView::OnCmdBlobOut (wxCommandEvent & event) -{ -// exporting to external file a BLOB-value - int blobType; - wxString fileName; - wxString fileType; - int ret; - wxString path; - FILE *out = NULL; - char xpath[2048]; - int wr; - wxString lastDir; - if (!CurrentBlob) - return; - blobType = - MainFrame->GuessBlobType (CurrentBlob->GetBlobSize (), - CurrentBlob->GetBlob ()); - switch (blobType) - { - case MyFrame::BLOB_EXIF: - case MyFrame::BLOB_JFIF: - case MyFrame::BLOB_JPEG: - fileName = wxT ("image.jpg"); - fileType = wxT ("File JPEG (*.jpg;*.jpeg)|*.jpg"); - break; - case MyFrame::BLOB_PNG: - fileName = wxT ("image.png"); - fileType = wxT ("File PNG (*.png)|*.png"); - break; - case MyFrame::BLOB_GIF: - fileName = wxT ("image.gif"); - fileType = wxT ("File GIF (*.gif)|*.gif"); - break; - case MyFrame::BLOB_PDF: - fileName = wxT ("document.pdf"); - fileType = wxT ("PDF document (*.jpg;*.jpeg)|*.jpg"); - break; - case MyFrame::BLOB_ZIP: - fileName = wxT ("archive.zip"); - fileType = wxT ("ZIP Archive (*.zip)|*.zip"); - break; - default: - fileName = wxT ("file"); - }; - fileType += wxT ("|All files (*.*)|*.*"); - wxFileDialog *fileDialog = - new wxFileDialog (this, wxT ("exporting a BLOB value to file"), - wxT (""), fileName, fileType, - wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, - wxDefaultSize, wxT ("filedlg")); - lastDir = MainFrame->GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - wxFileName file (fileDialog->GetPath ()); - path = file.GetPath (); - path += file.GetPathSeparator (); - path += file.GetName (); - switch (blobType) - { - case MyFrame::BLOB_EXIF: - case MyFrame::BLOB_JFIF: - case MyFrame::BLOB_JPEG: - path += wxT (".jpg"); - break; - case MyFrame::BLOB_PNG: - path += wxT (".png"); - break; - case MyFrame::BLOB_GIF: - path += wxT (".gif"); - break; - case MyFrame::BLOB_PDF: - path += wxT (".pdf"); - break; - case MyFrame::BLOB_ZIP: - path += wxT (".zip"); - break; - default: - path += file.GetExt (); - }; - strcpy (xpath, path.ToUTF8 ()); - out = fopen (xpath, "wb"); - if (!out) - { - wxMessageBox (wxT ("Cannot open '") + path + - wxT ("' for writing"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; - } - lastDir = file.GetPath (); - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - wr = fwrite (CurrentBlob->GetBlob (), 1, CurrentBlob->GetBlobSize (), - out); - if (wr != CurrentBlob->GetBlobSize ()) - { - wxMessageBox (wxT ("an I/O error occurred"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - } - fclose (out); - ::wxEndBusyCursor (); - } -} - -void -MyQueryView::OnCmdBlobNull (wxCommandEvent & event) -{ -// setting to NULL a BLOB-value - wxString rowid; - wxString sql; - int ret; - char *errMsg = NULL; - bool error = false; - MyVariant *value; - value = TableValues->GetValue (CurrentEvtRow, 0); - rowid.Printf (wxT ("%d"), value->GetIntValue ()); - sql = - wxT ("UPDATE ") + TableName + wxT (" SET ") + - TableView->GetColLabelValue (CurrentEvtColumn); - sql += wxT (" = NULL WHERE ROWID = ") + rowid; - ret = - sqlite3_exec (MainFrame->GetSqlite (), sql.ToUTF8 (), NULL, NULL, - &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - error = true; - } - if (error == false) - { - // updating the Grid cell - TableView->SetCellValue (CurrentEvtRow, CurrentEvtColumn, - wxT ("NULL")); - TableView->SetCellTextColour (CurrentEvtRow, CurrentEvtColumn, - wxColour (0, 0, 192)); - TableView->SetCellBackgroundColour (CurrentEvtRow, CurrentEvtColumn, - wxColour (255, 255, 204)); - TableView->ForceRefresh (); - } +// return the next token + wxString *token = TokenList[Index]; + Index++; + CurrentToken = *token; + return CurrentToken; } ADDED ResultSetView.cpp Index: ResultSetView.cpp ================================================================== --- ResultSetView.cpp +++ ResultSetView.cpp @@ -0,0 +1,1411 @@ +/* +/ ResultSetView.cpp +/ a panel to show SQL query results +/ +/ version 1.2, 2008 October 9 +/ +/ Author: Sandro Furieri a-furieri@lqt.it +/ +/ Copyright (C) 2008 Alessandro Furieri +/ +/ This program is free software: you can redistribute it and/or modify +/ it under the terms of the GNU General Public License as published by +/ the Free Software Foundation, either version 3 of the License, or +/ (at your option) any later version. +/ +/ This program is distributed in the hope that it will be useful, +/ but WITHOUT ANY WARRANTY; without even the implied warranty of +/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +/ GNU General Public License for more details. +/ +/ You should have received a copy of the GNU General Public License +/ along with this program. If not, see . +/ +*/ + +#include "Classdef.h" + +#include "wx/clipbrd.h" +#include "wx/filename.h" + +// +// ICONs in XPM format [universally portable] +// +#include "icons/rs_first.xpm" +#include "icons/rs_last.xpm" +#include "icons/rs_next.xpm" +#include "icons/rs_previous.xpm" +#include "icons/refresh.xpm" + +#if defined(_WIN32) || defined (__MINGW32__) +#define FORMAT_64 "%I64d" +#else +#define FORMAT_64 "%lld" +#endif + +MyResultSetView::MyResultSetView(MyFrame * parent, wxWindowID id): +wxPanel(parent, id, wxDefaultPosition, wxSize(440, 480), wxBORDER_SUNKEN) +{ +// +// constructor: a frame for SQL Result Sets +// + RsBlock = 500; // the ResultSet block size + RowIds = new sqlite3_int64[RsBlock]; + ReadOnly = true; + InsertRow = NULL; + MainFrame = parent; + BtnRsFirst = + new wxBitmapButton(this, ID_RS_FIRST, wxBitmap(rs_first_xpm), + wxPoint(5, 400), wxSize(32, 32)); + BtnRsFirst->SetToolTip(wxT("ResultSet: go to first row")); + BtnRsPrevious = + new wxBitmapButton(this, ID_RS_PREVIOUS, wxBitmap(rs_previous_xpm), + wxPoint(55, 400), wxSize(32, 32)); + BtnRsPrevious->SetToolTip(wxT("ResultSet: go to previous block")); + BtnRefresh = + new wxBitmapButton(this, ID_REFRESH, wxBitmap(refresh_xpm), + wxPoint(55, 400), wxSize(32, 32)); + BtnRefresh->SetToolTip(wxT("ResultSet: refresh")); + BtnRsNext = + new wxBitmapButton(this, ID_RS_NEXT, wxBitmap(rs_next_xpm), + wxPoint(105, 400), wxSize(32, 32)); + BtnRsNext->SetToolTip(wxT("ResultSet: go to next block")); + BtnRsLast = + new wxBitmapButton(this, ID_RS_LAST, wxBitmap(rs_last_xpm), + wxPoint(155, 400), wxSize(32, 32)); + BtnRsLast->SetToolTip(wxT("ResultSet: go to last row")); + RsCurrentBlock = + new wxStaticText(this, ID_RS_BLOCK, wxT(""), wxPoint(210, 400), + wxSize(200, 18)); + TableView = NULL; + TableBlobs = NULL; + TableValues = NULL; + CurrentBlob = NULL; +// setting up event handlers + Connect(ID_RS_FIRST, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyResultSetView::OnRsFirst); + Connect(ID_RS_PREVIOUS, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyResultSetView::OnRsPrevious); + Connect(ID_RS_NEXT, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyResultSetView::OnRsNext); + Connect(ID_RS_LAST, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyResultSetView::OnRsLast); + Connect(ID_REFRESH, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) & MyResultSetView::OnRefresh); + Connect(wxID_ANY, wxEVT_SIZE, + (wxObjectEventFunction) & MyResultSetView::OnSize); + Connect(wxID_ANY, wxEVT_GRID_SELECT_CELL, + (wxObjectEventFunction) & MyResultSetView::OnCellSelected); + Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, + (wxObjectEventFunction) & MyResultSetView::OnRightClick); + Connect(wxID_ANY, wxEVT_GRID_CELL_CHANGE, + (wxObjectEventFunction) & MyResultSetView::OnCellChanged); + Connect(Grid_Delete, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdDelete); + Connect(Grid_Insert, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdInsert); + Connect(Grid_Abort, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdAbort); + Connect(Grid_Clear, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdClearSelection); + Connect(Grid_All, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdSelectAll); + Connect(Grid_Row, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdSelectRow); + Connect(Grid_Column, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdSelectColumn); + Connect(Grid_Copy, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdCopy); + Connect(Grid_Blob, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdBlob); + Connect(Grid_BlobIn, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdBlobIn); + Connect(Grid_BlobOut, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdBlobOut); + Connect(Grid_BlobNull, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyResultSetView::OnCmdBlobNull); +} + +MyResultSetView::~MyResultSetView() +{ +// destructor + if (RowIds) + delete[]RowIds; + if (InsertRow) + delete InsertRow; + if (TableBlobs) + delete TableBlobs; + if (TableValues) + delete TableValues; +} + +void MyResultSetView::ShowControls() +{ +// +// making all ResultSet controls to be visible +// + BtnRsFirst->Show(true); + BtnRsPrevious->Show(true); + BtnRsNext->Show(true); + BtnRsLast->Show(true); + BtnRefresh->Show(true); + RsCurrentBlock->Show(true); + if (TableView) + TableView->Show(true); +} + +void MyResultSetView::HideControls() +{ +// +// making all controls to be invisible +// + BtnRsFirst->Show(false); + BtnRsPrevious->Show(false); + BtnRsNext->Show(false); + BtnRsLast->Show(false); + BtnRefresh->Show(false); + RsCurrentBlock->Show(false); + if (TableView) + TableView->Show(false); +} + +void MyResultSetView::EditTable(wxString & sql, int *primaryKeys, int *blobCols, + wxString & table) +{ +// +// starting the edit table sequence +// + int i; + for (i = 0; i < 1024; i++) + { + PrimaryKeys[i] = *(primaryKeys + i); + BlobColumns[i] = *(blobCols + i); + } + ReadOnly = false; + TableName = table; + MainFrame->GetQueryView()->GetSqlCtrl()->SetValue(sql); + if (ExecuteSql(sql, 0, ReadOnly) == false) + wxMessageBox(SqlErrorMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + MainFrame); +} + +bool MyResultSetView::ExecuteSql(wxString & sql, int from, bool read_only) +{ +// +// executing some SQL statement +// + ReadOnly = read_only; + char *xSql = NULL; + char err_msg[2048]; + char dummy[1024]; + int columns; + int i_col; + int i_row; + int end_row = 0; + wxString blobType; + MyVariantList list; + MyRowVariant *row; + MyVariant *value; + wxString cellValue; + wxString currentBlock; + sqlite3_stmt *stmt; + sqlite3 *sqlite = MainFrame->GetSqlite(); + SqlErrorMsg = wxT(""); + if (TableView) + TableView->Destroy(); + TableView = NULL; + if (TableBlobs) + delete TableBlobs; + if (TableValues) + delete TableValues; + TableBlobs = NULL; + TableValues = NULL; + CurrentBlob = NULL; + HideControls(); + RsBeginRow = 0; + RsEndRow = 0; + RsMaxRow = 0; + for (i_row = 0; i_row < RsBlock; i_row++) + RowIds[i_row] = -1; + i_row = 0; + xSql = new char[65536]; + strcpy(xSql, sql.ToUTF8()); + ::wxBeginBusyCursor(); + int ret = sqlite3_prepare_v2(sqlite, xSql, strlen(xSql), &stmt, NULL); + if (ret != SQLITE_OK) + { + sprintf(err_msg, "SQL error: \"%s\"", sqlite3_errmsg(sqlite)); + SqlErrorMsg = wxString::FromUTF8(err_msg); + ::wxEndBusyCursor(); + delete[]xSql; + return false; + } + RsCurrentBlock->Show(true); + while (1) + { + // + // fetching the result set rows + // + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; // end of result set + if (ret == SQLITE_ROW) + { + // + // fetching a row + // + if ((i_row % 100) == 0) + { + sprintf(dummy, "fetching the result set: %d rows", i_row); + currentBlock = wxString::FromUTF8(dummy); + RsCurrentBlock->SetLabel(currentBlock); + } + if (i_row < from) + { + i_row++; + continue; + } + if ((i_row - from) >= RsBlock) + { + i_row++; + continue; + } + end_row = i_row; + columns = sqlite3_column_count(stmt); + MyRowVariant *rowVariant = list.Add(columns); + for (i_col = 0; i_col < columns; i_col++) + { + sqlite3_int64 int_value; + double dbl_value; + const unsigned char *txt_value; + const void *blob_value; + int blobSize; + list.SetColumnName(i_col, sqlite3_column_name(stmt, i_col)); + switch (sqlite3_column_type(stmt, i_col)) + { + case SQLITE_INTEGER: + int_value = sqlite3_column_int64(stmt, i_col); + rowVariant->Set(i_col, int_value); + break; + case SQLITE_FLOAT: + dbl_value = sqlite3_column_double(stmt, i_col); + rowVariant->Set(i_col, dbl_value); + break; + case SQLITE_TEXT: + txt_value = sqlite3_column_text(stmt, i_col); + rowVariant->Set(i_col, txt_value); + break; + case SQLITE_BLOB: + blob_value = sqlite3_column_blob(stmt, i_col); + blobSize = sqlite3_column_bytes(stmt, i_col); + rowVariant->Set(i_col, blob_value, blobSize); + break; + case SQLITE_NULL: + default: + break; + }; + } + i_row++; + } else + { + sprintf(err_msg, "SQL error: \"%s\"", sqlite3_errmsg(sqlite)); + SqlErrorMsg = wxString::FromUTF8(err_msg); + goto error; + } + } + sqlite3_finalize(stmt); + RsBeginRow = from; + RsEndRow = end_row; + RsMaxRow = i_row; + if (list.GetRows() == 0) + { + // + // this one is an EMPTY Result Set + // + if (ReadOnly == false) + { + // preparing the insert row + int numCols = 0; + wxString *colNames = MainFrame->GetColumnNames(TableName, &numCols); + CreateGrid(0, numCols + 1); + TableView->SetColLabelValue(0, wxT("ROWID")); + for (i_col = 0; i_col < numCols; i_col++) + TableView->SetColLabelValue(i_col + 1, *(colNames + i_col)); + TableView->EnableEditing(true); + delete[]colNames; + } else + { + // simply showing a warning message + CreateGrid(1, 1); + TableView->SetColLabelValue(0, wxT("Message")); + TableView->SetRowLabelValue(0, wxT("Message")); + TableView->SetCellValue(0, 0, + wxT + ("SQL query returned an empty ResultSet\n\nThis is not an error")); + } + } else + { + // + // preparing the Grid to show the result set + // + CreateGrid(list.GetRows(), list.GetColumns()); + if (ReadOnly == true) + TableView->EnableEditing(false); + else + TableView->EnableEditing(true); + for (i_col = 0; i_col < list.GetColumns(); i_col++) + TableView->SetColLabelValue(i_col, list.GetColumnName(i_col)); + if (ReadOnly == false) + TableView->SetColLabelValue(0, wxT("ROWID")); + i_row = 0; + row = list.GetFirst(); + while (row) + { + sprintf(dummy, "%d", i_row + RsBeginRow + 1); + cellValue = wxString::FromUTF8(dummy); + TableView->SetRowLabelValue(i_row, cellValue); + if (ReadOnly == false) + { + // storing the ROWID value into the RowIds array + value = row->GetColumn(0); + if (value->GetType() == MY_INT_VARIANT) + RowIds[i_row] = value->GetIntValue(); + } + for (i_col = 0; i_col < row->GetNumCols(); i_col++) + { + value = row->GetColumn(i_col); + if (value) + { + switch (value->GetType()) + { + case MY_INT_VARIANT: + sprintf(dummy, FORMAT_64, value->GetIntValue()); + cellValue = wxString::FromUTF8(dummy); + TableView->SetCellValue(i_row, i_col, cellValue); + if (ReadOnly == false) + TableValues->SetValue(i_row, i_col, + value->GetIntValue()); + break; + case MY_DBL_VARIANT: + sprintf(dummy, "%1.6lf", value->GetDblValue()); + cellValue = wxString::FromUTF8(dummy); + TableView->SetCellValue(i_row, i_col, cellValue); + if (ReadOnly == false) + TableValues->SetValue(i_row, i_col, + value->GetDblValue()); + break; + case MY_TXT_VARIANT: + TableView->SetCellValue(i_row, i_col, + value->GetTxtValue()); + if (ReadOnly == false) + TableValues->SetValue(i_row, i_col, + value->GetTxtValue()); + break; + case MY_BLOB_VARIANT: + blobType = wxT("UNKNOWN type"); + switch (gaiaGuessBlobType + (value->GetBlob(), value->GetBlobSize())) + { + case GAIA_GEOMETRY_BLOB: + blobType = wxT("GEOMETRY"); + break; + case GAIA_JPEG_BLOB: + blobType = wxT("JPEG image"); + break; + case GAIA_EXIF_BLOB: + blobType = wxT("JPEG-EXIF image"); + break; + case GAIA_EXIF_GPS_BLOB: + blobType = wxT("JPEG-EXIF-GPS image"); + break; + case GAIA_PNG_BLOB: + blobType = wxT("PNG image"); + break; + case GAIA_GIF_BLOB: + blobType = wxT("GIF image"); + break; + case GAIA_PDF_BLOB: + blobType = wxT("PDF document"); + break; + case GAIA_ZIP_BLOB: + blobType = wxT("ZIP archive"); + break; + }; + sprintf(dummy, "BLOB sz=%d ", value->GetBlobSize()); + cellValue = wxString::FromUTF8(dummy); + cellValue += blobType; + TableView->SetCellValue(i_row, i_col, cellValue); + TableView->SetReadOnly(i_row, i_col); + TableBlobs->SetBlob(i_row, i_col, value); + break; + case MY_NULL_VARIANT: + default: + TableView->SetCellValue(i_row, i_col, wxT("NULL")); + break; + }; + } else + TableView->SetCellValue(i_row, i_col, wxT("NULL")); + if (ReadOnly == false) + { + if (IsPrimaryKey(i_col) == true) + TableView->SetReadOnly(i_row, i_col); + if (IsBlobColumn(i_col) == true) + TableView->SetReadOnly(i_row, i_col); + } + } + i_row++; + row = row->GetNext(); + } + } + if (ReadOnly == false) + { + // prepearing the insert row + TableView->SetRowLabelValue(TableView->GetNumberRows() - 1, + wxT("Insert row")); + InsertPending = false; + for (i_col = 0; i_col < TableView->GetNumberCols(); i_col++) + { + TableView->SetCellValue(TableView->GetNumberRows() - 1, i_col, + wxT("")); + TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, + i_col, wxColour(0, 0, 0)); + TableView->SetReadOnly(TableView->GetNumberRows() - 1, i_col); + } + } + TableView->SetRowLabelSize(wxGRID_AUTOSIZE); + TableView->AutoSize(); + ResizeView(); + sprintf(dummy, "current block: %d / %d [%d rows]", RsBeginRow + 1, + RsEndRow + 1, RsMaxRow); + currentBlock = wxString::FromUTF8(dummy); + RsCurrentBlock->SetLabel(currentBlock); + ShowControls(); + MainFrame->GetQueryView()->AddToHistory(sql); + ::wxEndBusyCursor(); + if (xSql) + delete[]xSql; + return true; +error: + ::wxEndBusyCursor(); + sqlite3_finalize(stmt); + if (xSql) + delete[]xSql; + return false; +} + +bool MyResultSetView::IsPrimaryKey(int column) +{ +// +// checks if this column is a Primary Key one +// + int i; + for (i = 0; i < 1024; i++) + { + if (PrimaryKeys[i] == column) + return true; + } + return false; +} + +bool MyResultSetView::IsBlobColumn(int column) +{ +// +// checks if this column is a BLOB-type column +// + int i; + for (i = 0; i < 1024; i++) + { + if (BlobColumns[i] == column) + return true; + } + return false; +} + +void MyResultSetView::CreateGrid(int rows, int cols) +{ +// +// creating a new Grid to show the result set +// + int extra = 0; + if (ReadOnly == false) + extra = 1; + wxSize sz = GetClientSize(); + TableView = new wxGrid(this, wxID_ANY, wxPoint(5, 5), wxSize(200, 200)); + TableView->Show(false); + TableView->CreateGrid(rows + extra, cols); + TableBlobs = new MyBlobs(rows, cols); + if (ReadOnly == false) + TableValues = new MyValues(rows, cols); +} + +void MyResultSetView::ResizeView() +{ +// +// resizing the Grid to show the result set +// + wxSize sz = GetClientSize(); + if (TableView) + { + TableView->SetSize(sz.GetWidth() - 10, sz.GetHeight() - 45); + TableView->Show(true); + } +} + +void MyResultSetView::OnSize(wxSizeEvent & event) +{ +// +// this window has changed its size +// + wxSize sz = GetClientSize(); + if (TableView) + TableView->SetSize(sz.GetWidth() - 10, sz.GetHeight() - 45); + BtnRsFirst->Move(5, sz.GetHeight() - 35); + BtnRsPrevious->Move(40, sz.GetHeight() - 35); + BtnRefresh->Move(75, sz.GetHeight() - 35); + BtnRsNext->Move(110, sz.GetHeight() - 35); + BtnRsLast->Move(145, sz.GetHeight() - 35); + RsCurrentBlock->Move(180, sz.GetHeight() - 25); +} + +void MyResultSetView::OnRsFirst(wxCommandEvent & WXUNUSED(event)) +{ +// +// scrolling to the result set beginning +// + wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); + if (ExecuteSql(sql, 0, ReadOnly) == false) + wxMessageBox(SqlErrorMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + MainFrame); +} + +void MyResultSetView::OnRsPrevious(wxCommandEvent & WXUNUSED(event)) +{ +// +// scrolling to the result set previous block +// + wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); + int start = RsBeginRow - RsBlock; + if (start < 0) + start = 0; + if (ExecuteSql(sql, start, ReadOnly) == false) + wxMessageBox(SqlErrorMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + MainFrame); +} + +void MyResultSetView::OnRsNext(wxCommandEvent & WXUNUSED(event)) +{ +// +// scrolling to the result set next block +// + wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); + int start = RsEndRow + 1; + if (ExecuteSql(sql, start, ReadOnly) == false) + wxMessageBox(SqlErrorMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + MainFrame); +} + +void MyResultSetView::OnRsLast(wxCommandEvent & WXUNUSED(event)) +{ +// +// scrolling to the result set ending +// + wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); + int start = RsMaxRow - RsBlock; + if (start < 0) + start = 0; + if (ExecuteSql(sql, start, ReadOnly) == false) + wxMessageBox(SqlErrorMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + MainFrame); +} + +void MyResultSetView::OnRefresh(wxCommandEvent & WXUNUSED(event)) +{ +// +// refreshing the result set +// + wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); + int start = RsBeginRow; + if (ExecuteSql(sql, start, ReadOnly) == false) + wxMessageBox(SqlErrorMsg, wxT("spatialite-gui"), wxOK | wxICON_ERROR, + MainFrame); +} + +void MyResultSetView::OnRightClick(wxGridEvent & event) +{ +// +// right click on some cell [mouse action] +// + MyVariant *blobVar; + wxMenu *menu = new wxMenu(); + wxMenuItem *menuItem; + wxPoint pt = event.GetPosition(); + if (ReadOnly == false && event.GetRow() == TableView->GetNumberRows() - 1) + { + // this is the INSERT ROW + if (InsertPending == true) + { + menuItem = + new wxMenuItem(menu, Grid_Insert, wxT("&Confirm insertion")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Grid_Abort, wxT("&Abort insertion")); + menu->Append(menuItem); + } else + { + menuItem = new wxMenuItem(menu, Grid_Insert, wxT("&Insert new row")); + menu->Append(menuItem); + } + TableView->PopupMenu(menu, pt); + return; + } + CurrentEvtRow = event.GetRow(); + CurrentEvtColumn = event.GetCol(); + blobVar = TableBlobs->GetBlob(CurrentEvtRow, CurrentEvtColumn); + if (blobVar) + { + // this one is a BLOB cell + if (ReadOnly == false) + { + MyRowVariant *varRow = TableValues->GetRow(CurrentEvtRow); + if (varRow->IsDeleted() == false) + { + menuItem = new wxMenuItem(menu, Grid_Delete, wxT("&Delete row")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Grid_Insert, wxT("&Insert new row")); + menu->Append(menuItem); + menu->AppendSeparator(); + } + } + menuItem = new wxMenuItem(menu, Grid_Blob, wxT("BLOB &explore")); + menu->Append(menuItem); + if (gaiaGuessBlobType(blobVar->GetBlob(), blobVar->GetBlobSize()) == + GAIA_GEOMETRY_BLOB) + ; + else + { + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Grid_BlobIn, wxT("BLOB &import")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Grid_BlobOut, wxT("BLOB &export")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Grid_BlobNull, wxT("Set BLOB as &NULL")); + menu->Append(menuItem); + } + CurrentBlob = blobVar; + } else + { + // this one is an ordinary cell + CurrentBlob = NULL; + if (ReadOnly == false) + { + MyRowVariant *varRow = TableValues->GetRow(CurrentEvtRow); + if (varRow->IsDeleted() == false) + { + menuItem = new wxMenuItem(menu, Grid_Delete, wxT("&Delete row")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Grid_Insert, wxT("&Insert new row")); + menu->Append(menuItem); + if (IsBlobColumn(CurrentEvtColumn) == true) + { + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Grid_BlobIn, wxT("BLOB &import")); + menu->Append(menuItem); + } + menu->AppendSeparator(); + } + } + menuItem = new wxMenuItem(menu, Grid_Clear, wxT("&Clear selection")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Grid_All, wxT("Select &all")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Grid_Row, wxT("Select &row")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Grid_Column, wxT("&Select column")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Grid_Copy, wxT("&Copy")); + menu->Append(menuItem); + if (TableView->IsSelection() == false) + menuItem->Enable(false); + } + TableView->PopupMenu(menu, pt); +} + +void MyResultSetView::OnCellSelected(wxGridEvent & event) +{ +// +// cell selection changed +// + if (InsertPending == true) + { + // an INSERT row is still pending + if (event.GetRow() != TableView->GetNumberRows() - 1) + DoInsert(false); + } + event.Skip(); +} + +void MyResultSetView::OnCellChanged(wxGridEvent & event) +{ +// +// user changed value in some cell +// + MyVariant *oldValue; + MyVariant *insValue; + wxString value; + wxString numValue; + wxString newValue = wxT("NULL"); + wxString sql; + wxString rowid; + char *errMsg = NULL; + bool error = false; + sqlite3_int64 int64_value; + long long_value; + bool okIntValue = false; + double dbl_value; + bool okDblValue = false; + int ret; + char dummy[256]; + int row = event.GetRow(); + int column = event.GetCol(); + value = TableView->GetCellValue(row, column); + if (InsertPending == true) + { + // an INSERT row is still pending + insValue = InsertRow->GetColumn(column); + numValue = value; + numValue.Replace(wxT(","), wxT(".")); + okIntValue = numValue.ToLong(&long_value); + okDblValue = numValue.ToDouble(&dbl_value); + if (okIntValue == true) + { + int64_value = long_value; + insValue->Set(int64_value); + } else if (okDblValue == true) + insValue->Set(dbl_value); + else + insValue->Set(value); + if (row != TableView->GetNumberRows() - 1) + DoInsert(false); + return; + } + if (value.Len() > 0) + { + numValue = value; + numValue.Replace(wxT(","), wxT(".")); + okIntValue = numValue.ToLong(&long_value); + okDblValue = numValue.ToDouble(&dbl_value); + if (okIntValue == true) + { + int64_value = long_value; + sprintf(dummy, FORMAT_64, int64_value); + newValue = wxString::FromUTF8(dummy); + } else if (okDblValue == true) + { + sprintf(dummy, "%1.6lf", dbl_value); + newValue = wxString::FromUTF8(dummy); + } else + { + value.Replace(wxT("'"), wxT("''")); + newValue = wxT("'") + value + wxT("'"); + } + } + oldValue = TableValues->GetValue(row, 0); + sprintf(dummy, FORMAT_64, oldValue->GetIntValue()); + rowid = wxString::FromUTF8(dummy); + sql = + wxT("UPDATE \"") + TableName + wxT("\" SET \"") + + TableView->GetColLabelValue(column) + wxT("\" = ") + newValue + + wxT(" WHERE ROWID = ") + rowid; + ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + error = true; + } + oldValue = TableValues->GetValue(row, column); + if (error == true) + { + // update failed; restorig old cell value + value = wxT("NULL"); + if (oldValue) + { + if (oldValue->GetType() == MY_INT_VARIANT) + { + sprintf(dummy, FORMAT_64, oldValue->GetIntValue()); + value = wxString::FromUTF8(dummy); + } + if (oldValue->GetType() == MY_DBL_VARIANT) + { + sprintf(dummy, "%1.6lf", oldValue->GetDblValue()); + value = wxString::FromUTF8(dummy); + } + if (oldValue->GetType() == MY_TXT_VARIANT) + value = oldValue->GetTxtValue(); + } + TableView->SetCellValue(row, column, value); + TableView->ForceRefresh(); + } else + { + // marking cell as modified + TableView->SetCellTextColour(row, column, wxColour(0, 0, 192)); + TableView->SetCellBackgroundColour(row, column, wxColour(255, 255, 204)); + TableView->ForceRefresh(); + } +} + +void MyResultSetView::DoInsert(bool confirmed) +{ +// +// performing actual row INSERT +// + int i; + int ret; + MyVariant *var; + wxString value; + wxString strValue; + wxString sql; + char dummy[256]; + char *errMsg = NULL; + if (confirmed == false) + { + ret = + wxMessageBox(wxT("A new row is ready for insertion\n\nConfirm ?"), + wxT("spatialite-gui"), wxYES_NO | wxICON_QUESTION, this); + if (ret != wxYES) + goto close_insert; + } + sql = wxT("INSERT INTO \"") + TableName + wxT("\" ("); + for (i = 1; i < TableView->GetNumberCols(); i++) + { + if (i > 1) + sql += wxT(", "); + sql += wxT("\"") + TableView->GetColLabelValue(i) + wxT("\""); + } + sql += wxT(") VALUES ("); + for (i = 1; i < InsertRow->GetNumCols(); i++) + { + if (i > 1) + sql += wxT(", "); + var = InsertRow->GetColumn(i); + value = wxT("NULL"); + if (var->GetType() == MY_INT_VARIANT) + { + sprintf(dummy, FORMAT_64, var->GetIntValue()); + value = wxString::FromUTF8(dummy); + } + if (var->GetType() == MY_DBL_VARIANT) + { + sprintf(dummy, "%1.6lf", var->GetDblValue()); + value = wxString::FromUTF8(dummy); + } + if (var->GetType() == MY_TXT_VARIANT) + { + strValue = var->GetTxtValue(); + strValue.Replace(wxT("'"), wxT("''")); + value = wxT("'") + strValue + wxT("'"); + } + sql += value; + } + sql += wxT(")"); + ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + } +close_insert: +// +// closing insert row +// + InsertPending = false; + delete InsertRow; + InsertRow = NULL; + for (i = 0; i < TableView->GetNumberCols(); i++) + { + TableView->SetCellValue(TableView->GetNumberRows() - 1, i, wxT("")); + TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i, + wxColour(0, 0, 0)); + TableView->SetReadOnly(TableView->GetNumberRows() - 1, i); + } +} + +void MyResultSetView::OnCmdDelete(wxCommandEvent & event) +{ +// +// user required row deletion +// + char *errMsg = NULL; + bool error = false; + int ret; + int i; + wxString sql; + wxString rowid; + MyVariant *value; + char dummy[256]; + MyRowVariant *varRow = TableValues->GetRow(CurrentEvtRow); + if (varRow->IsDeleted() == true) + return; + value = TableValues->GetValue(CurrentEvtRow, 0); + sprintf(dummy, FORMAT_64, value->GetIntValue()); + rowid = wxString::FromUTF8(dummy); + ret = + wxMessageBox(wxT("Requested deletion for row identified by RowId = ") + + rowid + wxT("\n\nConfirm ?"), wxT("spatialite-gui"), + wxYES_NO | wxICON_QUESTION, this); + if (ret != wxYES) + return; + sql = wxT("DELETE FROM \"") + TableName + wxT("\" WHERE ROWID = ") + rowid; + ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + error = true; + } + if (error == false) + { + // marking row as deleted + varRow->SetDeleted(); + for (i = 0; i < TableView->GetNumberCols(); i++) + { + TableView->SetCellTextColour(CurrentEvtRow, i, wxColour(0, 0, 0)); + TableView->SetCellBackgroundColour(CurrentEvtRow, i, + wxColour(128, 128, 128)); + TableView->SetReadOnly(CurrentEvtRow, i); + } + TableView->ForceRefresh(); + } +} + +void MyResultSetView::OnCmdInsert(wxCommandEvent & event) +{ +// +// user required row insertion +// + int i; + if (ReadOnly == true) + return; + if (InsertPending == true) + { + // an INSERT is still pending, and the user required actual insertion + DoInsert(true); + return; + } + InsertRow = new MyRowVariant(TableView->GetNumberCols()); + TableView->MakeCellVisible(TableView->GetNumberRows() - 1, 1); + InsertPending = true; + for (i = 1; i < TableView->GetNumberCols(); i++) + { + TableView->SetCellValue(TableView->GetNumberRows() - 1, i, wxT("")); + TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i, + wxColour(255, 255, 255)); + TableView->SetReadOnly(TableView->GetNumberRows() - 1, i, false); + } +} + +void MyResultSetView::OnCmdAbort(wxCommandEvent & event) +{ +// +// user cancelled current row insertion +// + int i; + if (InsertPending) + { + InsertPending = false; + delete InsertRow; + InsertRow = NULL; + for (i = 0; i < TableView->GetNumberCols(); i++) + { + TableView->SetCellValue(TableView->GetNumberRows() - 1, i, wxT("")); + TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i, + wxColour(0, 0, 0)); + TableView->SetReadOnly(TableView->GetNumberRows() - 1, i); + } + } +} + +void MyResultSetView::OnCmdClearSelection(wxCommandEvent & event) +{ +// +// clearing current selection +// + TableView->ClearSelection(); +} + +void MyResultSetView::OnCmdSelectAll(wxCommandEvent & event) +{ +// +// selecting all +// + TableView->SelectAll(); +} + +void MyResultSetView::OnCmdSelectRow(wxCommandEvent & event) +{ +// +// selecting the current row +// + TableView->SelectRow(CurrentEvtRow); +} + +void MyResultSetView::OnCmdSelectColumn(wxCommandEvent & event) +{ +// +// selecting column +// + TableView->SelectCol(CurrentEvtColumn); +} + +void MyResultSetView::OnCmdCopy(wxCommandEvent & event) +{ +// +// copying the selection into the clipboard +// + wxString copyData; + int row; + int col; + bool newRow; + bool firstRow = true; + for (row = 0; row < TableView->GetNumberRows(); row++) + { + newRow = true; + for (col = 0; col < TableView->GetNumberCols(); col++) + { + if (TableView->IsInSelection(row, col) == true) + { + // ok, this cell is included into the selection to copy + if (firstRow == true) + { + newRow = false; + firstRow = false; + } else if (newRow == true) + { + newRow = false; + copyData += wxT("\n"); + } else + copyData += wxT("\t"); + copyData += TableView->GetCellValue(row, col); + } + } + } + if (wxTheClipboard->Open()) + { + wxTheClipboard->SetData(new wxTextDataObject(copyData)); + wxTheClipboard->Close(); + } +} + +void MyResultSetView::OnCmdBlob(wxCommandEvent & event) +{ +// +// exploring some BLOB value +// + if (!CurrentBlob) + return; + BlobExplorerDialog dlg; + dlg.Create(MainFrame, CurrentBlob->GetBlobSize(), CurrentBlob->GetBlob()); + dlg.ShowModal(); +} + +void MyResultSetView::OnCmdBlobIn(wxCommandEvent & event) +{ +// importing an external file into a BLOB-value + FILE *in = NULL; + char path[2048]; + int rd; + int maxSize = 1024 * 1024; // limit BLOB size to 1MB + wxString fileList; + wxString rowid; + wxString sql; + wxString blobValue; + wxString hex; + MyVariant *value; + char dummy[1024]; + bool error = false; + unsigned char *buffer = NULL; + int ret; + char *errMsg = NULL; + wxString lastDir; + fileList = + wxT + ("BLOB Document (*.jpg;*.jpeg;*.png;*.gif;*.pdf;*.zip)|*.jpg;*.jpeg;*.png;*.gif;*.pdf;*.zip|"); + fileList += wxT("Image (*.jpg;*.jpeg;*.png;*.gif)|*.jpg;*.jpeg;*.png;*.gif|"); + fileList += + wxT + ("JPEG Image (*.jpg;*.jpeg)|*.jpg;*.jpeg|PNG Image (*.png)|*.png|GIF Image (*.gif)|*.gif"); + fileList += + wxT("PDF Document (*.pdf)|*.pdf|ZIP Archive|(*.zip)|All files (*.*)|*.*"); + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("loading a BLOB value"), + wxT(""), wxT(""), fileList, + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition, + wxDefaultSize, wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + strcpy(path, fileDialog->GetPath().ToUTF8()); + in = fopen(path, "rb"); + if (!in) + { + wxMessageBox(wxT("Cannot open '") + fileDialog->GetPath() + + wxT("' for reading"), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + return; + } + wxFileName file(fileDialog->GetPath()); + lastDir = file.GetPath(); + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + buffer = new unsigned char[maxSize]; + rd = fread(buffer, 1, maxSize, in); + if (rd == maxSize && !(feof(in))) + { + // exceding 1MB; it's too big for a BLOB + wxMessageBox(wxT + ("Selected file excedes 1MB; cowardly refusing to load it as a BLOB value ..."), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + goto end; + } + if (ferror(in)) + { + // I/O error + wxMessageBox(wxT("an I/O error occurred"), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + goto end; + } + // + // preparing theSQL UPDATE statement + // + value = TableValues->GetValue(CurrentEvtRow, 0); + sprintf(dummy, FORMAT_64, value->GetIntValue()); + rowid = wxString::FromUTF8(dummy); + HexBlobValue(buffer, rd, hex); + sql = + wxT("UPDATE \"") + TableName + wxT("\" SET \"") + + TableView->GetColLabelValue(CurrentEvtColumn); + sql += wxT("\" = ") + hex + wxT(" WHERE ROWID = ") + rowid; + ret = + sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + error = true; + } + ::wxEndBusyCursor(); + value = TableValues->GetValue(CurrentEvtRow, CurrentEvtColumn); + if (error == false) + { + // updating the Grid cell + sprintf(dummy, "BLOB sz=%d ", rd); + blobValue = wxString::FromUTF8(dummy); + switch (gaiaGuessBlobType(buffer, rd)) + { + case GAIA_JPEG_BLOB: + blobValue += wxT("JPEG image"); + break; + case GAIA_EXIF_BLOB: + blobValue += wxT("JPEG-EXIF image"); + break; + case GAIA_EXIF_GPS_BLOB: + blobValue += wxT("JPEG-EXIF-GPS image"); + break; + case GAIA_PNG_BLOB: + blobValue += wxT("PNG image"); + break; + case GAIA_GIF_BLOB: + blobValue += wxT("GIF image"); + break; + case GAIA_PDF_BLOB: + blobValue += wxT("PDF document"); + break; + case GAIA_ZIP_BLOB: + blobValue += wxT("ZIP archive"); + break; + default: + blobValue += wxT("UNKNOWN type"); + }; + TableView->SetCellValue(CurrentEvtRow, CurrentEvtColumn, blobValue); + TableView->SetCellTextColour(CurrentEvtRow, CurrentEvtColumn, + wxColour(0, 0, 192)); + TableView->SetCellBackgroundColour(CurrentEvtRow, CurrentEvtColumn, + wxColour(255, 255, 204)); + TableView->ForceRefresh(); + } + } +end: +// clean-up + if (in) + fclose(in); + if (buffer) + delete[]buffer; +} + +void MyResultSetView::HexBlobValue(unsigned char *blob, int size, + wxString & hex) +{ +// +// builds the HEX BLOB as X'01234567890abcdef' +// + int i; + char digit[16]; + hex = wxT("X'"); + for (i = 0; i < size; i++) + { + sprintf(digit, "%02x", *(blob + i)); + hex += wxString::FromUTF8(digit); + } + hex += wxT("'"); +} + +void MyResultSetView::OnCmdBlobOut(wxCommandEvent & event) +{ +// exporting to external file a BLOB-value + int blobType; + wxString fileName; + wxString fileType; + int ret; + wxString path; + FILE *out = NULL; + char xpath[2048]; + int wr; + wxString lastDir; + if (!CurrentBlob) + return; + blobType = + gaiaGuessBlobType(CurrentBlob->GetBlob(), CurrentBlob->GetBlobSize()); + switch (blobType) + { + case GAIA_JPEG_BLOB: + case GAIA_EXIF_BLOB: + case GAIA_EXIF_GPS_BLOB: + fileName = wxT("image.jpg"); + fileType = wxT("File JPEG (*.jpg;*.jpeg)|*.jpg"); + break; + case GAIA_PNG_BLOB: + fileName = wxT("image.png"); + fileType = wxT("File PNG (*.png)|*.png"); + break; + case GAIA_GIF_BLOB: + fileName = wxT("image.gif"); + fileType = wxT("File GIF (*.gif)|*.gif"); + break; + case GAIA_PDF_BLOB: + fileName = wxT("document.pdf"); + fileType = wxT("PDF document (*.jpg;*.jpeg)|*.jpg"); + break; + case GAIA_ZIP_BLOB: + fileName = wxT("archive.zip"); + fileType = wxT("ZIP Archive (*.zip)|*.zip"); + break; + default: + fileName = wxT("file"); + }; + fileType += wxT("|All files (*.*)|*.*"); + wxFileDialog *fileDialog = + new wxFileDialog(this, wxT("exporting a BLOB value to file"), + wxT(""), fileName, fileType, + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, + wxDefaultSize, wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + wxFileName file(fileDialog->GetPath()); + path = file.GetPath(); + path += file.GetPathSeparator(); + path += file.GetName(); + switch (blobType) + { + case GAIA_JPEG_BLOB: + case GAIA_EXIF_BLOB: + case GAIA_EXIF_GPS_BLOB: + path += wxT(".jpg"); + break; + case GAIA_PNG_BLOB: + path += wxT(".png"); + break; + case GAIA_GIF_BLOB: + path += wxT(".gif"); + break; + case GAIA_PDF_BLOB: + path += wxT(".pdf"); + break; + case GAIA_ZIP_BLOB: + path += wxT(".zip"); + break; + default: + path += file.GetExt(); + }; + strcpy(xpath, path.ToUTF8()); + out = fopen(xpath, "wb"); + if (!out) + { + wxMessageBox(wxT("Cannot open '") + path + wxT("' for writing"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; + } + lastDir = file.GetPath(); + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + wr = fwrite(CurrentBlob->GetBlob(), 1, CurrentBlob->GetBlobSize(), out); + if (wr != CurrentBlob->GetBlobSize()) + { + wxMessageBox(wxT("an I/O error occurred"), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + } + fclose(out); + ::wxEndBusyCursor(); + } +} + +void MyResultSetView::OnCmdBlobNull(wxCommandEvent & event) +{ +// setting to NULL a BLOB-value + wxString rowid; + wxString sql; + int ret; + char *errMsg = NULL; + bool error = false; + MyVariant *value; + char dummy[256]; + value = TableValues->GetValue(CurrentEvtRow, 0); + sprintf(dummy, FORMAT_64, value->GetIntValue()); + rowid = wxString::FromUTF8(dummy); + sql = + wxT("UPDATE \"") + TableName + wxT("\" SET \"") + + TableView->GetColLabelValue(CurrentEvtColumn); + sql += wxT("\" = NULL WHERE ROWID = ") + rowid; + ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + error = true; + } + if (error == false) + { + // updating the Grid cell + TableView->SetCellValue(CurrentEvtRow, CurrentEvtColumn, wxT("NULL")); + TableView->SetCellTextColour(CurrentEvtRow, CurrentEvtColumn, + wxColour(0, 0, 192)); + TableView->SetCellBackgroundColour(CurrentEvtRow, CurrentEvtColumn, + wxColour(255, 255, 204)); + TableView->ForceRefresh(); + } +} Index: Shapefiles.cpp ================================================================== --- Shapefiles.cpp +++ Shapefiles.cpp @@ -1,10 +1,10 @@ /* / Shapefiles.cpp / methods related to Shapefile loading and saving / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -23,1453 +23,1391 @@ / */ #include "Classdef.h" -void -MyFrame::CleanTxtTab (char *buf) +void MyFrame::CleanTxtTab(char *buf) { // well-formatting a string to be used as a Txt/Tab string - char tmp[65536]; - char *in = tmp; - char *out = buf; - strcpy (tmp, buf); - while (*in != '\0') - { - if (*in == '\t' || *in == '\r' || *in == '\n') - { - in++; - *out++ = ' '; - } - else - *out++ = *in++; - } - *out = '\0'; + char tmp[65536]; + char *in = tmp; + char *out = buf; + strcpy(tmp, buf); + while (*in != '\0') + { + if (*in == '\t' || *in == '\r' || *in == '\n') + { + in++; + *out++ = ' '; + } else + *out++ = *in++; + } + *out = '\0'; } -void -MyFrame::CleanCsv (char *buf) +void MyFrame::CleanCsv(char *buf) { // well-formatting a string to be used as a Csv string - char tmp[65536]; - char *in = tmp; - char *out = buf; - bool special = false; - strcpy (tmp, buf); - while (*in != '\0') - { - if (*in == ',' || *in == '\r' || *in == '\n') - special = true; - if (*in == '"') - *out++ = '"'; - *out++ = *in++; - } - *out = '\0'; - if (special == true) - { - sprintf (tmp, "\"%s\"", buf); - strcpy (buf, tmp); - } + char tmp[65536]; + char *in = tmp; + char *out = buf; + bool special = false; + strcpy(tmp, buf); + while (*in != '\0') + { + if (*in == ',' || *in == '\r' || *in == '\n') + special = true; + if (*in == '"') + *out++ = '"'; + *out++ = *in++; + } + *out = '\0'; + if (special == true) + { + sprintf(tmp, "\"%s\"", buf); + strcpy(buf, tmp); + } } -void -MyFrame::CleanHtml (char *buf) +void MyFrame::CleanHtml(char *buf) { // well-formatting a string to be used as an Html string - char tmp[65536]; - char *in = tmp; - char *out = buf; - strcpy (tmp, buf); - while (*in != '\0') - { - if (*in == '<') - { - *out++ = '&'; - *out++ = 'l'; - *out++ = 't'; - *out++ = ';'; - in++; - continue; - } - if (*in == '>') - { - *out++ = '&'; - *out++ = 'g'; - *out++ = 't'; - *out++ = ';'; - in++; - continue; - } - if (*in == ' ') - { - *out++ = '&'; - *out++ = 'n'; - *out++ = 'b'; - *out++ = 's'; - *out++ = 'p'; - *out++ = ';'; - in++; - continue; - } - if (*in == '"') - { - *out++ = '&'; - *out++ = 'q'; - *out++ = 'u'; - *out++ = 'o'; - *out++ = 't'; - *out++ = ';'; - in++; - continue; - } - if (*in == '&') - { - *out++ = '&'; - *out++ = 'a'; - *out++ = 'm'; - *out++ = 'p'; - *out++ = ';'; - in++; - continue; - } - *out++ = *in++; - } - *out = '\0'; + char tmp[65536]; + char *in = tmp; + char *out = buf; + strcpy(tmp, buf); + while (*in != '\0') + { + if (*in == '<') + { + *out++ = '&'; + *out++ = 'l'; + *out++ = 't'; + *out++ = ';'; + in++; + continue; + } + if (*in == '>') + { + *out++ = '&'; + *out++ = 'g'; + *out++ = 't'; + *out++ = ';'; + in++; + continue; + } + if (*in == ' ') + { + *out++ = '&'; + *out++ = 'n'; + *out++ = 'b'; + *out++ = 's'; + *out++ = 'p'; + *out++ = ';'; + in++; + continue; + } + if (*in == '"') + { + *out++ = '&'; + *out++ = 'q'; + *out++ = 'u'; + *out++ = 'o'; + *out++ = 't'; + *out++ = ';'; + in++; + continue; + } + if (*in == '&') + { + *out++ = '&'; + *out++ = 'a'; + *out++ = 'm'; + *out++ = 'p'; + *out++ = ';'; + in++; + continue; + } + *out++ = *in++; + } + *out = '\0'; } -bool MyFrame::TableAlreadyExists (wxString & name) +bool MyFrame::TableAlreadyExists(wxString & name) { // // checks if a table of this name already exists // - char ** - results; - int - rows; - int - columns; - int - i; - char * - errMsg = NULL; - bool - already_exists = false; - wxString - sql = - wxT - ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = '"); - sql += name; - sql += wxT ("'"); - int - ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return false; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - already_exists = true; - } - sqlite3_free_table (results); - return already_exists; + char **results; + int rows; + int columns; + int i; + char *errMsg = NULL; + bool already_exists = false; + wxString sql = + wxT("SELECT name FROM sqlite_master WHERE type = 'table' AND name LIKE '"); + sql += name; + sql += wxT("'"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return false; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + already_exists = true; + } + sqlite3_free_table(results); + return already_exists; } -bool MyFrame::SridNotExists (int srid) +bool MyFrame::SridNotExists(int srid) { // // checks if a SRID value is a valid one // - char ** - results; - int - rows; - int - columns; - int - i; - char * - errMsg = NULL; - bool - constrained = false; - bool - not_exists = true; - wxString - RefSysName; - wxString - sql = - wxT - ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'spatial_ref_sys'"); - int - ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return false; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - constrained = true; - } - sqlite3_free_table (results); - if (constrained == false) - return false; - sql.Printf (wxT - ("SELECT ref_sys_name FROM spatial_ref_sys WHERE srid = %d"), - srid); - ret = - sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, &rows, - &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return false; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - not_exists = false; - } - sqlite3_free_table (results); - return not_exists; + char **results; + int rows; + int columns; + int i; + char *errMsg = NULL; + bool constrained = false; + bool not_exists = true; + wxString RefSysName; + char xsql[128]; + wxString sql = + wxT + ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'spatial_ref_sys'"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return false; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + constrained = true; + } + sqlite3_free_table(results); + if (constrained == false) + return false; + sprintf(xsql, "SELECT ref_sys_name FROM spatial_ref_sys WHERE srid = %d", + srid); + ret = + sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return false; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + not_exists = false; + } + sqlite3_free_table(results); + return not_exists; } -bool MyFrame::CheckMetadata () +bool MyFrame::CheckMetadata() { // // checking if METADATA tables are defined // - char ** - results; - int - rows; - int - columns; - int - i; - char * - errMsg = NULL; - bool - constrained = false; - wxString - sql = - wxT - ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'geometry_columns'"); - int - ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return false; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - constrained = true; - } - sqlite3_free_table (results); - return constrained; + char **results; + int rows; + int columns; + int i; + char *errMsg = NULL; + bool constrained = false; + if (SpatiaLiteMetadata == false) + return false; + wxString sql = + wxT + ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'geometry_columns'"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return false; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + constrained = true; + } + sqlite3_free_table(results); + return constrained; } -void -MyFrame::CleanSqlString (char *value) +void MyFrame::CleanSqlString(char *value) { // // returns a well formatted TEXT value for SQL // 1] strips trailing spaces // 2] masks any ' inside the string, appending another ' // - char new_value[1024]; - char *p; - int len; - int i; - len = strlen (value); - for (i = (len - 1); i >= 0; i--) - { - // stripping trailing spaces - if (value[i] == ' ') - value[i] = '\0'; - else - break; - } - p = new_value; - for (i = 0; i < len; i++) - { - if (value[i] == '\'') - *(p++) = '\''; - *(p++) = value[i]; - } - *p = '\0'; - strcpy (value, new_value); + char new_value[1024]; + char *p; + int len; + int i; + len = strlen(value); + for (i = (len - 1); i >= 0; i--) + { + // stripping trailing spaces + if (value[i] == ' ') + value[i] = '\0'; + else + break; + } + p = new_value; + for (i = 0; i < len; i++) + { + if (value[i] == '\'') + *(p++) = '\''; + *(p++) = value[i]; + } + *p = '\0'; + strcpy(value, new_value); } -void -MyFrame::LoadShapefile (wxString & path, wxString & table, int srid, - wxString & column, wxString & charset) +void MyFrame::LoadShapefile(wxString & path, wxString & table, int srid, + wxString & column, wxString & charset) { // // loading a Shapefile as a new DB table // - int cnt; - int col_cnt; - int seed; - int len; - int dup; - int idup; - int current_row; - int ret; - int rows = 0; - char *errMsg = NULL; - char xtable[1024]; - char xcolumn[1024]; - char dummy[65536]; - char dummyName[4096]; - char sql[65536]; - char **col_name = NULL; - const char *geom_type = "UNKNOWN"; - char *hexWKB = NULL; - int szSQL; - char *bufSQL = NULL; - wxString dummyStr; - wxString msg; - gaiaShapefilePtr shp = NULL; - gaiaDbfFieldPtr dbf_field; - bool metadata = CheckMetadata (); - bool sqlError = false; + sqlite3_stmt *stmt; + int cnt; + int col_cnt; + int seed; + int len; + int dup; + int idup; + int current_row; + int ret; + int rows = 0; + char *errMsg = NULL; + char xtable[1024]; + char xcolumn[1024]; + char dummyName[4096]; + char sql[65536]; + char **col_name = NULL; + unsigned char *blob; + int blob_size; + const char *geom_type = "UNKNOWN"; + wxString dummyStr; + wxString msg; + gaiaShapefilePtr shp = NULL; + gaiaDbfFieldPtr dbf_field; + bool metadata = CheckMetadata(); + bool sqlError = false; // // performing some checks before starting // - if (TableAlreadyExists (table) == true) - { - wxMessageBox (wxT ("a table name '") + table + - wxT ("' already exists"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; - } - if (gaiaIllegalSqlName (table.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (table.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (table.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + table + - wxT - ("' is an invalid TABLE NAME\n\nsame as SQL reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - return; - } - if (gaiaIllegalSqlName (column.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (column.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (column.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + column + - wxT - ("' is an invalid COLUMN NAME\n\nsame as SQL reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - return; - } - if (metadata == true) - { - if (SridNotExists (srid) == true) - { - wxMessageBox (wxT ("invalid SRID value"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - return; - } - } + if (TableAlreadyExists(table) == true) + { + wxMessageBox(wxT("a table name '") + table + wxT("' already exists"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; + } + if (metadata == true) + { + if (SridNotExists(srid) == true) + { + wxMessageBox(wxT("invalid SRID value"), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + return; + } + } // // initalizing the SHP struct // - shp = gaiaAllocShapefile (); - gaiaOpenShpRead (shp, path.ToUTF8 (), charset.ToUTF8 (), "UTF-8"); - if (!(shp->Valid)) - { - gaiaFreeShapefile (shp); - return; - } - ::wxBeginBusyCursor (); + shp = gaiaAllocShapefile(); + gaiaOpenShpRead(shp, path.ToUTF8(), charset.ToUTF8(), "UTF-8"); + if (!(shp->Valid)) + { + wxString error = wxT("ERROR: invalid Shapefile\n\n"); + if (shp->LastError) + error += wxString::FromUTF8(shp->LastError); + gaiaFreeShapefile(shp); + wxMessageBox(error, wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; + } + ::wxBeginBusyCursor(); // // checking for duplicate / illegal column names and antialising them // - col_cnt = 0; - dbf_field = shp->Dbf->First; - while (dbf_field) - { - // counting DBF fields - col_cnt++; - dbf_field = dbf_field->Next; - } - col_name = (char **) malloc (sizeof (char *) * col_cnt); - cnt = 0; - seed = 0; - dbf_field = shp->Dbf->First; - while (dbf_field) - { - // preparing column names - if (gaiaIllegalSqlName (dbf_field->Name) - || gaiaIsReservedSqlName (dbf_field->Name) - || gaiaIsReservedSqliteName (dbf_field->Name)) - sprintf (dummyName, "COL_%d", seed++); - else - strcpy (dummyName, dbf_field->Name); - dup = 0; - for (idup = 0; idup < cnt; idup++) - { - if (strcasecmp (dummyName, *(col_name + idup)) == 0) - dup = 1; - } - if (strcasecmp (dummyName, "PK_UID") == 0) - dup = 1; - if (strcasecmp (dummyName, column.ToUTF8 ()) == 0) - dup = 1; - if (dup) - sprintf (dummyName, "COL_%d", seed++); - len = strlen (dummyName); - *(col_name + cnt) = (char *) malloc (len + 1); - strcpy (*(col_name + cnt), dummyName); - cnt++; - dbf_field = dbf_field->Next; - } + col_cnt = 0; + dbf_field = shp->Dbf->First; + while (dbf_field) + { + // counting DBF fields + col_cnt++; + dbf_field = dbf_field->Next; + } + col_name = (char **) malloc(sizeof(char *) * col_cnt); + cnt = 0; + seed = 0; + dbf_field = shp->Dbf->First; + while (dbf_field) + { + // preparing column names + strcpy(dummyName, dbf_field->Name); + dup = 0; + for (idup = 0; idup < cnt; idup++) + { + if (strcasecmp(dummyName, *(col_name + idup)) == 0) + dup = 1; + } + if (strcasecmp(dummyName, "PK_UID") == 0) + dup = 1; + if (strcasecmp(dummyName, column.ToUTF8()) == 0) + dup = 1; + if (dup) + sprintf(dummyName, "COL_%d", seed++); + len = strlen(dummyName); + *(col_name + cnt) = (char *) malloc(len + 1); + strcpy(*(col_name + cnt), dummyName); + cnt++; + dbf_field = dbf_field->Next; + } // // starting a transaction // - ret = sqlite3_exec (SqliteHandle, "BEGIN", NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } + ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load shapefile error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + sqlError = true; + goto clean_up; + } // // creating the Table // - strcpy (xtable, table.ToUTF8 ()); - strcpy (xcolumn, column.ToUTF8 ()); - sprintf (sql, "CREATE TABLE %s", xtable); - strcat (sql, " (\nPK_UID INTEGER PRIMARY KEY AUTOINCREMENT"); - cnt = 0; - dbf_field = shp->Dbf->First; - while (dbf_field) - { - strcat (sql, ",\n"); - strcat (sql, *(col_name + cnt)); - cnt++; - switch (dbf_field->Type) - { - case 'C': - strcat (sql, " TEXT"); - break; - case 'N': - if (dbf_field->Decimals) - strcat (sql, " DOUBLE"); - else - { - if (dbf_field->Length <= 9) - strcat (sql, " INTEGER"); - else - strcat (sql, " DOUBLE"); - } - break; - case 'D': - strcat (sql, " TEXT"); - break; - case 'L': - strcat (sql, " INTEGER"); - break; - }; - strcat (sql, " NOT NULL"); - dbf_field = dbf_field->Next; - } - if (metadata == true) - strcat (sql, ")"); - else - { - strcat (sql, ",\n"); - strcat (sql, xcolumn); - strcat (sql, " BLOB NOT NULL)"); - } - ret = sqlite3_exec (SqliteHandle, sql, NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } - if (metadata) - { - // creating Geometry column - switch (shp->Shape) - { - case 1: - case 11: - case 21: - geom_type = "POINT"; - break; - case 8: - geom_type = "MULTIPOINT"; - break; - case 3: - case 13: - case 23: - geom_type = "MULTILINESTRING"; - break; - case 5: - case 15: - case 25: - geom_type = "MULTIPOLYGON"; - break; - }; - sprintf (sql, "SELECT AddGeometryColumn('%s', '%s', %d, '%s', 2)", - xtable, xcolumn, srid, geom_type); - ret = sqlite3_exec (SqliteHandle, sql, NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } - } - current_row = 0; - while (1) - { - // - // inserting rows from shapefile - // - ret = gaiaReadShpEntity (shp, current_row, srid); - if (!ret) - { - if (!(shp->LastError)) // normal SHP EOF - break; - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (shp->LastError), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlError = true; - goto clean_up; - } - current_row++; - sprintf (sql, "INSERT INTO %s (\nPK_UID,", xtable); - cnt = 0; - dbf_field = shp->Dbf->First; - while (dbf_field) - { - // columns corresponding to some DBF attribute - strcat (sql, *(col_name + cnt)); - cnt++; - strcat (sql, ","); - dbf_field = dbf_field->Next; - } - strcat (sql, xcolumn); // the GEOMETRY column - strcat (sql, ")\nVALUES ("); - sprintf (dummy, "%d,", current_row); - strcat (sql, dummy); - dbf_field = shp->Dbf->First; - while (dbf_field) - { - // column values - if (!(dbf_field->Value)) - strcat (sql, "NULL"); - else - { - switch (dbf_field->Value->Type) - { - case GAIA_INT_VALUE: - sprintf (dummy, "%d", dbf_field->Value->IntValue); - strcat (sql, dummy); - break; - case GAIA_DOUBLE_VALUE: - sprintf (dummy, "%1.6lf", - dbf_field->Value->DblValue); - strcat (sql, dummy); - break; - case GAIA_TEXT_VALUE: - strcpy (dummy, dbf_field->Value->TxtValue); - CleanSqlString (dummy); - strcat (sql, "'"); - strcat (sql, dummy); - strcat (sql, "'"); - break; - default: - strcat (sql, "NULL"); - break; - }; - } - strcat (sql, ","); - dbf_field = dbf_field->Next; - } - hexWKB = gaiaToHexWkb (shp->Dbf->Geometry); - szSQL = strlen (sql) + strlen (hexWKB) + 1024; - bufSQL = (char *) malloc (szSQL); - strcpy (bufSQL, sql); - strcat (bufSQL, "\n"); - strcat (bufSQL, "GeomFromWkb(X'"); - strcat (bufSQL, hexWKB); - sprintf (dummy, "', %d))", srid); - strcat (bufSQL, dummy); - ret = sqlite3_exec (SqliteHandle, bufSQL, NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } - rows++; - free (hexWKB); - hexWKB = NULL; - free (bufSQL); - bufSQL = NULL; - } - clean_up: - if (hexWKB) - free (hexWKB); - if (bufSQL) - free (bufSQL); - gaiaFreeShapefile (shp); - if (col_name) - { - // releasing memory allocation for column names - for (cnt = 0; cnt < col_cnt; cnt++) - free (*(col_name + cnt)); - free (col_name); - } - if (sqlError == true) - { - // some error occurred - ROLLBACK - ret = sqlite3_exec (SqliteHandle, "ROLLBACK", NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - } - ::wxEndBusyCursor (); - msg.Printf (wxT - ("Shapefile not loaded\n\n\na ROLLBACK was automatically performed")); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_WARNING, - this); - } - else - { - // ok - confirming pending transaction - COMMIT - ret = sqlite3_exec (SqliteHandle, "COMMIT", NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load shapefile error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - return; - } - ::wxEndBusyCursor (); - msg.Printf (wxT ("Shapefile loaded\n\n%d inserted rows"), rows); - wxMessageBox (msg, wxT ("spatialite-gui"), - wxOK | wxICON_INFORMATION, this); - ClearTableTree (); - InitTableTree (); - } + strcpy(xtable, table.ToUTF8()); + strcpy(xcolumn, column.ToUTF8()); + sprintf(sql, "CREATE TABLE \"%s\"", xtable); + strcat(sql, " (\n\"PK_UID\" INTEGER PRIMARY KEY AUTOINCREMENT"); + cnt = 0; + dbf_field = shp->Dbf->First; + while (dbf_field) + { + strcat(sql, ",\n\""); + strcat(sql, *(col_name + cnt)); + cnt++; + switch (dbf_field->Type) + { + case 'C': + strcat(sql, "\" TEXT"); + break; + case 'N': + if (dbf_field->Decimals) + strcat(sql, "\" DOUBLE"); + else + { + if (dbf_field->Length <= 18) + strcat(sql, "\" INTEGER"); + else + strcat(sql, "\" DOUBLE"); + } + break; + case 'D': + strcat(sql, "\" DOUBLE"); + break; + case 'L': + strcat(sql, "\" INTEGER"); + break; + }; + dbf_field = dbf_field->Next; + } + if (metadata == true) + strcat(sql, ")"); + else + { + strcat(sql, ",\n"); + strcat(sql, xcolumn); + strcat(sql, " BLOB)"); + } + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load shapefile error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + sqlError = true; + goto clean_up; + } + if (metadata) + { + // creating Geometry column + switch (shp->Shape) + { + case 1: + case 11: + case 21: + geom_type = "POINT"; + break; + case 8: + geom_type = "MULTIPOINT"; + break; + case 3: + case 13: + case 23: + gaiaShpAnalyze(shp); + if (shp->EffectiveType == GAIA_LINESTRING) + geom_type = "LINESTRING"; + else + geom_type = "MULTILINESTRING"; + break; + case 5: + case 15: + case 25: + gaiaShpAnalyze(shp); + if (shp->EffectiveType == GAIA_POLYGON) + geom_type = "POLYGON"; + else + geom_type = "MULTIPOLYGON"; + break; + }; + sprintf(sql, "SELECT AddGeometryColumn('%s', '%s', %d, '%s', 2)", xtable, + xcolumn, srid, geom_type); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load shapefile error:") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + sqlError = true; + goto clean_up; + } + } else + { + // no Metadata + if (shp->Shape == 3 || shp->Shape == 13 || shp->Shape == 23 + || shp->Shape == 5 || shp->Shape == 15 || shp->Shape == 25) + { + // fixing anyway the Geometry type for LINESTRING/MULTILINESTRING or POLYGON/MULTIPOLYGON + gaiaShpAnalyze(shp); + } + } +// preparing the INSERT INTO parameterized statement + sprintf(sql, "INSERT INTO \"%s\" (\"PK_UID\",", xtable); + cnt = 0; + dbf_field = shp->Dbf->First; + while (dbf_field) + { + // columns corresponding to some DBF attribute + strcat(sql, "\""); + strcat(sql, *(col_name + cnt)); + cnt++; + strcat(sql, "\","); + dbf_field = dbf_field->Next; + } + strcat(sql, xcolumn); // the GEOMETRY column + strcat(sql, ")\nVALUES (? "); + dbf_field = shp->Dbf->First; + while (dbf_field) + { + // column values + strcat(sql, ", ?"); + dbf_field = dbf_field->Next; + } + strcat(sql, ", ?)"); // the GEOMETRY column + ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); + if (ret != SQLITE_OK) + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("load shapefile error: ") + err, wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlError = true; + goto clean_up; + } + current_row = 0; + while (1) + { + // + // inserting rows from shapefile + // + ret = gaiaReadShpEntity(shp, current_row, srid); + if (!ret) + { + if (!(shp->LastError)) // normal SHP EOF + break; + wxMessageBox(wxT("load shapefile error:") + + wxString::FromUTF8(shp->LastError), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlError = true; + goto clean_up; + } + current_row++; + // binding query params + sqlite3_reset(stmt); + sqlite3_clear_bindings(stmt); + sqlite3_bind_int(stmt, 1, current_row); + cnt = 0; + dbf_field = shp->Dbf->First; + while (dbf_field) + { + // column values + if (!(dbf_field->Value)) + sqlite3_bind_null(stmt, cnt + 2); + else + { + switch (dbf_field->Value->Type) + { + case GAIA_INT_VALUE: + sqlite3_bind_int64(stmt, cnt + 2, + dbf_field->Value->IntValue); + break; + case GAIA_DOUBLE_VALUE: + sqlite3_bind_double(stmt, cnt + 2, + dbf_field->Value->DblValue); + break; + case GAIA_TEXT_VALUE: + sqlite3_bind_text(stmt, cnt + 2, + dbf_field->Value->TxtValue, + strlen(dbf_field->Value-> + TxtValue), SQLITE_STATIC); + break; + default: + sqlite3_bind_null(stmt, cnt + 2);; + break; + }; + } + cnt++; + dbf_field = dbf_field->Next; + } + if (shp->Dbf->Geometry) + { + gaiaToSpatiaLiteBlobWkb(shp->Dbf->Geometry, &blob, &blob_size); + sqlite3_bind_blob(stmt, cnt + 2, blob, blob_size, free); + } else + { + /* handling a NULL-Geometry */ + sqlite3_bind_null(stmt, cnt + 2); + } + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE || ret == SQLITE_ROW) + ; + else + { + wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); + wxMessageBox(wxT("load shapefile error:") + err, + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_finalize(stmt); + sqlError = true; + goto clean_up; + } + rows++; + } + sqlite3_finalize(stmt); +clean_up: + gaiaFreeShapefile(shp); + if (col_name) + { + // releasing memory allocation for column names + for (cnt = 0; cnt < col_cnt; cnt++) + free(*(col_name + cnt)); + free(col_name); + } + if (sqlError == true) + { + // some error occurred - ROLLBACK + ret = sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load shapefile error:") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + } + ::wxEndBusyCursor(); + msg = + wxT("Shapefile not loaded\n\n\na ROLLBACK was automatically performed"); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + } else + { + // ok - confirming pending transaction - COMMIT + ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load shapefile error:") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + ::wxEndBusyCursor(); + sprintf(dummyName, "Shapefile loaded\n\n%d inserted rows", rows); + msg = wxString::FromUTF8(dummyName); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + InitTableTree(); + } } -gaiaDbfFieldPtr MyFrame::GetDbfField (gaiaDbfListPtr list, char *name) +gaiaDbfFieldPtr MyFrame::GetDbfField(gaiaDbfListPtr list, char *name) { // // find a DBF attribute by name // - gaiaDbfFieldPtr - fld = list->First; - while (fld) - { - if (strcasecmp (fld->Name, name) == 0) - return fld; - fld = fld->Next; - } - return NULL; + gaiaDbfFieldPtr fld = list->First; + while (fld) + { + if (strcasecmp(fld->Name, name) == 0) + return fld; + fld = fld->Next; + } + return NULL; } -void -MyFrame::DumpShapefile (wxString & path, wxString & table, wxString & column, - wxString & charset) +void MyFrame::DumpShapefile(wxString & path, wxString & table, + wxString & column, wxString & charset) { // // dumping a geometry table as Shapefile // - char **results; - int rows; - int columns; - int i; - char *errMsg = NULL; - char *gtype; - wxString geometryType; - int shape = -1; - char xtable[1024]; - char xcolumn[1024]; - char xpath[1024]; - char xsql[4096]; - sqlite3_stmt *stmt; - int row1 = 0; - int n_cols = 0; - int offset = 0; - int type; - int multiple_entities = 0; - const unsigned char *char_value; - const void *blob_value; - gaiaShapefilePtr shp = NULL; - gaiaDbfListPtr dbf_export_list = NULL; - gaiaDbfListPtr dbf_list = NULL; - gaiaDbfListPtr dbf_write; - gaiaDbfFieldPtr dbf_field; - gaiaGeomCollPtr geom; - int *max_length = NULL; - int *sql_type = NULL; - char dummy[1024]; - int len; - wxString msg; - wxString sql = - wxT ("SELECT type FROM geometry_columns WHERE f_table_name = '"); - sql += table; - sql += wxT ("' AND f_geometry_column = '"); - sql += column; - sql += wxT ("'"); - int ret = sqlite3_get_table (SqliteHandle, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("dump shapefile error:") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - gtype = results[(i * columns) + 0]; - geometryType = wxString::FromUTF8 (gtype); - } - } - sqlite3_free_table (results); - if (geometryType == wxT ("POINT")) - shape = GAIA_POINT; - if (geometryType == wxT ("MULTIPOINT")) - shape = GAIA_MULTIPOINT; - if (geometryType == wxT ("LINESTRING") - || geometryType == wxT ("MULTILINESTRING")) - shape = GAIA_LINESTRING; - if (geometryType == wxT ("POLYGON") || geometryType == wxT ("MULTIPOLYGON")) - shape = GAIA_POLYGON; - if (shape < 0) - { - wxMessageBox (wxT ("Unable to detect GeometryType for '") + - table + wxT (".") + column + wxT ("'"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - return; - } + char **results; + int rows; + int columns; + int i; + char *errMsg = NULL; + char *gtype; + wxString geometryType; + int shape = -1; + char xtable[1024]; + char xcolumn[1024]; + char xpath[1024]; + char xsql[4096]; + sqlite3_stmt *stmt; + int row1 = 0; + int n_cols = 0; + int offset = 0; + int type; + int multiple_entities = 0; + const unsigned char *char_value; + const void *blob_value; + gaiaShapefilePtr shp = NULL; + gaiaDbfListPtr dbf_export_list = NULL; + gaiaDbfListPtr dbf_list = NULL; + gaiaDbfListPtr dbf_write; + gaiaDbfFieldPtr dbf_field; + gaiaGeomCollPtr geom; + int *max_length = NULL; + int *sql_type = NULL; + char dummy[1024]; + int len; + wxString msg; + wxString sql = + wxT("SELECT type FROM geometry_columns WHERE f_table_name = '"); + sql += table; + sql += wxT("' AND f_geometry_column = '"); + sql += column; + sql += wxT("'"); + int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + gtype = results[(i * columns) + 0]; + geometryType = wxString::FromUTF8(gtype); + } + } + sqlite3_free_table(results); + if (geometryType == wxT("POINT")) + shape = GAIA_POINT; + if (geometryType == wxT("MULTIPOINT")) + shape = GAIA_MULTIPOINT; + if (geometryType == wxT("LINESTRING") + || geometryType == wxT("MULTILINESTRING")) + shape = GAIA_LINESTRING; + if (geometryType == wxT("POLYGON") || geometryType == wxT("MULTIPOLYGON")) + shape = GAIA_POLYGON; + if (shape < 0) + { + wxMessageBox(wxT("Unable to detect GeometryType for '") + + table + wxT(".") + column + wxT("'"), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + return; + } // // preparing SQL statement // - strcpy (xtable, table.ToUTF8 ()); - strcpy (xcolumn, column.ToUTF8 ()); - sprintf (xsql, "SELECT * FROM %s WHERE GeometryType(%s) = ", xtable, - xcolumn); - if (shape == GAIA_LINESTRING) - { - strcat (xsql, "'LINESTRING' OR GeometryType("); - strcat (xsql, xcolumn); - strcat (xsql, ") = 'MULTILINESTRING'"); - } - else if (shape == GAIA_POLYGON) - { - strcat (xsql, "'POLYGON' OR GeometryType("); - strcat (xsql, xcolumn); - strcat (xsql, ") = 'MULTIPOLYGON'"); - } - else if (shape == GAIA_MULTIPOINT) - { - strcat (xsql, "'POINT' OR GeometryType("); - strcat (xsql, xcolumn); - strcat (xsql, ") = 'MULTIPOINT'"); - } - else - strcat (xsql, "'POINT'"); + strcpy(xtable, table.ToUTF8()); + strcpy(xcolumn, column.ToUTF8()); + sprintf(xsql, "SELECT * FROM \"%s\" WHERE GeometryType(\"%s\") = ", xtable, + xcolumn); + if (shape == GAIA_LINESTRING) + { + strcat(xsql, "'LINESTRING' OR GeometryType(\""); + strcat(xsql, xcolumn); + strcat(xsql, "\") = 'MULTILINESTRING'"); + } else if (shape == GAIA_POLYGON) + { + strcat(xsql, "'POLYGON' OR GeometryType(\""); + strcat(xsql, xcolumn); + strcat(xsql, "\") = 'MULTIPOLYGON'"); + } else if (shape == GAIA_MULTIPOINT) + { + strcat(xsql, "'POINT' OR GeometryType(\""); + strcat(xsql, xcolumn); + strcat(xsql, "\") = 'MULTIPOINT'"); + } else + strcat(xsql, "'POINT'"); +// fetching anyway NULL Geometries + strcat(xsql, " OR \""); + strcat(xsql, xcolumn); + strcat(xsql, "\" IS NULL"); // // compiling SQL prepared statement // - ret = sqlite3_prepare_v2 (SqliteHandle, xsql, strlen (xsql), &stmt, NULL); - if (ret != SQLITE_OK) - goto sql_error; - rows = 0; - while (1) - { - // - // Pass I - scrolling the result set to compute real DBF attributes' sizes and types - // - ret = sqlite3_step (stmt); - if (ret == SQLITE_DONE) - break; // end of result set - if (ret == SQLITE_ROW) - { - // processing a result set row - row1++; - if (n_cols == 0) - { - // this one is the first row, so we are going to prepare the DBF Fields list - n_cols = sqlite3_column_count (stmt); - dbf_export_list = gaiaAllocDbfList (); - max_length = (int *) malloc (sizeof (int) * n_cols); - sql_type = (int *) malloc (sizeof (int) * n_cols); - for (i = 0; i < n_cols; i++) - { - // initializes the DBF export fields - strcpy (dummy, sqlite3_column_name (stmt, i)); - gaiaAddDbfField (dbf_export_list, dummy, '\0', 0, - 0, 0); - max_length[i] = 0; - sql_type[i] = SQLITE_NULL; - } - } - for (i = 0; i < n_cols; i++) - { - // update the DBF export fields analyzing fetched data - type = sqlite3_column_type (stmt, i); - if (type == SQLITE_BLOB && strcasecmp ((char *) xcolumn, - (char *) - sqlite3_column_name - (stmt, i)) == 0 - && shape == GAIA_POINT) - { - // - // we need to check if there is any MULTIPOINT, - // because shapefile handles simple-points shapes and multi-points shapes - // in a complete differet way - // - blob_value = sqlite3_column_blob (stmt, i); - len = sqlite3_column_bytes (stmt, i); - geom = - gaiaFromSpatiaLiteBlobWkb ((unsigned char *) - blob_value, len); - if (geom) - { - if (geom->FirstPoint != geom->LastPoint) - multiple_entities = 1; - gaiaFreeGeomColl (geom); - } - } - if (type == SQLITE_NULL || type == SQLITE_BLOB) - continue; - if (type == SQLITE_TEXT) - { - char_value = sqlite3_column_text (stmt, i); - len = sqlite3_column_bytes (stmt, i); - sql_type[i] = SQLITE_TEXT; - if (len > max_length[i]) - max_length[i] = len; - } - else if (type == SQLITE_FLOAT - && sql_type[i] != SQLITE_TEXT) - sql_type[i] = SQLITE_FLOAT; // promoting a numeric column to be DOUBLE - else if (type == SQLITE_INTEGER - && (sql_type[i] == SQLITE_NULL - || sql_type[i] == SQLITE_INTEGER)) - sql_type[i] = SQLITE_INTEGER; // promoting a null column to be INTEGER - } - } - else - goto sql_error; - } - if (!row1) - goto empty_result_set; - i = 0; - offset = 0; - dbf_list = gaiaAllocDbfList (); - dbf_field = dbf_export_list->First; - while (dbf_field) - { - // preparing the final DBF attribute list - if (sql_type[i] == SQLITE_NULL) - { - i++; - dbf_field = dbf_field->Next; - continue; - } - if (sql_type[i] == SQLITE_TEXT) - { - gaiaAddDbfField (dbf_list, dbf_field->Name, 'C', offset, - max_length[i], 0); - offset += max_length[i]; - } - if (sql_type[i] == SQLITE_FLOAT) - { - gaiaAddDbfField (dbf_list, dbf_field->Name, 'N', offset, 24, 6); - offset += 24; - } - if (sql_type[i] == SQLITE_INTEGER) - { - gaiaAddDbfField (dbf_list, dbf_field->Name, 'N', offset, 9, 0); - offset += 9; - } - i++; - dbf_field = dbf_field->Next; - } - free (max_length); - free (sql_type); - gaiaFreeDbfList (dbf_export_list); + ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); + if (ret != SQLITE_OK) + goto sql_error; + rows = 0; + while (1) + { + // + // Pass I - scrolling the result set to compute real DBF attributes' sizes and types + // + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; // end of result set + if (ret == SQLITE_ROW) + { + // processing a result set row + row1++; + if (n_cols == 0) + { + // this one is the first row, so we are going to prepare the DBF Fields list + n_cols = sqlite3_column_count(stmt); + dbf_export_list = gaiaAllocDbfList(); + max_length = (int *) malloc(sizeof(int) * n_cols); + sql_type = (int *) malloc(sizeof(int) * n_cols); + for (i = 0; i < n_cols; i++) + { + // initializes the DBF export fields + strcpy(dummy, sqlite3_column_name(stmt, i)); + gaiaAddDbfField(dbf_export_list, dummy, '\0', 0, 0, 0); + max_length[i] = 0; + sql_type[i] = SQLITE_NULL; + } + } + for (i = 0; i < n_cols; i++) + { + // update the DBF export fields analyzing fetched data + type = sqlite3_column_type(stmt, i); + if (type == SQLITE_BLOB && strcasecmp((char *) xcolumn, + (char *) + sqlite3_column_name(stmt, + i)) == 0 + && shape == GAIA_POINT) + { + // + // we need to check if there is any MULTIPOINT, + // because shapefile handles simple-points shapes and multi-points shapes + // in a complete differet way + // + blob_value = sqlite3_column_blob(stmt, i); + len = sqlite3_column_bytes(stmt, i); + geom = + gaiaFromSpatiaLiteBlobWkb((unsigned char *) blob_value, + len); + if (geom) + { + if (geom->FirstPoint != geom->LastPoint) + multiple_entities = 1; + gaiaFreeGeomColl(geom); + } + } + if (type == SQLITE_NULL || type == SQLITE_BLOB) + continue; + if (type == SQLITE_TEXT) + { + char_value = sqlite3_column_text(stmt, i); + len = sqlite3_column_bytes(stmt, i); + sql_type[i] = SQLITE_TEXT; + if (len > max_length[i]) + max_length[i] = len; + } else if (type == SQLITE_FLOAT && sql_type[i] != SQLITE_TEXT) + sql_type[i] = SQLITE_FLOAT; // promoting a numeric column to be DOUBLE + else if (type == SQLITE_INTEGER + && (sql_type[i] == SQLITE_NULL + || sql_type[i] == SQLITE_INTEGER)) + sql_type[i] = SQLITE_INTEGER; // promoting a null column to be INTEGER + } + } else + goto sql_error; + } + if (!row1) + goto empty_result_set; + i = 0; + offset = 0; + dbf_list = gaiaAllocDbfList(); + dbf_field = dbf_export_list->First; + while (dbf_field) + { + // preparing the final DBF attribute list + if (sql_type[i] == SQLITE_NULL) + { + i++; + dbf_field = dbf_field->Next; + continue; + } + if (sql_type[i] == SQLITE_TEXT) + { + gaiaAddDbfField(dbf_list, dbf_field->Name, 'C', offset, max_length[i], + 0); + offset += max_length[i]; + } + if (sql_type[i] == SQLITE_FLOAT) + { + gaiaAddDbfField(dbf_list, dbf_field->Name, 'N', offset, 24, 6); + offset += 24; + } + if (sql_type[i] == SQLITE_INTEGER) + { + gaiaAddDbfField(dbf_list, dbf_field->Name, 'N', offset, 18, 0); + offset += 18; + } + i++; + dbf_field = dbf_field->Next; + } + free(max_length); + free(sql_type); + gaiaFreeDbfList(dbf_export_list); // resetting SQLite query - ret = sqlite3_reset (stmt); - if (ret != SQLITE_OK) - goto sql_error; + ret = sqlite3_reset(stmt); + if (ret != SQLITE_OK) + goto sql_error; // trying to open shapefile files - shp = gaiaAllocShapefile (); - strcpy (xpath, path.ToUTF8 ()); - gaiaOpenShpWrite (shp, xpath, shape, dbf_list, "UTF-8", charset.ToUTF8 ()); - if (!(shp->Valid)) - goto no_file; - while (1) - { - // Pass II - scrolling the result set to dump data into shapefile - ret = sqlite3_step (stmt); - if (ret == SQLITE_DONE) - break; // end of result set - if (ret == SQLITE_ROW) - { - rows++; - geom = NULL; - dbf_write = gaiaCloneDbfEntity (dbf_list); - for (i = 0; i < n_cols; i++) - { - if (strcasecmp - ((char *) xcolumn, - (char *) sqlite3_column_name (stmt, i)) == 0) - { - // this one is the internal BLOB encoded GEOMETRY to be exported - blob_value = sqlite3_column_blob (stmt, i); - len = sqlite3_column_bytes (stmt, i); - dbf_write->Geometry = - gaiaFromSpatiaLiteBlobWkb ((unsigned char *) - blob_value, len); - } - strcpy (dummy, sqlite3_column_name (stmt, i)); - dbf_field = GetDbfField (dbf_write, dummy); - if (!dbf_field) - continue; - switch (dbf_field->Type) - { - case 'N': - if (sqlite3_column_type (stmt, i) == SQLITE_INTEGER) - gaiaSetIntValue (dbf_field, - sqlite3_column_int (stmt, i)); - else if (sqlite3_column_type (stmt, i) == - SQLITE_FLOAT) - gaiaSetDoubleValue (dbf_field, - sqlite3_column_double - (stmt, i)); - else - gaiaSetNullValue (dbf_field); - break; - case 'C': - if (sqlite3_column_type (stmt, i) == SQLITE_TEXT) - { - strcpy (dummy, - (char *) sqlite3_column_text (stmt, - i)); - gaiaSetStrValue (dbf_field, dummy); - } - else - gaiaSetNullValue (dbf_field); - break; - }; - } - if (!(dbf_write->Geometry)) - { - gaiaFreeDbfList (dbf_write); - continue; - } - if (!gaiaWriteShpEntity (shp, dbf_write)) - { - wxMessageBox (wxT ("Shapefile write error"), - wxT ("spatialite-gui"), - wxOK | wxICON_INFORMATION, this); - } - gaiaFreeDbfList (dbf_write); - } - else - goto sql_error; - } - sqlite3_finalize (stmt); - gaiaFlushShpHeaders (shp); - gaiaFreeShapefile (shp); - msg.Printf (wxT ("Exported %d rows into Shapefile"), rows); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, this); - return; - sql_error: + shp = gaiaAllocShapefile(); + strcpy(xpath, path.ToUTF8()); + gaiaOpenShpWrite(shp, xpath, shape, dbf_list, "UTF-8", charset.ToUTF8()); + if (!(shp->Valid)) + goto no_file; + while (1) + { + // Pass II - scrolling the result set to dump data into shapefile + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; // end of result set + if (ret == SQLITE_ROW) + { + rows++; + geom = NULL; + dbf_write = gaiaCloneDbfEntity(dbf_list); + for (i = 0; i < n_cols; i++) + { + if (strcasecmp + ((char *) xcolumn, + (char *) sqlite3_column_name(stmt, i)) == 0) + { + // this one is the internal BLOB encoded GEOMETRY to be exported + if (sqlite3_column_type(stmt, i) != SQLITE_BLOB) + { + // this one is a NULL Geometry + dbf_write->Geometry = NULL; + } else + { + blob_value = sqlite3_column_blob(stmt, i); + len = sqlite3_column_bytes(stmt, i); + dbf_write->Geometry = + gaiaFromSpatiaLiteBlobWkb((unsigned char *) blob_value, + len); + } + } + strcpy(dummy, sqlite3_column_name(stmt, i)); + dbf_field = GetDbfField(dbf_write, dummy); + if (!dbf_field) + continue; + if (sqlite3_column_type(stmt, i) == SQLITE_NULL) + { + // handling NULL values + gaiaSetNullValue(dbf_field); + } else + { + switch (dbf_field->Type) + { + case 'N': + if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) + gaiaSetIntValue(dbf_field, + sqlite3_column_int64(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) + gaiaSetDoubleValue(dbf_field, + sqlite3_column_double(stmt, i)); + else + gaiaSetNullValue(dbf_field); + break; + case 'C': + if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) + { + strcpy(dummy, + (char *) sqlite3_column_text(stmt, i)); + gaiaSetStrValue(dbf_field, dummy); + } else + gaiaSetNullValue(dbf_field); + break; + }; + } + } + if (!gaiaWriteShpEntity(shp, dbf_write)) + { + wxMessageBox(wxT("Shapefile write error"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + } + gaiaFreeDbfList(dbf_write); + } else + goto sql_error; + } + sqlite3_finalize(stmt); + gaiaFlushShpHeaders(shp); + gaiaFreeShapefile(shp); + sprintf(dummy, "Exported %d rows into Shapefile", rows); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + return; +sql_error: // // some SQL error occurred // - sqlite3_finalize (stmt); - if (dbf_export_list); - gaiaFreeDbfList (dbf_export_list); - if (dbf_list); - gaiaFreeDbfList (dbf_list); - if (shp) - gaiaFreeShapefile (shp); - wxMessageBox (wxT ("dump shapefile error:") + - wxString::FromUTF8 (sqlite3_errmsg (SqliteHandle)), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - return; - no_file: + sqlite3_finalize(stmt); + if (dbf_export_list); + gaiaFreeDbfList(dbf_export_list); + if (dbf_list); + gaiaFreeDbfList(dbf_list); + if (shp) + gaiaFreeShapefile(shp); + wxMessageBox(wxT("dump shapefile error:") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; +no_file: // // shapefile can't be created/opened // - if (dbf_export_list); - gaiaFreeDbfList (dbf_export_list); - if (dbf_list); - gaiaFreeDbfList (dbf_list); - if (shp) - gaiaFreeShapefile (shp); - wxMessageBox (wxT ("ERROR: unable to open '") + path + - wxT ("' for writing"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; - empty_result_set: + if (dbf_export_list); + gaiaFreeDbfList(dbf_export_list); + if (dbf_list); + gaiaFreeDbfList(dbf_list); + if (shp) + gaiaFreeShapefile(shp); + wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; +empty_result_set: // // the result set is empty - nothing to do // - sqlite3_finalize (stmt); - if (dbf_export_list); - gaiaFreeDbfList (dbf_export_list); - if (dbf_list); - gaiaFreeDbfList (dbf_list); - if (shp) - gaiaFreeShapefile (shp); - wxMessageBox (wxT - ("The SQL SELECT returned an empty result set\n... there is nothing to export ..."), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); + sqlite3_finalize(stmt); + if (dbf_export_list); + gaiaFreeDbfList(dbf_export_list); + if (dbf_list); + gaiaFreeDbfList(dbf_list); + if (shp) + gaiaFreeShapefile(shp); + wxMessageBox(wxT + ("The SQL SELECT returned an empty result set\n... there is nothing to export ..."), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); } -void -MyFrame::DumpTxtTab (wxString & path, wxString & table, wxString & charset) +void MyFrame::DumpTxtTab(wxString & path, wxString & table, wxString & charset) { // // dumping a table as Txt/Tab // - wxString sql; - sqlite3_stmt *stmt; - int ret; - int rows = 0; - int i; - int n_cols; - char xpath[1024]; - char dummy[65536]; - char outCs[128]; - char *pDummy; - wxString msg; - strcpy (outCs, charset.ToUTF8 ()); - strcpy (xpath, path.ToUTF8 ()); - FILE *out = fopen (xpath, "w"); - if (!out) - goto no_file; + wxString sql; + sqlite3_stmt *stmt; + int ret; + int rows = 0; + int i; + int n_cols; + char xpath[1024]; + char dummy[65536]; + char outCs[128]; + char *pDummy; + wxString msg; + strcpy(outCs, charset.ToUTF8()); + strcpy(xpath, path.ToUTF8()); + FILE *out = fopen(xpath, "w"); + if (!out) + goto no_file; // // preparing SQL statement // - sql = wxT ("SELECT * FROM "); - sql += table; + sql = wxT("SELECT * FROM \""); + sql += table; + sql += wxT("\""); // // compiling SQL prepared statement // - ret = - sqlite3_prepare_v2 (SqliteHandle, sql.ToUTF8 (), sql.Len (), &stmt, - NULL); - if (ret != SQLITE_OK) - goto sql_error; - rows = 0; - while (1) - { - ret = sqlite3_step (stmt); - if (ret == SQLITE_DONE) - break; // end of result set - if (ret == SQLITE_ROW) - { - n_cols = sqlite3_column_count (stmt); - if (rows == 0) - { - // outputting the column titles - for (i = 0; i < n_cols; i++) - { - if (i == 0) - fprintf (out, "%s", - sqlite3_column_name (stmt, i)); - else - fprintf (out, "\t%s", - sqlite3_column_name (stmt, i)); - } - fprintf (out, "\n"); - } - rows++; - for (i = 0; i < n_cols; i++) - { - if (i > 0) - fprintf (out, "\t"); - if (sqlite3_column_type (stmt, i) == SQLITE_INTEGER) - fprintf (out, "%d", sqlite3_column_int (stmt, i)); - else if (sqlite3_column_type (stmt, i) == SQLITE_FLOAT) - fprintf (out, "%1.6lf", - sqlite3_column_double (stmt, i)); - else if (sqlite3_column_type (stmt, i) == SQLITE_TEXT) - { - strcpy (dummy, - (char *) sqlite3_column_text (stmt, i)); - CleanTxtTab (dummy); - pDummy = dummy; - if (!gaiaConvertCharset (&pDummy, "UTF-8", outCs)) - goto encoding_error; - fprintf (out, "%s", dummy); - } - } - fprintf (out, "\n"); - } - else - goto sql_error; - } - sqlite3_finalize (stmt); - fclose (out); - msg.Printf (wxT ("Exported %d rows into Txt/Tab file"), rows); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, this); - return; - sql_error: + ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); + if (ret != SQLITE_OK) + goto sql_error; + rows = 0; + while (1) + { + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; // end of result set + if (ret == SQLITE_ROW) + { + n_cols = sqlite3_column_count(stmt); + if (rows == 0) + { + // outputting the column titles + for (i = 0; i < n_cols; i++) + { + if (i == 0) + fprintf(out, "%s", sqlite3_column_name(stmt, i)); + else + fprintf(out, "\t%s", sqlite3_column_name(stmt, i)); + } + fprintf(out, "\n"); + } + rows++; + for (i = 0; i < n_cols; i++) + { + if (i > 0) + fprintf(out, "\t"); + if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) + fprintf(out, "%d", sqlite3_column_int(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) + fprintf(out, "%1.6lf", sqlite3_column_double(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) + { + strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); + CleanTxtTab(dummy); + pDummy = dummy; + if (!gaiaConvertCharset(&pDummy, "UTF-8", outCs)) + goto encoding_error; + fprintf(out, "%s", dummy); + } + } + fprintf(out, "\n"); + } else + goto sql_error; + } + sqlite3_finalize(stmt); + fclose(out); + sprintf(dummy, "Exported %d rows into Txt/Tab file", rows); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + return; +sql_error: // // some SQL error occurred // - sqlite3_finalize (stmt); - wxMessageBox (wxT ("dump Txt/Tab error:") + - wxString::FromUTF8 (sqlite3_errmsg (SqliteHandle)), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - if (out) - fclose (out); - return; - encoding_error: + sqlite3_finalize(stmt); + wxMessageBox(wxT("dump Txt/Tab error:") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (out) + fclose(out); + return; +encoding_error: // // some CHARSET converion occurred // - sqlite3_finalize (stmt); - wxMessageBox (wxT ("dump Txt/Tab: charset conversion reported an error"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - if (out) - fclose (out); - return; - no_file: + sqlite3_finalize(stmt); + wxMessageBox(wxT("dump Txt/Tab: charset conversion reported an error"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (out) + fclose(out); + return; +no_file: // // output file can't be created/opened // - wxMessageBox (wxT ("ERROR: unable to open '") + path + - wxT ("' for writing"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; + wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; } -void -MyFrame::DumpCsv (wxString & path, wxString & table, wxString & charset) +void MyFrame::DumpCsv(wxString & path, wxString & table, wxString & charset) { // // dumping a table as CSV // - wxString sql; - sqlite3_stmt *stmt; - int ret; - int rows = 0; - int i; - int n_cols; - char xpath[1024]; - char dummy[65536]; - char outCs[128]; - char *pDummy; - wxString msg; - strcpy (outCs, charset.ToUTF8 ()); - strcpy (xpath, path.ToUTF8 ()); - FILE *out = fopen (xpath, "w"); - if (!out) - goto no_file; + wxString sql; + sqlite3_stmt *stmt; + int ret; + int rows = 0; + int i; + int n_cols; + char xpath[1024]; + char dummy[65536]; + char outCs[128]; + char *pDummy; + wxString msg; + strcpy(outCs, charset.ToUTF8()); + strcpy(xpath, path.ToUTF8()); + FILE *out = fopen(xpath, "w"); + if (!out) + goto no_file; // // preparing SQL statement // - sql = wxT ("SELECT * FROM "); - sql += table; + sql = wxT("SELECT * FROM \""); + sql += table; + sql += wxT("\""); // // compiling SQL prepared statement // - ret = - sqlite3_prepare_v2 (SqliteHandle, sql.ToUTF8 (), sql.Len (), &stmt, - NULL); - if (ret != SQLITE_OK) - goto sql_error; - rows = 0; - while (1) - { - ret = sqlite3_step (stmt); - if (ret == SQLITE_DONE) - break; // end of result set - if (ret == SQLITE_ROW) - { - n_cols = sqlite3_column_count (stmt); - if (rows == 0) - { - // outputting the column titles - for (i = 0; i < n_cols; i++) - { - if (i == 0) - { - strcpy (dummy, sqlite3_column_name (stmt, i)); - CleanCsv (dummy); - fprintf (out, "%s", dummy); - } - else - { - strcpy (dummy, sqlite3_column_name (stmt, i)); - CleanCsv (dummy); - fprintf (out, ",%s", dummy); - } - } - fprintf (out, "\n"); - } - rows++; - for (i = 0; i < n_cols; i++) - { - if (i > 0) - fprintf (out, ","); - if (sqlite3_column_type (stmt, i) == SQLITE_INTEGER) - fprintf (out, "%d", sqlite3_column_int (stmt, i)); - else if (sqlite3_column_type (stmt, i) == SQLITE_FLOAT) - fprintf (out, "%1.6lf", - sqlite3_column_double (stmt, i)); - else if (sqlite3_column_type (stmt, i) == SQLITE_TEXT) - { - strcpy (dummy, - (char *) sqlite3_column_text (stmt, i)); - CleanCsv (dummy); - pDummy = dummy; - if (!gaiaConvertCharset - (&pDummy, (const char *) "UTF-8", outCs)) - goto encoding_error; - fprintf (out, "%s", dummy); - } - } - fprintf (out, "\n"); - } - else - goto sql_error; - } - sqlite3_finalize (stmt); - fclose (out); - msg.Printf (wxT ("Exported %d rows into CSV file"), rows); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, this); - return; - sql_error: + ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); + if (ret != SQLITE_OK) + goto sql_error; + rows = 0; + while (1) + { + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; // end of result set + if (ret == SQLITE_ROW) + { + n_cols = sqlite3_column_count(stmt); + if (rows == 0) + { + // outputting the column titles + for (i = 0; i < n_cols; i++) + { + if (i == 0) + { + strcpy(dummy, sqlite3_column_name(stmt, i)); + CleanCsv(dummy); + fprintf(out, "%s", dummy); + } else + { + strcpy(dummy, sqlite3_column_name(stmt, i)); + CleanCsv(dummy); + fprintf(out, ",%s", dummy); + } + } + fprintf(out, "\n"); + } + rows++; + for (i = 0; i < n_cols; i++) + { + if (i > 0) + fprintf(out, ","); + if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) + fprintf(out, "%d", sqlite3_column_int(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) + fprintf(out, "%1.6lf", sqlite3_column_double(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) + { + strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); + CleanCsv(dummy); + pDummy = dummy; + if (!gaiaConvertCharset + (&pDummy, (const char *) "UTF-8", outCs)) + goto encoding_error; + fprintf(out, "%s", dummy); + } + } + fprintf(out, "\n"); + } else + goto sql_error; + } + sqlite3_finalize(stmt); + fclose(out); + sprintf(dummy, "Exported %d rows into CSV file", rows); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + return; +sql_error: // // some SQL error occurred // - sqlite3_finalize (stmt); - wxMessageBox (wxT ("dump CSV error:") + - wxString::FromUTF8 (sqlite3_errmsg (SqliteHandle)), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - if (out) - fclose (out); - return; - encoding_error: + sqlite3_finalize(stmt); + wxMessageBox(wxT("dump CSV error:") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (out) + fclose(out); + return; +encoding_error: // // some CHARSET converion occurred // - sqlite3_finalize (stmt); - wxMessageBox (wxT ("dump CSV: charset conversion reported an error"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - if (out) - fclose (out); - return; - no_file: + sqlite3_finalize(stmt); + wxMessageBox(wxT("dump CSV: charset conversion reported an error"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (out) + fclose(out); + return; +no_file: // // output file can't be created/opened // - wxMessageBox (wxT ("ERROR: unable to open '") + path + - wxT ("' for writing"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; + wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; } -void -MyFrame::DumpHtml (wxString & path, wxString & table, wxString & charset) +void MyFrame::DumpHtml(wxString & path, wxString & table, wxString & charset) { // // dumping a table as HTML // - wxString sql; - sqlite3_stmt *stmt; - int ret; - int rows = 0; - int i; - int n_cols; - char xpath[1024]; - char xtable[1024]; - char dummy[65536]; - char outCs[128]; - char *pDummy; - wxString msg; - strcpy (outCs, charset.ToUTF8 ()); - strcpy (xpath, path.ToUTF8 ()); - strcpy (xtable, table.ToUTF8 ()); - FILE *out = fopen (xpath, "w"); - if (!out) - goto no_file; - fprintf (out, - "\n"); - fprintf (out, "\n\t\n"); - fprintf (out, - "\t\t\n", - outCs); - fprintf (out, "\t\t\nTable '%s': from SQLite/SpatiaLite DB '%s'\n", - xtable, xpath); - fprintf (out, "\t\t\n"); - fprintf (out, "\t\t\n\t\n\t\n\t\t\n"); + wxString sql; + sqlite3_stmt *stmt; + int ret; + int rows = 0; + int i; + int n_cols; + char xpath[1024]; + char xtable[1024]; + char dummy[65536]; + char outCs[128]; + char *pDummy; + wxString msg; + strcpy(outCs, charset.ToUTF8()); + strcpy(xpath, path.ToUTF8()); + strcpy(xtable, table.ToUTF8()); + FILE *out = fopen(xpath, "w"); + if (!out) + goto no_file; + fprintf(out, + "\n"); + fprintf(out, "\n\t\n"); + fprintf(out, + "\t\t\n", + outCs); + fprintf(out, "\t\t\nTable '%s': from SQLite/SpatiaLite DB '%s'\n", + xtable, xpath); + fprintf(out, "\t\t\n"); + fprintf(out, "\t\t\n\t\n\t\n\t\t
\n"); // // preparing SQL statement // - sql = wxT ("SELECT * FROM "); - sql += table; + sql = wxT("SELECT * FROM \""); + sql += table; + sql += wxT("\""); // // compiling SQL prepared statement // - ret = - sqlite3_prepare_v2 (SqliteHandle, sql.ToUTF8 (), sql.Len (), &stmt, - NULL); - if (ret != SQLITE_OK) - goto sql_error; - rows = 0; - while (1) - { - ret = sqlite3_step (stmt); - if (ret == SQLITE_DONE) - break; // end of result set - if (ret == SQLITE_ROW) - { - n_cols = sqlite3_column_count (stmt); - if (rows == 0) - { - // outputting the column titles - fprintf (out, "\t\t\t\n"); - for (i = 0; i < n_cols; i++) - { - strcpy (dummy, sqlite3_column_name (stmt, i)); - CleanHtml (dummy); - fprintf (out, "\t\t\t\t\n", dummy); - } - fprintf (out, "\t\t\t\n"); - } - rows++; - fprintf (out, "\t\t\t\n", - (rows % 2) ? "d0" : "d1"); - for (i = 0; i < n_cols; i++) - { - if (sqlite3_column_type (stmt, i) == SQLITE_INTEGER) - fprintf (out, - "\t\t\t\t\n", - sqlite3_column_int (stmt, i)); - else if (sqlite3_column_type (stmt, i) == SQLITE_FLOAT) - fprintf (out, - "\t\t\t\t\n", - sqlite3_column_double (stmt, i)); - else if (sqlite3_column_type (stmt, i) == SQLITE_TEXT) - { - strcpy (dummy, - (char *) sqlite3_column_text (stmt, i)); - CleanHtml (dummy); - pDummy = dummy; - if (!gaiaConvertCharset - (&pDummy, (const char *) "UTF-8", outCs)) - goto encoding_error; - fprintf (out, "\t\t\t\t\n", dummy); - } - } - fprintf (out, "\t\t\t\n"); - } - else - goto sql_error; - } - sqlite3_finalize (stmt); - fprintf (out, "\t\t
%s
%d%1.6lf%s
\n\t\n\n"); - fclose (out); - msg.Printf (wxT ("Exported %d rows into HTML file"), rows); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, this); - return; - sql_error: + ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); + if (ret != SQLITE_OK) + goto sql_error; + rows = 0; + while (1) + { + ret = sqlite3_step(stmt); + if (ret == SQLITE_DONE) + break; // end of result set + if (ret == SQLITE_ROW) + { + n_cols = sqlite3_column_count(stmt); + if (rows == 0) + { + // outputting the column titles + fprintf(out, "\t\t\t\n"); + for (i = 0; i < n_cols; i++) + { + strcpy(dummy, sqlite3_column_name(stmt, i)); + CleanHtml(dummy); + fprintf(out, "\t\t\t\t%s\n", dummy); + } + fprintf(out, "\t\t\t\n"); + } + rows++; + fprintf(out, "\t\t\t\n", (rows % 2) ? "d0" : "d1"); + for (i = 0; i < n_cols; i++) + { + if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) + fprintf(out, "\t\t\t\t%d\n", + sqlite3_column_int(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) + fprintf(out, "\t\t\t\t%1.6lf\n", + sqlite3_column_double(stmt, i)); + else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) + { + strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); + CleanHtml(dummy); + pDummy = dummy; + if (!gaiaConvertCharset + (&pDummy, (const char *) "UTF-8", outCs)) + goto encoding_error; + fprintf(out, "\t\t\t\t%s\n", dummy); + } + } + fprintf(out, "\t\t\t\n"); + } else + goto sql_error; + } + sqlite3_finalize(stmt); + fprintf(out, "\t\t\n\t\n\n"); + fclose(out); + sprintf(dummy, "Exported %d rows into HTML file", rows); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + return; +sql_error: // // some SQL error occurred // - sqlite3_finalize (stmt); - wxMessageBox (wxT ("dump HTML error:") + - wxString::FromUTF8 (sqlite3_errmsg (SqliteHandle)), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - if (out) - fclose (out); - return; - encoding_error: + sqlite3_finalize(stmt); + wxMessageBox(wxT("dump HTML error:") + + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (out) + fclose(out); + return; +encoding_error: // -// some CHARSET converion occurred +// some CHARSET convertion occurred // - sqlite3_finalize (stmt); - wxMessageBox (wxT ("dump HTML: charset conversion reported an error"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - if (out) - fclose (out); - return; - no_file: + sqlite3_finalize(stmt); + wxMessageBox(wxT("dump HTML: charset conversion reported an error"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + if (out) + fclose(out); + return; +no_file: // // output file can't be created/opened // - wxMessageBox (wxT ("ERROR: unable to open '") + path + - wxT ("' for writing"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; + wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; } Index: TableTree.cpp ================================================================== --- TableTree.cpp +++ TableTree.cpp @@ -1,10 +1,10 @@ /* / TableTree.cpp / tree control to show tables, columns, indices and triggers / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -41,1799 +41,1707 @@ #include "icons/index.xpm" #include "icons/trigger.xpm" #include "icons/geometry.xpm" #include "icons/spatialidx.xpm" #include "icons/mbrcache.xpm" +#include "icons/kill_spindex.xpm" +#include "icons/dumpshp.xpm" -MyTableTree::MyTableTree (MyFrame * parent, wxWindowID id):wxTreeCtrl (parent, - id) +MyTableTree::MyTableTree(MyFrame * parent, wxWindowID id):wxTreeCtrl(parent, id) { // // constructor: TREE control to show DB objects // - MainFrame = parent; - Root = AddRoot (wxT ("no current DB")); + MainFrame = parent; + Root = AddRoot(wxT("no current DB")); // setting up icons - Images = new wxImageList (16, 16, true); - wxIcon icons[12]; - icons[0] = wxIcon (db_xpm); - icons[1] = wxIcon (table_xpm); - icons[2] = wxIcon (pkey_xpm); - icons[3] = wxIcon (column_xpm); - icons[4] = wxIcon (index_xpm); - icons[5] = wxIcon (trigger_xpm); - icons[6] = wxIcon (geometry_xpm); - icons[7] = wxIcon (spatialidx_xpm); - icons[8] = wxIcon (vtable_xpm); - icons[9] = wxIcon (view_xpm); - icons[10] = wxIcon (geotable_xpm); - icons[11] = wxIcon (mbrcache_xpm); - Images->Add (icons[0]); - Images->Add (icons[1]); - Images->Add (icons[2]); - Images->Add (icons[3]); - Images->Add (icons[4]); - Images->Add (icons[5]); - Images->Add (icons[6]); - Images->Add (icons[7]); - Images->Add (icons[8]); - Images->Add (icons[9]); - Images->Add (icons[10]); - Images->Add (icons[11]); - SetImageList (Images); - SetItemImage (Root, 0); -// setting up event handlers - Connect (wxID_ANY, wxEVT_COMMAND_TREE_SEL_CHANGED, - (wxObjectEventFunction) & MyTableTree::OnSelChanged); - Connect (wxID_ANY, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, - (wxObjectEventFunction) & MyTableTree::OnRightClick); - Connect (Tree_NewTable, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdNewTable); - Connect (Tree_NewView, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdNewView); - Connect (Tree_NewIndex, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdNewIndex); - Connect (Tree_NewTrigger, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdNewTrigger); - Connect (Tree_NewColumn, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdNewColumn); - Connect (Tree_Show, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdShow); - Connect (Tree_Drop, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdDrop); - Connect (Tree_Rename, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdRename); - Connect (Tree_Select, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdSelect); - Connect (Tree_Refresh, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdRefresh); - Connect (Tree_Recover, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdRecover); - Connect (Tree_ShowSql, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdShowSql); - Connect (Tree_SpatialIndex, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdSpatialIndex); - Connect (Tree_MbrCache, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdMbrCache); - Connect (Tree_CheckGeometry, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdCheckGeometry); - Connect (Tree_SetSrid, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdSetSrid); - Connect (Tree_DumpShp, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdDumpShp); - Connect (Tree_DumpTxtTab, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdDumpTxtTab); - Connect (Tree_DumpCsv, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdDumpCsv); - Connect (Tree_DumpHtml, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdDumpHtml); - Connect (Tree_Edit, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) & MyTableTree::OnCmdEdit); -} - -void -MyTableTree::AddTable (wxString & tableName, bool virtualTable) + Images = new wxImageList(16, 16, true); + wxIcon icons[12]; + icons[0] = wxIcon(db_xpm); + icons[1] = wxIcon(table_xpm); + icons[2] = wxIcon(pkey_xpm); + icons[3] = wxIcon(column_xpm); + icons[4] = wxIcon(index_xpm); + icons[5] = wxIcon(trigger_xpm); + icons[6] = wxIcon(geometry_xpm); + icons[7] = wxIcon(spatialidx_xpm); + icons[8] = wxIcon(vtable_xpm); + icons[9] = wxIcon(view_xpm); + icons[10] = wxIcon(geotable_xpm); + icons[11] = wxIcon(mbrcache_xpm); + Images->Add(icons[0]); + Images->Add(icons[1]); + Images->Add(icons[2]); + Images->Add(icons[3]); + Images->Add(icons[4]); + Images->Add(icons[5]); + Images->Add(icons[6]); + Images->Add(icons[7]); + Images->Add(icons[8]); + Images->Add(icons[9]); + Images->Add(icons[10]); + Images->Add(icons[11]); + SetImageList(Images); + SetItemImage(Root, 0); +// setting up event handlers + Connect(wxID_ANY, wxEVT_COMMAND_TREE_SEL_CHANGED, + (wxObjectEventFunction) & MyTableTree::OnSelChanged); + Connect(wxID_ANY, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, + (wxObjectEventFunction) & MyTableTree::OnRightClick); + Connect(Tree_NewTable, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdNewTable); + Connect(Tree_NewView, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdNewView); + Connect(Tree_NewIndex, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdNewIndex); + Connect(Tree_NewTrigger, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdNewTrigger); + Connect(Tree_NewColumn, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdNewColumn); + Connect(Tree_Show, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdShow); + Connect(Tree_Drop, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdDrop); + Connect(Tree_Rename, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdRename); + Connect(Tree_Select, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdSelect); + Connect(Tree_Refresh, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdRefresh); + Connect(Tree_Recover, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdRecover); + Connect(Tree_ShowSql, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdShowSql); + Connect(Tree_SpatialIndex, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdSpatialIndex); + Connect(Tree_MbrCache, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdMbrCache); + Connect(Tree_RebuildTriggers, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdRebuildTriggers); + Connect(Tree_CheckGeometry, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdCheckGeometry); + Connect(Tree_SetSrid, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdSetSrid); + Connect(Tree_DumpShp, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdDumpShp); + Connect(Tree_DumpTxtTab, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdDumpTxtTab); + Connect(Tree_DumpCsv, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdDumpCsv); + Connect(Tree_DumpHtml, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdDumpHtml); + Connect(Tree_Edit, wxEVT_COMMAND_MENU_SELECTED, + (wxObjectEventFunction) & MyTableTree::OnCmdEdit); +} + +void MyTableTree::AddTable(wxString & tableName, bool virtualTable) { // // appends a table to the TREE list - MyTableInfo list; - MyColumnInfo *col; - MyIndexInfo *idx; - MyTriggerInfo *trgr; - wxTreeItemId item; - wxTreeItemId item2; - wxString columnInfo; - wxString indexInfo; - wxString triggerInfo; - int icon = 1; - if (virtualTable == true) - icon = 8; - item = AppendItem (Root, tableName, icon); - if (virtualTable == true) - SetItemData (item, - (wxTreeItemData *) (new MyObject (MY_VTABLE, tableName))); - else - SetItemData (item, - (wxTreeItemData *) (new MyObject (MY_TABLE, tableName))); - MainFrame->GetTableColumns (tableName, &list); - MainFrame->GetTableIndices (tableName, &list); - MainFrame->GetTableTriggers (tableName, &list); - col = list.GetFirstColumn (); - while (col) - { - int icon; - if (col->IsPrimaryKey () == true) - icon = 2; - else - { - if (col->IsGeometry () == true) - { - if (virtualTable == false) - SetItemImage (item, 10); - if (col->IsGeometryIndex () == true) - icon = 7; - else if (col->IsMbrCache () == true) - icon = 11; - else - icon = 6; - } - else - icon = 3; - } - columnInfo = col->GetName (); - item2 = AppendItem (item, columnInfo, icon); - if (col->IsGeometry () == true) - { - if (col->IsGeometryIndex () == true) - SetItemData (item2, - (wxTreeItemData *) (new - MyObject - (MY_GEOMETRY_INDEX, - tableName, - col->GetName ()))); - else if (col->IsMbrCache () == true) - SetItemData (item2, - (wxTreeItemData *) (new - MyObject - (MY_GEOMETRY_CACHED, - tableName, - col->GetName ()))); - else - SetItemData (item2, - (wxTreeItemData *) (new - MyObject (MY_GEOMETRY, - tableName, - col->GetName - ()))); - } - else - SetItemData (item2, - (wxTreeItemData *) (new - MyObject (MY_COLUMN, tableName, - col->GetName ()))); - col = col->GetNext (); - } - idx = list.GetFirstIndex (); - while (idx) - { - indexInfo = idx->GetName (); - item2 = AppendItem (item, indexInfo, 4); - SetItemData (item2, - (wxTreeItemData *) (new - MyObject (MY_INDEX, - idx->GetName ()))); - idx = idx->GetNext (); - } - trgr = list.GetFirstTrigger (); - while (trgr) - { - triggerInfo = trgr->GetName (); - item2 = AppendItem (item, triggerInfo, 5); - SetItemData (item2, - (wxTreeItemData *) (new - MyObject (MY_TRIGGER, - trgr->GetName ()))); - trgr = trgr->GetNext (); - } -} - -void -MyTableTree::AddView (wxString & viewName) + MyTableInfo list; + MyColumnInfo *col; + MyIndexInfo *idx; + MyTriggerInfo *trgr; + wxTreeItemId item; + wxTreeItemId item2; + wxString columnInfo; + wxString indexInfo; + wxString triggerInfo; + int icon = 1; + if (virtualTable == true) + icon = 8; + item = AppendItem(Root, tableName, icon); + if (virtualTable == true) + SetItemData(item, (wxTreeItemData *) (new MyObject(MY_VTABLE, tableName))); + else + SetItemData(item, (wxTreeItemData *) (new MyObject(MY_TABLE, tableName))); + MainFrame->GetTableColumns(tableName, &list); + MainFrame->GetTableIndices(tableName, &list); + MainFrame->GetTableTriggers(tableName, &list); + col = list.GetFirstColumn(); + while (col) + { + int icon; + if (col->IsPrimaryKey() == true) + icon = 2; + else + { + if (col->IsGeometry() == true) + { + if (virtualTable == false) + SetItemImage(item, 10); + if (col->IsGeometryIndex() == true) + icon = 7; + else if (col->IsMbrCache() == true) + icon = 11; + else + icon = 6; + } else + icon = 3; + } + columnInfo = col->GetName(); + item2 = AppendItem(item, columnInfo, icon); + if (col->IsGeometry() == true) + { + if (col->IsGeometryIndex() == true) + SetItemData(item2, + (wxTreeItemData *) (new + MyObject(MY_GEOMETRY_INDEX, + tableName, + col->GetName()))); + else if (col->IsMbrCache() == true) + SetItemData(item2, + (wxTreeItemData *) (new + MyObject(MY_GEOMETRY_CACHED, + tableName, + col->GetName()))); + else + SetItemData(item2, + (wxTreeItemData *) (new + MyObject(MY_GEOMETRY, tableName, + col->GetName()))); + } else + SetItemData(item2, + (wxTreeItemData *) (new + MyObject(MY_COLUMN, tableName, + col->GetName()))); + col = col->GetNext(); + } + idx = list.GetFirstIndex(); + while (idx) + { + indexInfo = idx->GetName(); + item2 = AppendItem(item, indexInfo, 4); + SetItemData(item2, + (wxTreeItemData *) (new MyObject(MY_INDEX, idx->GetName()))); + idx = idx->GetNext(); + } + trgr = list.GetFirstTrigger(); + while (trgr) + { + triggerInfo = trgr->GetName(); + item2 = AppendItem(item, triggerInfo, 5); + SetItemData(item2, + (wxTreeItemData *) (new + MyObject(MY_TRIGGER, trgr->GetName()))); + trgr = trgr->GetNext(); + } +} + +void MyTableTree::AddView(wxString & viewName) { // // appends a view to the TREE list - MyViewInfo list; - MyColumnInfo *col; - wxTreeItemId item; - wxTreeItemId item2; - wxString columnInfo; - item = AppendItem (Root, viewName, 9); - SetItemData (item, (wxTreeItemData *) (new MyObject (MY_VIEW, viewName))); - MainFrame->GetViewColumns (viewName, &list); - col = list.GetFirst (); - while (col) - { - columnInfo = col->GetName (); - item2 = AppendItem (item, columnInfo, 3); - SetItemData (item2, - (wxTreeItemData *) (new - MyObject (MY_COLUMN, viewName, - col->GetName ()))); - col = col->GetNext (); - } -} - -void -MyTableTree::OnSelChanged (wxTreeEvent & event) + MyViewInfo list; + MyColumnInfo *col; + wxTreeItemId item; + wxTreeItemId item2; + wxString columnInfo; + item = AppendItem(Root, viewName, 9); + SetItemData(item, (wxTreeItemData *) (new MyObject(MY_VIEW, viewName))); + MainFrame->GetViewColumns(viewName, &list); + col = list.GetFirst(); + while (col) + { + columnInfo = col->GetName(); + item2 = AppendItem(item, columnInfo, 3); + SetItemData(item2, + (wxTreeItemData *) (new + MyObject(MY_COLUMN, viewName, + col->GetName()))); + col = col->GetNext(); + } +} + +void MyTableTree::OnSelChanged(wxTreeEvent & event) { // // selecting some node [mouse action] // - wxTreeItemId item = event.GetItem (); - if (item == Root) - return; - MyObject *obj = (MyObject *) GetItemData (item); - if (obj == NULL) - return; - CurrentItem = item; + wxTreeItemId item = event.GetItem(); + if (item == Root) + return; + MyObject *obj = (MyObject *) GetItemData(item); + if (obj == NULL) + return; + CurrentItem = item; } -void -MyTableTree::OnRightClick (wxTreeEvent & event) +void MyTableTree::OnRightClick(wxTreeEvent & event) { // // right click on some node [mouse action] // - wxMenu menu; - wxMenuItem *menuItem; - wxString title; - bool table = false; - bool canEdit = false; - bool view = false; - bool column = false; - bool geometry = false; - bool geometry_index = false; - bool geometry_cached = false; - bool index = false; - bool trigger = false; - bool metadata = MainFrame->CheckMetadata (); - if (MainFrame->IsConnected () == false) - return; - wxTreeItemId item = event.GetItem (); - SelectItem (item); - wxPoint pt = event.GetPoint (); - if (item == Root) - { - CurrentItem = NULL; - menuItem = new wxMenuItem (&menu, Tree_Refresh, wxT ("&Refresh")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_NewTable, wxT ("Create New &Table")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_NewView, wxT ("Create New &View")); - menu.Append (menuItem); - PopupMenu (&menu, pt); - return; - } - MyObject *obj = (MyObject *) GetItemData (item); - if (obj == NULL) - { - CurrentItem = NULL; - menuItem = new wxMenuItem (&menu, Tree_Refresh, wxT ("&Refresh")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_NewTable, wxT ("Create New &Table")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_NewView, wxT ("Create New &View")); - menu.Append (menuItem); - PopupMenu (&menu, pt); - return; - } - switch (obj->GetType ()) - { + wxMenu *menu = new wxMenu(); + wxMenuItem *menuItem; + wxString title; + bool table = false; + bool canEdit = false; + bool view = false; + bool column = false; + bool geometry = false; + bool geometry_index = false; + bool geometry_cached = false; + bool index = false; + bool trigger = false; + bool metadata = MainFrame->CheckMetadata(); + if (MainFrame->IsConnected() == false) + return; + wxTreeItemId item = event.GetItem(); + SelectItem(item); + wxPoint pt = event.GetPoint(); + if (item == Root) + { + CurrentItem = NULL; + menuItem = new wxMenuItem(menu, Tree_Refresh, wxT("&Refresh")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_NewTable, wxT("Create New &Table")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_NewView, wxT("Create New &View")); + menu->Append(menuItem); + PopupMenu(menu, pt); + return; + } + MyObject *obj = (MyObject *) GetItemData(item); + if (obj == NULL) + { + CurrentItem = NULL; + menuItem = new wxMenuItem(menu, Tree_Refresh, wxT("&Refresh")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_NewTable, wxT("Create New &Table")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_NewView, wxT("Create New &View")); + menu->Append(menuItem); + PopupMenu(menu, pt); + return; + } + switch (obj->GetType()) + { case MY_VTABLE: case MY_TABLE: - table = true; - break; + table = true; + break; case MY_VIEW: - view = true; - break; + view = true; + break; case MY_COLUMN: - column = true; - break; + column = true; + break; case MY_GEOMETRY: - geometry = true; - break; + geometry = true; + break; case MY_GEOMETRY_INDEX: - geometry_index = true; - break; + geometry_index = true; + break; case MY_GEOMETRY_CACHED: - geometry_cached = true; - break; + geometry_cached = true; + break; case MY_INDEX: - index = true; - break; + index = true; + break; case MY_TRIGGER: - trigger = true; - break; - }; - if (obj->GetType () == MY_TABLE) - canEdit = true; - CurrentItem = item; - menuItem = new wxMenuItem (&menu, Tree_Refresh, wxT ("&Refresh")); - menu.Append (menuItem); - if (table == true) - { - wxString title = wxT ("Table: ") + obj->GetName (); - menu.SetTitle (title); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_NewTable, wxT ("Create New &Table")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_NewView, wxT ("Create New &View")); - menu.Append (menuItem); - menu.AppendSeparator (); - if (canEdit == true) - { - menuItem = - new wxMenuItem (&menu, Tree_Edit, wxT ("&Edit table rows")); - menu.Append (menuItem); - } - else - { - menuItem = - new wxMenuItem (&menu, Tree_Select, wxT ("&Query table")); - menu.Append (menuItem); - } - menuItem = new wxMenuItem (&menu, Tree_Show, wxT ("&Show columns")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_ShowSql, - wxT ("&Show CREATE statement")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_NewColumn, wxT ("Add New &Column")); - menu.Append (menuItem); - menuItem = new wxMenuItem (&menu, Tree_Rename, wxT ("&Rename table")); - menu.Append (menuItem); - menuItem = new wxMenuItem (&menu, Tree_Drop, wxT ("&Drop table")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_NewIndex, wxT ("Create New &Index")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_NewTrigger, - wxT ("Create New &Trigger")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_DumpTxtTab, - wxT ("Export as &Txt/Tab")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_DumpCsv, wxT ("Export as &CSV")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_DumpHtml, wxT ("Export as &HTML")); - menu.Append (menuItem); - } - if (view == true) - { - wxString title = wxT ("View: ") + obj->GetName (); - menu.SetTitle (title); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_NewTable, wxT ("Create New &Table")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_NewView, wxT ("Create New &View")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Tree_Select, wxT ("&Query view")); - menu.Append (menuItem); - menuItem = new wxMenuItem (&menu, Tree_Show, wxT ("&Show columns")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_ShowSql, - wxT ("&Show CREATE statement")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Tree_Drop, wxT ("&Drop view")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_DumpTxtTab, - wxT ("Export as &Txt/Tab")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_DumpCsv, wxT ("Export as &CSV")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_DumpHtml, wxT ("Export as &HTML")); - menu.Append (menuItem); - } - if (column == true) - { - wxString title = - wxT ("Column: ") + obj->GetName () + wxT (".") + - obj->GetColumn (); - menu.SetTitle (title); - menuItem = - new wxMenuItem (&menu, Tree_CheckGeometry, - wxT ("&Check geometries")); - menu.Append (menuItem); - menuItem = new wxMenuItem (&menu, Tree_SetSrid, wxT ("&Set SRID")); - menu.Append (menuItem); - if (metadata == true) - { - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_Recover, - wxT ("&Recover geometry column")); - menu.Append (menuItem); - } - } - if (geometry == true) - { - wxString title = - wxT ("Column: ") + obj->GetName () + wxT (".") + - obj->GetColumn (); - menu.SetTitle (title); - menuItem = - new wxMenuItem (&menu, Tree_Show, wxT ("&Show Spatial Metadata")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_CheckGeometry, - wxT ("&Check geometries")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_SpatialIndex, - wxT ("&Build Spatial Index")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_MbrCache, wxT ("Build &MBR cache")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_DumpShp, - wxT ("Export as &Shapefile")); - menu.Append (menuItem); - } - if (geometry_index == true) - { - wxString title = - wxT ("Column: ") + obj->GetName () + wxT (".") + - obj->GetColumn (); - menu.SetTitle (title); - menuItem = - new wxMenuItem (&menu, Tree_Show, wxT ("&Show Spatial Metadata")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_CheckGeometry, - wxT ("&Check geometries")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_SpatialIndex, - wxT ("&Remove Spatial Index")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_DumpShp, - wxT ("Export as &Shapefile")); - menu.Append (menuItem); - } - if (geometry_cached == true) - { - wxString title = - wxT ("Column: ") + obj->GetName () + wxT (".") + - obj->GetColumn (); - menu.SetTitle (title); - menuItem = - new wxMenuItem (&menu, Tree_Show, wxT ("&Show Spatial Metadata")); - menu.Append (menuItem); - menuItem = - new wxMenuItem (&menu, Tree_CheckGeometry, - wxT ("&Check geometries")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_MbrCache, wxT ("&Remove MBR cache")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = - new wxMenuItem (&menu, Tree_DumpShp, - wxT ("Export as &Shapefile")); - menu.Append (menuItem); - } - if (index == true) - { - wxString title = wxT ("Index: ") + obj->GetName (); - menu.SetTitle (title); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Tree_Show, wxT ("&Show index")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Tree_Drop, wxT ("&Drop index")); - menu.Append (menuItem); - } - if (trigger == true) - { - wxString title = wxT ("Trigger: ") + obj->GetName (); - menu.SetTitle (title); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Tree_Show, wxT ("&Show trigger")); - menu.Append (menuItem); - menu.AppendSeparator (); - menuItem = new wxMenuItem (&menu, Tree_Drop, wxT ("&Drop trigger")); - menu.Append (menuItem); - } - PopupMenu (&menu, pt); -} - -void -MyTableTree::OnCmdNewTable (wxCommandEvent & event) + trigger = true; + break; + }; + if (obj->GetType() == MY_TABLE) + canEdit = true; + CurrentItem = item; + menuItem = new wxMenuItem(menu, Tree_Refresh, wxT("&Refresh")); + menu->Append(menuItem); + if (table == true) + { + wxString title = wxT("Table: \"") + obj->GetName() + wxT("\""); + menu->SetTitle(title); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_NewTable, wxT("Create New &Table")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_NewView, wxT("Create New &View")); + menu->Append(menuItem); + menu->AppendSeparator(); + if (canEdit == true) + { + menuItem = new wxMenuItem(menu, Tree_Edit, wxT("&Edit table rows")); + menu->Append(menuItem); + } else + { + menuItem = new wxMenuItem(menu, Tree_Select, wxT("&Query table")); + menu->Append(menuItem); + } + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show columns")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Tree_ShowSql, wxT("&Show CREATE statement")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_NewColumn, wxT("Add New &Column")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_Rename, wxT("&Rename table")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_Drop, wxT("&Drop table")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_NewIndex, wxT("Create New &Index")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Tree_NewTrigger, wxT("Create New &Trigger")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_DumpTxtTab, wxT("Export as &Txt/Tab")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_DumpCsv, wxT("Export as &CSV")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_DumpHtml, wxT("Export as &HTML")); + menu->Append(menuItem); + } + if (view == true) + { + wxString title = wxT("View: \"") + obj->GetName() + wxT("\""); + menu->SetTitle(title); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_NewTable, wxT("Create New &Table")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_NewView, wxT("Create New &View")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_Select, wxT("&Query view")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show columns")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Tree_ShowSql, wxT("&Show CREATE statement")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_Drop, wxT("&Drop view")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_DumpTxtTab, wxT("Export as &Txt/Tab")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_DumpCsv, wxT("Export as &CSV")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_DumpHtml, wxT("Export as &HTML")); + menu->Append(menuItem); + } + if (column == true) + { + wxString title = + wxT("Column: \"") + obj->GetName() + wxT("\".\"") + obj->GetColumn() + + wxT("\""); + menu->SetTitle(title); + menuItem = + new wxMenuItem(menu, Tree_CheckGeometry, wxT("&Check geometries")); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_SetSrid, wxT("&Set SRID")); + menu->Append(menuItem); + if (metadata == true) + { + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_Recover, wxT("&Recover geometry column")); + menu->Append(menuItem); + } + } + if (geometry == true) + { + wxString title = + wxT("Column: \"") + obj->GetName() + wxT("\".\"") + obj->GetColumn() + + wxT("\""); + menu->SetTitle(title); + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show Spatial Metadata")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Tree_CheckGeometry, wxT("&Check geometries")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_SpatialIndex, wxT("&Build Spatial Index")); + menuItem->SetBitmap(wxBitmap(spatialidx_xpm)); + menu->Append(menuItem); + menuItem = new wxMenuItem(menu, Tree_MbrCache, wxT("Build &MBR cache")); + menuItem->SetBitmap(wxBitmap(mbrcache_xpm)); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_RebuildTriggers, + wxT("Rebuild Geometry &Triggers")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_DumpShp, wxT("Export as &Shapefile")); + menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); + menu->Append(menuItem); + } + if (geometry_index == true) + { + wxString title = + wxT("Column: \"") + obj->GetName() + wxT("\".\"") + obj->GetColumn() + + wxT("\""); + menu->SetTitle(title); + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show Spatial Metadata")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Tree_CheckGeometry, wxT("&Check geometries")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_SpatialIndex, wxT("&Remove Spatial Index")); + menuItem->SetBitmap(wxBitmap(kill_spindex_xpm)); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_RebuildTriggers, + wxT("Rebuild Geometry &Triggers")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_DumpShp, wxT("Export as &Shapefile")); + menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); + menu->Append(menuItem); + } + if (geometry_cached == true) + { + wxString title = + wxT("Column: \"") + obj->GetName() + wxT("\".\"") + obj->GetColumn() + + wxT("\""); + menu->SetTitle(title); + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show Spatial Metadata")); + menu->Append(menuItem); + menuItem = + new wxMenuItem(menu, Tree_CheckGeometry, wxT("&Check geometries")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_MbrCache, wxT("&Remove MBR cache")); + menuItem->SetBitmap(wxBitmap(kill_spindex_xpm)); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_RebuildTriggers, + wxT("Rebuild Geometry &Triggers")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = + new wxMenuItem(menu, Tree_DumpShp, wxT("Export as &Shapefile")); + menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); + menu->Append(menuItem); + } + if (index == true) + { + wxString title = wxT("Index: \"") + obj->GetName() + wxT("\""); + menu->SetTitle(title); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show index")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_Drop, wxT("&Drop index")); + menu->Append(menuItem); + } + if (trigger == true) + { + wxString title = wxT("Trigger: \"") + obj->GetName() + wxT("\""); + menu->SetTitle(title); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_Show, wxT("&Show trigger")); + menu->Append(menuItem); + menu->AppendSeparator(); + menuItem = new wxMenuItem(menu, Tree_Drop, wxT("&Drop trigger")); + menu->Append(menuItem); + } + PopupMenu(menu, pt); +} + +void MyTableTree::OnCmdNewTable(wxCommandEvent & event) { // // menu event - new table creation required // - wxString sql; - sql = wxT ("CREATE TABLE ...table-name... (\n"); - sql += wxT ("...column1,\n...column2,\n...columnN)"); - MainFrame->SetSql (sql, false); + wxString sql; + sql = wxT("CREATE TABLE ...table-name... (\n"); + sql += wxT("...column1,\n...column2,\n...columnN)"); + MainFrame->SetSql(sql, false); } -void -MyTableTree::OnCmdNewView (wxCommandEvent & event) +void MyTableTree::OnCmdNewView(wxCommandEvent & event) { // // menu event - new view creation required // - wxString sql; - sql = wxT ("CREATE VIEW ...view-name... AS\n"); - sql += wxT ("SELECT ...sql-select-statement..."); - MainFrame->SetSql (sql, false); + wxString sql; + sql = wxT("CREATE VIEW ...view-name... AS\n"); + sql += wxT("SELECT ...sql-select-statement..."); + MainFrame->SetSql(sql, false); } -void -MyTableTree::OnCmdNewIndex (wxCommandEvent & event) +void MyTableTree::OnCmdNewIndex(wxCommandEvent & event) { // // menu event - new index creation required // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE) - { - sql = wxT ("CREATE [ UNIQUE ] INDEX ...index-name...\nON "); - sql += obj->GetName (); - sql += wxT ("\n(\n...column1, column2, columnN...\n)"); - MainFrame->SetSql (sql, false); - } + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE) + { + sql = wxT("CREATE [ UNIQUE ] INDEX ...index-name...\nON "); + sql += obj->GetName(); + sql += wxT("\n(\n...column1, column2, columnN...\n)"); + MainFrame->SetSql(sql, false); + } } -void -MyTableTree::OnCmdNewTrigger (wxCommandEvent & event) +void MyTableTree::OnCmdNewTrigger(wxCommandEvent & event) { // // menu event - new trigger creation required // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE) - { - sql = wxT ("CREATE TRIGGER ...trigger-name...\n[ BEFORE | AFTER ]\n"); - sql += wxT ("[ INSERT | UPDATE | DELETE ]\nON "); - sql += obj->GetName (); - sql += wxT ("\n...sql-statement..."); - MainFrame->SetSql (sql, false); - } + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE) + { + sql = wxT("CREATE TRIGGER ...trigger-name...\n[ BEFORE | AFTER ]\n"); + sql += wxT("[ INSERT | UPDATE | DELETE ]\nON "); + sql += obj->GetName(); + sql += wxT("\n...sql-statement..."); + MainFrame->SetSql(sql, false); + } } -void -MyTableTree::OnCmdNewColumn (wxCommandEvent & event) +void MyTableTree::OnCmdNewColumn(wxCommandEvent & event) { // // menu event - new column creation required // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE) - { - sql = wxT ("ALTER TABLE "); - sql += obj->GetName (); - sql += wxT ("\nADD COLUMN ...column-name column-type..."); - MainFrame->SetSql (sql, false); - } + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE) + { + sql = wxT("ALTER TABLE \""); + sql += obj->GetName(); + sql += wxT("\"\nADD COLUMN ...column-name column-type..."); + MainFrame->SetSql(sql, false); + } } -void -MyTableTree::OnCmdSelect (wxCommandEvent & event) +void MyTableTree::OnCmdSelect(wxCommandEvent & event) { // // menu event - examining table rows required // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - sql = wxT ("SELECT * FROM "); - sql += obj->GetName (); - MainFrame->SetSql (sql, true); + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + sql = wxT("SELECT * FROM \""); + sql += obj->GetName() + wxT("\""); + MainFrame->SetSql(sql, true); } -void -MyTableTree::OnCmdShow (wxCommandEvent & event) +void MyTableTree::OnCmdShow(wxCommandEvent & event) { // // menu event - examining full infos required // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE || obj->GetType () == MY_VTABLE - || obj->GetType () == MY_VIEW) - { - sql = wxT ("PRAGMA table_info("); - sql += obj->GetName (); - sql += wxT (")"); - } - if (obj->GetType () == MY_GEOMETRY || obj->GetType () == MY_GEOMETRY_INDEX - || obj->GetType () == MY_GEOMETRY_CACHED) - { - sql = wxT ("SELECT * FROM geom_cols_ref_sys\n"); - sql += wxT ("WHERE f_table_name = '"); - sql += obj->GetName (); - sql += wxT ("'\nAND f_geometry_column = '"); - sql += obj->GetColumn (); - sql += wxT ("'"); - } - if (obj->GetType () == MY_INDEX) - { - sql = wxT ("PRAGMA index_info("); - sql += obj->GetName (); - sql += wxT (")"); - } - if (obj->GetType () == MY_TRIGGER) - { - sql = - wxT - ("SELECT sql FROM sqlite_master\nWHERE type = 'trigger' AND name = '"); - sql += obj->GetName (); - sql += wxT ("'"); - } - if (sql.Len () < 1) - return; - MainFrame->SetSql (sql, true); -} - -void -MyTableTree::OnCmdDrop (wxCommandEvent & event) + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE + || obj->GetType() == MY_VIEW) + { + sql = wxT("PRAGMA table_info(\""); + sql += obj->GetName(); + sql += wxT("\")"); + } + if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX + || obj->GetType() == MY_GEOMETRY_CACHED) + { + sql = wxT("SELECT * FROM geom_cols_ref_sys\n"); + sql += wxT("WHERE f_table_name = '"); + sql += obj->GetName(); + sql += wxT("'\nAND f_geometry_column = '"); + sql += obj->GetColumn(); + sql += wxT("'"); + } + if (obj->GetType() == MY_INDEX) + { + sql = wxT("PRAGMA index_info(\""); + sql += obj->GetName(); + sql += wxT("\")"); + } + if (obj->GetType() == MY_TRIGGER) + { + sql = + wxT + ("SELECT sql FROM sqlite_master\nWHERE type = 'trigger' AND name = '"); + sql += obj->GetName(); + sql += wxT("'"); + } + if (sql.Len() < 1) + return; + MainFrame->SetSql(sql, true); +} + +void MyTableTree::OnCmdDrop(wxCommandEvent & event) { // // menu event - dropping some object required // - wxString sql; - wxString msg; - char *errMsg = NULL; - int ret; - sqlite3 *sqlite = MainFrame->GetSqlite (); - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE || obj->GetType () == MY_VTABLE) - { - bool metadata = MainFrame->CheckMetadata (); - if (metadata == true) - { - // SpatialMetadata exists; we must check for geometry_columns and SpatialIndices as well - char *errMsg = NULL; - int ret; - int i; - char **results; - int rows; - int columns; - sqlite3 *sqlite = MainFrame->GetSqlite (); - sql = wxT ("SELECT f_geometry_column, spatial_index_enabled "); - sql += wxT ("FROM geometry_columns WHERE f_table_name = '"); - sql += obj->GetName (); - sql += wxT ("'"); - ret = sqlite3_get_table (sqlite, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - return; - } - sql = wxT ("BEGIN; "); - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - if (results[(i * columns) + 0]) - { - const char *column = - results[(i * columns) + 0]; - wxString geo_column = - wxString::FromUTF8 (column); - if (atoi (results[(i * columns) + 1])) - { - // dropping the SpatialIndex - sql += - wxT ("DROP TABLE IF EXISTS idx_"); - sql += obj->GetName (); - sql += wxT ("_"); - sql += geo_column; - sql += wxT ("; "); - // dropping the MBR cache - sql += - wxT ("DROP TABLE IF EXISTS cache_"); - sql += obj->GetName (); - sql += wxT ("_"); - sql += geo_column; - sql += wxT ("; "); - } - // deleting from geometry_columns - sql += - wxT - ("DELETE FROM geometry_columns\n WHERE f_table_name = '"); - sql += obj->GetName (); - sql += - wxT - ("'\n AND f_geometry_column = '"); - sql += geo_column; - sql += wxT ("'; "); - } - } - } - sqlite3_free_table (results); - sql += wxT ("DROP TABLE IF EXISTS "); - sql += obj->GetName (); - sql += wxT ("; COMMIT;"); - } - else - { - // there are no SpatialMetadata at all; we'll simply try to drop the table - sql = wxT ("BEGIN; "); - sql += wxT ("DROP TABLE IF EXISTS "); - sql += obj->GetName (); - sql += wxT ("; COMMIT;"); - } - msg = wxT ("Do you really intend to drop the Table named: '"); - msg += obj->GetName (); - msg += wxT ("'\n[and any other related object] ?"); - } - if (obj->GetType () == MY_VIEW) - { - msg = wxT ("Do you really intend to drop the View named: '"); - msg += obj->GetName (); - msg += wxT ("' ?"); - sql = wxT ("BEGIN; DROP VIEW IF EXISTS "); - sql += obj->GetName (); - sql += wxT ("; COMMIT;"); - } - if (obj->GetType () == MY_INDEX) - { - sql = wxT ("BEGIN; DROP INDEX IF EXISTS "); - sql += obj->GetName (); - sql += wxT ("; COMMIT;"); - } - if (obj->GetType () == MY_TRIGGER) - { - msg = wxT ("Do you really intend to drop the Index named: '"); - msg += obj->GetName (); - msg += wxT ("' ?"); - sql = wxT ("BEGIN; DROP TRIGGER IF EXISTS "); - sql += obj->GetName (); - sql += wxT ("; COMMIT;"); - } - if (sql.Len () < 1) - return; - wxMessageDialog confirm (this, msg, wxT ("Confirming DROP"), - wxOK | wxCANCEL | wxICON_QUESTION); - ret = confirm.ShowModal (); - if (ret != wxID_OK) - return; - ::wxBeginBusyCursor (); - ret = sqlite3_exec (sqlite, sql.ToUTF8 (), NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - goto rollback; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT ("Selected object '") + obj->GetName () + - wxT ("' was successfully removed"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, this); - MainFrame->ClearTableTree (); - MainFrame->InitTableTree (); - return; - rollback: - ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT - ("An error occurred\n\na ROLLBACK was automatically performed"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); -} - -void -MyTableTree::OnCmdRename (wxCommandEvent & event) + wxString sql; + wxString msg; + char *errMsg = NULL; + int ret; + sqlite3 *sqlite = MainFrame->GetSqlite(); + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE) + { + bool metadata = MainFrame->CheckMetadata(); + if (metadata == true) + { + // SpatialMetadata exists; we must check for geometry_columns and SpatialIndices as well + char *errMsg = NULL; + int ret; + int i; + char **results; + int rows; + int columns; + sqlite3 *sqlite = MainFrame->GetSqlite(); + sql = wxT("SELECT f_geometry_column, spatial_index_enabled "); + sql += wxT("FROM geometry_columns WHERE f_table_name = '"); + sql += obj->GetName(); + sql += wxT("'"); + ret = + sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + sql = wxT("BEGIN; "); + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + if (results[(i * columns) + 0]) + { + const char *column = results[(i * columns) + 0]; + wxString geo_column = wxString::FromUTF8(column); + if (atoi(results[(i * columns) + 1])) + { + // dropping the SpatialIndex + sql += wxT("DROP TABLE IF EXISTS \"idx_"); + sql += obj->GetName(); + sql += wxT("_"); + sql += geo_column; + sql += wxT("\"; "); + // dropping the MBR cache + sql += wxT("DROP TABLE IF EXISTS \"cache_"); + sql += obj->GetName(); + sql += wxT("_"); + sql += geo_column; + sql += wxT("\"; "); + } + // deleting from geometry_columns + sql += + wxT + ("DELETE FROM geometry_columns\n WHERE f_table_name = '"); + sql += obj->GetName(); + sql += wxT("'\n AND f_geometry_column = '"); + sql += geo_column; + sql += wxT("'; "); + } + } + } + sqlite3_free_table(results); + sql += wxT("DROP TABLE IF EXISTS \""); + sql += obj->GetName(); + sql += wxT("\"; COMMIT;"); + } else + { + // there are no SpatialMetadata at all; we'll simply try to drop the table + sql = wxT("BEGIN; "); + sql += wxT("DROP TABLE IF EXISTS \""); + sql += obj->GetName(); + sql += wxT("\"; COMMIT;"); + } + msg = wxT("Do you really intend to drop the Table named: \""); + msg += obj->GetName(); + msg += wxT("\"\n[and any other related object] ?"); + } + if (obj->GetType() == MY_VIEW) + { + msg = wxT("Do you really intend to drop the View named: \""); + msg += obj->GetName(); + msg += wxT("\" ?"); + sql = wxT("BEGIN; DROP VIEW IF EXISTS \""); + sql += obj->GetName(); + sql += wxT("\"; COMMIT;"); + } + if (obj->GetType() == MY_INDEX) + { + sql = wxT("BEGIN; DROP INDEX IF EXISTS \""); + sql += obj->GetName(); + sql += wxT("\"; COMMIT;"); + } + if (obj->GetType() == MY_TRIGGER) + { + msg = wxT("Do you really intend to drop the Index named: \""); + msg += obj->GetName(); + msg += wxT("\" ?"); + sql = wxT("BEGIN; DROP TRIGGER IF EXISTS \""); + sql += obj->GetName(); + sql += wxT("\"; COMMIT;"); + } + if (sql.Len() < 1) + return; + wxMessageDialog confirm(this, msg, wxT("Confirming DROP"), + wxOK | wxCANCEL | wxICON_QUESTION); + ret = confirm.ShowModal(); + if (ret != wxID_OK) + return; + ::wxBeginBusyCursor(); + ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + goto rollback; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT("Selected object '") + obj->GetName() + + wxT("' was successfully removed"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + MainFrame->InitTableTree(); + return; +rollback: + ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT + ("An error occurred\n\na ROLLBACK was automatically performed"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); +} + +void MyTableTree::OnCmdRename(wxCommandEvent & event) { // // menu event - table renaming required // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE || obj->GetType () == MY_VTABLE) - { - sql = wxT ("ALTER TABLE "); - sql += obj->GetName (); - sql += wxT ("\nRENAME TO ...new-table-name..."); - MainFrame->SetSql (sql, false); - } + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE) + { + sql = wxT("ALTER TABLE \""); + sql += obj->GetName(); + sql += wxT("\"\nRENAME TO ...new-table-name..."); + MainFrame->SetSql(sql, false); + } } -void -MyTableTree::OnCmdRefresh (wxCommandEvent & event) +void MyTableTree::OnCmdRefresh(wxCommandEvent & event) { // // menu event - refreshing the Tree // - MainFrame->ClearTableTree (); - MainFrame->InitTableTree (); + MainFrame->InitTableTree(); } -void -MyTableTree::OnCmdRecover (wxCommandEvent & event) +void MyTableTree::OnCmdRecover(wxCommandEvent & event) { // // menu event - Recover Geometry // - char *errMsg = NULL; - int ret; - wxString sql; - int i; - char **results; - int rows; - int columns; - int retval = 0; - int srid = -1; - wxString strSrid; - wxString type; - RecoverDialog dlg; - sqlite3 *sqlite = MainFrame->GetSqlite (); - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_COLUMN) - { - // trying to recover a geometry column - if (MainFrame->CheckMetadata () == false) - { - wxMessageBox (wxT - ("Missing Spatial Metadata tables\n\ntry to run the 'init_spatialite.sql' script ..."), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - return; - } - dlg.Create (MainFrame, obj->GetName (), obj->GetColumn ()); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - srid = dlg.GetSrid (); - type = dlg.GetType (); - ::wxBeginBusyCursor (); - ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - sql = wxT ("SELECT RecoverGeometryColumn('"); - sql += obj->GetName (); - sql += wxT ("', '"); - sql += obj->GetColumn (); - strSrid.Printf (wxT ("', %d, '"), srid); - sql += strSrid; - sql += type; - sql += wxT ("', 2)"); - ret = sqlite3_get_table (sqlite, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - goto rollback; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - if (results[(i * columns) + 0]) - retval = atoi (results[(i * columns) + 0]); - } - } - sqlite3_free_table (results); - if (!retval) - goto rollback; - ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT ("Geometry column '") + obj->GetName () + - wxT (".") + obj->GetColumn () + - wxT ("' was successfully recovered"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - } - } - return; - rollback: - ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT - ("Geometry column doesn't satisfies required constraints\n\na ROLLBACK was automatically performed"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); + char *errMsg = NULL; + int ret; + wxString sql; + int i; + char **results; + int rows; + int columns; + int retval = 0; + int srid = -1; + char dummy[128]; + wxString type; + RecoverDialog dlg; + sqlite3 *sqlite = MainFrame->GetSqlite(); + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_COLUMN) + { + // trying to recover a geometry column + if (MainFrame->CheckMetadata() == false) + { + wxMessageBox(wxT + ("Missing Spatial Metadata tables\n\ntry to run the 'init_spatialite.sql' script ..."), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; + } + dlg.Create(MainFrame, obj->GetName(), obj->GetColumn()); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + srid = dlg.GetSrid(); + type = dlg.GetType(); + ::wxBeginBusyCursor(); + ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + sql = wxT("SELECT RecoverGeometryColumn('"); + sql += obj->GetName(); + sql += wxT("', '"); + sql += obj->GetColumn(); + sprintf(dummy, "', %d, '", srid); + sql += wxString::FromUTF8(dummy); + sql += type; + sql += wxT("', 2)"); + ret = + sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto rollback; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + if (results[(i * columns) + 0]) + retval = atoi(results[(i * columns) + 0]); + } + } + sqlite3_free_table(results); + if (!retval) + goto rollback; + ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + + wxString::FromUTF8(errMsg), wxT("spatialite-gui"), + wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT("Geometry column \"") + obj->GetName() + + wxT(".") + obj->GetColumn() + + wxT("\" was successfully recovered"), + wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + } + } + return; +rollback: + ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT + ("Geometry column doesn't satisfies required constraints\n\na ROLLBACK was automatically performed"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); } -void -MyTableTree::OnCmdShowSql (wxCommandEvent & event) +void MyTableTree::OnCmdShowSql(wxCommandEvent & event) { // // menu event - Showing CREATE TABLE statement // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_TABLE || obj->GetType () == MY_VTABLE) - { - sql = - wxT - ("SELECT sql FROM sqlite_master\nWHERE type = 'table' AND name = '"); - sql += obj->GetName (); - sql += wxT ("'"); - MainFrame->SetSql (sql, true); - } - if (obj->GetType () == MY_VIEW) - { - sql = - wxT - ("SELECT sql FROM sqlite_master\nWHERE type = 'view' AND name = '"); - sql += obj->GetName (); - sql += wxT ("'"); - MainFrame->SetSql (sql, true); - } + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE) + { + sql = + wxT("SELECT sql FROM sqlite_master\nWHERE type = 'table' AND name = '"); + sql += obj->GetName(); + sql += wxT("'"); + MainFrame->SetSql(sql, true); + } + if (obj->GetType() == MY_VIEW) + { + sql = + wxT("SELECT sql FROM sqlite_master\nWHERE type = 'view' AND name = '"); + sql += obj->GetName(); + sql += wxT("'"); + MainFrame->SetSql(sql, true); + } } -void -MyTableTree::OnCmdSpatialIndex (wxCommandEvent & event) +void MyTableTree::OnCmdSpatialIndex(wxCommandEvent & event) { // // menu event - Spatial Index creation-destruction // - char *errMsg = NULL; - int ret; - wxString sql; - wxString msg; - int i; - char **results; - int rows; - int columns; - int retval = 0; - sqlite3 *sqlite = MainFrame->GetSqlite (); - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_GEOMETRY) - { - // creating the Spatial Index - ::wxBeginBusyCursor (); - ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - sql = wxT ("SELECT CreateSpatialIndex('"); - sql += obj->GetName (); - sql += wxT ("', '"); - sql += obj->GetColumn (); - sql += wxT ("')"); - ret = sqlite3_get_table (sqlite, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - goto rollback; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - if (results[(i * columns) + 0]) - retval = atoi (results[(i * columns) + 0]); - } - } - sqlite3_free_table (results); - if (!retval) - goto rollback; - ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT ("Spatial Index idx_") + obj->GetName () + - wxT ("_") + obj->GetColumn () + - wxT (" was successfully created"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - MainFrame->ClearTableTree (); - MainFrame->InitTableTree (); - } - else if (obj->GetType () == MY_GEOMETRY_INDEX) - { - // dropping the Spatial Index - ::wxBeginBusyCursor (); - ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - sql = wxT ("SELECT DisableSpatialIndex('"); - sql += obj->GetName (); - sql += wxT ("', '"); - sql += obj->GetColumn (); - sql += wxT ("')"); - msg = wxT ("Do you really intend to delete the SpatialIndex\n"); - msg += wxT ("on column '"); - msg += obj->GetName (); - msg += wxT ("."); - msg += obj->GetColumn (); - msg += wxT ("' ?"); - wxMessageDialog confirm (this, msg, - wxT ("Confirming Delete Spatial Index"), - wxOK | wxCANCEL | wxICON_QUESTION); - ret = confirm.ShowModal (); - if (ret != wxID_OK) - return; - ret = sqlite3_get_table (sqlite, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - goto rollback; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - if (results[(i * columns) + 0]) - retval = atoi (results[(i * columns) + 0]); - } - } - sqlite3_free_table (results); - if (!retval) - goto rollback; - sql = wxT ("DROP TABLE IF EXISTS idx_"); - sql += obj->GetName (); - sql += wxT ("_"); - sql += obj->GetColumn (); - ret = sqlite3_exec (sqlite, sql.ToUTF8 (), NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT ("Spatial Index idx_") + obj->GetName () + - wxT ("_") + obj->GetColumn () + - wxT (" was successfully removed"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - MainFrame->ClearTableTree (); - MainFrame->InitTableTree (); - } + char *errMsg = NULL; + int ret; + wxString sql; + wxString msg; + int i; + char **results; + int rows; + int columns; + int retval = 0; + sqlite3 *sqlite = MainFrame->GetSqlite(); + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) return; - rollback: - ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT - ("An error occurred\n\na ROLLBACK was automatically performed"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); + if (obj->GetType() == MY_GEOMETRY) + { + // creating the Spatial Index + ::wxBeginBusyCursor(); + ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + sql = wxT("SELECT CreateSpatialIndex('"); + sql += obj->GetName(); + sql += wxT("', '"); + sql += obj->GetColumn(); + sql += wxT("')"); + ret = + sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto rollback; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + if (results[(i * columns) + 0]) + retval = atoi(results[(i * columns) + 0]); + } + } + sqlite3_free_table(results); + if (!retval) + goto rollback; + ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT("Spatial Index \"idx_") + obj->GetName() + + wxT("_") + obj->GetColumn() + + wxT("\" was successfully created"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + MainFrame->InitTableTree(); + } else if (obj->GetType() == MY_GEOMETRY_INDEX) + { + // dropping the Spatial Index + ::wxBeginBusyCursor(); + ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + sql = wxT("SELECT DisableSpatialIndex('"); + sql += obj->GetName(); + sql += wxT("', '"); + sql += obj->GetColumn(); + sql += wxT("')"); + msg = wxT("Do you really intend to delete the SpatialIndex\n"); + msg += wxT("on column \""); + msg += obj->GetName(); + msg += wxT("\".\""); + msg += obj->GetColumn(); + msg += wxT("\" ?"); + wxMessageDialog confirm(this, msg, wxT("Confirming Delete Spatial Index"), + wxOK | wxCANCEL | wxICON_QUESTION); + ret = confirm.ShowModal(); + if (ret != wxID_OK) + return; + ret = + sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto rollback; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + if (results[(i * columns) + 0]) + retval = atoi(results[(i * columns) + 0]); + } + } + sqlite3_free_table(results); + if (!retval) + goto rollback; + sql = wxT("DROP TABLE IF EXISTS \"idx_"); + sql += obj->GetName(); + sql += wxT("_"); + sql += obj->GetColumn(); + sql += wxT("\""); + ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + + wxT("_") + obj->GetColumn() + + wxT(" was successfully removed"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + MainFrame->InitTableTree(); + } + return; +rollback: + ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT + ("An error occurred\n\na ROLLBACK was automatically performed"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); } -void -MyTableTree::OnCmdMbrCache (wxCommandEvent & event) +void MyTableTree::OnCmdMbrCache(wxCommandEvent & event) { // // menu event - MBR cache creation-destruction // - char *errMsg = NULL; - int ret; - wxString sql; - wxString msg; - int i; - char **results; - int rows; - int columns; - int retval = 0; - sqlite3 *sqlite = MainFrame->GetSqlite (); - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_GEOMETRY) - { - // creating the MBR cache - ::wxBeginBusyCursor (); - ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - sql = wxT ("SELECT CreateMbrCache('"); - sql += obj->GetName (); - sql += wxT ("', '"); - sql += obj->GetColumn (); - sql += wxT ("')"); - ret = sqlite3_get_table (sqlite, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - goto rollback; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - if (results[(i * columns) + 0]) - retval = atoi (results[(i * columns) + 0]); - } - } - sqlite3_free_table (results); - if (!retval) - goto rollback; - ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT ("MBR cache cache_") + obj->GetName () + - wxT ("_") + obj->GetColumn () + - wxT (" was successfully created"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - MainFrame->ClearTableTree (); - MainFrame->InitTableTree (); - } - else if (obj->GetType () == MY_GEOMETRY_CACHED) - { - // dropping the MBR cache - ::wxBeginBusyCursor (); - ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - sql = wxT ("SELECT DisableSpatialIndex('"); - sql += obj->GetName (); - sql += wxT ("', '"); - sql += obj->GetColumn (); - sql += wxT ("')"); - msg = wxT ("Do you really intend to delete the MBR cache\n"); - msg += wxT ("on column '"); - msg += obj->GetName (); - msg += wxT ("."); - msg += obj->GetColumn (); - msg += wxT ("' ?"); - wxMessageDialog confirm (this, msg, - wxT ("Confirming Delete MBR cache"), - wxOK | wxCANCEL | wxICON_QUESTION); - ret = confirm.ShowModal (); - if (ret != wxID_OK) - return; - ret = sqlite3_get_table (sqlite, sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - goto rollback; - } - if (rows < 1) - ; - else - { - for (i = 1; i <= rows; i++) - { - if (results[(i * columns) + 0]) - retval = atoi (results[(i * columns) + 0]); - } - } - sqlite3_free_table (results); - if (!retval) - goto rollback; - sql = wxT ("DROP TABLE IF EXISTS cache_"); - sql += obj->GetName (); - sql += wxT ("_"); - sql += obj->GetColumn (); - ret = sqlite3_exec (sqlite, sql.ToUTF8 (), NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT ("MBR cache cache_") + obj->GetName () + - wxT ("_") + obj->GetColumn () + - wxT (" was successfully removed"), - wxT ("spatialite-gui"), wxOK | wxICON_INFORMATION, - this); - MainFrame->ClearTableTree (); - MainFrame->InitTableTree (); - } + char *errMsg = NULL; + int ret; + wxString sql; + wxString msg; + int i; + char **results; + int rows; + int columns; + int retval = 0; + sqlite3 *sqlite = MainFrame->GetSqlite(); + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_GEOMETRY) + { + // creating the MBR cache + ::wxBeginBusyCursor(); + ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + sql = wxT("SELECT CreateMbrCache('"); + sql += obj->GetName(); + sql += wxT("', '"); + sql += obj->GetColumn(); + sql += wxT("')"); + ret = + sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto rollback; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + if (results[(i * columns) + 0]) + retval = atoi(results[(i * columns) + 0]); + } + } + sqlite3_free_table(results); + if (!retval) + goto rollback; + ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT("MBR cache \"cache_") + obj->GetName() + + wxT("_") + obj->GetColumn() + + wxT("\" was successfully created"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + MainFrame->InitTableTree(); + } else if (obj->GetType() == MY_GEOMETRY_CACHED) + { + // dropping the MBR cache + ::wxBeginBusyCursor(); + ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + sql = wxT("SELECT DisableSpatialIndex('"); + sql += obj->GetName(); + sql += wxT("', '"); + sql += obj->GetColumn(); + sql += wxT("')"); + msg = wxT("Do you really intend to delete the MBR cache\n"); + msg += wxT("on column \""); + msg += obj->GetName(); + msg += wxT("\".\""); + msg += obj->GetColumn(); + msg += wxT("\" ?"); + wxMessageDialog confirm(this, msg, wxT("Confirming Delete MBR cache"), + wxOK | wxCANCEL | wxICON_QUESTION); + ret = confirm.ShowModal(); + if (ret != wxID_OK) + return; + ret = + sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, + &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + goto rollback; + } + if (rows < 1) + ; + else + { + for (i = 1; i <= rows; i++) + { + if (results[(i * columns) + 0]) + retval = atoi(results[(i * columns) + 0]); + } + } + sqlite3_free_table(results); + if (!retval) + goto rollback; + sql = wxT("DROP TABLE IF EXISTS \"cache_"); + sql += obj->GetName(); + sql += wxT("_"); + sql += obj->GetColumn(); + sql += wxT("\""); + ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT("MBR cache \"cache_") + obj->GetName() + + wxT("_") + obj->GetColumn() + + wxT("\" was successfully removed"), wxT("spatialite-gui"), + wxOK | wxICON_INFORMATION, this); + MainFrame->InitTableTree(); + } + return; +rollback: + ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + ::wxEndBusyCursor(); + return; + } + ::wxEndBusyCursor(); + wxMessageBox(wxT + ("An error occurred\n\na ROLLBACK was automatically performed"), + wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); +} + +void MyTableTree::OnCmdRebuildTriggers(wxCommandEvent & event) +{ +// +// menu event - rebuilding Geometry Triggers +// + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) return; - rollback: - ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - ::wxEndBusyCursor (); - return; - } - ::wxEndBusyCursor (); - wxMessageBox (wxT - ("An error occurred\n\na ROLLBACK was automatically performed"), - wxT ("spatialite-gui"), wxOK | wxICON_WARNING, this); + if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY + || obj->GetType() == MY_GEOMETRY_INDEX + || obj->GetType() == MY_GEOMETRY_CACHED) + { + sql = wxT("SELECT RebuildGeometryTriggers('"); + sql += obj->GetName(); + sql += wxT("', '"); + sql += obj->GetColumn(); + sql += wxT("')"); + MainFrame->SetSql(sql, true); + } } -void -MyTableTree::OnCmdCheckGeometry (wxCommandEvent & event) +void MyTableTree::OnCmdCheckGeometry(wxCommandEvent & event) { // // menu event - checking geometries // - wxString sql; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_COLUMN) - { - sql = wxT ("SELECT Count(*), GeometryType("); - sql += obj->GetColumn (); - sql += wxT ("), Srid("); - sql += obj->GetColumn (); - sql += wxT (")\nFROM "); - sql += obj->GetName (); - sql += wxT ("\nGROUP BY 2, 3"); - MainFrame->SetSql (sql, true); - } + wxString sql; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY + || obj->GetType() == MY_GEOMETRY_INDEX + || obj->GetType() == MY_GEOMETRY_CACHED) + { + sql = wxT("SELECT Count(*), GeometryType(\""); + sql += obj->GetColumn(); + sql += wxT("\"), Srid(\""); + sql += obj->GetColumn(); + sql += wxT("\")\nFROM \""); + sql += obj->GetName(); + sql += wxT("\"\nGROUP BY 2, 3"); + MainFrame->SetSql(sql, true); + } } -void -MyTableTree::OnCmdSetSrid (wxCommandEvent & event) +void MyTableTree::OnCmdSetSrid(wxCommandEvent & event) { // // menu event - setting SRID for geometries // - SetSridDialog dlg; - wxString sql; - wxString strSrid; - int srid; - int oldSrid; - int ret; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_COLUMN) - { - dlg.Create (MainFrame, obj->GetName (), obj->GetColumn ()); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - srid = dlg.GetSrid (); - oldSrid = dlg.GetOldSrid (); - sql = wxT ("UPDATE "); - sql += obj->GetName (); - sql += wxT (" SET "); - sql += obj->GetColumn (); - sql += wxT (" = SetSrid("); - sql += obj->GetColumn (); - strSrid.Printf (wxT (", %d)"), srid); - sql += strSrid; - sql += wxT ("\nWHERE Srid("); - sql += obj->GetColumn (); - strSrid.Printf (wxT (") = %d"), oldSrid); - sql += strSrid; - MainFrame->SetSql (sql, true); - } - } + SetSridDialog dlg; + wxString sql; + int srid; + int oldSrid; + int ret; + char dummy[128]; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_COLUMN) + { + dlg.Create(MainFrame, obj->GetName(), obj->GetColumn()); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + srid = dlg.GetSrid(); + oldSrid = dlg.GetOldSrid(); + sql = wxT("UPDATE "); + sql += obj->GetName(); + sql += wxT(" SET "); + sql += obj->GetColumn(); + sql += wxT(" = SetSrid("); + sql += obj->GetColumn(); + sprintf(dummy, ", %d)", srid); + sql += wxString::FromUTF8(dummy); + sql += wxT("\nWHERE Srid("); + sql += obj->GetColumn(); + sprintf(dummy, ") = %d", oldSrid); + sql += wxString::FromUTF8(dummy); + MainFrame->SetSql(sql, true); + } + } } -void -MyTableTree::OnCmdDumpShp (wxCommandEvent & event) +void MyTableTree::OnCmdDumpShp(wxCommandEvent & event) { // // menu event - dumping as Shapefile // - int ret; - wxString path; - wxString lastDir; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - if (obj->GetType () == MY_GEOMETRY || obj->GetType () == MY_GEOMETRY_INDEX) - { - wxFileDialog *fileDialog = - new wxFileDialog (this, wxT ("Dump Shapefile"), - wxT (""), wxT ("shapefile.shp"), - wxT - ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), - wxFD_SAVE | wxFD_OVERWRITE_PROMPT, - wxDefaultPosition, wxDefaultSize, - wxT ("filedlg")); - lastDir = MainFrame->GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { + int ret; + wxString path; + wxString lastDir; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX + || obj->GetType() == MY_GEOMETRY_CACHED) + { + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Dump Shapefile"), + wxT(""), wxT("shapefile.shp"), + wxT + ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), + wxFD_SAVE | + wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { - wxFileName file (fileDialog->GetPath ()); - path = file.GetPath (); - path += file.GetPathSeparator (); - path += file.GetName (); - lastDir = file.GetPath (); - if (MainFrame->IsSetAskCharset () == false) - { - // using the default output charset - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpShapefile (path, obj->GetName (), - obj->GetColumn (), - MainFrame->GetDefaultCharset - ()); - ::wxEndBusyCursor (); - } - else - { - // asking the charset to be used - DumpShpDialog dlg; - dlg.Create (MainFrame, path, obj->GetName (), - obj->GetColumn (), - MainFrame->GetDefaultCharset ()); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpShapefile (path, obj->GetName (), - obj->GetColumn (), - dlg.GetCharset ()); - ::wxEndBusyCursor (); - } - } - } - } + wxFileName file(fileDialog->GetPath()); + path = file.GetPath(); + path += file.GetPathSeparator(); + path += file.GetName(); + lastDir = file.GetPath(); + if (MainFrame->IsSetAskCharset() == false) + { + // using the default output charset + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpShapefile(path, obj->GetName(), obj->GetColumn(), + MainFrame->GetDefaultCharset()); + ::wxEndBusyCursor(); + } else + { + // asking the charset to be used + DumpShpDialog dlg; + dlg.Create(MainFrame, path, obj->GetName(), obj->GetColumn(), + MainFrame->GetDefaultCharset()); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpShapefile(path, obj->GetName(), + obj->GetColumn(), dlg.GetCharset()); + ::wxEndBusyCursor(); + } + } + } + } } -void -MyTableTree::OnCmdDumpTxtTab (wxCommandEvent & event) +void MyTableTree::OnCmdDumpTxtTab(wxCommandEvent & event) { // // menu event - dumping as TxtTab // - int ret; - wxString path; - wxString lastDir; - wxString target; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - wxFileDialog *fileDialog = - new wxFileDialog (this, wxT ("Dump Txt/Tab file"), - wxT (""), wxT ("table.txt"), - wxT - ("File Txt/Tab (*.txt)|*.txt|All files (*.*)|*.*"), - wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, - wxDefaultSize, wxT ("filedlg")); - lastDir = MainFrame->GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - wxFileName file (fileDialog->GetPath ()); - path = file.GetPath (); - path += file.GetPathSeparator (); - path += file.GetName (); - path += wxT (".txt"); - lastDir = file.GetPath (); - if (MainFrame->IsSetAskCharset () == false) - { - // using the default output charset - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpTxtTab (path, obj->GetName (), - MainFrame->GetDefaultCharset ()); - ::wxEndBusyCursor (); - } - else - { - // asking the charset to be used - DumpTxtDialog dlg; - target = wxT ("TXT / TAB"); - dlg.Create (MainFrame, path, target, - MainFrame->GetDefaultCharset ()); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpTxtTab (path, obj->GetName (), - dlg.GetCharset ()); - ::wxEndBusyCursor (); - } - } - } + int ret; + wxString path; + wxString lastDir; + wxString target; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Dump Txt/Tab file"), + wxT(""), wxT("table.txt"), + wxT + ("File Txt/Tab (*.txt)|*.txt|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + wxFileName file(fileDialog->GetPath()); + path = file.GetPath(); + path += file.GetPathSeparator(); + path += file.GetName(); + path += wxT(".txt"); + lastDir = file.GetPath(); + if (MainFrame->IsSetAskCharset() == false) + { + // using the default output charset + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpTxtTab(path, obj->GetName(), + MainFrame->GetDefaultCharset()); + ::wxEndBusyCursor(); + } else + { + // asking the charset to be used + DumpTxtDialog dlg; + target = wxT("TXT / TAB"); + dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpTxtTab(path, obj->GetName(), dlg.GetCharset()); + ::wxEndBusyCursor(); + } + } + } } -void -MyTableTree::OnCmdDumpCsv (wxCommandEvent & event) +void MyTableTree::OnCmdDumpCsv(wxCommandEvent & event) { // // menu event - dumping as CSV // - int ret; - wxString path; - wxString lastDir; - wxString target; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("Dump CSV file"), - wxT (""), wxT ("table.csv"), - wxT - ("File CSV (*.csv)|*.csv|All files (*.*)|*.*"), - wxFD_SAVE | - wxFD_OVERWRITE_PROMPT, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = MainFrame->GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - wxFileName file (fileDialog->GetPath ()); - path = file.GetPath (); - path += file.GetPathSeparator (); - path += file.GetName (); - path += wxT (".csv"); - lastDir = file.GetPath (); - if (MainFrame->IsSetAskCharset () == false) - { - // using the default output charset - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpCsv (path, obj->GetName (), - MainFrame->GetDefaultCharset ()); - ::wxEndBusyCursor (); - } - else - { - // asking the charset to be used - DumpTxtDialog dlg; - target = wxT ("CSV"); - dlg.Create (MainFrame, path, target, - MainFrame->GetDefaultCharset ()); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpCsv (path, obj->GetName (), - dlg.GetCharset ()); - ::wxEndBusyCursor (); - } - } - } + int ret; + wxString path; + wxString lastDir; + wxString target; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Dump CSV file"), + wxT(""), wxT("table.csv"), + wxT + ("File CSV (*.csv)|*.csv|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + wxFileName file(fileDialog->GetPath()); + path = file.GetPath(); + path += file.GetPathSeparator(); + path += file.GetName(); + path += wxT(".csv"); + lastDir = file.GetPath(); + if (MainFrame->IsSetAskCharset() == false) + { + // using the default output charset + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpCsv(path, obj->GetName(), + MainFrame->GetDefaultCharset()); + ::wxEndBusyCursor(); + } else + { + // asking the charset to be used + DumpTxtDialog dlg; + target = wxT("CSV"); + dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpCsv(path, obj->GetName(), dlg.GetCharset()); + ::wxEndBusyCursor(); + } + } + } } -void -MyTableTree::OnCmdDumpHtml (wxCommandEvent & event) +void MyTableTree::OnCmdDumpHtml(wxCommandEvent & event) { // // menu event - dumping as Html // - int ret; - wxString path; - wxString lastDir; - wxString target; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - wxFileDialog *fileDialog = new wxFileDialog (this, wxT ("Dump HTML file"), - wxT (""), wxT ("table.html"), - wxT - ("HTML web page (*.html)|*.html|All files (*.*)|*.*"), - wxFD_SAVE | - wxFD_OVERWRITE_PROMPT, - wxDefaultPosition, - wxDefaultSize, - wxT ("filedlg")); - lastDir = MainFrame->GetLastDirectory (); - if (lastDir.Len () >= 1) - fileDialog->SetDirectory (lastDir); - ret = fileDialog->ShowModal (); - if (ret == wxID_OK) - { - wxFileName file (fileDialog->GetPath ()); - path = file.GetPath (); - path += file.GetPathSeparator (); - path += file.GetName (); - path += wxT (".html"); - lastDir = file.GetPath (); - if (MainFrame->IsSetAskCharset () == false) - { - // using the default output charset - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpHtml (path, obj->GetName (), - MainFrame->GetDefaultCharset ()); - ::wxEndBusyCursor (); - } - else - { - // asking the charset to be used - DumpTxtDialog dlg; - target = wxT ("HTML"); - dlg.Create (MainFrame, path, target, - MainFrame->GetDefaultCharset ()); - ret = dlg.ShowModal (); - if (ret == wxID_OK) - { - MainFrame->SetLastDirectory (lastDir); - ::wxBeginBusyCursor (); - MainFrame->DumpHtml (path, obj->GetName (), - dlg.GetCharset ()); - ::wxEndBusyCursor (); - } - } - } + int ret; + wxString path; + wxString lastDir; + wxString target; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + wxFileDialog *fileDialog = new wxFileDialog(this, wxT("Dump HTML file"), + wxT(""), wxT("table.html"), + wxT + ("HTML web page (*.html)|*.html|All files (*.*)|*.*"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition, + wxDefaultSize, + wxT("filedlg")); + lastDir = MainFrame->GetLastDirectory(); + if (lastDir.Len() >= 1) + fileDialog->SetDirectory(lastDir); + ret = fileDialog->ShowModal(); + if (ret == wxID_OK) + { + wxFileName file(fileDialog->GetPath()); + path = file.GetPath(); + path += file.GetPathSeparator(); + path += file.GetName(); + path += wxT(".html"); + lastDir = file.GetPath(); + if (MainFrame->IsSetAskCharset() == false) + { + // using the default output charset + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpHtml(path, obj->GetName(), + MainFrame->GetDefaultCharset()); + ::wxEndBusyCursor(); + } else + { + // asking the charset to be used + DumpTxtDialog dlg; + target = wxT("HTML"); + dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); + ret = dlg.ShowModal(); + if (ret == wxID_OK) + { + MainFrame->SetLastDirectory(lastDir); + ::wxBeginBusyCursor(); + MainFrame->DumpHtml(path, obj->GetName(), dlg.GetCharset()); + ::wxEndBusyCursor(); + } + } + } } -void -MyTableTree::OnCmdEdit (wxCommandEvent & event) +void MyTableTree::OnCmdEdit(wxCommandEvent & event) { // // menu event - editing row valuew // - char **results; - int rows; - int columns; - int i; - char *errMsg = NULL; - wxString sql; - char *column; - char *type; - int pk = 0; - int pb = 0; - int primaryKeys[1024]; - int blobCols[1024]; - for (i = 0; i < 1024; i++) - { - primaryKeys[i] = -1; - blobCols[i] = -1; - } - primaryKeys[pk++] = 0; - MyObject *obj = (MyObject *) GetItemData (CurrentItem); - if (obj == NULL) - return; - sql = wxT ("PRAGMA table_info("); - sql += obj->GetName (); - sql += wxT (")"); - int ret = - sqlite3_get_table (MainFrame->GetSqlite (), sql.ToUTF8 (), &results, - &rows, &columns, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("SQLite SQL error: ") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - return; - } - sql = wxT (""); - if (rows < 1) - ; - else - { - sql = wxT ("SELECT ROWID"); - for (i = 1; i <= rows; i++) - { - column = results[(i * columns) + 1]; - sql += wxT (", ") + wxString::FromUTF8 (column); - type = results[(i * columns) + 2]; - if (strcasecmp (type, "BLOB") == 0) - blobCols[pb++] = i; - if (atoi (results[(i * columns) + 5]) == 0) - ; - else - primaryKeys[pk++] = i; - } - } - sqlite3_free_table (results); - if (sql.Len () < 1) - return; - sql += wxT ("\nFROM "); - sql += obj->GetName (); - sql += wxT ("\nORDER BY ROWID"); - MainFrame->EditTable (sql, primaryKeys, blobCols, obj->GetName ()); + char **results; + int rows; + int columns; + int i; + char *errMsg = NULL; + wxString sql; + char *column; + char *type; + int pk = 0; + int pb = 0; + int primaryKeys[1024]; + int blobCols[1024]; + for (i = 0; i < 1024; i++) + { + primaryKeys[i] = -1; + blobCols[i] = -1; + } + primaryKeys[pk++] = 0; + MyObject *obj = (MyObject *) GetItemData(CurrentItem); + if (obj == NULL) + return; + sql = wxT("PRAGMA table_info(\""); + sql += obj->GetName(); + sql += wxT("\")"); + int ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, + &rows, &columns, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + sql = wxT(""); + if (rows < 1) + ; + else + { + sql = wxT("SELECT ROWID"); + for (i = 1; i <= rows; i++) + { + column = results[(i * columns) + 1]; + sql += wxT(", \""); + sql += wxString::FromUTF8(column); + sql += wxT("\""); + type = results[(i * columns) + 2]; + if (strcasecmp(type, "BLOB") == 0) + blobCols[pb++] = i; + if (atoi(results[(i * columns) + 5]) == 0) + ; + else + primaryKeys[pk++] = i; + } + } + sqlite3_free_table(results); + if (sql.Len() < 1) + return; + sql += wxT("\nFROM \""); + sql += obj->GetName(); + sql += wxT("\"\nORDER BY ROWID"); + MainFrame->EditTable(sql, primaryKeys, blobCols, obj->GetName()); } Index: TextCsv.cpp ================================================================== --- TextCsv.cpp +++ TextCsv.cpp @@ -1,10 +1,10 @@ /* / TextCsv.cpp / methods related to CSV/TXT loading / -/ version 1.1, 2008 September 13 +/ version 1.2, 2008 October 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008 Alessandro Furieri / @@ -30,789 +30,740 @@ #define VRTTXT_DOUBLE 3 struct row_buffer { /* a complete row */ - int n_cells; /* how many cells are stored into this line */ - char **cells; /* the cells array */ - struct row_buffer *next; /* pointer for linked list */ + int n_cells; /* how many cells are stored into this line */ + char **cells; /* the cells array */ + struct row_buffer *next; /* pointer for linked list */ }; struct text_buffer { - int max_n_cells; /* the maximun cell index */ - char **titles; /* the column titles array */ - char *types; /* the column types array */ - int n_rows; /* the number of rows */ - struct row_buffer **rows; /* the rows array */ - struct row_buffer *first; /* pointers to build a linked list of rows */ - struct row_buffer *last; + int max_n_cells; /* the maximun cell index */ + char **titles; /* the column titles array */ + char *types; /* the column types array */ + int n_rows; /* the number of rows */ + struct row_buffer **rows; /* the rows array */ + struct row_buffer *first; /* pointers to build a linked list of rows */ + struct row_buffer *last; }; -static void -text_insert_row (struct text_buffer *text, char **fields, int max_cell) +static void text_insert_row(struct text_buffer *text, char **fields, + int max_cell) { /* inserting a row into the text buffer struct */ - int i; - struct row_buffer *row = - (struct row_buffer *) malloc (sizeof (struct row_buffer)); - row->n_cells = max_cell + 1; - if (max_cell < 0) - row->cells = NULL; - else - { - row->cells = (char **) malloc (sizeof (char *) * (max_cell + 1)); - for (i = 0; i < row->n_cells; i++) - { - /* setting cell values */ - *(row->cells + i) = *(fields + i); - } - } - row->next = NULL; + int i; + struct row_buffer *row = + (struct row_buffer *) malloc(sizeof(struct row_buffer)); + row->n_cells = max_cell + 1; + if (max_cell < 0) + row->cells = NULL; + else + { + row->cells = (char **) malloc(sizeof(char *) * (max_cell + 1)); + for (i = 0; i < row->n_cells; i++) + { + /* setting cell values */ + *(row->cells + i) = *(fields + i); + } + } + row->next = NULL; /* inserting the row into the linked list */ - if (!(text->first)) - text->first = row; - if (text->last) - text->last->next = row; - text->last = row; + if (!(text->first)) + text->first = row; + if (text->last) + text->last->next = row; + text->last = row; } -static struct text_buffer * -text_buffer_alloc () +static struct text_buffer *text_buffer_alloc() { /* allocating and initializing the text buffer struct */ - struct text_buffer *text = - (struct text_buffer *) malloc (sizeof (struct text_buffer)); - text->max_n_cells = 0; - text->titles = NULL; - text->types = NULL; - text->n_rows = 0; - text->rows = NULL; - text->first = NULL; - text->last = NULL; - return text; + struct text_buffer *text = + (struct text_buffer *) malloc(sizeof(struct text_buffer)); + text->max_n_cells = 0; + text->titles = NULL; + text->types = NULL; + text->n_rows = 0; + text->rows = NULL; + text->first = NULL; + text->last = NULL; + return text; } -static void -text_buffer_free (struct text_buffer *text) +static void text_buffer_free(struct text_buffer *text) { /* memory cleanup - freeing the text buffer */ - int i; - struct row_buffer *row; - if (!text) - return; - row = text->first; - while (row) - { - for (i = 0; i < row->n_cells; i++) - { - if (*(row->cells + i)) - free (*(row->cells + i)); - } - row = row->next; - } - if (text->types) - free (text->types); - free (text); + int i; + struct row_buffer *row; + if (!text) + return; + row = text->first; + while (row) + { + for (i = 0; i < row->n_cells; i++) + { + if (*(row->cells + i)) + free(*(row->cells + i)); + } + row = row->next; + } + if (text->types) + free(text->types); + free(text); } -static int -text_is_integer (char *value) +static int text_is_integer(char *value) { /* checking if this value can be an INTEGER */ - int invalids = 0; - int digits = 0; - int signs = 0; - char last = '\0'; - char *p = value; - while (*p != '\0') - { - last = *p; - if (*p >= '0' && *p <= '9') - digits++; - else if (*p == '+' || *p == '-') - signs++; - else - signs++; - p++; - } - if (invalids) - return 0; - if (signs > 1) - return 0; - if (signs) - { - if (*value == '+' || *value == '-' || last == '+' || last == '-') - ; - else - return 0; - } - return 1; + int invalids = 0; + int digits = 0; + int signs = 0; + char last = '\0'; + char *p = value; + while (*p != '\0') + { + last = *p; + if (*p >= '0' && *p <= '9') + digits++; + else if (*p == '+' || *p == '-') + signs++; + else + signs++; + p++; + } + if (invalids) + return 0; + if (signs > 1) + return 0; + if (signs) + { + if (*value == '+' || *value == '-' || last == '+' || last == '-') + ; + else + return 0; + } + return 1; } -static int -text_is_double (char *value, char decimal_separator) +static int text_is_double(char *value, char decimal_separator) { /* checking if this value can be a DOUBLE */ - int invalids = 0; - int digits = 0; - int signs = 0; - int points = 0; - char last = '\0'; - char *p = value; - while (*p != '\0') - { - last = *p; - if (*p >= '0' && *p <= '9') - digits++; - else if (*p == '+' || *p == '-') - points++; - else - { - if (decimal_separator == ',') - { - if (*p == ',') - points++; - else - invalids++; - } - else - { - if (*p == '.') - points++; - else - invalids++; - } - } - p++; - } - if (invalids) - return 0; - if (points > 1) - return 0; - if (signs > 1) - return 0; - if (signs) - { - if (*value == '+' || *value == '-' || last == '+' || last == '-') - ; - else - return 0; - } - return 1; + int invalids = 0; + int digits = 0; + int signs = 0; + int points = 0; + char last = '\0'; + char *p = value; + while (*p != '\0') + { + last = *p; + if (*p >= '0' && *p <= '9') + digits++; + else if (*p == '+' || *p == '-') + points++; + else + { + if (decimal_separator == ',') + { + if (*p == ',') + points++; + else + invalids++; + } else + { + if (*p == '.') + points++; + else + invalids++; + } + } + p++; + } + if (invalids) + return 0; + if (points > 1) + return 0; + if (signs > 1) + return 0; + if (signs) + { + if (*value == '+' || *value == '-' || last == '+' || last == '-') + ; + else + return 0; + } + return 1; } -static void -text_clean_integer (char *value) +static void text_clean_integer(char *value) { /* cleaning an integer value */ - char last; - char buffer[35536]; - int len = strlen (value); - last = value[len - 1]; - if (last == '-' || last == '+') - { - /* trailing sign; transforming into a leading sign */ - *buffer = last; - strcpy (buffer + 1, value); - buffer[len - 1] = '\0'; - strcpy (value, buffer); - } + char last; + char buffer[35536]; + int len = strlen(value); + last = value[len - 1]; + if (last == '-' || last == '+') + { + /* trailing sign; transforming into a leading sign */ + *buffer = last; + strcpy(buffer + 1, value); + buffer[len - 1] = '\0'; + strcpy(value, buffer); + } } -static void -text_clean_double (char *value) +static void text_clean_double(char *value) { /* cleaning an integer value */ - char *p; - char last; - char buffer[35536]; - int len = strlen (value); - last = value[len - 1]; - if (last == '-' || last == '+') - { - /* trailing sign; transforming into a leading sign */ - *buffer = last; - strcpy (buffer + 1, value); - buffer[len - 1] = '\0'; - strcpy (value, buffer); - } - p = value; - while (*p != '\0') - { - /* transforming COMMAs into POINTs */ - if (*p == ',') - *p = '.'; - p++; - } + char *p; + char last; + char buffer[35536]; + int len = strlen(value); + last = value[len - 1]; + if (last == '-' || last == '+') + { + /* trailing sign; transforming into a leading sign */ + *buffer = last; + strcpy(buffer + 1, value); + buffer[len - 1] = '\0'; + strcpy(value, buffer); + } + p = value; + while (*p != '\0') + { + /* transforming COMMAs into POINTs */ + if (*p == ',') + *p = '.'; + p++; + } } -static int -text_clean_text (char **value, void *toUtf8) +static int text_clean_text(char **value, void *toUtf8) { /* cleaning a TEXT value and converting to UTF-8 */ - char *text = *value; - char *utf8text; - int err; - int i; - int oldlen = strlen (text); - int newlen; - for (i = oldlen - 1; i > 0; i++) - { - /* cleaning up trailing spaces */ - if (text[i] == ' ') - text[i] = '\0'; - else - break; - } - utf8text = gaiaConvertToUTF8 (toUtf8, text, oldlen, &err); - if (err) - return 1; - newlen = strlen (utf8text); - if (newlen <= oldlen) - strcpy (*value, utf8text); - else - { - free (*value); - *value = (char *) malloc (newlen + 1); - strcpy (*value, utf8text); - } - return 0; + char *text = *value; + char *utf8text; + int err; + int i; + int oldlen = strlen(text); + int newlen; + for (i = oldlen - 1; i > 0; i++) + { + /* cleaning up trailing spaces */ + if (text[i] == ' ') + text[i] = '\0'; + else + break; + } + utf8text = gaiaConvertToUTF8(toUtf8, text, oldlen, &err); + if (err) + return 1; + newlen = strlen(utf8text); + if (newlen <= oldlen) + strcpy(*value, utf8text); + else + { + free(*value); + *value = (char *) malloc(newlen + 1); + strcpy(*value, utf8text); + } + return 0; } -static struct text_buffer * -text_parse (const char *path, const char *encoding, bool first_line_titles, - char field_separator, char text_separator, char decimal_separator) +static struct text_buffer *text_parse(const char *path, const char *encoding, + bool first_line_titles, + char field_separator, char text_separator, + char decimal_separator) { /* trying to open and parse the text file */ - int c; - int fld; - int len; - int max_cell; - int is_string = 0; - char last = '\0'; - char *fields[4096]; - char buffer[35536]; - char *p = buffer; - struct text_buffer *text; - int nrows; - int ncols; - int errs; - struct row_buffer *row; - void *toUtf8; - int encoding_errors; - int ir; - char title[64]; - char *first_valid_row; - int i; - char *name; - for (fld = 0; fld < 4096; fld++) - { - /* preparing an empty row */ - fields[fld] = NULL; - } + int c; + int fld; + int len; + int max_cell; + int is_string = 0; + char last = '\0'; + char *fields[4096]; + char buffer[35536]; + char *p = buffer; + struct text_buffer *text; + int nrows; + int ncols; + int errs; + struct row_buffer *row; + void *toUtf8; + int encoding_errors; + int ir; + char title[64]; + char *first_valid_row; + int i; + char *name; + for (fld = 0; fld < 4096; fld++) + { + /* preparing an empty row */ + fields[fld] = NULL; + } /* trying to open the text file */ - FILE *in = fopen (path, "rb"); - if (!in) - return NULL; - text = text_buffer_alloc (); - fld = 0; - while ((c = getc (in)) != EOF) - { - /* parsing the file, one char at each time */ - if (c == '\r' && !is_string) - { - last = c; - continue; - } - if (c == field_separator && !is_string) - { - /* insering a field into the fields tmp array */ - last = c; - *p = '\0'; - len = strlen (buffer); - if (len) - { - fields[fld] = (char *) malloc (len + 1); - strcpy (fields[fld], buffer); - } - fld++; - p = buffer; - *p = '\0'; - continue; - } - if (c == text_separator) - { - /* found a text separator */ - if (is_string) - { - is_string = 0; - last = c; - } - else - { - if (last == text_separator) - *p++ = text_separator; - is_string = 1; - } - continue; - } - last = c; - if (c == '\n' && !is_string) - { - /* inserting the row into the text buffer */ - *p = '\0'; - len = strlen (buffer); - if (len) - { - fields[fld] = (char *) malloc (len + 1); - strcpy (fields[fld], buffer); - } - fld++; - p = buffer; - *p = '\0'; - max_cell = -1; - for (fld = 0; fld < 4096; fld++) - { - if (fields[fld]) - max_cell = fld; - } - text_insert_row (text, fields, max_cell); - for (fld = 0; fld < 4096; fld++) - { - /* resetting an empty row */ - fields[fld] = NULL; - } - fld = 0; - continue; - } - *p++ = c; - } - fclose (in); + FILE *in = fopen(path, "rb"); + if (!in) + return NULL; + text = text_buffer_alloc(); + fld = 0; + while ((c = getc(in)) != EOF) + { + /* parsing the file, one char at each time */ + if (c == '\r' && !is_string) + { + last = c; + continue; + } + if (c == field_separator && !is_string) + { + /* insering a field into the fields tmp array */ + last = c; + *p = '\0'; + len = strlen(buffer); + if (len) + { + fields[fld] = (char *) malloc(len + 1); + strcpy(fields[fld], buffer); + } + fld++; + p = buffer; + *p = '\0'; + continue; + } + if (c == text_separator) + { + /* found a text separator */ + if (is_string) + { + is_string = 0; + last = c; + } else + { + if (last == text_separator) + *p++ = text_separator; + is_string = 1; + } + continue; + } + last = c; + if (c == '\n' && !is_string) + { + /* inserting the row into the text buffer */ + *p = '\0'; + len = strlen(buffer); + if (len) + { + fields[fld] = (char *) malloc(len + 1); + strcpy(fields[fld], buffer); + } + fld++; + p = buffer; + *p = '\0'; + max_cell = -1; + for (fld = 0; fld < 4096; fld++) + { + if (fields[fld]) + max_cell = fld; + } + text_insert_row(text, fields, max_cell); + for (fld = 0; fld < 4096; fld++) + { + /* resetting an empty row */ + fields[fld] = NULL; + } + fld = 0; + continue; + } + *p++ = c; + } + fclose(in); /* checking if the text file really seems to contain a table */ - nrows = 0; - ncols = 0; - errs = 0; - row = text->first; - while (row) - { - if (first_line_titles == true && row == text->first) - { - /* skipping first line */ - row = row->next; - continue; - } - nrows++; - if (row->n_cells > ncols) - ncols = row->n_cells; - row = row->next; - } - if (nrows == 0 && ncols == 0) - { - text_buffer_free (text); - return NULL; - } - text->n_rows = nrows; + nrows = 0; + ncols = 0; + errs = 0; + row = text->first; + while (row) + { + if (first_line_titles == true && row == text->first) + { + /* skipping first line */ + row = row->next; + continue; + } + nrows++; + if (row->n_cells > ncols) + ncols = row->n_cells; + row = row->next; + } + if (nrows == 0 && ncols == 0) + { + text_buffer_free(text); + return NULL; + } + text->n_rows = nrows; /* going to check the column types */ - text->max_n_cells = ncols; - text->types = (char *) malloc (sizeof (char) * text->max_n_cells); - first_valid_row = (char *) malloc (sizeof (char) * text->max_n_cells); - for (fld = 0; fld < text->max_n_cells; fld++) - { - /* initally assuming any cell contains TEXT */ - *(text->types + fld) = VRTTXT_TEXT; - *(first_valid_row + fld) = 1; - } - row = text->first; - while (row) - { - if (first_line_titles == true && row == text->first) - { - /* skipping first line */ - row = row->next; - continue; - } - for (fld = 0; fld < row->n_cells; fld++) - { - if (*(row->cells + fld)) - { - if (text_is_integer (*(row->cells + fld))) - { - if (*(first_valid_row + fld)) - { - *(text->types + fld) = VRTTXT_INTEGER; - *(first_valid_row + fld) = 0; - } - } - else if (text_is_double - (*(row->cells + fld), decimal_separator)) - { - if (*(first_valid_row + fld)) - { - *(text->types + fld) = VRTTXT_DOUBLE; - *(first_valid_row + fld) = 0; - } - else - { - /* promoting an INTEGER column to be of the DOUBLE type */ - if (*(text->types + fld) == VRTTXT_INTEGER) - *(text->types + fld) = VRTTXT_DOUBLE; - } - } - else - { - /* this column is anyway of the TEXT type */ - *(text->types + fld) = VRTTXT_TEXT; - if (*(first_valid_row + fld)) - *(first_valid_row + fld) = 0; - } - } - } - row = row->next; - } - free (first_valid_row); + text->max_n_cells = ncols; + text->types = (char *) malloc(sizeof(char) * text->max_n_cells); + first_valid_row = (char *) malloc(sizeof(char) * text->max_n_cells); + for (fld = 0; fld < text->max_n_cells; fld++) + { + /* initally assuming any cell contains TEXT */ + *(text->types + fld) = VRTTXT_TEXT; + *(first_valid_row + fld) = 1; + } + row = text->first; + while (row) + { + if (first_line_titles == true && row == text->first) + { + /* skipping first line */ + row = row->next; + continue; + } + for (fld = 0; fld < row->n_cells; fld++) + { + if (*(row->cells + fld)) + { + if (text_is_integer(*(row->cells + fld))) + { + if (*(first_valid_row + fld)) + { + *(text->types + fld) = VRTTXT_INTEGER; + *(first_valid_row + fld) = 0; + } + } else if (text_is_double(*(row->cells + fld), decimal_separator)) + { + if (*(first_valid_row + fld)) + { + *(text->types + fld) = VRTTXT_DOUBLE; + *(first_valid_row + fld) = 0; + } else + { + /* promoting an INTEGER column to be of the DOUBLE type */ + if (*(text->types + fld) == VRTTXT_INTEGER) + *(text->types + fld) = VRTTXT_DOUBLE; + } + } else + { + /* this column is anyway of the TEXT type */ + *(text->types + fld) = VRTTXT_TEXT; + if (*(first_valid_row + fld)) + *(first_valid_row + fld) = 0; + } + } + } + row = row->next; + } + free(first_valid_row); /* preparing the column names */ - text->titles = (char **) malloc (sizeof (char *) * text->max_n_cells); - if (first_line_titles == true) - { - for (fld = 0; fld < text->max_n_cells; fld++) - { - if (fld >= text->first->n_cells) - { - /* this column name is NULL; setting a default name */ - sprintf (title, "COL%03d", fld + 1); - len = strlen (title); - *(text->titles + fld) = (char *) malloc (len + 1); - strcpy (*(text->titles + fld), title); - } - else - { - if (*(text->first->cells + fld)) - { - len = strlen (*(text->first->cells + fld)); - *(text->titles + fld) = (char *) malloc (len + 1); - strcpy (*(text->titles + fld), - *(text->first->cells + fld)); - name = *(text->titles + fld); - for (i = 0; i < len; i++) - { - /* masking any space in the column name */ - if (*(name + i) == ' ') - *(name + i) = '_'; - } - } - else - { - /* this column name is NULL; setting a default name */ - sprintf (title, "COL%03d", fld + 1); - len = strlen (title); - *(text->titles + fld) = (char *) malloc (len + 1); - strcpy (*(text->titles + fld), title); - } - } - } - } - else - { - for (fld = 0; fld < text->max_n_cells; fld++) - { - sprintf (title, "COL%03d", fld + 1); - len = strlen (title); - *(text->titles + fld) = (char *) malloc (len + 1); - strcpy (*(text->titles + fld), title); - } - } + text->titles = (char **) malloc(sizeof(char *) * text->max_n_cells); + if (first_line_titles == true) + { + for (fld = 0; fld < text->max_n_cells; fld++) + { + if (fld >= text->first->n_cells) + { + /* this column name is NULL; setting a default name */ + sprintf(title, "COL%03d", fld + 1); + len = strlen(title); + *(text->titles + fld) = (char *) malloc(len + 1); + strcpy(*(text->titles + fld), title); + } else + { + if (*(text->first->cells + fld)) + { + len = strlen(*(text->first->cells + fld)); + *(text->titles + fld) = (char *) malloc(len + 1); + strcpy(*(text->titles + fld), *(text->first->cells + fld)); + name = *(text->titles + fld); + for (i = 0; i < len; i++) + { + /* masking any space in the column name */ + if (*(name + i) == ' ') + *(name + i) = '_'; + } + } else + { + /* this column name is NULL; setting a default name */ + sprintf(title, "COL%03d", fld + 1); + len = strlen(title); + *(text->titles + fld) = (char *) malloc(len + 1); + strcpy(*(text->titles + fld), title); + } + } + } + } else + { + for (fld = 0; fld < text->max_n_cells; fld++) + { + sprintf(title, "COL%03d", fld + 1); + len = strlen(title); + *(text->titles + fld) = (char *) malloc(len + 1); + strcpy(*(text->titles + fld), title); + } + } /* cleaning cell values when needed */ - toUtf8 = gaiaCreateUTF8Converter (encoding); - if (!toUtf8) - { - text_buffer_free (text); - return NULL; - } - encoding_errors = 0; - row = text->first; - while (row) - { - if (first_line_titles == true && row == text->first) - { - /* skipping first line */ - row = row->next; - continue; - } - for (fld = 0; fld < row->n_cells; fld++) - { - if (*(row->cells + fld)) - { - if (*(text->types + fld) == VRTTXT_INTEGER) - text_clean_integer (*(row->cells + fld)); - else if (*(text->types + fld) == VRTTXT_DOUBLE) - text_clean_double (*(row->cells + fld)); - else - encoding_errors += - text_clean_text (row->cells + fld, toUtf8); - } - } - row = row->next; - } - gaiaFreeUTF8Converter (toUtf8); - if (encoding_errors) - { - text_buffer_free (text); - return NULL; - } + toUtf8 = gaiaCreateUTF8Converter(encoding); + if (!toUtf8) + { + text_buffer_free(text); + return NULL; + } + encoding_errors = 0; + row = text->first; + while (row) + { + if (first_line_titles == true && row == text->first) + { + /* skipping first line */ + row = row->next; + continue; + } + for (fld = 0; fld < row->n_cells; fld++) + { + if (*(row->cells + fld)) + { + if (*(text->types + fld) == VRTTXT_INTEGER) + text_clean_integer(*(row->cells + fld)); + else if (*(text->types + fld) == VRTTXT_DOUBLE) + text_clean_double(*(row->cells + fld)); + else + encoding_errors += text_clean_text(row->cells + fld, toUtf8); + } + } + row = row->next; + } + gaiaFreeUTF8Converter(toUtf8); + if (encoding_errors) + { + text_buffer_free(text); + return NULL; + } /* ok, we can now go to prepare the rows array */ - text->rows = - (struct row_buffer **) malloc (sizeof (struct text_row *) * - text->n_rows); - ir = 0; - row = text->first; - while (row) - { - if (first_line_titles == true && row == text->first) - { - /* skipping first line */ - row = row->next; - continue; - } - *(text->rows + ir++) = row; - row = row->next; - } - return text; + text->rows = + (struct row_buffer **) malloc(sizeof(struct text_row *) * text->n_rows); + ir = 0; + row = text->first; + while (row) + { + if (first_line_titles == true && row == text->first) + { + /* skipping first line */ + row = row->next; + continue; + } + *(text->rows + ir++) = row; + row = row->next; + } + return text; } void -MyFrame::LoadText (wxString & path, wxString & table, wxString & charset, - bool first_titles, char decimal_separator, char separator, - char text_separator) + MyFrame::LoadText(wxString & path, wxString & table, wxString & charset, + bool first_titles, char decimal_separator, char separator, + char text_separator) { // // loading a CSV/TXT as a new DB table // - struct text_buffer *text = NULL; - struct row_buffer *row; - int seed; - int dup; - int idup; - char dummy[65536]; - char dummyName[4096]; - char **col_name = NULL; - int i; - char sql[65536]; - int len; - int ret; - int rows = 0; - char *errMsg = NULL; - bool sqlError = false; - char xtable[1024]; - int current_row; - wxString msg; + struct text_buffer *text = NULL; + struct row_buffer *row; + int seed; + int dup; + int idup; + char dummy[65536]; + char dummyName[4096]; + char **col_name = NULL; + int i; + char sql[65536]; + int len; + int ret; + int rows = 0; + char *errMsg = NULL; + bool sqlError = false; + char xtable[1024]; + int current_row; + wxString msg; // // performing some checks before starting // - if (TableAlreadyExists (table) == true) - { - wxMessageBox (wxT ("a table name '") + table + - wxT ("' already exists"), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - return; - } - if (gaiaIllegalSqlName (table.ToUTF8 ()) == 1 - || gaiaIsReservedSqlName (table.ToUTF8 ()) == 1 - || gaiaIsReservedSqliteName (table.ToUTF8 ()) == 1) - { - wxMessageBox (wxT ("'") + table + - wxT - ("' is an invalid TABLE NAME\n\nsame as SQL reserved keyword"), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, this); - return; - } - text = - text_parse (path.ToUTF8 (), charset.ToUTF8 (), first_titles, separator, - text_separator, decimal_separator); - if (!text) - return; - ::wxBeginBusyCursor (); + if (TableAlreadyExists(table) == true) + { + wxMessageBox(wxT("a table name '") + table + wxT("' already exists"), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + return; + } + text = + text_parse(path.ToUTF8(), charset.ToUTF8(), first_titles, separator, + text_separator, decimal_separator); + if (!text) + return; + ::wxBeginBusyCursor(); // // checking for duplicate / illegal column names and antialising them // - col_name = (char **) malloc (sizeof (char *) * text->max_n_cells); - seed = 0; - for (i = 0; i < text->max_n_cells; i++) - { - if (gaiaIllegalSqlName (*(text->titles + i)) - || gaiaIsReservedSqlName (*(text->titles + i)) - || gaiaIsReservedSqliteName (*(text->titles + i))) - sprintf (dummyName, "COL_%d", seed++); - else - strcpy (dummyName, *(text->titles + i)); - dup = 0; - for (idup = 0; idup < i; idup++) - { - if (strcasecmp (dummyName, *(col_name + idup)) == 0) - dup = 1; - } - if (strcasecmp (dummyName, "PKUID") == 0) - dup = 1; - if (strcasecmp (dummyName, "Geometry") == 0) - dup = 1; - if (dup) - sprintf (dummyName, "COL_%d", seed++); - len = strlen (dummyName); - *(col_name + i) = (char *) malloc (len + 1); - strcpy (*(col_name + i), dummyName); - } + col_name = (char **) malloc(sizeof(char *) * text->max_n_cells); + seed = 0; + for (i = 0; i < text->max_n_cells; i++) + { + strcpy(dummyName, *(text->titles + i)); + dup = 0; + for (idup = 0; idup < i; idup++) + { + if (strcasecmp(dummyName, *(col_name + idup)) == 0) + dup = 1; + } + if (strcasecmp(dummyName, "PKUID") == 0) + dup = 1; + if (strcasecmp(dummyName, "Geometry") == 0) + dup = 1; + if (dup) + sprintf(dummyName, "COL_%d", seed++); + len = strlen(dummyName); + *(col_name + i) = (char *) malloc(len + 1); + strcpy(*(col_name + i), dummyName); + } // // starting a transaction // - ret = sqlite3_exec (SqliteHandle, "BEGIN", NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load CSV/TXT error:") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } + ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load CSV/TXT error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + sqlError = true; + goto clean_up; + } // // creating the Table // - strcpy (xtable, table.ToUTF8 ()); - sprintf (sql, "CREATE TABLE %s", xtable); - strcat (sql, " (\nPK_UID INTEGER PRIMARY KEY AUTOINCREMENT"); - for (i = 0; i < text->max_n_cells; i++) - { - strcat (sql, ",\n"); - strcat (sql, *(col_name + i)); - if (*(text->types + i) == VRTTXT_INTEGER) - strcat (sql, " INTEGER"); - else if (*(text->types + i) == VRTTXT_DOUBLE) - strcat (sql, " DOUBLE"); - else - strcat (sql, " TEXT"); - } - strcat (sql, ")"); - ret = sqlite3_exec (SqliteHandle, sql, NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load text error:") + - wxString::FromUTF8 (errMsg), wxT ("spatialite-gui"), - wxOK | wxICON_ERROR, this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } - current_row = 0; - while (current_row < text->n_rows) - { - // - // inserting rows from CSV/TXT - // - sprintf (sql, "INSERT INTO %s (\nPK_UID", xtable); - for (i = 0; i < text->max_n_cells; i++) - { - // columns corresponding to some CSV/TXT column - strcat (sql, ","); - strcat (sql, *(col_name + i)); - } - strcat (sql, ")\nVALUES ("); - sprintf (dummy, "%d", current_row); - strcat (sql, dummy); - for (i = 0; i < text->max_n_cells; i++) - { - // column values - row = *(text->rows + current_row); - strcat (sql, ","); - if (i >= row->n_cells) - strcat (sql, "NULL"); - else - { - if (*(row->cells + i)) - { - if (*(text->types + i) == VRTTXT_INTEGER) - { - sprintf (dummy, "%d", - atoi (*(row->cells + i))); - strcat (sql, dummy); - } - else if (*(text->types + i) == VRTTXT_DOUBLE) - { - sprintf (dummy, "%1.6lf", - atof (*(row->cells + i))); - strcat (sql, dummy); - } - else - { - strcpy (dummy, *(row->cells + i)); - CleanSqlString (dummy); - strcat (sql, "'"); - strcat (sql, dummy); - strcat (sql, "'"); - } - } - else - strcat (sql, "NULL"); - } - } - strcat (sql, ")"); - ret = sqlite3_exec (SqliteHandle, sql, NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load text error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - sqlError = true; - goto clean_up; - } - rows++; - current_row++; - } - clean_up: - if (col_name) - { - // releasing memory allocation for column names - for (i = 0; i < text->max_n_cells; i++) - free (*(col_name + i)); - free (col_name); - } - free (text); - if (sqlError == true) - { - // some error occurred - ROLLBACK - ret = sqlite3_exec (SqliteHandle, "ROLLBACK", NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load text error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - } - ::wxEndBusyCursor (); - msg.Printf (wxT - ("CSV/TXT not loaded\n\n\na ROLLBACK was automatically performed")); - wxMessageBox (msg, wxT ("spatialite-gui"), wxOK | wxICON_WARNING, - this); - } - else - { - // ok - confirming pending transaction - COMMIT - ret = sqlite3_exec (SqliteHandle, "COMMIT", NULL, 0, &errMsg); - if (ret != SQLITE_OK) - { - wxMessageBox (wxT ("load text error:") + - wxString::FromUTF8 (errMsg), - wxT ("spatialite-gui"), wxOK | wxICON_ERROR, - this); - sqlite3_free (errMsg); - return; - } - ::wxEndBusyCursor (); - msg.Printf (wxT ("CSV/TXT loaded\n\n%d inserted rows"), rows); - wxMessageBox (msg, wxT ("spatialite-gui"), - wxOK | wxICON_INFORMATION, this); - ClearTableTree (); - InitTableTree (); - } + strcpy(xtable, table.ToUTF8()); + sprintf(sql, "CREATE TABLE \"%s\"", xtable); + strcat(sql, " (\n\"PK_UID\" INTEGER PRIMARY KEY AUTOINCREMENT"); + for (i = 0; i < text->max_n_cells; i++) + { + strcat(sql, ",\n\""); + strcat(sql, *(col_name + i)); + if (*(text->types + i) == VRTTXT_INTEGER) + strcat(sql, "\" INTEGER"); + else if (*(text->types + i) == VRTTXT_DOUBLE) + strcat(sql, "\" DOUBLE"); + else + strcat(sql, "\" TEXT"); + } + strcat(sql, ")"); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + sqlError = true; + goto clean_up; + } + current_row = 0; + while (current_row < text->n_rows) + { + // + // inserting rows from CSV/TXT + // + sprintf(sql, "INSERT INTO \"%s\" (\n\"PK_UID\"", xtable); + for (i = 0; i < text->max_n_cells; i++) + { + // columns corresponding to some CSV/TXT column + strcat(sql, ",\""); + strcat(sql, *(col_name + i)); + strcat(sql, "\""); + } + strcat(sql, ")\nVALUES ("); + sprintf(dummy, "%d", current_row); + strcat(sql, dummy); + for (i = 0; i < text->max_n_cells; i++) + { + // column values + row = *(text->rows + current_row); + strcat(sql, ","); + if (i >= row->n_cells) + strcat(sql, "NULL"); + else + { + if (*(row->cells + i)) + { + if (*(text->types + i) == VRTTXT_INTEGER) + { + sprintf(dummy, "%d", atoi(*(row->cells + i))); + strcat(sql, dummy); + } else if (*(text->types + i) == VRTTXT_DOUBLE) + { + sprintf(dummy, "%1.6lf", atof(*(row->cells + i))); + strcat(sql, dummy); + } else + { + strcpy(dummy, *(row->cells + i)); + CleanSqlString(dummy); + strcat(sql, "'"); + strcat(sql, dummy); + strcat(sql, "'"); + } + } else + strcat(sql, "NULL"); + } + } + strcat(sql, ")"); + ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + sqlError = true; + goto clean_up; + } + rows++; + current_row++; + } +clean_up: + if (col_name) + { + // releasing memory allocation for column names + for (i = 0; i < text->max_n_cells; i++) + free(*(col_name + i)); + free(col_name); + } + free(text); + if (sqlError == true) + { + // some error occurred - ROLLBACK + ret = sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + } + ::wxEndBusyCursor(); + msg = + wxT("CSV/TXT not loaded\n\n\na ROLLBACK was automatically performed"); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_WARNING, this); + } else + { + // ok - confirming pending transaction - COMMIT + ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, 0, &errMsg); + if (ret != SQLITE_OK) + { + wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), + wxT("spatialite-gui"), wxOK | wxICON_ERROR, this); + sqlite3_free(errMsg); + return; + } + ::wxEndBusyCursor(); + sprintf(dummy, "CSV/TXT loaded\n\n%d inserted rows", rows); + msg = wxString::FromUTF8(dummy); + wxMessageBox(msg, wxT("spatialite-gui"), wxOK | wxICON_INFORMATION, this); + InitTableTree(); + } } ADDED icons/dumpshp.xpm Index: icons/dumpshp.xpm ================================================================== --- icons/dumpshp.xpm +++ icons/dumpshp.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static const char * dumpshp_xpm[] = { +"16 16 16 1", +" c None", +". c #5AB24A", +"+ c #41A0E9", +"@ c #8BCC5C", +"# c #ECF7E6", +"$ c #D3EDBC", +"% c #D0EBFA", +"& c #0A5EC5", +"* c #9BD48C", +"= c #BCE7B1", +"- c #94B7E3", +"; c #A7D6A3", +"> c #209910", +", c #638F45", +"' c #106CD2", +") c #FFFFFF", +" )))))) ", +" ),@.,) ", +" )),@@,)) ", +" ),,,@@,,,) ", +" )),@@@@,)) ", +" )>#),@.,#=>) ", +" )'#$#,,#.=>) ", +" )'%$$*%%.@@=>) ", +" )'%+*+++@@.;>) ", +" )'%+-+++...;>) ", +" )>$*.+++''>;') ", +" )>$@..'&&-') ", +" )>==>.'&--') ", +" )>>;;--'') ", +" ))>''')) ", +" )))) "}; ADDED icons/exif.xpm Index: icons/exif.xpm ================================================================== --- icons/exif.xpm +++ icons/exif.xpm @@ -0,0 +1,133 @@ +/* XPM */ +static const char * exif_xpm[] = { +"16 16 114 2", +" c None", +". c #AA7128", +"+ c #A96F27", +"@ c #A76E26", +"# c #A56C25", +"$ c #A36A23", +"% c #A06822", +"& c #9D6620", +"* c #9B641F", +"= c #98611D", +"- c #955F1C", +"; c #A86F26", +"> c #DDA252", +", c #DA934D", +"' c #D59243", +") c #D1913C", +"! c #CD8E3C", +"~ c #CB8B3A", +"{ c #BE843E", +"] c #CA924B", +"^ c #905B19", +"/ c #D8903F", +"( c #61BCF3", +"_ c #62BDF3", +": c #5DB8F1", +"< c #4DA6E9", +"[ c #368EDE", +"} c #CA9249", +"| c #8C5817", +"1 c #A26A23", +"2 c #DD9148", +"3 c #5CB6F0", +"4 c #5EB8F1", +"5 c #5CB7F0", +"6 c #A47536", +"7 c #A27234", +"8 c #9F7032", +"9 c #A86E26", +"0 c #A16922", +"a c #9E6721", +"b c #D98F46", +"c c #4BA4E8", +"d c #4FA8EA", +"e c #4CA5E8", +"f c #A17233", +"g c #D2A15B", +"h c #CE9256", +"i c #D49244", +"j c #CC8D39", +"k c #9A631F", +"l c #D48A43", +"m c #368DDE", +"n c #3890DF", +"o c #9B6F35", +"p c #CC8F49", +"q c #35C62D", +"r c #40C723", +"s c #3CC321", +"t c #3BCD27", +"u c #43D12E", +"v c #57DA3F", +"w c #96601C", +"x c #CC8A43", +"y c #6EE454", +"z c #CF9037", +"A c #885514", +"B c #925D1A", +"C c #8F5A18", +"D c #6EE46E", +"E c #CA8B51", +"F c #845112", +"G c #38BAED", +"H c #58BFFF", +"I c #62BBFF", +"J c #44B6FF", +"K c #DBEB8C", +"L c #FFFF6D", +"M c #78EF69", +"N c #CE8F45", +"O c #804E10", +"P c #3BCE45", +"Q c #07BE31", +"R c #5AB7FF", +"S c #58B6FF", +"T c #97D1CC", +"U c #F3FA8A", +"V c #C99A40", +"W c #C7883D", +"X c #7D4C0E", +"Y c #4BC84F", +"Z c #36CB21", +"` c #42C825", +" . c #54B8AC", +".. c #42A6FF", +"+. c #00A2FF", +"@. c #7E4D0F", +"#. c #7C4B0E", +"$. c #7A490D", +"%. c #77F35E", +"&. c #A4FF8C", +"*. c #ACFF77", +"=. c #7CF634", +"-. c #75EF55", +";. c #64FF79", +">. c #C59046", +",. c #C6954A", +"'. c #E8D462", +"). c #E9D461", +"!. c #C99644", +"~. c #8C5816", +"{. c #895515", +"]. c #865313", +"^. c #835112", +"/. c #804F10", +" ", +". + @ # $ % & * = - ", +"; > , ' ) ! ~ { ] ^ ", +"# / ( _ ( : < [ } | ", +"1 2 3 4 5 6 7 8 9 0 % & * = - ", +"a b c d e f g h i j ! ~ { ] ^ ", +"k l m n [ o p q r s t u v } | ", +"w x . + @ # $ % & * = - y z A ", +"B C ; > , ' ) ! ~ { ] ^ D E F ", +" # / G H I J K L } | M N O ", +" 1 2 P Q R S T U z A V W X ", +" a b Y Z ` ...+.E F @.#.$. ", +" k l %.&.*.=.-.;.N O ", +" w x >.,.'.).!.V W X ", +" B C ~.{.].^./.@.#.$. ", +" "}; Index: icons/icon.xpm ================================================================== --- icons/icon.xpm +++ icons/icon.xpm @@ -1,43 +1,44 @@ /* XPM */ static const char * icon_xpm[] = { -"32 32 8 1", +"32 32 9 1", " c None", -". c #F0C080", -"+ c #D0E0D0", -"@ c #D0FFD0", -"# c #E0F0E0", -"$ c #D0D0FF", -"% c #F0F0F0", -"& c #E0E0FF", -" ", -" ", -" ", -" ........ ", -" ....++++++++.... ", -" ....++++++##@##+++++.... ", -" ..++++++##+++#@#+++@++++++.. ", -" .+++@@@##@@@@@##+#@@@##@@@+++. ", -" .++++++@#@@@#+##@@@@@#@++++++. ", -" ..++++++@+++#@#+++##++++++.. ", -" $....++++++#@##++++++....$ ", -" $$$$$....++++++++....$$$$$ ", -" $$$$$&&&&........&&&&$$$$$ ", -" $$$$$&&&&%%%%%%%%&&&&$$$$$ ", -" $$$$$&&&&%%%%%%%%&&&&$$$$$ ", -" .$$$$$&&&&%%%%%%%%&&&&$$$$$. ", -" .+$$$$$&&&&%%%%%%%%&&&&$$$$$+. ", -" .++$$$$&&&&%%%%%%%%&&&&$$$$++. ", -" ..++++&&&&%%%%%%%%&&&&++++.. ", -" $....++++%%%%%%%%++++....$ ", -" $$$$$....++++++++....$$$$$ ", -" $$$$$&&&&........&&&&$$$$$ ", -" $$$$$&&&&%%%%%%%%&&&&$$$$$ ", -" $$$$$&&&&%%%%%%%%&&&&$$$$$ ", -" .$$$$$&&&&%%%%%%%%&&&&$$$$$. ", -" .+$$$$$&&&&%%%%%%%%&&&&$$$$$+. ", -" .++$$$$&&&&%%%%%%%%&&&&$$$$++. ", -" ..++++&&&&%%%%%%%%&&&&++++.. ", -" ....++++%%%%%%%%++++.... ", -" ....++++++++.... ", -" ........ ", -" "}; +". c #5F6431", +"+ c #496E14", +"@ c #AF5C57", +"# c #916864", +"$ c #5F8B22", +"% c #878882", +"& c #9C9D9A", +"* c #C1C2BF", +" * ", +" *** ", +" &**** ", +" &&**** ", +" &&***** ", +" &&&***** ", +" &&&***** ", +" &&&&******", +" &&&&******", +" #####&&&&&&*****", +" #######&&&&&***** ", +" #####@#&&&&&&***** ", +" ####@@@##@@##***** ", +" ##@@@@@@@@@@@&**** ", +" ###@@@@@@@@@@@#*** ", +" #@@@@@@@@@@@@@@&** ", +" .#@@@@@@@@@@@@@@#* ", +" .+.#@@@@@@@@@@@@@@#.+. ", +" +++##@@@@@@@@@@@@@@@#+++ ", +" +++ ###@@@@@@@@@@@@@@# ++ ", +" +++ ###@@@@@@@@@@@@@## +++", +" +++ ###@@@@@@@@@@@@@# ++$", +" ++++##@@@@@@@@@@@@@@# ++$$", +" $++.##@@@@@@@@@@@@##++$$ ", +" $$++.#@@@@@@@@@##.++$$ ", +" $$$++++......+++$$$$ ", +" %%%+$$$$$$$$+$$$$$$ ", +" %&%%&&%..+$$$$+.. ", +" %%%&&****######## ", +" %%%&&&&*&* ", +" && %&&*&& ", +" & "}; ADDED icons/icon_info.xpm Index: icons/icon_info.xpm ================================================================== --- icons/icon_info.xpm +++ icons/icon_info.xpm @@ -0,0 +1,372 @@ +/* XPM */ +static const char * icon_info_xpm[] = { +"128 113 256 2", +" c None", +". c #583F32", +"+ c #653D22", +"@ c #4A4625", +"# c #643E2B", +"$ c #4F452E", +"% c #6E3C2D", +"& c #3A5016", +"* c #5E432D", +"= c #3C4F1C", +"- c #3A5211", +"; c #404F23", +"> c #784129", +", c #92392C", +"' c #495025", +") c #873D2C", +"! c #77413D", +"~ c #3F590F", +"{ c #3F5917", +"] c #6D4745", +"^ c #973D30", +"/ c #42591F", +"( c #8D4226", +"_ c #944028", +": c #864521", +"< c #84452E", +"[ c #844626", +"} c #475829", +"| c #4F5536", +"1 c #3E5F14", +"2 c #3F600B", +"3 c #824743", +"4 c #7B4947", +"5 c #9E4228", +"6 c #8E453B", +"7 c #6A5040", +"8 c #6F4E4D", +"9 c #535843", +"0 c #3F6505", +"a c #8B4846", +"b c #4E5E24", +"c c #894B3F", +"d c #476221", +"e c #9B4925", +"f c #9C492C", +"g c #964A38", +"h c #944A45", +"i c #6B5554", +"j c #76534A", +"k c #426815", +"l c #4B651C", +"m c #9B4946", +"n c #655A43", +"o c #47671C", +"p c #A9473B", +"q c #85504E", +"r c #486815", +"s c #8C4F4A", +"t c #8B4F4F", +"u c #466B0E", +"v c #AA4844", +"w c #536339", +"x c #536430", +"y c #924F4C", +"z c #A54B47", +"A c #7C5749", +"B c #446F04", +"C c #994F4F", +"D c #476D19", +"E c #436F11", +"F c #586443", +"G c #A14E4B", +"H c #795A4A", +"I c #496E12", +"J c #9C504B", +"K c #5C644D", +"L c #417309", +"M c #6B6140", +"N c #506C2B", +"O c #6F5E5C", +"P c #985351", +"Q c #B04D46", +"R c #48720A", +"S c #AF4D4C", +"T c #9D5347", +"U c #66625B", +"V c #825A58", +"W c #785E5C", +"X c #6B6352", +"Y c #4D7217", +"Z c #AB514C", +"` c #746153", +" . c #965752", +".. c #A65350", +"+. c #45770E", +"@. c #497518", +"#. c #77624E", +"$. c #487802", +"%. c #B4514A", +"&. c #965958", +"*. c #B4514F", +"=. c #8B5C5D", +"-. c #4C7710", +";. c #507424", +">. c #A35751", +",. c #AE5454", +"'. c #B0544F", +"). c #B75346", +"!. c #915D59", +"~. c #A35857", +"{. c #A5594D", +"]. c #A75A48", +"^. c #836263", +"/. c #A05B58", +"(. c #AC5854", +"_. c #7F6463", +":. c #B9554E", +"<. c #85635E", +"[. c #786766", +"}. c #8B6260", +"|. c #6B6C5E", +"1. c #B95654", +"2. c #4D7E08", +"3. c #8E635C", +"4. c #4F7D17", +"5. c #B55954", +"6. c #AF5B58", +"7. c #68705A", +"8. c #9E605E", +"9. c #9C6254", +"0. c #6E6E6B", +"a. c #B65B5A", +"b. c #8F6664", +"c. c #A6605D", +"d. c #63764B", +"e. c #B95C50", +"f. c #AB5F5E", +"g. c #BE5A58", +"h. c #956565", +"i. c #976661", +"j. c #8A696A", +"k. c #B95D57", +"l. c #AE605A", +"m. c #8C6965", +"n. c #677654", +"o. c #9D6562", +"p. c #538314", +"q. c #C15C54", +"r. c #777254", +"s. c #627A44", +"t. c #816D6C", +"u. c #B4605C", +"v. c #627C3B", +"w. c #7C7071", +"x. c #C25E5B", +"y. c #508717", +"z. c #51880B", +"A. c #886E6D", +"B. c #558520", +"C. c #986B5E", +"D. c #AA6752", +"E. c #956B69", +"F. c #AC6562", +"G. c #A56766", +"H. c #BE615B", +"I. c #A16966", +"J. c #B86360", +"K. c #B3655F", +"L. c #9B6B6B", +"M. c #C16257", +"N. c #BE6261", +"O. c #568B00", +"P. c #7A7572", +"Q. c #767A51", +"R. c #757774", +"S. c #AA6963", +"T. c #5F8530", +"U. c #AF6865", +"V. c #C7625F", +"W. c #967067", +"X. c #538F04", +"Y. c #AA6B6B", +"Z. c #B9685D", +"`. c #C3655F", +" + c #A56D6A", +".+ c #847676", +"++ c #B96B4D", +"@+ c #588E15", +"#+ c #B36D51", +"$+ c #728246", +"%+ c #B86A69", +"&+ c #B46C69", +"*+ c #C56867", +"=+ c #8F795F", +"-+ c #C8695D", +";+ c #7B7D7A", +">+ c #C16C5A", +",+ c #817C7B", +"'+ c #B66E6B", +")+ c #738460", +"!+ c #BC6E6C", +"~+ c #BE6E68", +"{+ c #BF7052", +"]+ c #5F9226", +"^+ c #AB7470", +"/+ c #B27270", +"(+ c #5A9611", +"_+ c #6E8B49", +":+ c #C56E6A", +"<+ c #599902", +"[+ c #977B78", +"}+ c #659134", +"|+ c #5D961E", +"1+ c #6A8F3F", +"2+ c #A37974", +"3+ c #7E856F", +"4+ c #818380", +"5+ c #738C56", +"6+ c #90807F", +"7+ c #5C9E0C", +"8+ c #858784", +"9+ c #639F1F", +"0+ c #8A8C89", +"a+ c #63A518", +"b+ c #AC8582", +"c+ c #7E975E", +"d+ c #9E8A89", +"e+ c #8E8F8D", +"f+ c #919390", +"g+ c #6AAC21", +"h+ c #949693", +"i+ c #7AA648", +"j+ c #8C9B83", +"k+ c #71AC32", +"l+ c #6FB019", +"m+ c #76AA40", +"n+ c #999B98", +"o+ c #9C9E9B", +"p+ c #9FA19E", +"q+ c #7BB938", +"r+ c #AFA1A2", +"s+ c #A4A6A3", +"t+ c #AAACA8", +"u+ c #ADAFAC", +"v+ c #B0B2AF", +"w+ c #B3B5B2", +"x+ c #C7B5B4", +"y+ c #B8BAB7", +"z+ c #BBBDBA", +"A+ c #C0C2BF", +"B+ c #C7C9C6", +"C+ c #CED0CC", +"D+ c #D0D2CF", +"E+ c #D3D5D2", +"F+ c #D7D9D6", +"G+ c #DEE0DC", +" ", +" s+ ", +" t+w+A+s+ ", +" p+t+z+A+A+z+s+z+ ", +" y+w+A+A+A+A+p+C+E+z+4+ ", +" A+C+u+A+A+A+z+s+E+E+z+t+;+ ", +" p+B+C+y+z+A+A+A+p+C+E+C+A+w+A+0+ ", +" p+C+C+C+v+A+A+A+z+s+E+E+y+F+E+y+ ", +" h+n+A+C+C+B+v+A+A+A+p+C+E+B+C+E+B+e+ ", +" h+p+p+C+C+C+w+A+A+A+z+t+E+D+z+F+E+s+f+ ", +" f+n+p+p+t+C+C+C+u+A+A+A+p+C+E+z+E+E+w+p+t+ ", +" f+8+p+p+p+w+C+C+A+y+A+A+z+t+E+C+A+E+B+p+E+A+f+ ", +" f+e+h+f+f+p+p+n+B+C+C+w+A+A+A+p+C+E+y+F+D+p+B+F+A+ ", +" o+f+p+8+o+p+p+h+C+C+C+u+A+A+z+t+E+B+B+E+u+w+F+B+s+ ", +" e+p+n+p+4+p+p+p+p+C+C+y+z+A+A+p+C+E+z+F+B+p+F+E+A+z+ ", +" e+u+n+p+p+4+p+p+o+u+C+C+v+A+A+z+t+E+z+E+D+n+C+F+z+F+A+t+ ", +" 8+t+u+h+p+n+8+p+p+f+B+C+B+v+A+A+p+C+C+A+E+t+z+F+z+F+F+C+y+ ", +" ;+e+p+u+u+f+p+0+f+p+p+n+C+C+w+A+A+y+t+E+z+F+A+s+F+B+C+F+C+C+A+ ", +" 4+h+u+u+t+f+p+4+o+p+p+s+C+C+u+A+A+p+C+B+B+D+h+D+C+B+F+C+C+C+A+ ", +" 8+o+u+u+u+p+o+p+4+p+p+p+y+C+A+y+A+y+t+E+z+E+s+A+E+A+F+B+C+C+C+B+ ", +" ;+h+t+u+u+u+n+p+p+4+p+p+h+B+C+w+A+A+p+C+A+D+z+s+F+z+F+C+C+C+C+C+C+ ", +" 0+s+u+u+u+u+h+p+f+e+p+p+p+C+C+u+A+y+u+C+A+C+n+E+A+E+D+B+C+C+C+C+C+n+ ", +" 4+o+t+u+u+u+u+f+p+e+f+p+p+v+C+y+z+A+s+C+y+E+p+B+B+C+E+B+C+C+C+C+C+C+o+ ", +" s+h+t+u+u+u+t+h+p+4+o+p+s+y+C+v+A+y+u+B+B+y+t+C+B+E+B+C+C+C+C+C+C+w+y+ ", +" e+z+f+u+u+u+u+p+n+o+4+p+p+n+C+B+w+A+s+D+y+C+n+F+z+E+B+C+C+C+C+C+C+u+C+F+ ", +" 4+w+z+e+u+u+u+u+n+p+e+e+p+n+t+C+w+A+y+v+A+C+p+C+z+F+A+C+C+C+C+C+C+t+D+F+F+w+ ", +" h+z+z+8+u+u+u+u+h+p+0+f+p+s+v+C+u+A+s+C+z+w+w+A+D+A+C+C+C+C+C+B+t+E+F+F+F+y+ ", +" ;+w+s+z+8+u+u+u+u+f+p+0+f+p+s+A+A+y+y+w+z+C+n+B+B+z+B+C+C+C+C+A+t+F+F+F+F+A+z+ ", +" 4+p+v+y+0+u+u+u+t+f+p+4+o+n+t+C+w+A+s+B+B+p+B+A+A+B+C+C+C+C+z+v+F+F+F+F+y+C+A+ ", +" ;+u+w+u+h+u+u+u+o+o+f+0+p+p+w+C+u+y+w+y+y+z+z+B+z+C+C+C+C+v+y+F+F+F+C+z+F+F+z+ ", +" ;+s+s+z+t+p+u+u+u+n+p+0+h+p+t+w+y+z+s+A+A+t+z+C+w+C+C+C+C+t+A+F+F+F+B+A+F+F+F+w+ ", +" f+v+s+z+s+o+u+u+u+h+p+f+f+n+t+B+v+y+w+z+n+A+B+u+C+C+C+C+s+B+F+F+F+z+B+F+F+F+F+ ", +" w.w.[..+.+[.0.U O w..+ 8+v+v+s+z+s+h+u+u+u+f+p+h+f+n+u+B+w+o+h+o+w+B+t+C+C+C+B+o+B+F+F+E+y+E+F+F+F+F+B+ ", +" w.t.W W W W O W W ^.i i i i i W O [.P.4+t+v+v+s+z+s+h+u+u+t+h+n+e+o+s+v+w+y+;+0+s+z+t+C+C+C+B+p+D+F+F+B+z+F+F+F+F+F+F+A+ ", +" P.[.O W O <.<.<.}.}.}.h.b.h.L.}.}.}.^.}.}.^.w.p+v+v+u+t+z+s+h+u+u+o+o+e+n+o+w+v+u+f+4+h+y+u+B+C+C+z+p+E+F+F+A+B+F+F+F+F+F+F+F+w+h+ ", +" [.W W W <.^.W b.h.b.h. +}. + +h. +h.h.I.}.<.A.e+v+v+v+h+w+z+s+n+u+u+h+p+e+n+h+w+y+u+;+0+u+v+A+C+C+w+s+F+F+F+y+C+F+F+F+F+F+F+F+F+u+ ", +" w.O ^.W b.}.}.}.h.h.}.}.h.h.h.i.i.}.i.h.h.=.o.h.w.p+v+v+v+f+z+y+s+o+u+u+h+p+f+f+s+v+v+e+4+p+t+y+C+C+u+u+F+F+C+z+E+F+F+F+F+F+F+F+F+E+f+ ", +" [.W ^.W ^.h.}.h.h.I.i.h.I.o.&+o.&+o.&+I.&+Y.o.Y.o.[+;+p+v+v+v+n+z+u+u+n+u+u+f+n+h+f+v+t+e+;+e+t+v+C+C+s+y+F+F+B+A+F+F+F+F+F+F+F+F+F+F+A+ ", +" ,+_.^.^.^.L.}.}.}.h.Y.h.I.Y.o.&+G.G.&+o.&+S.G.&+i.&+L.4+e+p+v+v+v+p+z+t+w+h+u+s+h+0+o+f+A+n+;+8+p+o+C+C+p+A+F+F+z+B+F+F+F+F+F+F+F+F+F+G+G+s+ ", +" w._.^.^.h.L.h. +h.I.I.}.h.i.}.o.G.o.&+&+o.&+&+o.&+S.E.,+s+e+p+v+v+v+h+z+s+w+h+u+o+p+0+p+o+w+e+4+e+h+C+B+s+B+F+E+y+E+F+F+F+F+F+F+F+F+G+G+G+y+0+ ", +" .+W m.^.L.h.h. +h.G.&+o.&+&+o.&+%+G.o.G.G.!.G.G.!.S.G.P.h+s+f+p+v+v+t+n+z+s+w+h+u+h+n+n+n+t+s+4+4+f+B+A+s+B+F+C+z+F+F+F+F+F+F+F+F+G+G+G+G+G+ ", +" t.^.^.^.I.b.I. +h.G.&+G.G.&+&+o.!+!+G.!+!+!+G.~+~+G.~+W.f+o+s+f+p+v+v+s+s+z+s+w+n+u+h+h+t+e+A+8+4+8+A+z+s+C+F+A+B+F+F+F+F+F+F+F+G+G+G+G+G+G+A+ ", +" t.^.m.h.h.<.i. +h.Y.&+Y.G.&+&+o.%+!+!+G.!+!+!+G.~+~+G.^+,+p+s+r+e+d+[+^+8.o.b+d+v+e+r+[+6+t+0+s+4+;+y+w+u+E+E+v+C+F+F+F+F+F+F+G+G+G+G+G+G+G+G+ ", +" [.j.m.h.L.h.Y.h.V h.Y.Y.o.&+&+&+G.!+!+&+G.!+!+&+F.~+~+/+P.t+n+2+~.G G P J G .. .y t t q C .6+e+0+R.u+v+u+F+y+t+E+F+F+F+F+C+F+G+G+G+G+G+G+G+G+A+ ", +" O m.<.h.L.}.Y.Y.o.S.&+o.h.o.o.S.o.!+!+!+G.!+!+!+U.%+~+~+<.o+r+L.Z y G G ..q s y .q ..G J a C y ^.,+t+t+y+D+p+y+C+F+F+F+C+A+G+G+G+G+G+G+G+G+G+F+ ", +" [.^.^.h.L.h. +Y.I.G.&+&+G.&+!+!+G.8.F.G.G.!.S.S.G.o.G.F./.O V P J y t y C >...C Z ,...P G G y y h a q r+z+A+p+y+D+F+F+E+z+C+G+G+G+G+G+G+G+G+G+G+u+ ", +" w._.W h.L.h.I.Y.Y.o.&+&+&+G.!+!+!+G.:+:+:+~+F.:+:+:+U.:+*+v Q h '.S *.Z C Z '.'.P Z Z ,.C J m ..s C h y !.r+s+y+E+F+F+B+A+G+G+G+G+G+G+G+G+G+G+G+F+n+ ", +" ,+_.^.}.}.h.I.Y.Y.i.&+&+&+o.!+!+!+%+U.:+:+:+F.:+:+:+:+U.*+Q S S h '.S *.S P Z '.Z (.P Z ,.'.a m (.G 3 C ~.s V z+F+F+D+z+E+G+G+G+G+G+G+G+G+G+G+G+G+t+ ", +" [.m.<.L.b.h.I.Y.o.&+&+&+S.U.!+!+!+G.:+:+:+:+G.:+:+:+:+U.k.S *.S h '.S *.S P Z '.Z 5.y Z ,.,.G y G m ..q .s &.b+E+z+B+G+G+G+G+G+G+G+G+G+G+G+G+E+z+ ", +" w.j.^.L.L.h.Y.I.h.o.&+&+&+G.!+!+!+!+F.:+:+:+:+F.:+:+:+:+U.S S '.Q h '.S *.S '.J '.Z 5.(.C ,.'.z h h m y y t f.f.q [+F+G+G+G+G+G+G+G+G+G+G+E+y+t+z+w+ ", +" _.^.E.L.b.Y.Y.Y.o.&+I.o.o.&+!+!+!+U.~+:+:+:+~+F.:+:+:+:+>.v S '.Q G G *.*.*.'.C '.'.5.'.y ,.Z m y 3 /...6. .~.J /.i.C+G+G+G+G+G+G+G+C+A+u+t+A+C+B+ ", +" .+j.}.L.h.o.Y.Y.i.&+&+&+&+G.G.G.G.G.G.:+:+:+:+F.:+*+N.N.k.m S S '.Q S J *.*.*.'.C '.'.6.J y q y m Z 6.J (.(.6.t f.F.8.b+G+G+G+G+C+A+A+w+y+B+C+C+C+t+ ", +" _.W L.L.h.Y.Y.Y.o.&+&+&+G.%+:+J.u.>.h 6 6 6 6 c 6 ) ) 6 m y G G ..m G s J J J J y y >...*.%.>.Z '.S S P u.6.u.c.c.F.F.!.x+C+A+A+B+z+y+C+C+C+C+C+z+ ", +" .+_.<.L.b. +Y.Y.i.&+&+f.>.h g ^ , _ ) 5 ^ 5 5 5 ) 5 5 5 v '.h Z Z 5.Q %.J :.%.:.1.%.G 1.1.%.*...'.v '.N.6.>.J.J.J.&.F.f./.=.B+B+z+A+C+C+C+C+C+C+B+ ", +" A.^.E.}.h.Y.G. .3 ) ) ) ) ) , _ ( ( < f e f e f < 5 f p Q 1.J %.%.:.%.%.J :.%.1.1.%.G 1.1.Q 1.*.C N.N.5.a.c.J.J.u.~. .f.8.q [+B+C+C+C+C+C+B+v+C+v+ ", +" .+_.b.h.V 3 % ) % ( ( ( ( > ( ( ( ( ( [ e e f f f g f p %.Q 1.J %.%.:.%.:.J :.%.g.1.%.G 1.1.Q *.1./.k.5.N.N.l.>.6.u.J.&.&.P /.!.A+C+C+C+z+y+z+u+v+ ", +" t.8 4 % % > > % % ( ( : [ < ( ( ( f < ].%.e.H.*+F.*+%.Q 1.Q 1.G %.%.:.%.:.J :.%.g.1.%.z 5.1.Q 1.1...6.k.k.k.N.c.J.6.P P &.f.f.!.b+B+y+y+B+C+w+4+ ", +" 9 . # % # > > > > < > > [ > f g (.J.~+F.:+:+:+:+:+F.H.Q 1.1.%.*.>.%.:.:.%.:.J :.%.g.1.%.1...1.*.*.1.g.~.N.N.N.N.~.P /.u.u.&.f.f.P E.A+C+C+C+B+ ", +" F / ' . + + # > > > > [ ( g .!.F.&+~+~+!+F.:+:+:+:+:+c.v %.1.1.%.S >.%.:.%.%.:.J :.%.g.1.Q g.(.*.g.g.`.`.c.N.f.~.~.6./.u.u.u./.P ~.c.!.x+C+C+C+f+ ", +" |.F / o r @ . + + > [ > > c >.U.&+S.&+~+%+F.F.o.U.~+:+:+:+*+h *.1.1.1.%.S >.%.:.%.%.:.G '.%.g.1.Q g...1.5.u.l.l./.P a.N.N.k.P (.z ,.6.!.c.c.&.b+C+C+u+N / w ", +" w / k d o d $ * + * > > c !.&+&+&+&+G.~+~+~+~+~+F.:+~+%+%+f.h y J C >...Z Z ..%.1.%.Z '.G C G >.>.J >. .>.u.N.g.g.x.~.5.5.5.*.J (.u.u.u.&.c.c.c.V B+B+s.I r k d w ", +" K / r D D E D I $ # * # s G. +o.&+&+&+&+S.~+~+~+~+~+U.:+:+:+*+S Z (.:.:.k.5.Z J D.D.D.D.D.#+#+>.e.M.q.).M.e.6.g.g.g.1.1.>.k.5.5.k.N./.u.u.u.f.&.c. .=.r+0+R D I D k o } K ", +" w / u r R D +.@.b * # 8 h.I. +h.&+&+&+&+&+F.~+~+~+~+!+%+:+:+:+k.S J 5.:.:.q.:.:.Z #+{+{+{+{+{+{+{.q.M.:.q.).e.G :.g.g.V.g.>.5.N.N.N.N./.u.u.u.u.&.8.8.!.[+* l D o d u d E d x n. ", +" n.d d u o r d D o 2.' . }.<.I.h.h.o.&+&+&+&+G.!+~+~+~+~+%+~+:+:+:+Q S J :.:.%.q.:.:.'.#+{+{+{+{+{+{+T M.q.M.).e.M.l.V.x.g.g.x.6.u.N.N.N.N./.l.u.J.K.!.8.c.8.=.! | D o R o L o B o l d. ", +" w 1 o B r L D $.D D N U ^.E.}.I.I.I.h.G.&+&+&+G.~+~+~+~+~+F.:+:+:+S Q S J :.:.%.q.:.:.(.{+{+{+{+{+{+{+T :.e.q.-+-+-+>.g.g.x.x.x.x.~.N.N.N.N.J.c.K.c.c.c.8.c./.h.I.U } u o R o R r B o o w ", +" w 1 o B r L r $.D +.N P.b.E.b.I.I.L.I.S.o.o.&+G.~+~+~+~+~+F.:+:+S Q S Q J :.:.%.:.:.:.(.++{+{+{+++{+{+T q.q.-+-+M.M.l.x.x.x.x.x.V.c.N.N.N.N.J.!.c.K.K.K.!.c.F.h.I.d+ } u o D d u d o d o w ", +" F d d u d D d I r $.d .+E.b.h.I.I.h.S.&+&+&+o.G.F.%+~+~+~+U.:+S v *.Q S J :.:.:.:.:.:.>.{+{+{+{+++{+{+{.).M.M.M.M.M.{.1.1.g.g.V.`.f.N.u.f.f.u.c.K.K.K.K.!./.&+o.h.[+ ; r o B r L r $.r D v. ", +" s.o k B u R E E u u / .+^.<.I.I.I.h.&+&+&+&+I.!+!+&+S.F.U.U.Q S Q *.S S >.:.:.:.:.:.:.>.{+{+{+{+++{+{+{.:.M.M.M.M.-+Z.J.`.`.`.J.l./.c.J.N.N.N.f.K.K.K.K.&.F.&+I.}.[+ & 0 u u E E u E u o s. ", +" o E r L r $.r $.r u w w._.^.I.I.I.h.&+&+&+&+I.!+!+!+!+!+F.h m J m J G Z >.:.:.1.:.:.:.{.{+++{+{+++{+++D.-+M.M.-+:+`.K./.l.l.l.N.`.N.f.N.N.N.N.l.f.K.K.K.&.&+&+o.b.[+ K k o B d u d I o E o ", +" N o k B u B R u E E l w.j.^.h.I.I.i.&+&+&+&+G.!+!+!+!+!+G.v Z Z S S z J C ....>.G ....>.D.].D.D.].].D.9.l.l.K.K.J.J.`.l.`.`.`.x.x.k.~.a.k.k.k.5.P ..(.l.S.Y.o.I.}.[+ ' ~ d 1 B B D R d o N ", +" d k o u o u o r d o w w.j.^.b.h.I.o.&+&+&+&+G.!+!+!+!+~+y v '.Z Z S S ..Z 1.*.1.%.%.*.C :.).M.e.).e.M.>.q.q.q.q.q.q.q.(.g.g.x.x.x.g.P 5.5.a.k.k./.l.!+!+!+=.I.Y.}.[+ 9 0 1 0 u L D $.D +.-. ", +" s.r $.r $.r L k B k u 7. [.j.<.L.h.<.G.&+&+&+&+G.!+!+!+!+..a S Z '.Z S S J Q 1.1.1.%.%.%.J :.).e.:.M.-+-+l.V.V.V.V.V.V.q.>.g.g.g.g.x.`.c.N.N.k.k.k.P K.!+U.G.h.Y.Y.}.A. 9 0 1 u k L D $.D $.I s. ", +" o D $.D $.r L k B k u 7. 6+j.<.L.L.}.o.o.S.&+S.F.!+!+!+(.z C S '.'.Z S S J %.1.%.1.%.%.:.J e.).).M.-+-+-+c.q.q.q.x.q.x.V.l.`.`.`.`.`.`.f.k.N.N.N.N.c.&+G.U.&+i.Y.Y.}.A. 9 { / 2 d u d u r $.I ;. ", +" D D $.D $.r B d u r 0 K .+j.^.L.L.b.Y.Y.o.o.o.!+!+!+(.z ..h S '.'.Z S S J %.1.1.1.%.Q 1.>.e.).e.M.M.M.M.>.V.V.V.V.V.x.x.6.x.g.g.g.g.g.~.k.5.5.5.6.8.G.&+&+&+h.Y.Y.^. |.~ 1 0 u L u L o Y N D ", +" I D I d D o u u 2 k { F _.^.L.L.b.Y.Y.Y.Y.i.G.F.G z z ..h *.'.'.S S S J %.1.%.1.%.Q 1.>.%.M.M.M.M.M.M.l.x.x.x.x.V.V.V.l.H.H.g.g.g.g.>.a.6./.c.%+G.&+&+&+&+i.Y.Y.W w ~ 0 2 L B I $.E 2.-.-. ", +" o D $.I $.L u L k 0 1 d [.^.L.L.b.Y.Y.Y.Y.o.%+f.a a a J h *.Z '.S S S J :.%.%.1.%.Q 1.G M.-+-+-+-+-+-+l.V.V.x.x.g.x.x.6.g.x.V.H.k.6.P /.>.u.:+:+F.&+&+&+&+o.Y.h._. - ~ 0 r L u L $.R 2.-.-. ", +" I -.$.+.R $.u L B k 0 2 n. t.W h.L.b.Y.Y.Y.Y.o.f.m m ..m P s C J >.,.'.S J :.%.%.1.:.%.Q >.-+-+M.M.M.M.M.l.g.q.x.V.V.V.V.6.a.(.>.>.f.N.l.(.u.:+:+:+S.&+&+&+&+o.o.}.[+ 7.& { { o u r L L +.2.2.;. ", +" x 2.@.$.E $.R u E d 1 { / .+_.<.b.b.Y.Y.Y.Y.!.m G ..G m J h '.z ..G C h y ..G G ..(.S Q J e.M.M.-+-+>+>+l.u.u.l.l.l.l.l. .u.N.N.N.N.N.l.6.:+:+:+:+S.&+&+&+&+=.h.b.A. & { 2 k B u R E r Y @.z.v. ", +" d.-.R $.R u I o k B 1 0 { b [.b.m.^.Y.Y.Y.Y.t m ....G m G J '.z ,.z '.z J 5.S Q 5.z ..l./.6.6.6.6.6.6.(.~.(.g.g.g.g.k.k.~.5.5.5.5.5.5.6.~+:+:+:+:+F.&+&+&+o.}.I.}. / - 2 1 B B I $.R 2.z.@.-.d. ", +" o $.D -.@.L $.u B B 1 0 { { [.j.E.^.h.I.Y.y 3 G ....m G m J '.Z Z Z '.z J 5.S 5.S *.H.k.>.x.H.x.g.g.g.g.6.5.g.g.g.1.*.*.J '.5.k.k.k.k.%+!+:+:+:+:+F.&+G.o.Y.h.I.t. / - 2 1 B B u $.L 4.z.4.X.4.)+ ", +" s.-.p.$.2.E L $.u B L r 0 ~ { .+^.E.b.h.h.4 a t G ....m G m J Z Z Z z '.z J *.5.S Q *.*.5.>.g.g.g.x.`.`.`.u.N.H.H.g.H.H.H./.N.N.N.N.k.:+%+%+:+:+:+:+G.o.Y.Y.o.I.L. ' = { { k k r $.$.@.z.2.z.p.1+ ", +" ;.z.p.$.2.I L $.u B u d { { ' F W E.E.V a 3 q 4 P ....m G J J Z '.z z '.z J '.Q *.k.k.k.5.>.g.g.g.g.g.g.g.6.k.H.H.H.H.H.H./.N.N.N.k.*+:+%+%+:+!+F.G.o.Y.Y.Y.i.I.E. w = ~ 1 k B u u E D o z.y.p.z.T. ", +" ;.z.2.$.2.I R D o k B u 1 2 - } |.E.j.] 3 t t q y t s C G J J Z '.z z '.'.J S S k.k.k.k.k.f.H.H.H.H.H.H.H.6.5.1.1.1.1.1.1.J 5.5.k.H.:+:+%+S.G.G.%+!+G.Y.Y.Y.h.h.P.; - 2 1 E B u R $.L -.z.Y @.X.T. ", +" c+;.z.4.$.-.Y R $.L D E B u 1 1 - w U ] 3 t t q a C h y t a y Z '.z z ,.z C *.*.S S *.S S G *.*.1.1.1.1.1.,.'.1.1.1.1.1.k.~.5.*+*+~+U.U.o.U.!+!+!+!+o.Y.Y./+<.9 ; = { r B B D $.$.R p.z.y.y.@+;._+ ", +" _+Y 4.@.2.z.p.@.L $.R u B B k 1 / = | 7 q t t t C h h C C 3 y P y C h ,./.k.k.k.5.1.5.5.>.1.1.1.g.k.H.H.u.N.`.`.`.`.`.H.P c.U.F.%+!+~+G.%+!+!+!+!+o.^+#.| & - ~ 2 u k o I $.$.@.z.z.p.X.X.@+1+ ", +" 5+B.z.X.4.p.z.2.E $.$.E D o k k 1 ~ - = $ j q C h h C C 3 ....m m m P &.~.~.~.f.f.f.l./.u.u.u.u.u.u.l.f.c.f.f.f.f.f.>.F.!+~+~+~+~+~+G.!+!+!+'+ +n ; - ~ 1 k B E u I $.I D 4.z.z.p.(+@+@+c+ ", +" s.B.p.X.z.4.z.z.-.E I R E u u B E 2 ~ ~ - ; n 4 y C C 3 G m G l.l.l.&.6.6.6.6.6.6.u.8.l.u.u.u.u.J.J.c.u.J.J.J.J.a.:+F.~+~+~+~+~+~+G./+W.#.| = = ~ 1 E B u u R $.$.@.-.z.@.p.@+(+@+}+ ", +" T.p.z.X.p.2.z.-.-.@.L $.$.I u u B u 2 { = & = | 7 7 s ~.l.l.l.l.&.u.u.u.u.u.u.6.P 5.a.a.5.a.a.J./.u.J.J.J.a.:+:+F.~+~+!+/+C.#.| = & - ~ 2 u k k k I $.$.R -.p.X.O.p.y.@+@+@+1+ ", +" )+T.y.z.z.4.p.z.z.p.-.E $.$.R u u r u u k 2 1 { & & ; | 7 A q 3./.F.6.6.6.6.6./.a.a.a.a.,.'.'.P Z '.5.!+'+^+C.H #.n | ; - - ~ 2 u B B u u u E D $.R -.p.X.z.p.@+<+(+(+B._+ ", +" v.p.B.@+(+@+p.p.z.z.2.-.R $.D E I u u u B B E k 2 1 & = & & = ; ; F n #.H ` H H H 7 ` ` X n n n | ; = & & & { ~ 1 2 l B B u u u E $.$.$.R -.o z.X.z.p.@+<+(+9+|+1+ ", +" 1+]+(+@+(+(+p.p.z.z.z.Y @.R R $.$.$.R I u u u u B B u u k 2 2 1 1 ~ - & - { ~ ~ ~ ~ ~ ~ ~ { 1 2 k u B B B u u k r r E $.$.$.R -.4.p.X.X.z.;.p.(+<+(+9+|+_+ ", +" R.0.n.B.|+|+@+<+@+p.@.p.X.X.z.p.4.-.@.R $.$.R r E I I u u u u k u B r B B B B B B E u u u r o u u u I E R +.$.$.$.R R R 4.p.X.X.X.p.y.@+(+7+B.(+9+]+s. ", +" 0+R.R.4+4+f+4+3+v.]+|+@+@+@+(+@+y.p.p.z.X.X.z.p.-.o R R R +.$.$.$.$.$.$.R r E R R R R R R +.$.$.$.I $.$.$.+.R R -.-.4.p.p.4.X.X.z.p.@+@+7+7+(+9+a+]+}+d. ", +" R.4+n+0+8+f+h+0+n+4+n.T.]+a+9+(+(+7+<+X.@+y.p.p.z.p.X.X.z.z.y.p.2.4.4.-.-.o R -.-.-.-.-.-.-.-.-.-.;.4.p.p.z.X.X.X.X.@+p.p.p.4.@+<+7+(+(+a+9+9+}+5+ ", +" e+;+h+h+f+8+e+n+n+e+n+e+0+p+R.)+_+]+9+9+7+(+@+(+7+<+4.@+@+@+y.y.p.p.z.@+X.X.X.p.X.X.X.X.X.X.X.X.X.X.X.p.z.z.p.p.@+@+@+@+(+7+7+7+y.(+7+a+9+]+_+ ", +" 0+n+h+h+8+e+e+e+f+e+e+e+f+p+o+p+p+A+u+j+5+1+|+9+a+9+p.(+(+(+<+7+7+7+<+(+@+@+@+4.@+@+@+@+@+@+@+@+@+@+|+|+p.7+7+7+<+(+(+9+a+g+l+g+9+]+1+s. ", +" 0+R.n+o+0+h+8+f+f+8+f+e+f+f+e+w+s+t+p+f+e+f+p+s+P.X M v.T.|+9+a+a+a+g+a+a+7+9+(+@+B.(+(+9+9+9+9+9+9+9+k+g+g+]+g+l+g+g+g+9+]+1+$+Q.r.3+ ", +" R.R.R.f+o+f+f+8+0+n+4+h+0+0+n+n+8+0+f+p+p+n+n+e+4+8+P.8 4 q V W H #.M M x $+T.}+|+9+q+q+q+q+q+k+k+k+m+m+m+m+i+1+_+Q.r.=+W.L.L.h.h._..+ ", +" ;+0.;+R.0+e+n+f+0+8+4+s+4+n+e+o+f+v+y+w+s+h+f+h+p+s+t+s+o+n+w.] ] ] 4 3 3 ! ! 4 s 8. +2+W.W.W.2+2+b+^+I.I.h. +^+^+^+Y.h. + + + +^.^.t. ", +" 0.4+4+e+4+0+e+f+e+;+f+e+o+e+h+w+A+z+w+y+B+G+G+G+G+C+B+F+E+C+B+A+n+i i 8 q q q t V + + + + + +h.Y.Y.Y.Y.Y.i.I.Y.Y.Y.Y.I.h.I.h.}.W A..+ ", +" R.0.0+8+0+0+8+f+8+o+4+n+R.p+A+z+t+n+n+s+w+z+w+y+A+G+G+G+G+G+G+G+G+G+B+d+W i ] V }.<.h.I. + + + +h.Y.Y.Y.Y.Y.h.Y.Y.o.h.h.<.}.b.b.[..+ ", +" 0.R.;+;+8+8+f+4+h+4+p+;+s+y+p+h+s+u+t+t+p+s+p+t+w+u+t+y+A+F+G+G+G+G+G+G+G+B+w.t.j.m.E._.b.}.}.}.b.<.h.h.h.b.b.<.}.b.E.L.<.b.j.[+ ", +" R.0.R.;+8+;+8+;+n+8+h+;+o+w+p+h+h+o+o+p+t+A+B+z+w+t+p+v+t+s+s+f+s+A+F+G+G+G+C+ .+A.W b.E.E.E.<.L.L.L.L.L.<.L.b.m.[+.+ ", +" p+8+R.;+R.;+;+;+0+R.f+e+e+p+p+e+0+h+n+o+n+t+t+n+t+v+z+A+B+B+B+B+A+v+s+h+4+p+A+B+ [.w.t.[.W [.t.t.[.w.w. ", +" p+p+e+8+;+;+;+;+8+R.;+8+f+o+s+w+o+8+e+h+f+f+p+s+n+t+u+u+s+h+p+t+w+w+w+w+v+A+o+0. ", +" p+s+h+8+e+n+h+;+R.R.8+8+8+0+f+8+0+0+0+h+p+s+o+n+u+s+h+f+h+e+8+p+v+u+p+f+n+v+w+n+ ", +" n+s+o+e+e+p+n+4+;+ ;+;+;+e+n+f+o+t+z+B+y+s+f+f+8+4+e+h+s+s+t+n+s+v+s+h+f+s+A+t+p+ ", +" o+s+s+n+h+s+o+8+0. 0+0+8+4+R.8+4+8+p+n+w+C+F+F+F+D+z+s+h+8+f+t+w+s+p+u+t+t+ ", +" h+s+t+p+p+s+s+0+R. 8+8+8+f+4+;+o+h+h+s+A+F+F+F+F+F+y+0.0.h+u+v+ ", +" h+e+n+s+t+v+f+4+ 8+e+p+f+8+8+;+e+8+8+w+E+E+v+ ", +" 0+4+e+f+o+n+8+ o+s+u+u+o+8+o+e+h+ ", +" f+n+ s+t+p+o+ ", +" "}; ADDED icons/kill_spindex.xpm Index: icons/kill_spindex.xpm ================================================================== --- icons/kill_spindex.xpm +++ icons/kill_spindex.xpm @@ -0,0 +1,143 @@ +/* XPM */ +static const char * kill_spindex_xpm[] = { +"16 16 124 2", +" c None", +". c #ECCE40", +"+ c #EBCC3F", +"@ c #EACB3E", +"# c #E9C93C", +"$ c #E9C73B", +"% c #E8C43A", +"& c #E7C238", +"* c #E6C036", +"= c #E5BD35", +"- c #E4BB33", +"; c #E3B831", +"> c #FAED9A", +", c #F9EB99", +"' c #F9E897", +") c #F8E594", +"! c #F7E291", +"~ c #F6DF8E", +"{ c #F5DB8B", +"] c #EBC756", +"^ c #F1D964", +"/ c #FAEB9A", +"( c #F4D848", +"_ c #F3D344", +": c #F1CE3F", +"< c #F0C83A", +"[ c #F5DC8C", +"} c #EDCB62", +"| c #EACA3D", +"1 c #F9E993", +"2 c #F7E172", +"3 c #F3D445", +"4 c #F2CE41", +"5 c #F0C93C", +"6 c #F5DC8A", +"7 c #EFD070", +"8 c #E4BB3D", +"9 c #EFD45B", +"0 c #F9EA99", +"a c #F4D647", +"b c #F2D042", +"c c #F0CB3D", +"d c #F3D56E", +"e c #F3D77F", +"f c #E7C04A", +"g c #F5E180", +"h c #F8E68E", +"i c #F3D243", +"j c #F1CD3F", +"k c #EFC739", +"l c #EAC658", +"m c #ECCD4F", +"n c #F9E998", +"o c #F3D54A", +"p c #F1CF45", +"q c #F0CA40", +"r c #EEC238", +"s c #F4D989", +"t c #E1B42E", +"u c #E0B12C", +"v c #DFAE2B", +"w c #DEAC29", +"x c #DCA927", +"y c #DBA625", +"z c #DAA323", +"A c #F2DA75", +"B c #F8E693", +"C c #F7E391", +"D c #F6E08D", +"E c #F5DB8A", +"F c #F4D788", +"G c #F2D384", +"H c #F1CF7F", +"I c #F0CC7C", +"J c #EFC97A", +"K c #E3B448", +"L c #E2B62F", +"M c #F3D786", +"N c #EBB62F", +"O c #ECBC4A", +"P c #F1CE80", +"Q c #D68B39", +"R c #C35812", +"S c #BC4204", +"T c #B94503", +"U c #E0B22D", +"V c #EECC70", +"W c #F2D283", +"X c #F1CE7E", +"Y c #D58A35", +"Z c #D17438", +"` c #F7B58D", +" . c #FED6B8", +".. c #F5A872", +"+. c #CB6B2D", +"@. c #DFAF2B", +"#. c #E7BD55", +"$. c #DEAA2E", +"%. c #BC4C06", +"&. c #F6B58D", +"*. c #FF924D", +"=. c #FF7711", +"-. c #FF8621", +";. c #EB8A40", +">. c #B94403", +",. c #E7BC4F", +"'. c #E6BA4C", +"). c #DCA726", +"!. c #FECDAE", +"~. c #FFFFFF", +"{. c #EF7F18", +"]. c #DFAE2D", +"^. c #DEAB2B", +"/. c #F49D63", +"(. c #FF7F18", +"_. c #F87600", +":. c #EE7600", +"<. c #E16803", +"[. c #C3571A", +"}. c #C96425", +"|. c #E67721", +"1. c #EA7905", +"2. c #DD6401", +"3. c #BD4D04", +" ", +" . + @ # $ % & * = - ; ", +" + > , ' ) ! ~ { ] ; ", +" + ^ / ( _ : < [ } ; ", +" | 1 2 3 4 5 6 7 8 ", +" 9 0 a b c d e f ", +" $ g h i j k [ l ", +" m n o p q r s t u v w x y z ", +"% A B C D 6 E F G H I J K z ", +"& * = - ; L M N O P Q R S T ", +" U V W X Y Z ` ...+. ", +" @.G #.$.%.&.*.=.-.;.>.", +" @.,.'.). S !.~.~.~.{.S ", +" ].^.y T /.(._.:.<.T ", +" w x [.}.|.1.2.3. ", +" T S T "}; ADDED icons/memdb_clock.xpm Index: icons/memdb_clock.xpm ================================================================== --- icons/memdb_clock.xpm +++ icons/memdb_clock.xpm @@ -0,0 +1,177 @@ +/* XPM */ +static const char * memdb_clock_xpm[] = { +"16 16 158 2", +" c None", +". c #C6AB7E", +"+ c #CDB378", +"@ c #D0B87B", +"# c #CDB47A", +"$ c #C4A971", +"% c #B99D71", +"& c #C2AA86", +"* c #D2BA78", +"= c #E3D9C8", +"- c #EAE7DD", +"; c #F1F1EE", +"> c #F0F0EC", +", c #E4E0D2", +"' c #D2C4A8", +") c #B89C67", +"! c #C0A885", +"~ c #DCCC97", +"{ c #EEEBE1", +"] c #D9E1EE", +"^ c #ACBEDF", +"/ c #96ADD5", +"( c #92AAD4", +"_ c #A3B7DC", +": c #CEDAE8", +"< c #DFD9C6", +"[ c #B69B68", +"} c #CCB374", +"| c #ECE9DF", +"1 c #C2CFE6", +"2 c #AEBFDF", +"3 c #DCE3F1", +"4 c #ECF1F3", +"5 c #EBF1F4", +"6 c #D9E2F1", +"7 c #A3BADC", +"8 c #AFC1DE", +"9 c #D8CFB7", +"0 c #A48358", +"a c #BCA177", +"b c #DBCFB7", +"c c #D7E0ED", +"d c #AABDDE", +"e c #FFFFFF", +"f c #EEF0F0", +"g c #DAE5E7", +"h c #F7FFFF", +"i c #F3FEFF", +"j c #98B4DC", +"k c #C4D1E1", +"l c #BBA473", +"m c #987C59", +"n c #BEA26D", +"o c #E6E1D3", +"p c #A4B9DB", +"q c #D6E3F1", +"r c #F5FBFE", +"s c #F3F5F5", +"t c #959E9F", +"u c #E9F0F0", +"v c #F2F8F8", +"w c #ADB9BE", +"x c #C2DAF0", +"y c #8BA7D1", +"z c #D3CAA9", +"A c #9B7B53", +"B c #BDA16C", +"C c #EEECE4", +"D c #8AA5D1", +"E c #E9F6FA", +"F c #EEF8FD", +"G c #F9FFFF", +"H c #798081", +"I c #A4AEB1", +"J c #777F81", +"K c #BAC6C9", +"L c #D3F0FA", +"M c #7295C9", +"N c #E2DFC9", +"O c #9E7B54", +"P c #B89A67", +"Q c #ECEADD", +"R c #819FCF", +"S c #E2F3FA", +"T c #E9F6FD", +"U c #E3F0F2", +"V c #848C8D", +"W c #C2CFD2", +"X c #EBFBFF", +"Y c #CCECFA", +"Z c #6D90C7", +"` c #E1DDC1", +" . c #9D7953", +".. c #AD8E5E", +"+. c #DDD3B7", +"@. c #90AAD1", +"#. c #C1DBF0", +"$. c #E6F7FF", +"%. c #E3F2FA", +"&. c #B6C0C5", +"*. c #DEEDF1", +"=. c #E8FCFF", +"-. c #A9C6AE", +";. c #719760", +">. c #668E4F", +",. c #5F8744", +"'. c #6E773E", +"). c #A0855E", +"!. c #C0A978", +"~. c #C6D1DA", +"{. c #88AAD9", +"]. c #EBFEFF", +"^. c #EEFAFF", +"/. c #F2FDFF", +"(. c #F2FEFF", +"_. c #ABC5A8", +":. c #81AB61", +"<. c #B4D495", +"[. c #D0E6BA", +"}. c #8FBB6A", +"|. c #578F2D", +"1. c #376B19", +"2. c #A28257", +"3. c #D8CCA2", +"4. c #A5B7CD", +"5. c #89AAD8", +"6. c #CFDFEF", +"7. c #F3F6FA", +"8. c #F3F5FA", +"9. c #618A49", +"0. c #B1D390", +"a. c #B1D692", +"b. c #8CBC65", +"c. c #8FBC67", +"d. c #A68855", +"e. c #D6C896", +"f. c #BFCACC", +"g. c #869FC8", +"h. c #7692C5", +"i. c #7390C4", +"j. c #4C7B31", +"k. c #B6D49C", +"l. c #B2D295", +"m. c #9A7850", +"n. c #B1975A", +"o. c #CEBD85", +"p. c #DED6A4", +"q. c #DED5A0", +"r. c #3E6E1E", +"s. c #8BBA62", +"t. c #87BA60", +"u. c #87B960", +"v. c #917553", +"w. c #93724E", +"x. c #97744D", +"y. c #606E31", +"z. c #538C28", +"A. c #8DBA64", +" ", +" . + @ # $ % ", +" & * = - ; > , ' ) ", +" ! ~ { ] ^ / ( _ : < [ ", +" } | 1 2 3 4 5 6 7 8 9 0 ", +" a b c d e f g h h i j k l m ", +" n o p q r s t u v w x y z A ", +" B C D E F G H I J K L M N O ", +" P Q R S T U V J W X Y Z ` . ", +" ..+.@.#.$.%.&.*.=.-.;.>.,.'. ", +" ).!.~.{.].^./.(._.:.<.[.}.|.1.", +" 2.3.4.5.6.7.8.9.0.a.e b.c.1.", +" d.e.f.g.h.i.j.k.e e e l.1.", +" m.n.o.p.q.r.s.t.e u.c.1.", +" v.w.x.x.y.z.A.l.A.z.1.", +" 1.1.1.1.1. "}; ADDED icons/memdb_load.xpm Index: icons/memdb_load.xpm ================================================================== --- icons/memdb_load.xpm +++ icons/memdb_load.xpm @@ -0,0 +1,140 @@ +/* XPM */ +static const char * memdb_load_xpm[] = { +"16 16 121 2", +" c None", +". c #BABABA", +"+ c #B8B8B8", +"@ c #B7B7B7", +"# c #B6B6B6", +"$ c #B4B4B4", +"% c #B3B3B3", +"& c #BBBBBB", +"* c #D0D0D0", +"= c #E8E8E8", +"- c #F3F3F3", +"; c #FDFDFD", +"> c #FCFCFC", +", c #EDEDED", +"' c #E0E0E0", +") c #C2C2C2", +"! c #ADADAD", +"~ c #E1E1E1", +"{ c #FEFEFE", +"] c #FFFFFF", +"^ c #FBFBFB", +"/ c #CFCFCF", +"( c #A9A9A9", +"_ c #B9B9B9", +": c #F8F8F8", +"< c #EAEAEA", +"[ c #A7A7A7", +"} c #F7F7F7", +"| c #E7E7E7", +"1 c #EFEFEF", +"2 c #F6F6F6", +"3 c #FAFAFA", +"4 c #F0F0F0", +"5 c #DEDEDE", +"6 c #C3C3C3", +"7 c #E6E6E6", +"8 c #A5A5A5", +"9 c #B5B5B5", +"0 c #EBEBEB", +"a c #D6D6D6", +"b c #D5D5D5", +"c c #D1D1D1", +"d c #BCBCBC", +"e c #C0C0C0", +"f c #E5E5E5", +"g c #A3A3A3", +"h c #F5F5F5", +"i c #EEEEEE", +"j c #E2E2E2", +"k c #CDCDCD", +"l c #6EA43C", +"m c #659F31", +"n c #DEE1DD", +"o c #A0A0A0", +"p c #B2B2B2", +"q c #F4F4F4", +"r c #DDDDDD", +"s c #E3E3E3", +"t c #C9C9C9", +"u c #67A036", +"v c #81B35A", +"w c #579828", +"x c #9B9E99", +"y c #B0B0B0", +"z c #6FA53D", +"A c #6EA338", +"B c #68A134", +"C c #629D30", +"D c #7CAF55", +"E c #AACB91", +"F c #74AB4F", +"G c #468F18", +"H c #AEAEAE", +"I c #F2F2F2", +"J c #D8D8D8", +"K c #6BA337", +"L c #B0CE96", +"M c #ADCD94", +"N c #A8CB90", +"O c #90BC74", +"P c #A1C78A", +"Q c #68A546", +"R c #358707", +"S c #ACACAC", +"T c #D4D4D4", +"U c #639F31", +"V c #8EBA6F", +"W c #89B86B", +"X c #85B666", +"Y c #80B361", +"Z c #82B567", +"` c #98C283", +" . c #5CA03C", +".. c #257F00", +"+. c #DBDBDB", +"@. c #5B9B29", +"#. c #A9CA90", +"$. c #A5C88D", +"%. c #A1C68A", +"&. c #9EC588", +"*. c #85B66A", +"=. c #97C282", +"-. c #66A548", +";. c #217D00", +">. c #CECECE", +",. c #529722", +"'. c #4A911C", +"). c #448F16", +"!. c #3C8B10", +"~. c #5E9F3A", +"{. c #96C180", +"]. c #62A346", +"^. c #217D03", +"/. c #A1A1A1", +"(. c #9F9F9F", +"_. c #ABABAB", +":. c #959595", +"<. c #2E8306", +"[. c #5FA143", +"}. c #207B01", +"|. c #1E7B03", +" ", +" . + @ # $ % ", +" & * = - ; > , ' ) ! ", +" . ~ { ] ] ] ] ] ] ^ / ( ", +" _ : { ] ] ] ] ] ] ^ < [ ", +" @ } | 1 2 ^ 3 4 5 6 7 8 ", +" 9 2 0 5 a b c 6 d e f g ", +" $ h i 7 j 7 ~ k l m n o ", +" p q < ~ r s 5 t u v w x ", +" y - | r z A B C D E F G ", +" H I j J K L M E N O P Q R ", +" S 4 5 T U M V W X Y Z ` ...", +" ( 5 - +.@.#.$.%.&.*.=.-.;. ", +" 8 >., ,.'.).!.~.{.].^. ", +" /.(./._.[ :.<.[.}. ", +" ;.|. "}; ADDED icons/memdb_new.xpm Index: icons/memdb_new.xpm ================================================================== --- icons/memdb_new.xpm +++ icons/memdb_new.xpm @@ -0,0 +1,156 @@ +/* XPM */ +static const char * memdb_new_xpm[] = { +"16 16 137 2", +" c None", +". c #BABABA", +"+ c #B8B8B8", +"@ c #B7B7B7", +"# c #B6B6B6", +"$ c #B4B4B4", +"% c #B3B3B3", +"& c #BBBBBB", +"* c #D0D0D0", +"= c #E8E8E8", +"- c #F3F3F3", +"; c #FDFDFD", +"> c #FCFCFC", +", c #EDEDED", +"' c #E0E0E0", +") c #C2C2C2", +"! c #ADADAD", +"~ c #E1E1E1", +"{ c #FEFEFE", +"] c #FFFFFF", +"^ c #FBFBFB", +"/ c #CFCFCF", +"( c #A9A9A9", +"_ c #EAC93D", +": c #E2C54C", +"< c #EACC55", +"[ c #EACA55", +"} c #E9C753", +"| c #E7C34E", +"1 c #E8C559", +"2 c #FCF7E8", +"3 c #EAEAEA", +"4 c #A7A7A7", +"5 c #F3DC73", +"6 c #F6E289", +"7 c #F4DE84", +"8 c #F3D981", +"9 c #F1D378", +"0 c #E8C14F", +"a c #F0DFAF", +"b c #F8F7F6", +"c c #E7E7E7", +"d c #D8D8D8", +"e c #C7C7C7", +"f c #E6E6E6", +"g c #A5A5A5", +"h c #E8C63B", +"i c #F8E793", +"j c #F4D85F", +"k c #F6E090", +"l c #F2D57C", +"m c #E9C352", +"n c #CFBD89", +"o c #CCCCCC", +"p c #C9C9C9", +"q c #B5B5B5", +"r c #C1C1C1", +"s c #E5E5E5", +"t c #A3A3A3", +"u c #E8C63A", +"v c #F1D86A", +"w c #F8E796", +"x c #F2CF47", +"y c #F4DC89", +"z c #E2B837", +"A c #E3D098", +"B c #E2E2E2", +"C c #CDCDCD", +"D c #E3E3E3", +"E c #A0A0A0", +"F c #E7C338", +"G c #F8E68F", +"H c #F7E38D", +"I c #F2D260", +"J c #F4D784", +"K c #E1B63A", +"L c #E0C47B", +"M c #DDC27D", +"N c #DFC179", +"O c #DCC183", +"P c #CBC4B6", +"Q c #BDBDBD", +"R c #BFBFBF", +"S c #9E9E9E", +"T c #E7C238", +"U c #F0D76D", +"V c #EFD267", +"W c #EDCF66", +"X c #F3D984", +"Y c #F4D788", +"Z c #F1CF7D", +"` c #E8BD58", +" . c #E6B852", +".. c #DAA425", +"+. c #D9C393", +"@. c #C5C2BD", +"#. c #9B9B9B", +"$. c #E4BC34", +"%. c #E3B831", +"&. c #E1B52F", +"*. c #DCB137", +"=. c #F0D07D", +"-. c #EDC76D", +";. c #E3B345", +">. c #D8B567", +",. c #DBD3C3", +"'. c #C0C0C0", +"). c #969696", +"!. c #DCAD2F", +"~. c #E7BC52", +"{. c #DBAC39", +"]. c #D6C192", +"^. c #D2D2D2", +"/. c #DBDBDB", +"(. c #D6D6D6", +"_. c #B0B0B0", +":. c #DEDEDE", +"<. c #909090", +"[. c #DEAD2A", +"}. c #E4B644", +"|. c #DCB863", +"1. c #F1EEE6", +"2. c #C4C4C4", +"3. c #8B8B8B", +"4. c #DCA927", +"5. c #C7A657", +"6. c #CECECE", +"7. c #F4F4F4", +"8. c #F5F5F5", +"9. c #EFEFEF", +"0. c #8A8A8A", +"a. c #A1A1A1", +"b. c #9F9F9F", +"c. c #ABABAB", +"d. c #959595", +"e. c #8D8D8D", +"f. c #898989", +" ", +" . + @ # $ % ", +" & * = - ; > , ' ) ! ", +" . ~ { ] ] ] ] ] ] ^ / ( ", +" _ : < [ } | 1 2 ] ] ^ 3 4 ", +" _ 5 6 7 8 9 0 a b c d e f g ", +" h i j k l m n o p q @ r s t ", +" u v w x y z A B f ~ C ) ) D E ", +" F G H I J K L M N O P Q R B S ", +"T U V W X Y Z ` ...+.@.+ & ~ #.", +" $.%.&.*.=.-.;.>.,.d '.% @ ' ).", +" !.~.{.].^./.(.R _.% :.<.", +" [.}.|.1./.^./.(.'.p f 2.3.", +" 4.5.g 6., 7.8.7.9.B . 0. ", +" a.b.a.c.4 d.e.f. ", +" "}; ADDED icons/memdb_save.xpm Index: icons/memdb_save.xpm ================================================================== --- icons/memdb_save.xpm +++ icons/memdb_save.xpm @@ -0,0 +1,177 @@ +/* XPM */ +static const char * memdb_save_xpm[] = { +"16 16 158 2", +" c None", +". c #BABABA", +"+ c #B8B8B8", +"@ c #B7B7B7", +"# c #B6B6B6", +"$ c #B4B4B4", +"% c #B3B3B3", +"& c #BBBBBB", +"* c #D0D0D0", +"= c #E8E8E8", +"- c #F3F3F3", +"; c #FDFDFD", +"> c #FCFCFC", +", c #EDEDED", +"' c #E0E0E0", +") c #C2C2C2", +"! c #ADADAD", +"~ c #E1E1E1", +"{ c #FEFEFE", +"] c #FFFFFF", +"^ c #FBFBFB", +"/ c #CFCFCF", +"( c #A9A9A9", +"_ c #B9B9B9", +": c #F8F8F8", +"< c #EAEAEA", +"[ c #A7A7A7", +"} c #F7F7F7", +"| c #E7E7E7", +"1 c #EFEFEF", +"2 c #F6F6F6", +"3 c #FAFAFA", +"4 c #F0F0F0", +"5 c #DEDEDE", +"6 c #C3C3C3", +"7 c #E6E6E6", +"8 c #A5A5A5", +"9 c #B5B5B5", +"0 c #EBEBEB", +"a c #D6D6D6", +"b c #D5D5D5", +"c c #D1D1D1", +"d c #BCBCBC", +"e c #C0C0C0", +"f c #E5E5E5", +"g c #A3A3A3", +"h c #F5F5F5", +"i c #EEEEEE", +"j c #E2E2E2", +"k c #6E97D4", +"l c #7B9ED4", +"m c #7198D0", +"n c #82A4D6", +"o c #688ECD", +"p c #6990CD", +"q c #759AD0", +"r c #7399D1", +"s c #628BC8", +"t c #B2B2B2", +"u c #F4F4F4", +"v c #DDDDDD", +"w c #E3E3E3", +"x c #658DCC", +"y c #B0CDF3", +"z c #B3C7E3", +"A c #A1BFEA", +"B c #6089C9", +"C c #B0B0B0", +"D c #D9D9D9", +"E c #5B86C7", +"F c #9EC0EF", +"G c #6E93CC", +"H c #F7FBFF", +"I c #F1F8FF", +"J c #8CAFE4", +"K c #618AC7", +"L c #AEAEAE", +"M c #F2F2F2", +"N c #D8D8D8", +"O c #DCDCDC", +"P c #5D88C8", +"Q c #A1BFEF", +"R c #FAFCFD", +"S c #FBFCFE", +"T c #FDFDFE", +"U c #FCFDFE", +"V c #FAFBFD", +"W c #FBFCFD", +"X c #85A8DD", +"Y c #537FC1", +"Z c #ACACAC", +"` c #D4D4D4", +" . c #D2D2D2", +".. c #DBDBDB", +"+. c #658DCA", +"@. c #99B8EA", +"#. c #7EA5DD", +"$. c #80A6DD", +"%. c #7CA3DB", +"&. c #7AA0D9", +"*. c #79A0D9", +"=. c #789FD8", +"-. c #789ED8", +";. c #5D84BF", +">. c #618BC9", +",. c #92B5E6", +"'. c #81A7E2", +"). c #81A7E1", +"!. c #7DA3DE", +"~. c #7BA1DC", +"{. c #799FDB", +"]. c #779ED9", +"^. c #739AD4", +"/. c #577EBB", +"(. c #CECECE", +"_. c #5481C4", +":. c #97B6EA", +"<. c #EAF3F3", +"[. c #E6F1ED", +"}. c #E6F1EF", +"|. c #E6F0EF", +"1. c #E5F1ED", +"2. c #EDF5F3", +"3. c #799CD5", +"4. c #4470B0", +"5. c #A1A1A1", +"6. c #9F9F9F", +"7. c #ABABAB", +"8. c #517FC3", +"9. c #9AB6EF", +"0. c #E8F3EA", +"a. c #84BF51", +"b. c #98C96F", +"c. c #99C971", +"d. c #84BF54", +"e. c #E9F4E4", +"f. c #7B9CDD", +"g. c #3A69AA", +"h. c #5583C6", +"i. c #BACEEF", +"j. c #FFFFDD", +"k. c #C7EE87", +"l. c #D7F4A2", +"m. c #D7F6A2", +"n. c #C7EE8C", +"o. c #FFFFE0", +"p. c #85A2DD", +"q. c #3E6AAB", +"r. c #3368BA", +"s. c #5884C3", +"t. c #688BD3", +"u. c #708FE1", +"v. c #6C8DDC", +"w. c #6D8BDA", +"x. c #6E8AD7", +"y. c #6C8BCD", +"z. c #446DAB", +"A. c #2E5FA6", +" . + @ # $ % ", +" & * = - ; > , ' ) ! ", +". ~ { ] ] ] ] ] ] ^ / ( ", +"_ : { ] ] ] ] ] ] ^ < [ ", +"@ } | 1 2 ^ 3 4 5 6 7 8 ", +"9 2 0 5 a b c 6 d e f g ", +"$ h i 7 j 7 k l m n o p q r s ", +"t u < ~ v w x y ] z ] ] ] ] A B ", +"C - | v D ' E F ] G ] ] H I J K ", +"L M j N b O P Q R S T U V W X Y ", +"Z 4 5 ` ...+.@.#.$.%.&.*.=.-.;.", +"( 5 - .. ...>.,.'.).!.~.{.].^./.", +" 8 (., u h _.:.<.[.}.|.1.2.3.4.", +" 5.6.5.7.8.9.0.a.b.c.d.e.f.g.", +" h.i.j.k.l.m.n.o.p.q.", +" r.s.t.u.v.w.x.y.z.A."}; ADDED icons/network.xpm Index: icons/network.xpm ================================================================== --- icons/network.xpm +++ icons/network.xpm @@ -0,0 +1,56 @@ +/* XPM */ +static const char * network_xpm[] = { +"16 16 37 1", +" c None", +". c #707070", +"+ c #C5C5C5", +"@ c #A8A8A8", +"# c #9A9A9A", +"$ c #D1D1D1", +"% c #737373", +"& c #A4A4A4", +"* c #979797", +"= c #A0A0A0", +"- c #D5D5D5", +"; c #989898", +"> c #777777", +", c #C7C7C7", +"' c #A2A2A2", +") c #8D8D8D", +"! c #9B9B9B", +"~ c #A1A1A1", +"{ c #7F7F7F", +"] c #8A8A8A", +"^ c #949494", +"/ c #A7A7A7", +"( c #909090", +"_ c #939393", +": c #A3A3A3", +"< c #7B7B7B", +"[ c #A5A5A5", +"} c #9D9D9D", +"| c #7D7D7D", +"1 c #9F9F9F", +"2 c #848484", +"3 c #727272", +"4 c #7E7E7E", +"5 c #858585", +"6 c #9E9E9E", +"7 c #DADADA", +"8 c #FFFFFF", +" ", +" ", +" 888888 ", +" 8@/[&~=8 ", +" 8@87-$,+!8 ", +"888@8&=1#;;+^888", +"866666:88*666668", +"8777775 {777778", +"855555#88%.....8", +"888'8*(]24<+>888", +" 8}87-$,+38 ", +" 8_)5|>%8 ", +" 888888 ", +" ", +" ", +" "}; ADDED indent_me Index: indent_me ================================================================== --- indent_me +++ indent_me @@ -0,0 +1,2 @@ +indent -npsl -nbfda -l80 -i2 -ci2 -cbi2 -cp2 -ts2 -cli2 -bl -ce -lp -npcs -nut *.h *.cpp + ADDED mac_resource/wxmac.icns Index: mac_resource/wxmac.icns ================================================================== --- mac_resource/wxmac.icns +++ mac_resource/wxmac.icns cannot compute difference between binary files Index: win_resource/icon.ico ================================================================== --- win_resource/icon.ico +++ win_resource/icon.ico cannot compute difference between binary files ADDED win_resource/spatialite-icon.png Index: win_resource/spatialite-icon.png ================================================================== --- win_resource/spatialite-icon.png +++ win_resource/spatialite-icon.png cannot compute difference between binary files