<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parseGeometry(self, geometry):
 """ A factory method for creating objects of the correct OpenGIS type. """


        self.coordinates = []
        self.index = []
        self.position = 0
        self.lastX = 0 
        self.lastY = 0
        self.isPoly = False
        self.isPoint = True;
        self.dropped = 0;
        self.first = True
        # Used for exception strings
        self._current_string = geometry
        
        reader = _ExtendedUnPacker(geometry)
                
        # Start the parsing
        self._dispatchNextType(reader)